
*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:Inter,"Noto Sans TC",system-ui,-apple-system,"Segoe UI",sans-serif;color:#211d29;background:#fafafe;overflow:hidden}
button,input,select{font:inherit}.app{height:100vh;display:flex}.side{width:330px;background:#fff;border-right:1px solid #e9e6ef;display:flex;flex-direction:column;transition:width .2s ease;position:relative;z-index:10}.side.small{width:72px}
.brand{height:76px;display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid #f0edf4}.brand img{width:35px;height:35px;border-radius:10px;object-fit:cover}.brand b{font-size:19px}.brand small{display:block;color:#8b8596;font-size:11px;margin-top:2px}
.side.small .brand-text,.side.small .txt,.side.small .new span,.side.small .group-label,.side.small .profile-text,.side.small .profile-arrow{display:none}.collapse{margin-left:auto;border:1px solid #ece7f3;background:#f7f4fd;border-radius:10px;width:34px;height:34px;cursor:pointer;font-size:20px}.side.small .collapse{position:absolute;right:-17px;top:20px;background:#fff;box-shadow:0 6px 18px rgba(34,20,66,.12)}
.new{margin:14px 12px 8px;border:0;border-radius:12px;background:#693ae8;color:#fff;padding:12px 14px;font-weight:800;cursor:pointer;text-align:left;display:flex;gap:8px;align-items:center}.nav{padding:4px 9px;overflow:auto}.group{margin:3px 0}.group-head{width:100%;border:0;background:transparent;display:flex;justify-content:space-between;align-items:center;color:#7f788d;padding:8px 10px 5px;font-size:12px;cursor:pointer}.group.closed .group-body{display:none}.group.closed .chev{transform:rotate(-90deg)}.chev{transition:.15s}
.item{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:10px;margin:2px 0;cursor:pointer;text-align:left;color:#30293d;font-size:15px}.item:hover,.item.active{background:#f0eaff;color:#5b32d7}.item:focus{outline:none}.item:focus-visible{box-shadow:0 0 0 2px rgba(105,58,232,.28)}.ico{width:24px;text-align:center;font-size:16px;flex:none}.collab-nav-icon{width:24px;height:24px;display:block;object-fit:contain;filter:saturate(.92)}
.profile-wrap{margin-top:auto;position:relative;padding:10px;border-top:1px solid #f0edf4}.profile-card{width:100%;border:0;background:#faf9fd;border-radius:12px;padding:8px;display:flex;align-items:center;gap:9px;cursor:pointer;text-align:left}.avatar-sm{width:38px;height:38px;border-radius:50%;object-fit:cover;background:#eee}.profile-text{min-width:0;flex:1}.profile-text b,.profile-text small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-text small{color:#8b8596;font-size:11px;margin-top:2px}.profile-menu{position:absolute;left:10px;right:10px;bottom:72px;background:#fff;border:1px solid #e4deeb;border-radius:13px;padding:7px;box-shadow:0 16px 42px rgba(44,27,75,.16);display:none}.profile-wrap.open .profile-menu{display:block}.profile-menu button{width:100%;border:0;background:transparent;border-radius:9px;padding:10px;text-align:left;cursor:pointer;display:flex;align-items:center;gap:10px}.profile-menu button:hover{background:#f4f0fd}.profile-menu-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;color:#706985;flex:none}.profile-menu-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative;overflow:hidden}.top{height:76px;background:#fff;border-bottom:1px solid #ebe8f0;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:relative;z-index:5}.top .title b{font-size:18px}.top .title div{font-size:12px;color:#928b9f;margin-top:4px}.top-actions{display:flex;gap:9px;align-items:center}.pill{border:1px solid #e1dbea;background:#fff;border-radius:12px;padding:9px 12px;cursor:pointer;min-width:108px;text-align:center}
.workspace{position:relative;flex:1;overflow:auto;padding:28px 28px 140px;background:linear-gradient(#fbfaff,#fafafe)}.panel{max-width:830px;margin:58px auto 0}.hero{background:#fff;border:1px solid #ece7f3;border-radius:19px;padding:26px;box-shadow:0 12px 34px rgba(45,28,78,.06)}.hero-head{display:flex;align-items:center;gap:14px}.hero-head img{width:44px}.hero h1{font-size:24px;margin:0}.hero p{color:#7b7487;margin:7px 0 0;font-size:14px}.status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:22px}.status-card{border:1px solid #ece7f3;border-radius:13px;padding:15px;background:#fcfbff}.status-card b{display:block;font-size:13px}.status-card span{display:block;margin-top:7px;color:#8c8596;font-size:12px}
.module-view{max-width:960px;margin:22px auto 0}.module-card{background:#fff;border:1px solid #ece7f3;border-radius:16px;padding:20px}.module-card h2{margin:0 0 8px;font-size:20px}.module-card p{margin:0;color:#7f788a}.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.chip{background:#f4efff;border:1px solid #e5dbff;color:#5e38c8;padding:7px 10px;border-radius:999px;font-size:12px}
.composer{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:24;width:min(820px,calc(100% - 52px));background:#fff;border:1px solid #ddd7e6;border-radius:18px;padding:8px 10px;display:flex;align-items:center;gap:8px;box-shadow:0 9px 26px rgba(34,19,62,.09)}.round{border:0;width:42px;height:42px;border-radius:12px;background:#f5f1fb;cursor:pointer;font-size:19px}.mic{font-size:20px}.mic.on{background:#efe7ff;box-shadow:inset 0 0 0 2px #754cf0}.input{flex:1;border:0;outline:0;font-size:15px;padding:8px;min-width:0}.send{background:#693ae8;color:#fff}
.menu{position:absolute;bottom:76px;left:0;background:#fff;border:1px solid #e1dbea;border-radius:14px;padding:7px;width:224px;box-shadow:0 12px 36px rgba(27,16,53,.14);display:none}.menu.show{display:block}.menu button{width:100%;border:0;background:transparent;padding:10px;border-radius:9px;cursor:pointer;text-align:left;font-size:14px}.menu button:hover{background:#f4f0fd}
.attachment-tray{display:none;align-items:center;gap:6px;max-width:38%;min-width:0;overflow:hidden}.attachment-tray.show{display:flex}.attachment-chip{display:flex;align-items:center;gap:6px;min-width:0;max-width:190px;border:1px solid #e2daf0;background:#f7f3ff;color:#49396b;border-radius:10px;padding:6px 8px;font-size:12px}.attachment-chip .attachment-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip img{width:24px;height:24px;border-radius:6px;object-fit:cover;flex:none}.attachment-chip button{border:0;background:transparent;color:#786d8e;cursor:pointer;padding:0;font-size:15px;line-height:1}.composer.code-mode{box-shadow:0 0 0 2px rgba(105,58,232,.18),0 9px 26px rgba(34,19,62,.09)}.composer.code-mode .input{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}
.modal-bg,.info-modal-bg{position:fixed;inset:0;background:rgba(22,17,31,.3);display:none;align-items:center;justify-content:center;padding:22px;z-index:140}.modal-bg.show,.info-modal-bg.show{display:flex}.modal{background:#fff;width:min(930px,96vw);height:min(680px,92vh);border-radius:18px;display:flex;overflow:hidden;box-shadow:0 25px 70px rgba(18,10,40,.22)}.tabs{width:225px;border-right:1px solid #eeeaf4;padding:18px}.tab{padding:11px 12px;border-radius:9px;margin:2px 0;cursor:pointer}.tab.active{background:#f0eaff;color:#5c32d9}.settings{padding:28px;flex:1;overflow:auto}.settings h2{margin-top:0}.setting-row{padding:14px 0;border-bottom:1px solid #eeeaf4;display:flex;justify-content:space-between;align-items:center;gap:20px}.setting-row.stack{align-items:flex-start;flex-direction:column}.setting-row label{font-weight:600}.setting-control{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.setting-control input,.setting-control select,.form-grid input,.form-grid select{border:1px solid #ddd7e6;border-radius:10px;padding:9px 10px;background:#fff;min-width:160px}.setting-control input[type=range]{min-width:180px}.close{float:right;border:0;background:#f3eff8;border-radius:9px;width:34px;height:34px;cursor:pointer}
.info-modal{position:relative;background:#fff;width:min(700px,94vw);max-height:86vh;overflow:auto;border-radius:18px;padding:28px;box-shadow:0 25px 70px rgba(18,10,40,.22)}.info-modal .close{position:absolute;right:18px;top:18px}.info-modal h2{margin:0 45px 10px 0}.info-modal p{line-height:1.7;color:#615a6c}.info-box{background:#faf8ff;border:1px solid #ece6f5;border-radius:12px;padding:14px;margin-top:12px}.share-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:16px}.share-actions button,.primary,.secondary{border:0;border-radius:10px;padding:10px 14px;cursor:pointer}.primary{background:#693ae8;color:#fff}.secondary{background:#f2edfb;color:#46365e}.line-btn{background:#06c755!important;color:white!important}.share-row{display:flex;gap:8px;margin-top:14px}.share-row input{flex:1;min-width:0;border:1px solid #ddd7e6;border-radius:10px;padding:10px}
.global-hub{position:fixed;right:48px;top:88px;z-index:80;user-select:none;touch-action:none;max-width:calc(100vw - 12px)}
.global-launch-shell{height:44px;display:flex;align-items:stretch;border-radius:15px;background:linear-gradient(135deg,#7f43f4,#5b27cf);box-shadow:0 10px 26px rgba(83,42,170,.23),inset 0 1px 0 rgba(255,255,255,.28);border:1px solid rgba(107,61,211,.5);overflow:hidden;transition:width .2s ease,box-shadow .2s ease,transform .2s ease;width:172px}
.global-launch-shell:hover{box-shadow:0 13px 32px rgba(83,42,170,.28),inset 0 1px 0 rgba(255,255,255,.32)}
.global-launch{height:44px;min-width:0;flex:1;border:0;background:transparent;color:#fff;display:flex;align-items:center;gap:8px;padding:0 8px;cursor:grab;text-align:left;white-space:nowrap;overflow:hidden}.global-launch:active{cursor:grabbing}
.global-logo{width:32px;height:32px;border-radius:10px;overflow:hidden;display:block;flex:none;background:#6b38df;box-shadow:0 2px 7px rgba(31,13,82,.2)}.global-logo img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none;-webkit-user-drag:none}.global-launch b{font-size:13px;line-height:1;font-weight:800;overflow:hidden;text-overflow:ellipsis}.global-collapse{width:44px;flex:none;border:0;border-left:1px solid rgba(255,255,255,.22);background:rgba(35,10,94,.08);color:#fff;font-size:19px;cursor:pointer;transition:background .15s ease}.global-collapse:hover{background:rgba(35,10,94,.18)}
.global-hub.compact .global-launch-shell{width:44px;border-radius:14px;background:#6b38df;border:0;box-shadow:0 8px 20px rgba(86,42,179,.28);overflow:hidden}.global-hub.compact .global-launch-shell:hover{box-shadow:0 10px 24px rgba(86,42,179,.32)}.global-hub.compact .global-launch{padding:6px;justify-content:center;background:#6b38df}.global-hub.compact .global-launch b,.global-hub.compact .global-collapse{display:none}.global-hub.compact .global-logo{width:32px;height:32px;border-radius:9px;background:#6b38df;box-shadow:none}.global-hub.compact .global-logo img{border-radius:9px;background:#6b38df}.global-hub.compact.open .global-menu{display:none}
.global-menu{position:absolute;right:0;top:52px;width:244px;background:rgba(255,255,255,.985);border:1px solid #e5dff0;border-radius:16px;padding:7px;box-shadow:0 18px 48px rgba(44,27,75,.17);display:none;backdrop-filter:blur(16px);max-height:min(520px,calc(100vh - 150px));overflow:auto}.global-hub.open:not(.compact) .global-menu{display:block}.gitem{width:100%;border:0;background:transparent;padding:8px 9px;border-radius:11px;text-align:left;cursor:pointer;display:flex;align-items:center;gap:9px;color:#211d29}.gitem:hover{background:#f4f0fd}.gitem span:last-child{min-width:0}.gitem b{font-size:13px}.gitem small{font-size:10.5px;color:#857d91}.gico{width:30px;height:30px;border-radius:9px;background:linear-gradient(145deg,#f6f1ff,#ece3ff);display:flex;align-items:center;justify-content:center;color:#623bd1;font-weight:800;flex:none;box-shadow:inset 0 0 0 1px rgba(101,61,205,.08)}.gico svg{width:18px;height:18px;fill:none;stroke:#6b38df;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.gico svg circle{fill:none}.gico svg circle[r="1"]{fill:#6b38df;stroke:none}
.lang-wrap{position:relative}.lang-menu{position:absolute;right:0;top:48px;width:260px;max-height:420px;overflow:auto;background:#fff;border:1px solid #e4deeb;border-radius:14px;padding:8px;box-shadow:0 16px 42px rgba(44,27,75,.16);display:none;z-index:95}.lang-wrap.open .lang-menu{display:block}.lang-option{width:100%;border:0;background:transparent;border-radius:9px;padding:9px 10px;text-align:left;cursor:pointer;display:flex;justify-content:space-between;gap:10px}.lang-option:hover,.lang-option.active{background:#f2edff;color:#5f38cf}.lang-option small{color:#938b9f}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid .full{grid-column:1/-1}.field label{display:block;font-size:12px;color:#766e81;margin-bottom:5px}.field input,.field select{width:100%;min-width:0}.avatar-editor{display:flex;align-items:center;gap:14px;margin:10px 0 18px}.avatar-lg{width:76px;height:76px;border-radius:50%;object-fit:cover;background:#eee;border:1px solid #e0dae8}.password-wrap{position:relative}.password-wrap input{padding-right:40px;width:100%}.eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;font-size:17px}.section-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.plan-card{border:1px solid #e8e2ef;border-radius:14px;padding:16px;margin-top:10px}.plan-card b{display:block}.plan-card small{color:#8a8296}.toast{position:fixed;right:18px;bottom:16px;background:#19151f;color:#fff;border-radius:10px;padding:9px 12px;font-size:12px;opacity:0;transform:translateY(8px);transition:.18s;z-index:200}.toast.show{opacity:.92;transform:none}.preview-note{position:fixed;left:50%;bottom:4px;transform:translateX(-50%);font-size:10px;color:#aaa2b4;z-index:1}
[dir=rtl] .item,[dir=rtl] .group-head,[dir=rtl] .profile-card,[dir=rtl] .gitem,[dir=rtl] .tab{text-align:right}
@media(max-width:820px){.side{width:72px}.brand-text,.txt,.new span,.group-label,.profile-text,.profile-arrow{display:none}.collapse{position:absolute;right:-17px;top:20px}.top{padding:0 12px}.top .title div{display:none}.top-actions .pill:first-child{display:none}.panel{margin-top:32px}.status-grid{grid-template-columns:1fr}.global-hub{right:14px;top:82px}.global-launch-shell{width:154px;height:42px}.global-launch{height:42px}.global-collapse{width:32px}.global-hub.compact .global-launch-shell{width:42px;height:42px}.global-hub.compact .global-logo{width:30px;height:30px}.global-menu{right:0;width:min(226px,calc(100vw - 18px));top:49px}.modal{height:92vh}.tabs{width:150px;padding:10px}.settings{padding:18px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.share-actions{grid-template-columns:1fr}}

.module-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.collab-card{max-width:980px}.collab-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.collab-section{border:1px solid #ebe5f2;border-radius:14px;padding:14px;background:#fff}.collab-section h3{margin:0 0 10px}.collab-section small{display:block;color:#8b8396;margin-top:8px}.member-list{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.member-chip{border:1px solid #e0d8ea;border-radius:999px;padding:7px 10px;background:#faf8fd;display:inline-flex;align-items:center;gap:6px}.member-avatar-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;color:#746d8c;flex:none}.member-avatar-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.member-chip.ai{background:#f2edff;color:#5f38cf}.ai-member-icon{font-size:17px;line-height:1;color:#6b38df}.collab-room{border:1px solid #e5deed;border-radius:16px;background:#fff;overflow:hidden}.collab-room-title{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #eee8f4}.collab-room-title span{color:#8a8295;font-size:12px}.mock-thread{min-height:140px;padding:16px;background:#fcfbfd}.bubble{max-width:72%;padding:9px 11px;border-radius:12px;margin-bottom:10px;background:#f0edf4}.bubble.me{margin-left:auto;background:#eee8ff}.bubble.ai{background:#f7f4fb}.mini-composer{display:flex;gap:8px;padding:10px;border-top:1px solid #eee8f4}.mini-composer input{flex:1}.download-card{display:flex;justify-content:space-between;align-items:center;gap:14px}.download-card div{min-width:0}
@media(max-width:820px){.module-head{flex-direction:column}.collab-grid{grid-template-columns:1fr}.bubble{max-width:92%}.download-card{align-items:flex-start;flex-direction:column}}

@media(max-width:620px){.attachment-tray{max-width:32%}.attachment-chip{max-width:110px;padding:5px 6px}.attachment-chip img{width:22px;height:22px}}

/* V9.5 shell-composer isolation */
@media(max-width:820px){.workspace{padding-bottom:132px}.composer{bottom:max(14px,env(safe-area-inset-bottom));width:min(820px,calc(100% - 24px))}}


/* V9.6 Help / account menu */
.profile-menu{overflow:visible}
.profile-menu-separator{height:1px;background:#eee9f4;margin:5px 3px}
.menu-glyph{font-size:16px;color:#6d6580;font-weight:700}
.has-submenu .menu-chevron{margin-left:auto;color:#8a8394;font-size:19px;line-height:1}
.logout-item{color:#7b3344}
.logout-item .profile-menu-icon{color:#9a3f55}
.profile-help-menu{position:absolute;left:calc(100% + 8px);bottom:0;width:238px;background:#fff;border:1px solid #e4deeb;border-radius:13px;padding:7px;box-shadow:0 18px 46px rgba(44,27,75,.17);display:none;z-index:4}
.profile-wrap.help-open .profile-help-menu{display:block}
.profile-help-menu button{font-size:14px}
.help-menu-icon{width:22px;height:22px;border:1px solid #ddd6e8;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;color:#625a72;font-size:12px;flex:none;background:#faf8fd}
.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.help-card{border:1px solid #e8e1f1;border-radius:14px;padding:14px;display:flex;gap:11px;align-items:flex-start;background:#fcfbff}.help-card-icon{width:30px;height:30px;border-radius:9px;background:#f0e9ff;color:#6738df;display:inline-flex;align-items:center;justify-content:center;font-weight:800;flex:none}.help-card b{display:block}.help-card p{font-size:13px;margin:5px 0 0;line-height:1.55}
.release-badge{display:inline-block;background:#eee8ff;color:#5e36ca;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700;margin:4px 0 8px}
.shortcut-list{margin-top:14px}.shortcut-list>div{display:flex;justify-content:space-between;gap:18px;align-items:center;border-bottom:1px solid #eee9f3;padding:12px 0}.shortcut-list kbd{display:inline-block;border:1px solid #d9d3e2;background:#faf9fc;border-bottom-width:2px;border-radius:7px;padding:4px 7px;min-width:28px;text-align:center;font-family:inherit;font-size:12px}.shortcut-list b{font-size:14px}
.draft-warning{background:#fff8e8;border:1px solid #f0dfb7;color:#775d21!important;padding:11px 12px;border-radius:11px}.legal-section{padding:12px 0;border-bottom:1px solid #eee9f3}.legal-section b{display:block}.legal-section p{margin:5px 0 0!important;font-size:13px}
.bug-form textarea{width:100%;resize:vertical;border:1px solid #ddd7e6;border-radius:10px;padding:9px 10px;background:#fff;font:inherit}.danger-primary{background:#a63d55}
@media(max-width:820px){.profile-help-menu{left:72px;bottom:0;width:min(238px,calc(100vw - 92px))}.help-grid{grid-template-columns:1fr}}

/* V9.7 Settings Center Expanded */
.settings-tabs{width:260px;overflow:auto;padding:14px 12px}
.settings-tabs .tab{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 12px}
.tab-ico{width:24px;height:24px;border:1px solid #e3ddef;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;color:#5e5570;background:#fff;flex:0 0 auto}
.settings-tabs .tab.active .tab-ico{border-color:#cfc0f6;background:#f7f3ff;color:#6336df}
.setting-label{display:flex;flex-direction:column;gap:4px;min-width:180px}
.setting-label small,.connector-row small,.usage-head small{color:#8b8397;line-height:1.45}
.setting-control.wide{width:100%;align-items:stretch}
.setting-control textarea{width:min(520px,100%);border:1px solid #ddd7e6;border-radius:12px;padding:11px 12px;resize:vertical;font:inherit}
.switch{position:relative;display:inline-flex;width:44px;height:26px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch span{position:absolute;inset:0;border-radius:999px;background:#ddd9e3;transition:.18s;box-shadow:inset 0 0 0 1px rgba(0,0,0,.03)}
.switch span:after{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:.18s}
.switch input:checked+span{background:#6b38df}
.switch input:checked+span:after{transform:translateX(18px)}
.api-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#f4f0fb;color:#6b5a7a;font-size:12px;white-space:nowrap}
.settings-note{margin:18px 0 0;color:#81788d;font-size:13px;line-height:1.6}
.settings-callout{background:#faf8ff;border:1px solid #ece5f8;border-radius:14px;padding:16px 18px;margin:4px 0 14px}
.settings-callout p{margin:6px 0 0;color:#6f667a;line-height:1.55}
.settings-section-title{font-size:18px;font-weight:700;margin:24px 0 4px;padding-bottom:10px;border-bottom:1px solid #eeeaf4}
.connector-list{display:flex;flex-direction:column}
.connector-row{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:15px 0;border-bottom:1px solid #eeeaf4}
.connector-row>div:first-child{display:flex;flex-direction:column;gap:4px}
.connector-row>div:last-child{display:flex;align-items:center;gap:8px}
.accent-dot{width:14px;height:14px;border-radius:50%;background:#6b38df;display:inline-block}
.usage-head,.storage-summary{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:8px 0 10px}
.usage-head>div{display:flex;flex-direction:column;gap:4px}
.usage-head strong,.storage-summary strong{font-size:22px}
.usage-bar{height:10px;border-radius:999px;background:#eeeaf3;overflow:hidden;margin-bottom:16px}
.usage-bar span{display:block;height:100%;background:#6b38df;border-radius:999px}
.danger-outline{color:#d13a56!important;background:#fff5f7!important;border:1px solid #ffd5dd!important}
.trusted-list{display:flex;flex-direction:column;gap:8px;margin:8px 0 14px}
.trusted-item{display:flex;justify-content:space-between;align-items:center;border:1px solid #eee8f4;border-radius:12px;padding:10px 12px}
.settings-shortcuts{margin-top:4px}
@media(max-width:820px){
  .modal{width:96vw}
  .settings-tabs{width:132px;padding:8px 6px}
  .settings-tabs .tab{gap:7px;padding:9px 8px;font-size:13px}
  .tab-ico{width:21px;height:21px;border-radius:7px}
  .setting-row{align-items:flex-start;flex-direction:column;gap:8px}
  .setting-label{min-width:0}
  .setting-control{width:100%;justify-content:flex-start}
  .connector-row{align-items:flex-start;flex-direction:column}
}

/* V9.8 Country/Locale Router + AI Persona */
.phone-field{display:flex;align-items:center;border:1px solid #ddd7e6;border-radius:10px;background:#fff;overflow:hidden;min-height:42px}
.phone-field .dial-prefix{padding:9px 11px;background:#f7f3ff;color:#5f35d5;font-weight:700;border-right:1px solid #e6def3;white-space:nowrap}
.phone-field input{border:0!important;min-width:0!important;flex:1;outline:0}
.field-hint{display:block;margin-top:6px;color:#8b8397;font-size:12px;line-height:1.4}
.inline-switch{display:inline-flex;width:max-content;margin-top:3px}
.country-router-card{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:14px 0 4px;padding:13px 15px;border:1px solid #e8e0f5;background:#fbf9ff;border-radius:13px}
.country-router-card div{display:flex;flex-direction:column;gap:4px}.country-router-card small{color:#81788d}
.persona-callout{background:linear-gradient(135deg,#fbf8ff,#fff9fc)}
.persona-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 16px}
.persona-mode-card{position:relative;display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;text-align:left;border:1px solid #e5dff0;background:#fff;border-radius:14px;padding:13px 14px;cursor:pointer;font:inherit;color:#21192c;transition:.16s ease}
.persona-mode-card:hover{border-color:#cdbcf3;box-shadow:0 8px 22px rgba(84,53,155,.08);transform:translateY(-1px)}
.persona-mode-card.active{border-color:#7540e8;background:#f7f2ff;box-shadow:inset 0 0 0 1px #7540e8}
.persona-mode-card.premium{background:linear-gradient(135deg,#fff,#fff8fc)}
.persona-mode-icon{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#f1ebff;color:#6b38df;font-size:20px;font-weight:700}
.persona-mode-card span:nth-child(2){display:flex;flex-direction:column;gap:3px}.persona-mode-card small{color:#82798d;line-height:1.35}
.persona-mode-card em{font-style:normal;font-size:11px;padding:4px 7px;border-radius:999px;background:#fff0f6;color:#bd3978;white-space:nowrap}.persona-mode-card em.free{background:#f1f7f3;color:#3f7a55}
.premium-hint{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:11px 0 0;border-top:1px solid #eeeaf4}.premium-hint span{margin-right:auto;color:#746b80}
.paywall-box{margin:12px 0;padding:16px;border-radius:14px;border:1px solid #eadff8;background:#faf7ff}.paywall-box p{margin:6px 0 0;color:#71667d;line-height:1.55}
@media(max-width:760px){.persona-mode-grid{grid-template-columns:1fr}.persona-mode-card{grid-template-columns:36px 1fr}.persona-mode-card em{grid-column:2;justify-self:start}.country-router-card{align-items:flex-start;flex-direction:column}.phone-field{width:100%}}


/* V9.10 membership / points popup */
.member-summary-box{border:1px solid #e8e2ef;border-radius:14px;overflow:hidden;margin:12px 0 14px}.member-summary-row{display:flex;justify-content:space-between;gap:18px;padding:12px 14px;border-bottom:1px solid #eeeaf4}.member-summary-row:last-child{border-bottom:0}.member-summary-row span{color:#665d71}.member-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.member-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}.member-plan-card{border:1px solid #e8e2ef;border-radius:14px;padding:14px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.member-plan-card.active{border-color:#8a65ed;background:#fbf9ff}.member-plan-card b,.member-plan-card small{display:block}.member-plan-card small{margin-top:5px;color:#81788d}.member-plan-status{font-size:12px;padding:4px 8px;border-radius:999px;background:#f1ebff;color:#5f38d8;white-space:nowrap}.points-headline{margin:10px 0 12px}.points-headline b,.points-headline small{display:block}.points-headline small{color:#81788d;margin-top:4px}.points-package-list{display:grid;gap:8px;margin-bottom:14px}.points-package{border:1px solid #e8e2ef;background:#fff;border-radius:12px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.points-package:hover{border-color:#9b7cf0;background:#fbf9ff}.points-package span:last-child{text-align:right}.points-package b,.points-package small{display:block}.points-package small{color:#81788d;margin-top:3px}@media(max-width:620px){.member-plan-grid,.member-link-grid{grid-template-columns:1fr}}


/* V9.12: AOS-owned multilingual file picker + share rewards */
.native-file-hidden{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
.aos-file-picker{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.compact-file-button{padding:8px 12px!important;min-height:38px}
.file-name-status{color:var(--muted,#766f86);font-size:14px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.share-reward-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;margin:14px 0;border:1px solid #e8defb;border-radius:18px;background:linear-gradient(135deg,#faf7ff,#f1e9ff)}
.share-reward-card div:first-child{display:flex;flex-direction:column;gap:4px}.share-reward-card small,.reward-rule-grid small{color:#827793}.share-reward-card b{font-size:24px;color:#5f2bd9}.share-reward-card span{color:#6f667d}.reward-icon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#6d28d9;color:#fff;font-size:24px;box-shadow:0 8px 22px rgba(109,40,217,.22)}
.reward-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 18px}.reward-rule-grid>div{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #eee7fb;border-radius:14px;background:#fff}
@media(max-width:700px){.reward-rule-grid{grid-template-columns:1fr}.file-name-status{max-width:180px}}

/* V5.28.4 real AI / skill / microphone additions */
.chat-thread{width:min(900px,94%);margin:18px auto 120px;display:flex;flex-direction:column;gap:14px}.chat-msg{display:flex;gap:10px;align-items:flex-start}.chat-msg.user{justify-content:flex-end}.chat-bubble{max-width:min(760px,86%);padding:12px 14px;border-radius:16px;border:1px solid #e6e0ef;background:#fff;white-space:pre-wrap;line-height:1.55;box-shadow:0 3px 12px rgba(30,20,50,.04)}.chat-msg.user .chat-bubble{background:#6d3ee8;color:#fff;border-color:#6d3ee8}.chat-msg.ai .chat-bubble{border-bottom-left-radius:6px}.chat-meta{font-size:11px;color:#8f879d;margin-top:5px}.chat-msg.user .chat-meta{color:#e9dcff}.ai-working{opacity:.72}.skill-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.skill-search{width:100%;padding:11px 12px;border:1px solid #ded7e8;border-radius:12px;font:inherit}.skill-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;margin-top:12px}.skill-card{border:1px solid #e5def0;background:#fff;border-radius:14px;padding:12px}.skill-card b{display:block;margin-bottom:5px}.skill-card small{color:#81788e}.skill-actions{display:flex;gap:7px;margin-top:10px}.skill-actions button,.skill-toolbar button{border:1px solid #d9cef0;background:#f8f5ff;color:#5b2fc3;border-radius:10px;padding:7px 10px;cursor:pointer}.skill-actions button.primary,.skill-toolbar button.primary{background:#6d3ee8;color:#fff;border-color:#6d3ee8}.skill-count{font-size:13px;color:#766d82}.mic.processing{background:#f3e9ff!important;box-shadow:inset 0 0 0 2px #8a5df0!important}.mic.recording{background:#6d3ee8!important;color:#fff!important;animation:aosMicPulse 1s ease-in-out infinite}@keyframes aosMicPulse{50%{transform:scale(1.07)}}

/* V5.28.7 chat scroll stability */
.workspace{overscroll-behavior:contain;scroll-behavior:smooth}
.chat-thread{position:relative;overflow-anchor:none}
.composer{will-change:transform}

/* V5.28.7 generated image result */
.aos-generated-image{display:block;max-width:min(720px,100%);height:auto;margin-top:12px;border-radius:16px;border:1px solid rgba(90,70,180,.16);box-shadow:0 10px 30px rgba(55,35,120,.10)}
.chat-msg.ai .chat-bubble:has(.aos-generated-image){max-width:min(780px,92%)}

/* V5.29 LOCAL ONLY image preview/download */
.aos-generated-image{cursor:zoom-in}
.aos-image-viewer{position:fixed;inset:0;z-index:9999;background:rgba(10,8,18,.82);display:flex;align-items:center;justify-content:center;padding:20px}
.aos-image-viewer-panel{width:min(1200px,96vw);max-height:94vh;background:#fff;border-radius:18px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 30px 90px rgba(0,0,0,.35)}
.aos-image-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #eeeaf4}
.aos-image-viewer-actions{display:flex;gap:8px;flex-wrap:wrap}
.aos-image-viewer-img{display:block;max-width:100%;max-height:calc(94vh - 70px);object-fit:contain;margin:auto;background:#111}
@media(max-width:700px){.aos-image-viewer{padding:8px}.aos-image-viewer-bar{align-items:flex-start;flex-direction:column}.aos-image-viewer-img{max-height:calc(94vh - 115px)}}

/* V5.30.4 functional tree visibility; preserves existing sidebar styling */
.aos-nav-tree{margin:-2px 0 4px 34px;padding-left:7px;border-left:1px solid #e8e2f1;max-height:170px;overflow:auto}.aos-nav-tree.empty{display:none}.aos-tree-node{width:100%;border:0;background:transparent;color:#6f677e;display:flex;align-items:center;gap:5px;padding:4px 6px;border-radius:7px;text-align:left;font-size:12px;cursor:pointer;min-width:0}.aos-tree-node:hover,.aos-tree-node.current{background:#f5f1ff;color:#5b32d7}.aos-tree-node b,.aos-tree-node span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.aos-tree-node small{margin-left:auto;font-size:9px;color:#9a91a7}.side.small .aos-nav-tree{display:none}@media(max-width:820px){.aos-nav-tree{display:none}}

/* V5.30.5.0 AI Box workspace: project folders, chat history, file library. */
.aos-tree-folder{min-width:0}.aos-tree-folder>.aos-tree-children{margin-left:13px;padding-left:5px;border-left:1px dashed #ece6f3}.aos-folder-node span:first-child{font-size:10px}.aos-thread-node{padding-left:7px}.aos-thread-node span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aos-project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-top:16px}.aos-project-card{display:flex;flex-direction:column;gap:6px;text-align:left;border:1px solid #e6e0ef;background:#fff;border-radius:14px;padding:14px;cursor:pointer;font:inherit;color:inherit}.aos-project-card.current{border-color:#8b69ec;background:#fbf9ff}.aos-project-card small{color:#81798b}
.aos-folder-list{display:grid;gap:12px;margin-top:16px}.aos-folder-card{border:1px solid #e7e1ee;border-radius:14px;background:#fff;overflow:hidden}.aos-folder-card.current{border-color:#9477e7}.aos-folder-title{width:100%;border:0;background:#faf8fd;padding:12px 14px;display:flex;justify-content:space-between;gap:12px;align-items:center;text-align:left;font:inherit;cursor:pointer}.aos-folder-title small{color:#837b8f}.aos-file-list{display:grid}.aos-file-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 14px;border-top:1px solid #eee9f3}.aos-file-row>div:first-child{min-width:0;display:flex;flex-direction:column;gap:4px}.aos-file-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aos-file-row small{color:#837b8f}.aos-file-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.aos-file-actions button{padding:6px 9px}.danger-lite{color:#8a4354!important}.aos-empty-folder{padding:16px;color:#8a8296}.aos-file-preview-text{max-height:56vh;overflow:auto;white-space:pre-wrap;word-break:break-word;border:1px solid #ebe5f1;background:#faf9fc;border-radius:12px;padding:12px;font-size:12px;line-height:1.5}.aos-file-preview-frame{width:100%;height:58vh;border:1px solid #ebe5f1;border-radius:12px;background:#fff}
@media(max-width:760px){.aos-file-row{align-items:flex-start;flex-direction:column}.aos-file-actions{justify-content:flex-start}.aos-project-grid{grid-template-columns:1fr}}


/* V5.30.5.5 functional fixes: visible scrollbars, project/chat separation, Live Voice. */
.nav,.workspace,.aos-nav-tree,.settings,.tabs,.module-view{scrollbar-width:auto;scrollbar-color:#b8accb #f3eff8}
.nav::-webkit-scrollbar,.workspace::-webkit-scrollbar,.aos-nav-tree::-webkit-scrollbar,.settings::-webkit-scrollbar,.tabs::-webkit-scrollbar{width:10px;height:10px}
.nav::-webkit-scrollbar-track,.workspace::-webkit-scrollbar-track,.aos-nav-tree::-webkit-scrollbar-track,.settings::-webkit-scrollbar-track,.tabs::-webkit-scrollbar-track{background:#f3eff8}
.nav::-webkit-scrollbar-thumb,.workspace::-webkit-scrollbar-thumb,.aos-nav-tree::-webkit-scrollbar-thumb,.settings::-webkit-scrollbar-thumb,.tabs::-webkit-scrollbar-thumb{background:#b8accb;border:2px solid #f3eff8;border-radius:10px}
.aos-tree-children[hidden]{display:none!important}.aos-add-thread{color:#5b32d7;font-weight:700}.aos-project-card{display:block!important;text-align:left}.aos-project-open{width:100%;border:0;background:transparent;text-align:left;padding:0;cursor:pointer}.aos-project-open b,.aos-project-open small{display:block}.aos-project-card-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.aos-project-thread-list{display:flex;flex-direction:column;gap:6px;margin-top:12px;padding-top:10px;border-top:1px solid #eee8f4}.aos-project-thread{border:0;background:#f8f6fb;border-radius:8px;padding:8px 10px;text-align:left;cursor:pointer;color:#554d63}.aos-project-thread:hover{background:#f0eaff;color:#5b32d7}
.aos-folder-card>summary{list-style:none;cursor:pointer}.aos-folder-card>summary::-webkit-details-marker{display:none}.aos-folder-card>summary:before{content:'▸';font-size:11px;margin-right:8px;color:#766c85}.aos-folder-card[open]>summary:before{content:'▾'}
.functional-card{cursor:pointer;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}.functional-card:hover{transform:translateY(-1px);border-color:#c9bce5;box-shadow:0 6px 20px rgba(73,48,120,.08)}.functional-card:focus-visible{outline:2px solid #7a55e7;outline-offset:2px}
.live-voice{font-size:17px;background:#efe8ff;color:#5d36d8}.live-voice.active{background:#693ae8;color:#fff;box-shadow:0 0 0 4px rgba(105,58,232,.14)}
.aos-live-voice-overlay{position:fixed;inset:0;z-index:120;display:none;align-items:center;justify-content:center;background:rgba(23,16,36,.18);backdrop-filter:blur(4px)}.aos-live-voice-overlay.show{display:flex}.aos-live-voice-card{position:relative;width:min(340px,calc(100vw - 32px));min-height:330px;border-radius:28px;background:rgba(255,255,255,.96);box-shadow:0 28px 80px rgba(31,17,55,.24);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center}.aos-live-close{position:absolute;right:16px;top:14px;border:0;background:#f1edf6;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}.aos-live-orb{position:relative;width:126px;height:126px;border-radius:50%;display:grid;place-items:center;margin-bottom:24px}.aos-live-core{width:82px;height:82px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#c9b8ff,#724ae8 52%,#3f247f);box-shadow:0 14px 32px rgba(88,55,180,.35)}.aos-live-wave{position:absolute;inset:12px;border-radius:50%;border:2px solid rgba(105,58,232,.35);animation:aosLivePulse 1.8s infinite}.aos-live-wave.w2{animation-delay:.7s}.aos-live-voice-overlay[data-state="thinking"] .aos-live-core{animation:aosLiveThink 1s ease-in-out infinite alternate}.aos-live-voice-overlay[data-state="speaking"] .aos-live-wave{animation-duration:.8s}.aos-live-voice-card>b{font-size:20px}.aos-live-voice-card>span{margin-top:8px;color:#6846c9;font-weight:800}.aos-live-voice-card>small{margin-top:10px;color:#857c92;max-width:250px;line-height:1.5}@keyframes aosLivePulse{0%{transform:scale(.75);opacity:.8}100%{transform:scale(1.35);opacity:0}}@keyframes aosLiveThink{from{transform:scale(.94)}to{transform:scale(1.06)}}
.aos-diagnostic-grid{display:grid;grid-template-columns:120px 1fr;gap:8px 14px;margin-top:16px}.aos-diagnostic-grid b,.aos-diagnostic-grid span{padding:8px;border-bottom:1px solid #eee8f4}.aos-diagnostic-grid span{word-break:break-word}
@media(max-width:820px){.composer{gap:5px}.round{width:38px;height:38px}.aos-live-voice-card{min-height:300px}.aos-live-orb{width:110px;height:110px}.aos-live-core{width:72px;height:72px}}
/* V5.30.5.7 Live Voice input diagnostics */
.aos-live-level{margin-top:8px;font-size:12px;font-weight:700;color:#6b7280;letter-spacing:.04em}
.aos-live-voice-overlay[data-state="error"] .aos-live-core{box-shadow:0 0 0 6px rgba(220,38,38,.10),0 14px 32px rgba(88,55,180,.25)}
.aos-live-voice-overlay[data-state="connecting"] .aos-live-wave{animation-duration:1.1s}

/* V5.30.5.9 CHAT MANAGEMENT: functional controls only; no layout redesign */
.aos-thread-row{display:flex;align-items:center;gap:2px;min-width:0}.aos-thread-row>.aos-tree-node{flex:1;min-width:0}.aos-thread-menu-btn{flex:0 0 26px;width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:#81788e;cursor:pointer;font-weight:900;line-height:20px}.aos-thread-menu-btn:hover{background:#eee8fb;color:#5b32d7}.aos-thread-row.pinned>.aos-tree-node{font-weight:700}.aos-conversation-menu{position:fixed;z-index:240;width:220px;padding:6px;background:#fff;border:1px solid #e5dff0;border-radius:12px;box-shadow:0 16px 40px rgba(40,24,66,.22)}.aos-conversation-menu button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:8px;color:#393043;cursor:pointer;font-size:13px}.aos-conversation-menu button:hover{background:#f5f1ff;color:#5b32d7}.aos-conversation-menu button.danger{color:#c83838}.aos-conversation-menu button.danger:hover{background:#fff0f0;color:#b42323}.aos-archive-entry{margin-top:3px;border-top:1px dashed #e7e0ef;padding-top:6px}.aos-project-picker{display:flex;flex-wrap:wrap;gap:8px}.aos-archived-list{display:flex;flex-direction:column;gap:8px}.aos-archived-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #ebe6f2;border-radius:10px;padding:9px 10px}.aos-archived-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* V5.30.6.2 management controls */
.aos-manage-search{display:flex;gap:10px;margin:12px 0 16px}.aos-manage-search input{width:min(560px,100%);min-height:42px;padding:9px 12px;border-radius:10px;border:1px solid var(--line,#d9dee7);background:var(--panel,#fff);color:inherit}.aos-folder-actions{display:flex;justify-content:flex-end;gap:8px;padding:8px 10px 0}.aos-file-actions,.aos-project-card-actions{flex-wrap:wrap}.aos-file-row{gap:12px}.aos-file-row>div:first-child{min-width:180px;flex:1}.danger-lite{border-color:#d77!important}

/* V5.30.6.3 settings usability: no hidden right-side controls */
.modal,.settings,.settings-tabs,#settingBody{min-width:0}
.settings{overflow-y:auto!important;overflow-x:hidden!important}
#settingBody{width:100%;max-width:100%;overflow-x:hidden}
.setting-row{min-width:0;flex-wrap:wrap}
.setting-row>label{min-width:150px;flex:0 0 auto}
.setting-control{min-width:0;max-width:100%;margin-left:auto;justify-content:flex-end}
.setting-control select,.setting-control input:not([type=checkbox]):not([type=range]){max-width:min(430px,100%);min-width:0}
.setting-control input[type=range]{width:min(260px,42vw);min-width:140px;max-width:100%}
#startLiveVoiceSettings,#testVoice,#testMicSettings,#stopVoice,#openPersonaFromVoice{position:relative;z-index:2;pointer-events:auto!important}
@media(max-width:900px){.setting-row{align-items:flex-start}.setting-control{width:100%;margin-left:0;justify-content:flex-start}.setting-control select{width:100%}}

/* V5.30.6.4 role/model setup hub */
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:16px 0}.feature-card{border:1px solid var(--line,#30343f);border-radius:14px;padding:14px;background:rgba(255,255,255,.025)}.feature-card h3{margin:0 0 7px}.feature-card p{margin:0;line-height:1.55;opacity:.84}.status-chip{padding:5px 9px;border-radius:999px;border:1px solid currentColor;font-size:11px;opacity:.72}

/* V5.30.6.7 role/model profile editor */
.aos-role-profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;margin:12px 0 18px}.aos-role-profile-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line,#d9d9e6);border-radius:12px;background:var(--panel,#fff)}.aos-role-profile-card div:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}.aos-role-profile-card small{opacity:.7}.aos-role-model-form{margin-top:12px}.aos-model-roadmap-grid{margin-top:18px}

/* V5.30.6.9 clipboard/drop attachment feedback */
.composer.aos-drop-active{outline:2px dashed #6d3df5;outline-offset:3px;background:rgba(109,61,245,.06)}

/* V5.30.6.10: real in-app large image mode; avoids popup/data-URL blocking. */
.aos-image-viewer.is-full{padding:0;background:rgba(5,4,10,.96)}
.aos-image-viewer.is-full .aos-image-viewer-panel{width:100vw;height:100vh;max-height:none;border-radius:0;background:#0b0a10}
.aos-image-viewer.is-full .aos-image-viewer-bar{background:#fff;flex:0 0 auto}
.aos-image-viewer.is-full .aos-image-viewer-img{max-width:100vw;max-height:calc(100vh - 66px);width:auto;height:auto;object-fit:contain;background:#0b0a10;cursor:zoom-out}
.aos-image-viewer-img{cursor:zoom-in}


/* V5.30.6.13 Character Studio + visible paid collaboration entries */
.role-studio-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid #e8e0f7;border-radius:18px;background:linear-gradient(135deg,#fbf9ff,#f4eeff);margin:8px 0 14px}.role-avatar-stage{display:grid;grid-template-columns:74px 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center}.role-avatar-stage svg{grid-row:1/3;width:70px;height:88px;padding:9px;border-radius:18px;background:linear-gradient(145deg,#8a65ed,#5e38d6);stroke:#fff;fill:none;stroke-width:1.6}.role-avatar-stage b{font-size:18px}.role-avatar-stage small{color:#776d86}.role-access{text-align:right}.role-access span,.role-access b{display:block}.role-access span{font-size:11px;color:#7f7391}.role-access b{font-size:12px;color:#6940d7;margin-top:4px}.role-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.role-quick-grid>div{padding:12px;border:1px solid #eee8f7;border-radius:14px;background:#fff}.role-quick-grid b{font-size:12px}.role-chip-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.role-chip{border:1px solid #dfd4f4;background:#faf7ff;color:#5d3bc3;border-radius:999px;padding:6px 10px;font-size:12px;cursor:pointer}.role-chip:hover,.role-chip:focus{background:#eee6ff;border-color:#8d6be7;outline:none}.role-free-desc{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:end;margin:12px 0 18px}.role-free-desc label{grid-column:1/-1}.role-free-desc textarea{width:100%;resize:vertical;min-height:74px;border:1px solid #ded7e9;border-radius:12px;padding:10px 12px;font:inherit}.role-svg{width:42px;height:42px;border-radius:12px;background:linear-gradient(145deg,#f5efff,#e9ddff);display:grid;place-items:center;margin-bottom:10px}.role-svg svg{width:25px;height:25px;fill:none;stroke:#6b3dde;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.feature-card h3 small{font-size:9px;letter-spacing:.06em;padding:3px 6px;border-radius:999px;background:#eee7ff;color:#6c3fd4;vertical-align:middle}.premium-card{position:relative;overflow:hidden}.premium-card:after{content:'需點數 / 付費';position:absolute;right:10px;top:10px;font-size:9px;color:#7046d7;background:#f4efff;border-radius:999px;padding:3px 6px}.partner-entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:12px 0 4px}.partner-entry{border:1px solid #e7def5;background:linear-gradient(145deg,#fff,#faf7ff);border-radius:16px;padding:15px;text-align:left;cursor:pointer;min-height:86px}.partner-entry:hover{border-color:#956fe8;box-shadow:0 8px 22px rgba(91,55,170,.10);transform:translateY(-1px)}.partner-entry b,.partner-entry small{display:block}.partner-entry b{color:#2f2441}.partner-entry small{margin-top:7px;color:#82768f;line-height:1.4}
@media(max-width:700px){.role-studio-head{align-items:flex-start}.role-access{display:none}.role-quick-grid{grid-template-columns:1fr}.role-free-desc{grid-template-columns:1fr}.role-free-desc button{width:100%}}

.skill-active-tray{display:grid;gap:8px;margin:10px 0 14px;padding:10px 12px;border:1px solid #e5def8;border-radius:12px;background:#faf8ff}.skill-active-tray>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.skill-check{display:flex;gap:6px;align-items:center;font-size:12px;color:#6f6682;margin-bottom:5px}.skill-card.skill-picked{outline:2px solid #7b4dff;background:#fbf9ff}.skill-card.skill-persistent{box-shadow:inset 0 0 0 2px #c9b7ff}.muted{color:#999;font-size:12px}

/* V5.30.6.15 Connector Center */
.connector-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px auto;gap:10px;align-items:center;margin:14px 0}.connector-toolbar select{height:42px;border:1px solid #ddd7ef;border-radius:12px;background:#fff;padding:0 12px}.connector-group{margin:16px 0 22px}.connector-group h3{display:flex;gap:8px;align-items:center;margin:0 0 8px}.connector-group h3 small{font-weight:500;color:#8a819e}.connector-row-rich{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 14px;border:1px solid #ebe6f5;border-radius:14px;margin:8px 0;background:#fff}.connector-main{display:grid;gap:4px}.connector-main small{color:#7f778e}.connector-auth{display:inline-flex;width:max-content;font-size:11px;background:#f4f0ff;color:#6b35d8;border-radius:999px;padding:3px 8px}.connector-controls{display:flex;align-items:center;gap:8px;white-space:nowrap}.api-badge.ok{background:#eaf8ef;color:#187b3b}.connector-auto-toggle{display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-weight:600}@media(max-width:760px){.connector-toolbar{grid-template-columns:1fr}.connector-row-rich{align-items:flex-start;flex-direction:column}.connector-controls{width:100%;justify-content:space-between}}


.connector-center-panel{padding:28px 34px 90px;max-width:1180px;margin:0 auto}
.connector-center-panel.hidden{display:none}
.connector-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}
.connector-head h2{margin:0 0 6px;font-size:24px}
.connector-head p{margin:0;color:#817b92}
.connector-summary{display:flex;gap:8px;flex-wrap:wrap}
.connector-summary span{padding:7px 10px;border:1px solid #e7e0f8;border-radius:999px;background:#fff;font-size:12px}
.connector-toolbar{display:flex;gap:10px;margin-bottom:14px}
.connector-toolbar input,.connector-toolbar select{border:1px solid #ded7ef;border-radius:12px;padding:10px 12px;background:white}
.connector-toolbar input{flex:1;min-width:180px}
.connector-toolbar button{border:0;border-radius:11px;padding:9px 14px;background:#6c36e8;color:white;font-weight:700}
.connector-status-banner{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:#f6f1ff;border:1px solid #e6dbff;border-radius:14px;padding:11px 13px;margin-bottom:16px}
.connector-status-banner small{color:#746d83}
.connector-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.connector-card{border:1px solid #e9e4f0;border-radius:16px;padding:14px;background:#fff;box-shadow:0 3px 12px rgba(53,34,87,.04)}
.connector-card-top{display:flex;justify-content:space-between;gap:10px;align-items:center}
.connector-card h3{font-size:15px;margin:0}
.connector-card p{font-size:12px;color:#817b92;margin:8px 0 10px;min-height:30px}
.connector-badge{font-size:11px;padding:5px 8px;border-radius:999px;white-space:nowrap}
.connector-badge.ready{background:#e8f7ee;color:#168149}
.connector-badge.pending{background:#fff5df;color:#a36a00}
.connector-badge.platform{background:#f3efff;color:#6533c9}
.connector-meta{font-size:11px;color:#8a8497}
.connector-actions{margin-top:10px;display:flex;gap:7px}
.connector-actions button{border:1px solid #dfd7f0;border-radius:9px;padding:6px 9px;background:white;font-size:12px}
@media(max-width:900px){.connector-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.connector-grid{grid-template-columns:1fr}.connector-center-panel{padding:18px 14px 80px}.connector-toolbar{flex-wrap:wrap}}

.connector-back-btn{
  border:1px solid #ded7ef;
  background:#fff;
  color:#5f2ed8;
  border-radius:10px;
  padding:7px 11px;
  font-size:12px;
  font-weight:800;
  margin:0 0 12px;
  cursor:pointer
}
.connector-back-btn:hover{background:#f7f3ff}

.connector-center-panel{position:relative}
.connector-close-x{
  position:sticky;
  top:10px;
  float:right;
  z-index:30;
  width:34px;
  height:34px;
  border:1px solid #ded7ef;
  border-radius:50%;
  background:#fff;
  color:#4f4760;
  font-size:22px;
  line-height:30px;
  text-align:center;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(35,24,55,.10)
}
.connector-close-x:hover{background:#f7f3ff;color:#642fe4}


/* V5.30.6.18F — Plugin Center independent scroll/navigation fix */
.connector-center-panel{
  position:fixed !important;
  left:320px !important;
  right:0 !important;
  top:130px !important;
  bottom:0 !important;
  z-index:120 !important;
  max-width:none !important;
  margin:0 !important;
  padding:28px 34px 110px !important;
  background:#fbfaff !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.connector-center-panel.hidden{display:none !important}
.connector-close-x{
  position:sticky !important;
  top:0 !important;
  float:right !important;
  z-index:140 !important;
}
.connector-back-btn{position:relative;z-index:130}
@media(max-width:760px){
  .connector-center-panel{
    left:0 !important;
    top:118px !important;
    padding:18px 14px 110px !important;
  }
}


/* V5.30.6.18G — stable plugin center geometry */
.connector-center-panel{
  left:0 !important;
  right:0 !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
}
.connector-center-panel .connector-head,
.connector-center-panel .connector-toolbar,
.connector-center-panel .connector-status-banner,
.connector-center-panel .connector-grid{
  width:100% !important;
  max-width:none !important;
  box-sizing:border-box !important;
}
.connector-grid{
  grid-template-columns:repeat(3,minmax(240px,1fr)) !important;
  align-items:stretch !important;
}
.connector-card{
  width:auto !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.connector-toolbar input{
  min-width:0 !important;
}
@media(max-width:1100px){
  .connector-grid{grid-template-columns:repeat(2,minmax(240px,1fr)) !important}
}
@media(max-width:760px){
  .connector-grid{grid-template-columns:1fr !important}
  .connector-center-panel{left:0 !important;right:0 !important}
}


/* V5.30.6.21 — Local Model Studio / Motion Control */
.model-control-panel{position:fixed;inset:88px 24px 24px 316px;z-index:180;background:#faf9ff;border:1px solid #e4def1;border-radius:20px;padding:22px;overflow:auto;box-shadow:0 18px 48px rgba(45,31,74,.14)}
.model-control-panel.hidden{display:none!important}
.model-control-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.model-control-head h2{margin:6px 0}
.model-control-head p{margin:0;color:#756e84}
.model-badges{display:flex;gap:7px;flex-wrap:wrap}.model-badges span{font-size:11px;border:1px solid #ded5f4;border-radius:999px;padding:5px 8px;background:#fff}
.model-control-close{width:36px;height:36px;border-radius:50%;border:1px solid #ddd5ee;background:#fff;font-size:22px;cursor:pointer}
.model-control-grid{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(340px,1.1fr);gap:20px;margin-top:18px}
.model-preview-card,.model-control-form{background:#fff;border:1px solid #e6e0ef;border-radius:16px;padding:16px}
.model-stage{height:440px;border-radius:14px;background:linear-gradient(180deg,#f5f1ff,#fff);display:flex;align-items:flex-end;justify-content:center;overflow:hidden;position:relative}
.model-stage img{max-height:95%;max-width:92%;object-fit:contain;transform-origin:center bottom;transition:.25s ease}
.model-stage.motion-float img{animation:aosFloat 2.2s ease-in-out infinite}
.model-stage.motion-walk img{animation:aosWalk 3.2s ease-in-out infinite}
.model-stage.motion-listen img{animation:aosListen 1.2s ease-in-out infinite}
.model-stage.motion-speak img{animation:aosSpeak .55s ease-in-out infinite}
.model-stage.motion-pose img{transform:translateY(-4px) rotate(-2deg)}
@keyframes aosFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
@keyframes aosWalk{0%{transform:translateX(-22px)}50%{transform:translateX(22px)}100%{transform:translateX(-22px)}}
@keyframes aosListen{0%,100%{transform:scale(1)}50%{transform:scale(1.015)}}
@keyframes aosSpeak{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.model-status-row{display:flex;justify-content:space-between;margin-top:10px;color:#6c647a;font-size:12px}
.model-control-form label{display:block;font-size:12px;font-weight:800;margin-bottom:12px;color:#4d4659}
.model-control-form select,.model-control-form textarea{width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #ddd6ea;border-radius:11px;padding:9px 10px;background:#fff;font:inherit}
.model-control-actions{display:flex;gap:8px;flex-wrap:wrap}.model-control-actions button{border:0;border-radius:10px;padding:9px 12px;background:#6236df;color:#fff;font-weight:800;cursor:pointer}
.model-a8-map{margin-top:15px;border:1px solid #e4dcf5;background:#f8f5ff;border-radius:12px;padding:12px}.model-a8-map code{display:block;margin:7px 0;font-size:12px}.model-a8-map small{color:#777081}
.model-control-result{margin-top:10px;font-size:12px;color:#5d546b}
.aos-floating-character{position:fixed;right:32px;bottom:90px;z-index:210;width:180px;user-select:none;cursor:grab;filter:drop-shadow(0 12px 20px rgba(35,24,55,.18))}
.aos-floating-character.hidden{display:none!important}.aos-floating-character img{display:block;width:100%;max-height:300px;object-fit:contain}
.aos-floating-character small{display:block;text-align:center;background:rgba(255,255,255,.88);border-radius:999px;padding:3px 8px;font-size:10px}
.floating-character-caption{max-width:220px;margin:5px auto 0;padding:6px 9px;border-radius:12px;background:rgba(25,16,52,.82);color:#fff;font-size:12px;text-align:center;backdrop-filter:blur(3px)}
.floating-character-resize{position:absolute;right:-7px;bottom:-7px;width:22px;height:22px;border:2px solid #fff;border-radius:50%;background:#7149e8;box-shadow:0 0 12px #7149e8;cursor:nwse-resize}
.aos-floating-character[data-voice-state="listening"] img{filter:drop-shadow(0 0 16px #43ddff)}
.aos-floating-character[data-voice-state="thinking"] img{filter:drop-shadow(0 0 18px #9b69ff)}
.aos-floating-character[data-voice-state="speaking"] img{animation:aosSpeak .55s ease-in-out infinite;filter:drop-shadow(0 0 18px #ff82e4)}
@media(max-width:720px){.aos-floating-character{width:120px;right:12px;bottom:82px}.floating-character-caption{font-size:10px}}
.floating-character-tools{display:flex;justify-content:flex-end;gap:4px}.floating-character-tools button{border:1px solid #ddd4ee;background:#fff;border-radius:50%;width:26px;height:26px;cursor:pointer}
.aos-floating-character.motion-float img{animation:aosFloat 2.2s ease-in-out infinite}.aos-floating-character.motion-walk img{animation:aosWalk 3.2s ease-in-out infinite}.aos-floating-character.motion-listen img{animation:aosListen 1.2s ease-in-out infinite}.aos-floating-character.motion-speak img{animation:aosSpeak .55s ease-in-out infinite}
@media(max-width:850px){.model-control-panel{inset:80px 10px 10px 10px}.model-control-grid{grid-template-columns:1fr}.model-stage{height:340px}}


/* V5.30.6.22 — unified AOS tools / model / connector visual system */
.aos-tool-item{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  border:0!important;
  background:transparent!important;
  border-radius:10px!important;
  padding:7px 9px!important;
  color:#312d3a!important;
  width:100%!important;
  text-align:left!important;
  box-shadow:none!important;
}
.aos-tool-item:hover{background:#f5f1ff!important}
.aos-tool-item.active{background:#eee7ff!important;color:#5f34d9!important}
.aos-tool-icon{
  width:26px;height:26px;border-radius:9px;
  display:grid;place-items:center;overflow:hidden;
  background:linear-gradient(145deg,#f0eaff,#fff);
  border:1px solid #e6dcff;flex:0 0 26px;
}
.aos-tool-icon svg{width:16px;height:16px;fill:#6a3ee0}
.aos-tool-icon-model{border-radius:50%;background:#fff}
.aos-tool-icon-model img{
  width:100%;height:100%;object-fit:cover;object-position:50% 18%;
  transform:scale(1.35);
}
.aos-tool-badge{
  margin-left:auto;font-size:9px;line-height:1;
  padding:4px 6px;border-radius:999px;
  color:#6a45cb;background:#f3edff;border:1px solid #e4d8ff;
  letter-spacing:.3px
}
.model-control-panel{
  background:linear-gradient(180deg,#fbfaff 0%,#f8f6fc 100%)!important;
  border:1px solid #e4deee!important;
  box-shadow:0 18px 50px rgba(48,35,74,.12)!important;
}
.model-control-title-wrap{display:flex;align-items:center;gap:13px}
.model-control-avatar{
  width:48px;height:48px;border-radius:15px;overflow:hidden;
  border:1px solid #ddd2f7;background:#fff;
  box-shadow:0 6px 16px rgba(83,55,146,.10)
}
.model-control-avatar img{
  width:100%;height:100%;object-fit:cover;object-position:50% 18%;
  transform:scale(1.2)
}
.model-control-head h2{font-size:20px;margin:2px 0 4px!important;color:#282332}
.model-control-head p{font-size:12px;max-width:680px}
.model-preview-card,.model-control-form{
  border:1px solid #e8e2f0!important;
  box-shadow:0 8px 24px rgba(46,34,66,.05)!important
}
.model-stage{
  background:
    radial-gradient(circle at 50% 22%,rgba(120,80,235,.12),transparent 32%),
    linear-gradient(180deg,#f8f4ff 0%,#ffffff 82%)!important;
}
.model-quick-actions{
  display:flex;gap:6px;flex-wrap:wrap;margin-top:10px
}
.model-quick-actions button{
  border:1px solid #ddd3f1;background:#fff;color:#5e3ab0;
  border-radius:999px;padding:6px 9px;font-size:11px;cursor:pointer
}
.model-quick-actions button:hover,.model-quick-actions button.active{
  background:#6a3ee0;color:#fff;border-color:#6a3ee0
}
.model-control-form select,.model-control-form textarea{
  background:#fcfbff!important;border-color:#ded7e9!important
}
.model-control-form select:focus,.model-control-form textarea:focus{
  outline:2px solid rgba(106,62,224,.18);border-color:#9a7ee8!important
}
.model-control-actions button{
  background:#673be2!important;
  box-shadow:0 5px 14px rgba(103,59,226,.15)
}
.aos-floating-character{
  width:165px!important;
  filter:drop-shadow(0 10px 18px rgba(60,38,100,.16))!important
}


/* V5.30.6.23 — AI platform completion */
.ai-platform-hub,.ai-subpanel{
  position:fixed;inset:88px 24px 24px 316px;z-index:185;
  background:linear-gradient(180deg,#fbfaff,#f7f5fb);
  border:1px solid #e4deee;border-radius:20px;padding:22px;overflow:auto;
  box-shadow:0 18px 50px rgba(48,35,74,.12)
}
.ai-platform-hub.hidden,.ai-subpanel.hidden{display:none!important}
.ai-platform-head,.ai-subpanel-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.ai-platform-head h2,.ai-subpanel-head h2{margin:6px 0 4px}
.ai-platform-head p,.ai-subpanel-head p{margin:0;color:#746d80;font-size:12px}
.ai-subpanel-head button{width:36px;height:36px;border-radius:50%;border:1px solid #ddd5ee;background:#fff;font-size:22px;cursor:pointer}
.ai-platform-status-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px;margin-top:18px}
.ai-status-card{background:#fff;border:1px solid #e7e1ef;border-radius:14px;padding:14px}
.ai-status-card b{display:block;margin-bottom:8px}
.ai-status-card span{display:inline-block;font-size:11px;padding:4px 7px;border-radius:999px;background:#f2eef8;color:#6d637b}
.ai-status-card span.ok{background:#e9f8ee;color:#24713e}.ai-status-card span.bad{background:#fff0f0;color:#a13a3a}
.ai-status-card small{display:block;margin-top:8px;color:#827a8d}
.ai-platform-module-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px;margin-top:18px}
.ai-module-card{border:1px solid #e4ddef;background:#fff;border-radius:15px;padding:16px;text-align:left;cursor:pointer}
.ai-module-card:hover{border-color:#bba8ea;background:#fbf9ff}
.ai-module-card b{display:block;color:#352b49;margin-bottom:6px}.ai-module-card small{color:#7c7487}
.ai-a8-map-card{margin-top:18px;background:#fff;border:1px solid #e5dfed;border-radius:15px;padding:15px}
.ai-a8-map-lines{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:7px;margin-top:10px}
.ai-a8-map-lines code{font-size:11px;background:#f7f4fb;border-radius:9px;padding:8px}
.ai-subpanel-body{margin-top:18px;display:grid;gap:12px;max-width:680px}
.ai-subpanel-body label{font-size:12px;font-weight:800}.ai-subpanel-body input,.ai-subpanel-body select{display:block;width:100%;margin-top:6px;padding:9px;border:1px solid #ddd5e8;border-radius:10px}
.ai-subpanel-body button,.desktop-mode-grid button{border:0;border-radius:10px;padding:10px 12px;background:#673be2;color:#fff;font-weight:800;cursor:pointer}
.desktop-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:10px;margin-top:18px}
#desktopStudioResult,#outfitResult{margin-top:14px;border:1px solid #e5deef;background:#fff;border-radius:12px;padding:12px;color:#6f667a}
@media(max-width:900px){
 .ai-platform-hub,.ai-subpanel{inset:80px 10px 10px 10px}
 .ai-platform-status-grid,.ai-platform-module-grid,.desktop-mode-grid{grid-template-columns:1fr}
 .ai-a8-map-lines{grid-template-columns:1fr}
}


/* V5.30.6.25 Motion Library */
.motion25-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin-top:16px}
.motion25-card{border:1px solid #e2daef;background:#fff;border-radius:12px;padding:12px;text-align:left;cursor:pointer}
.motion25-card:hover,.motion25-card.active{border-color:#845ee8;background:#f8f5ff}
.motion25-card b{display:block}.motion25-card small{display:block;color:#7c7387;margin-top:5px}
.motion25-player{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:15px}
.motion25-player button{border:0;border-radius:9px;background:#673be2;color:#fff;padding:8px 11px;font-weight:800}
#motion25Status{margin-top:12px;background:#fff;border:1px solid #e4ddef;border-radius:10px;padding:11px;color:#6d6577}
@media(max-width:900px){.motion25-grid{grid-template-columns:repeat(2,1fr)}}


/* V5.30.6.26 AI RUN badge */
.aos626-run-badge{
 position:fixed;right:18px;bottom:12px;z-index:9999;
 padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800;
 background:#fff;border:1px solid #ddd4ef;box-shadow:0 6px 18px rgba(42,30,70,.12);
 cursor:pointer;color:#6c6377
}
.aos626-run-badge.ready{color:#21713a;background:#eefaf2;border-color:#ccebd6}
.aos626-run-badge.off{color:#9a3a3a;background:#fff2f2;border-color:#f1cccc}


/* V5.30.6.27 — AI Model Studio */
.model-studio627{position:fixed;inset:0;z-index:250;background:
radial-gradient(circle at 52% 12%,rgba(81,58,180,.35),transparent 28%),
linear-gradient(135deg,#07152e 0%,#0a2144 45%,#071528 100%);color:#eef5ff;overflow:auto}
.model-studio627.hidden{display:none!important}
.ms627-topbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:18px;padding:12px 18px;background:rgba(6,20,47,.96);border-bottom:1px solid #1d4f8e;box-shadow:0 8px 24px rgba(0,0,0,.22)}
.ms627-brand{font-size:23px;font-weight:900;white-space:nowrap}.ms627-brand small{font-size:10px;font-weight:600;color:#9db5d3;margin-left:8px}
.ms627-tabs{display:flex;gap:8px;flex:1;overflow-x:auto}.ms627-tabs button,.ms627-panel button,.ms627-lib-head button,.ms627-player button{
border:1px solid #275da0;background:#0c2b58;color:#eef5ff;border-radius:9px;padding:8px 11px;cursor:pointer;font-weight:800}
.ms627-tabs button.active,.ms627-lib-head button.active,.ms627-stage-tools button.active{background:linear-gradient(90deg,#6444e8,#168fe8);border-color:#6aa6ff}
.ms627-close{width:36px;height:36px;border-radius:50%;border:1px solid #37689d;background:#0d2a4f;color:#fff;font-size:22px;cursor:pointer}
.ms627-layout{display:grid;grid-template-columns:230px minmax(600px,1fr) 300px;gap:10px;padding:10px;min-height:calc(100vh - 62px)}
.ms627-left,.ms627-right{display:flex;flex-direction:column;gap:10px}
.ms627-panel,.ms627-motion-library,.ms627-stage{background:rgba(8,30,65,.88);border:1px solid #235a99;border-radius:12px;padding:12px;box-shadow:inset 0 0 0 1px rgba(112,159,255,.05)}
.ms627-panel h3,.ms627-motion-library h3{margin:0 0 10px;font-size:15px}
.ms627-model-card{display:flex;gap:9px;align-items:center}.ms627-avatar-thumb{width:54px;height:62px;border-radius:10px;background:linear-gradient(160deg,#5734c7,#1a84d7)}
.ms627-model-card small{display:block;color:#9eb4d1}.ms627-model-card span{display:inline-block;margin-top:4px;background:#13a65a;padding:2px 6px;border-radius:999px;font-size:9px}
.ms627-info-grid{display:grid;grid-template-columns:70px 1fr;gap:6px;margin-top:10px;font-size:11px}.ms627-info-grid span{color:#8ea8c9}
.ms627-row{display:flex;gap:8px;margin-top:10px}.ms627-row>*{flex:1}
.ms627-quick{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.ms627-center{display:grid;grid-template-rows:minmax(430px,1fr) auto;gap:10px}
.ms627-stage{position:relative;padding:0;overflow:hidden;min-height:450px}
.ms627-stage-tools{position:absolute;top:12px;left:12px;z-index:2;display:flex;gap:6px}
.ms627-stage-tools button{border:1px solid #2c5f9a;background:#0b2a54;color:#fff;border-radius:8px;padding:7px 10px}
.ms627-stage-inner{position:relative;height:100%;min-height:450px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.ms627-stage-inner.transparent{
background-color:#0c1b35;
background-image:linear-gradient(45deg,rgba(255,255,255,.06) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.06) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.06) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.06) 75%);
background-size:28px 28px;background-position:0 0,0 14px,14px -14px,-14px 0}
.ms627-stage-inner.studio{background:radial-gradient(circle at 50% 40%,#27446e,#0b1730 58%,#050b17)}
.ms627-stage-inner.product{background:linear-gradient(135deg,#311c5f,#102f5b 55%,#0c1328)}
.ms627-model-preview{width:min(52%,470px);height:86%;min-height:380px;background:linear-gradient(180deg,rgba(136,78,255,.35),rgba(52,31,106,.75));border-radius:48% 48% 16% 16%;filter:drop-shadow(0 18px 25px rgba(0,0,0,.45))}
#ms627StageHint{position:absolute;bottom:10px;color:#8fa8c9;font-size:11px}
.ms627-lib-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.ms627-lib-head>div{display:flex;gap:5px;flex-wrap:wrap}
.ms627-lib-head button{padding:6px 9px;font-size:11px}
.ms627-motion-grid{display:grid;grid-template-columns:repeat(6,minmax(95px,1fr));gap:8px;margin-top:10px;max-height:220px;overflow:auto}
.ms627-motion-card{border:1px solid #285b94;background:#0b2750;border-radius:9px;padding:7px;cursor:pointer;color:#fff;text-align:left}
.ms627-motion-card.active{outline:2px solid #8b65ff;background:#17386f}.ms627-motion-card .thumb{height:78px;border-radius:7px;background:linear-gradient(160deg,#4e2ea4,#1f72bb);margin-bottom:6px}
.ms627-motion-card b{display:block;font-size:11px}.ms627-motion-card small{font-size:9px;color:#8fa9c9}
.ms627-player{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}.ms627-player label{font-size:11px;color:#aac0da}.ms627-player input[type=range]{width:110px}
#ms627MotionStatus{margin-left:auto;color:#65d49b;font-size:11px}
.ms627-panel label{display:block;font-size:11px;color:#adc0d7;margin-top:8px}.ms627-panel select{width:100%;margin-top:5px;background:#081d3d;color:#fff;border:1px solid #285995;border-radius:8px;padding:8px}
.ms627-wave{height:48px;border-radius:8px;background:repeating-linear-gradient(90deg,#4b8bff 0 2px,transparent 2px 7px),linear-gradient(180deg,#102e64,#091b37)}
.ms627-record-panel .danger{background:linear-gradient(90deg,#b62f5d,#e14848)}
#ms627RecordStatus{font-size:11px;margin-top:8px;color:#9bb4d0}.ms627-download{display:block;margin-top:8px;text-align:center;background:#1f8dd6;color:#fff;padding:8px;border-radius:8px;text-decoration:none;font-weight:800}
#ms627RecordPreview{width:100%;margin-top:8px;border-radius:8px;background:#000}.hidden{display:none!important}
@media(max-width:1200px){.ms627-layout{grid-template-columns:210px minmax(500px,1fr) 270px}.ms627-motion-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.ms627-layout{grid-template-columns:1fr}.ms627-left,.ms627-right{display:grid;grid-template-columns:1fr}.ms627-motion-grid{grid-template-columns:repeat(3,1fr)}}


/* V5.30.6.29 — Global language + guide */
.ms629-lang,.ms629-help,.ms629-ai{border:1px solid #37689d;background:#0c2b58;color:#fff;border-radius:9px;padding:8px 10px;font-weight:800}
.ms629-ai{background:linear-gradient(90deg,#6a48e8,#1a90e5);cursor:pointer}
.ms629-help{cursor:pointer}.ms629-note{font-size:11px;color:#9eb4d1;line-height:1.5}
.ms629-status{margin-top:8px;padding:8px;border:1px solid #2a5c93;border-radius:8px;background:#081d3d;color:#9fb5d0;font-size:11px}
.ms629-guide{position:fixed;inset:0;z-index:500;background:rgba(2,9,22,.72);display:flex;align-items:center;justify-content:center;padding:20px}
.ms629-guide.hidden{display:none!important}
.ms629-guide-card{width:min(760px,92vw);background:#0a2144;border:1px solid #32639a;border-radius:16px;padding:20px;color:#eef5ff;box-shadow:0 28px 70px rgba(0,0,0,.4)}
.ms629-guide-head{display:flex;align-items:center;justify-content:space-between}.ms629-guide-head h2{margin:0}
.ms629-guide-head button{width:36px;height:36px;border-radius:50%;border:1px solid #37689d;background:#0d2a4f;color:#fff;font-size:22px}
.ms629-guide ol{line-height:1.9;color:#bfd0e5}


/* V5.30.6.31 — Model Studio UI/Recorder fix */
.ms627-topbar{
  flex-wrap:nowrap!important;
  min-height:64px;
}
.ms627-tabs{
  flex-wrap:nowrap!important;
  white-space:nowrap;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
.ms627-tabs button{
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
.model-studio627{
  overflow:hidden!important;
}
.ms627-layout{
  height:calc(100vh - 64px)!important;
  min-height:0!important;
  overflow:hidden!important;
}
.ms627-left,.ms627-right{
  overflow-y:auto!important;
  min-height:0!important;
}
.ms627-center{
  min-height:0!important;
  overflow-y:auto!important;
}
.ms631-recorder-focus{
  outline:3px solid #7a5cff!important;
  box-shadow:0 0 0 6px rgba(122,92,255,.18),0 12px 30px rgba(0,0,0,.28)!important;
}
@media(max-width:1100px){
  .ms627-layout{grid-template-columns:210px minmax(460px,1fr) 270px!important}
  .ms627-brand small{display:none}
}

/* V5.30.6.32D — real browser-side Model controls for photo models */
.ms627-stage-inner .ms632-model-image{transform-origin:50% 70%;will-change:transform,filter;}
.ms627-stage-inner.motion-idle .ms632-model-image{animation:ms32dIdle 2.8s ease-in-out infinite;}
.ms627-stage-inner.motion-walk .ms632-model-image{animation:ms32dWalk 2.2s ease-in-out infinite;}
.ms627-stage-inner.motion-sit .ms632-model-image{animation:ms32dSit 1.2s ease-in-out forwards;}
.ms627-stage-inner.motion-wave .ms632-model-image{animation:ms32dWave 1.1s ease-in-out infinite;}
.ms627-stage-inner.motion-present .ms632-model-image{animation:ms32dPresent 1.8s ease-in-out infinite;}
.ms627-stage-inner.motion-live .ms632-model-image{animation:ms32dLive 1.5s ease-in-out infinite;}
.ms627-stage-inner.motion-paused .ms632-model-image{animation-play-state:paused!important;}
@keyframes ms32dIdle{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-5px) scale(1.005)}}
@keyframes ms32dWalk{0%,100%{transform:translateX(-18px) translateY(0) rotate(-.5deg)}50%{transform:translateX(18px) translateY(-5px) rotate(.5deg)}}
@keyframes ms32dSit{to{transform:translateY(36px) scaleY(.92) scaleX(1.02)}}
@keyframes ms32dWave{0%,100%{transform:rotate(0)}30%{transform:rotate(-1.4deg) translateX(-3px)}70%{transform:rotate(1.4deg) translateX(3px)}}
@keyframes ms32dPresent{0%,100%{transform:scale(1)}50%{transform:scale(1.035) translateY(-4px)}}
@keyframes ms32dLive{0%,100%{transform:translateY(0) rotate(-.3deg)}50%{transform:translateY(-8px) rotate(.3deg)}}
.ms627-stage-inner.scene-live{background:radial-gradient(circle at 50% 45%,#5b2b8b 0,#17162a 45%,#0b1220 100%)!important}
.ms627-stage-inner.scene-beach{background:linear-gradient(#8fd3ff 0 55%,#ffe0a3 55% 72%,#61b8d5 72%)!important}
.ms627-stage-inner.scene-gym{background:linear-gradient(135deg,#222 0 35%,#555 35% 45%,#1a1a1a 45% 100%)!important}
.ms627-stage-inner.scene-dance{background:radial-gradient(circle at 30% 20%,#ec4899,transparent 28%),radial-gradient(circle at 70% 30%,#8b5cf6,transparent 30%),#101227!important}
.ms627-stage-inner.scene-photo{background:linear-gradient(135deg,#e8e8e8,#fff 55%,#d6d6d6)!important}
.ms627-stage-inner.scene-kitchen{background:linear-gradient(180deg,#f7efe6 0 55%,#c7b7a7 55% 58%,#ece4dd 58%)!important}
.ms627-stage-inner.scene-future{background:radial-gradient(circle at 50% 40%,#174b91,#071426 60%,#02060d)!important}
.ms32d-focus{outline:3px solid #7c3aed!important;outline-offset:4px;}


/* V5.30.6.76 — right dock recovery + fully hidden state */
.global-hub.aos-fully-hidden{display:none!important}
.global-reopen-tab{
  position:fixed;right:0;top:38%;z-index:9998;
  width:30px;height:72px;border:1px solid rgba(91,39,207,.36);border-right:0;
  border-radius:14px 0 0 14px;background:linear-gradient(180deg,#7f43f4,#5b27cf);
  color:#fff;font-size:22px;font-weight:900;display:none;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 8px 24px rgba(83,42,170,.26);opacity:.9
}
.global-reopen-tab.show{display:flex}
.global-reopen-tab:hover{opacity:1;transform:translateX(-1px)}

/* ==========================================================================
   A8_STYLE_BEGIN | style_key=AOS_AI_STYLE_COMPOSER_ADAPTIVE | 中文=聊天框自適應排版 | English=Adaptive chat composer layout
   ========================================================================== */
/* V5.30.6.76 — adaptive chat composer. Attachments get their own row; text can grow to about 8–10 cm. */
.composer{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto auto auto;
  grid-template-rows:auto auto;
  align-items:end!important;
  column-gap:8px;row-gap:7px;
  width:min(900px,calc(100% - 40px))!important;
  max-height:min(12cm,58vh);
  padding:9px 10px!important;
}
.composer .attachment-tray{
  grid-column:1/-1;grid-row:1;
  width:100%;max-width:100%!important;min-width:0;
  flex-wrap:wrap;overflow-x:hidden;overflow-y:auto;
  max-height:128px;padding:1px 0 2px;
}
.composer #plus{grid-column:1;grid-row:2}
.composer #chatInput{
  grid-column:2;grid-row:2;
  width:100%;min-width:0;min-height:44px;
  max-height:min(10cm,42vh);
  height:44px;resize:none;overflow-y:auto;
  line-height:1.5;padding:10px 8px!important;
  white-space:pre-wrap;word-break:break-word;
}
.composer #mic{grid-column:3;grid-row:2}
.composer #liveVoice{grid-column:4;grid-row:2}
.composer #send{grid-column:5;grid-row:2}
.workspace{padding-bottom:190px!important}
.chat-thread{margin-bottom:155px!important}

@media(max-width:820px){
  .global-reopen-tab{top:34%;width:28px;height:66px}
  .composer{width:calc(100% - 20px)!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
  .composer #chatInput{max-height:min(8cm,36vh)}
  .workspace{padding-bottom:182px!important}
}
@media(max-width:620px){
  .composer{
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-rows:auto auto auto;
    gap:7px;
    width:calc(100% - 12px)!important;
    border-radius:15px!important;
  }
  .composer .attachment-tray{grid-column:1/-1;grid-row:1;max-height:112px}
  .composer #chatInput{grid-column:1/-1;grid-row:2;min-height:52px;max-height:min(8cm,32vh);padding:9px 10px!important}
  .composer #plus{grid-column:1;grid-row:3;justify-self:stretch;width:100%}
  .composer #mic{grid-column:2;grid-row:3;justify-self:stretch;width:100%}
  .composer #liveVoice{grid-column:3;grid-row:3;justify-self:stretch;width:100%}
  .composer #send{grid-column:4;grid-row:3;justify-self:stretch;width:100%}
  .attachment-chip{max-width:min(210px,74vw)!important}
  .workspace{padding-bottom:230px!important}
  .chat-thread{width:96%!important;margin-bottom:190px!important}
}
@media(max-width:390px){
  .composer{width:calc(100% - 8px)!important;padding:7px!important}
  .round{height:40px!important;min-width:0}
  .composer #chatInput{max-height:min(7cm,30vh)}
}


/* ==========================================================================
   A8_STYLE_END | style_key=AOS_AI_STYLE_COMPOSER_ADAPTIVE
   ========================================================================== */
/* ============================================================
   V5.30.6.92 — UI freeze candidate
   ============================================================ */

/* Top-left three-line master button */
.aos-top-left-cluster{display:flex;align-items:center;gap:10px;min-width:0}
.aos-left-master-toggle{
  flex:none;width:42px;height:42px;border:1px solid #e2dced;background:#fff;color:#5e35d4;
  border-radius:12px;font-size:23px;line-height:1;cursor:pointer;box-shadow:0 4px 14px rgba(58,35,100,.07)
}
.aos-left-master-toggle:hover,.aos-left-master-toggle.active{background:#f4efff}
.app.aos-left-hidden .side{display:none!important}

/* Whole-page drop feedback */
body.aos-global-drop-active::before{
  content:'拖放到整個 AOS AI 畫面 → 加入聊天附件';
  position:fixed;inset:9px;z-index:99990;display:flex;align-items:center;justify-content:center;
  pointer-events:none;border:3px dashed #6d3df5;border-radius:22px;background:rgba(91,49,211,.10);
  color:#5d32cc;font-size:18px;font-weight:900;backdrop-filter:blur(2px)
}
body.aos-global-drop-active .composer{
  outline:3px solid rgba(109,61,245,.35)!important;outline-offset:4px!important;
  box-shadow:0 0 0 6px rgba(109,61,245,.08),0 12px 34px rgba(66,35,145,.18)!important
}

/* Owner Studio edge tab + right drawer */
.owner-studio-edge-tab{
  position:fixed;right:0;top:52%;z-index:9997;width:31px;height:78px;border:0;border-radius:15px 0 0 15px;
  background:linear-gradient(180deg,#7d42f0,#5523c9);color:#fff;font-size:24px;font-weight:900;cursor:pointer;
  box-shadow:0 9px 28px rgba(82,40,173,.28)
}
.owner-studio-edge-tab.hidden{display:none}
.owner-studio-drawer{
  position:fixed;right:8px;bottom:8px;z-index:9999;width:66vw;height:78vh;min-width:480px;min-height:390px;
  max-width:94vw;max-height:94vh;display:none;grid-template-rows:auto auto 1fr auto;background:#120b1d;color:#f8f4ff;
  border:1px solid rgba(205,183,122,.78);border-radius:18px;overflow:hidden;
  box-shadow:0 24px 80px rgba(17,6,39,.42),0 0 0 1px rgba(115,67,225,.18)
}
.owner-studio-drawer.open{display:grid}
.owner-studio-resize{position:absolute;z-index:5}
.owner-studio-resize-left{left:-5px;top:18px;bottom:18px;width:10px;cursor:ew-resize}
.owner-studio-resize-top{left:18px;right:18px;top:-5px;height:10px;cursor:ns-resize}
.owner-studio-resize-corner{left:-7px;top:-7px;width:20px;height:20px;cursor:nwse-resize}
.owner-studio-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 13px;background:linear-gradient(135deg,#2d174d,#1a0d2b);border-bottom:1px solid #3c2858}
.owner-studio-head b{display:block;font-size:14px}.owner-studio-head small{display:block;color:#bcaed2;font-size:10px;margin-top:2px}
.owner-studio-head-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.owner-studio-head-actions button,.owner-studio-mode-tabs button,.owner-training-tabs button,.owner-studio-drawer button{
  border:1px solid #4a3567;background:#211331;color:#f3eaff;border-radius:8px;padding:7px 9px;cursor:pointer
}
.owner-studio-head-actions button:hover,.owner-studio-drawer button:hover{border-color:#cdb77a;background:#382052}
.owner-studio-mode-tabs{display:flex;gap:6px;padding:8px 10px;background:#160d23;border-bottom:1px solid #352247}
.owner-studio-mode-tabs button.active,.owner-training-tabs button.active{background:#6d3df5;border-color:#bda2ff}
.owner-studio-mode{display:none;min-height:0;overflow:auto;padding:12px}
.owner-studio-mode.active{display:block}
.owner-studio-toolbar,.owner-training-toolbar,.owner-code-toolbar,.owner-training-runtime-row{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px
}
.owner-studio-drawer input,.owner-studio-drawer textarea{
  background:#0c0712;color:#f7f2ff;border:1px solid #493361;border-radius:9px;padding:9px;outline:none
}
.owner-studio-toolbar input,.owner-training-toolbar input{flex:1;min-width:180px}
.owner-studio-note{color:#b9adc8;font-size:11px;line-height:1.55;background:#0d0813;border:1px solid #30213e;border-radius:10px;padding:9px}
.owner-panel-list,.owner-category-list{display:grid;gap:7px}
.owner-panel-row,.owner-category-row,.owner-file-row,.owner-version-row{
  display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 10px;border:1px solid #352548;background:#181022;border-radius:10px
}
.owner-panel-row.is-hidden{opacity:.55}
.owner-panel-row b,.owner-category-row b,.owner-file-row b,.owner-version-row b{font-size:12px}
.owner-panel-row small,.owner-category-row small,.owner-file-row small,.owner-version-row small{display:block;color:#a99bbd;font-size:9px;margin-top:3px}
.owner-panel-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.owner-studio-drawer .danger{border-color:#7c3d52!important;color:#ffb5c6!important}
.owner-empty{padding:22px;text-align:center;color:#9688aa;border:1px dashed #3c2b50;border-radius:10px}
.owner-training-runtime-row{justify-content:flex-end}.owner-training-runtime-row span{margin-right:auto;color:#b9adc8}.owner-training-runtime-row b{color:#f3bd72}.owner-training-runtime-row b.ok{color:#76d39b}
.owner-training-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}
.owner-training-tabs button{font-size:10px;padding:6px 8px}
.owner-training-content{min-height:280px}
.owner-file-zone{border:1px dashed #5a4174;border-radius:12px;padding:14px;background:#0e0915}
.owner-code-editor{width:100%;height:38vh;min-height:220px;resize:none;font-family:Consolas,monospace;font-size:12px;line-height:1.5}
.owner-code-diff,.owner-runtime-placeholder pre{white-space:pre-wrap;background:#08050c;border:1px solid #30213e;padding:10px;border-radius:9px;color:#aee4bf;min-height:54px}
.owner-runtime-placeholder{padding:18px;border:1px solid #37264c;background:#0f0917;border-radius:12px}
.owner-runtime-placeholder h3{margin-top:0}.owner-runtime-placeholder p{color:#b9adc8}
.owner-studio-foot{display:flex;justify-content:space-between;gap:12px;padding:8px 11px;background:#0b0710;border-top:1px solid #2c1e3b;color:#988baa;font-size:9px}

/* Mobile composer: always reachable above browser keyboard; STT behavior untouched. */
@media(max-width:820px){
  .app{height:var(--app-height,100dvh)}
  .side{
    position:fixed!important;left:0;top:0;bottom:0;z-index:9800;width:min(84vw,330px)!important;
    box-shadow:14px 0 44px rgba(23,13,42,.24)
  }
  .app.aos-left-hidden .side{display:none!important}
  .top{height:64px;padding:0 8px!important}
  .aos-top-left-cluster{gap:7px;min-width:0}
  .aos-left-master-toggle{width:40px;height:40px;font-size:22px}
  .top .title b{font-size:16px}.top .title div{display:none!important}
  .top-actions{gap:5px}.top-actions .pill{min-width:0;padding:8px 9px}
  .top-actions .pill:first-child{display:none}
  .workspace{padding:18px 10px 240px!important}
  .composer{
    position:fixed!important;left:50%!important;right:auto!important;
    bottom:calc(var(--aos-keyboard-bottom,0px) + max(6px,env(safe-area-inset-bottom)))!important;
    width:calc(100vw - 12px)!important;max-width:none!important;z-index:9500!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:auto auto auto!important;
    gap:6px!important;padding:7px!important;border-radius:14px!important
  }
  .composer .attachment-tray{grid-column:1/-1!important;grid-row:1!important;max-height:92px!important}
  .composer #chatInput{
    grid-column:1/-1!important;grid-row:2!important;min-height:50px!important;max-height:28vh!important;
    font-size:16px!important;padding:10px 11px!important
  }
  .composer #plus{grid-column:1!important;grid-row:3!important}
  .composer #mic{grid-column:2!important;grid-row:3!important}
  .composer #liveVoice{grid-column:3!important;grid-row:3!important}
  .composer #send{grid-column:4!important;grid-row:3!important}
  .composer .round{width:100%!important;height:44px!important;min-width:0!important;touch-action:manipulation}
  .chat-thread{width:100%!important;margin-bottom:188px!important}
  .owner-studio-drawer{right:0;bottom:0;width:100vw!important;height:88dvh!important;min-width:0;max-width:100vw;max-height:94dvh;border-radius:16px 16px 0 0}
  .owner-studio-resize-left{display:none}
  .owner-studio-head{align-items:flex-start}.owner-studio-head-actions{max-width:58%}
  .owner-studio-head-actions [data-owner-size]{display:none}
  .owner-studio-foot span:first-child{display:none}
}
@media(max-width:420px){
  .top-actions #tieredModelButton{display:none}
  .lang-wrap .pill{font-size:11px;max-width:98px}
  .workspace{padding-left:6px!important;padding-right:6px!important}
  .composer{width:calc(100vw - 6px)!important;padding:6px!important}
  .composer #chatInput{min-height:48px!important;max-height:24vh!important}
  .composer .round{height:42px!important}
}


/* V5.30.6.92 — Cloud AI / Device Bridge inside Owner Training Studio */
.owner-bridge-panel{display:grid;gap:10px}
.owner-bridge-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.owner-bridge-status-card{
  padding:10px;border:1px solid #3a2850;background:#0c0712;border-radius:10px
}
.owner-bridge-status-card span{display:block;color:#ad9fbe;font-size:9px;margin-bottom:4px}
.owner-bridge-status-card b{font-size:12px;color:#e2bd74}
.owner-bridge-status-card b.ok{color:#76d39b}
.owner-bridge-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.owner-bridge-actions select{
  flex:1;min-width:220px;background:#0c0712;color:#f7f2ff;border:1px solid #493361;border-radius:9px;padding:9px
}
.owner-bridge-instruction{width:100%;min-height:108px;resize:vertical}
.owner-bridge-log{
  margin:0;min-height:112px;white-space:pre-wrap;background:#08050c;border:1px solid #30213e;
  padding:10px;border-radius:9px;color:#aee4bf;overflow:auto
}
@media(max-width:820px){
  .owner-bridge-status-grid{grid-template-columns:1fr}
  .owner-bridge-actions{align-items:stretch}
  .owner-bridge-actions select,.owner-bridge-actions button{width:100%;min-width:0}
}


/* V5.30.6.92 — integrated Brain / Router / Tier Training panel */
.owner-brain-router-panel{display:grid;gap:10px}
.owner-brain-mode-switch{
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:9px;border:1px solid #3c2950;
  background:#0d0813;border-radius:11px
}
.owner-brain-mode-switch button.active{background:#6d3df5;border-color:#c3aaff}
.owner-brain-mode-switch span{font-size:10px;color:#b9adc8;flex:1;min-width:240px}
.owner-brain-tier-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.owner-brain-tier-card{padding:10px;border:1px solid #49335f;background:#181022;border-radius:11px;min-width:0}
.owner-brain-tier-card b{display:block;color:#f0d78d;font-size:18px}
.owner-brain-tier-card span{display:block;color:#f5edff;font-size:9px;margin-top:2px;font-weight:800}
.owner-brain-tier-card small{display:block;color:#aa9bbc;font-size:9px;line-height:1.35;margin-top:5px}
.owner-brain-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.owner-brain-settings-grid label{display:grid;gap:5px;font-size:9px;color:#b9adc8}
.owner-brain-settings-grid label.is-disabled{opacity:.5}
.owner-brain-settings-grid select{
  width:100%;min-width:0;background:#0c0712;color:#f7f2ff;border:1px solid #493361;border-radius:8px;padding:8px
}
.owner-brain-actions{display:flex;gap:8px;flex-wrap:wrap}
.owner-brain-console{
  margin:0;white-space:pre-wrap;min-height:100px;max-height:240px;overflow:auto;background:#08050c;
  border:1px solid #30213e;padding:10px;border-radius:9px;color:#aee4bf
}
.owner-brain-training-block{padding:11px;border:1px solid #4b3364;background:#100918;border-radius:12px}
.owner-brain-training-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.owner-brain-training-head b{font-size:12px}.owner-brain-training-head small{display:block;color:#a99abd;font-size:9px;margin-top:3px}
#ownerBrainTrainingStatus{color:#e4bd71}#ownerBrainTrainingStatus.ok{color:#76d39b}
.owner-brain-targets{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.owner-brain-targets label{border:1px solid #45305c;background:#1b1127;padding:7px 9px;border-radius:9px;font-size:10px}
@media(max-width:1050px){
  .owner-brain-tier-grid{grid-template-columns:repeat(3,1fr)}
  .owner-brain-settings-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:620px){
  .owner-brain-tier-grid,.owner-brain-settings-grid{grid-template-columns:1fr}
  .owner-brain-mode-switch span{min-width:0;width:100%}
}


/* V5.30.6.92 — persistent Training File Vault + Code upload/download */
.owner-file-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.owner-file-toolbar>span{color:#a99bbd;font-size:10px;flex:1;min-width:260px}
.owner-file-upload-btn{
  display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border:1px solid #4a3567;
  background:#211331;color:#f3eaff;border-radius:8px;cursor:pointer;font-size:11px
}
.owner-file-upload-btn:hover{border-color:#cdb77a;background:#382052}
.owner-file-drop-zone.is-dragging{border-color:#8e66ff;background:#1a1027;box-shadow:inset 0 0 0 2px rgba(142,102,255,.25)}
.owner-file-main{min-width:0;flex:1}.owner-file-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.owner-file-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.owner-file-preview{margin-top:10px;border:1px solid #352548;background:#0a0610;border-radius:10px;min-height:90px;padding:10px;overflow:auto}
.owner-file-preview-meta{color:#cbb7e0;font-size:10px;margin-bottom:8px}
.owner-file-preview-image{display:block;max-width:100%;max-height:42vh;margin:0 auto;border-radius:8px}
.owner-file-preview-text{white-space:pre-wrap;word-break:break-word;margin:0;color:#d6f4de;font-family:Consolas,monospace;font-size:11px;line-height:1.45}
.owner-code-name{min-width:210px;flex:1}
@media(max-width:620px){
  .owner-file-actions{width:100%;justify-content:stretch}
  .owner-file-actions button{flex:1}
  .owner-code-toolbar{align-items:stretch}
  .owner-code-toolbar>*{width:100%}
}


/* ==========================================================================
   A8_STYLE_BEGIN | style_key=AOS_AI_STYLE_STT_INLINE_WAVE | 中文=STT 行內聲波 | English=STT inline waveform
   ========================================================================== */
/* V5.30.6.92 — STT-only inline waveform.
   IMPORTANT: no microphone-button style is changed here. */
.manual-stt-wave-v53092{
  position:absolute;
  bottom:9px;
  height:20px;
  display:none;
  align-items:center;
  justify-content:center;
  gap:3px;
  padding:0 5px;
  overflow:hidden;
  pointer-events:none;
  z-index:25;
  border-radius:8px;
  background:linear-gradient(90deg,rgba(255,255,255,.90),rgba(247,243,255,.94),rgba(255,255,255,.90));
}
.manual-stt-wave-v53092.show{display:flex}
.manual-stt-wave-v53092 span{
  width:3px;
  height:16px;
  flex:1;
  min-width:2px;
  max-width:7px;
  border-radius:999px;
  background:#754cf0;
  transform:scaleY(.08);
  transform-origin:center;
  opacity:.4;
  transition:transform 80ms linear,opacity 80ms linear;
}

/* ==========================================================================
   A8_STYLE_BEGIN | style_key=AOS_AI_STYLE_MIC_LIVE_BUTTONS | 中文=麥克風／語音對話按鈕 | English=Microphone and Live Voice buttons
   ========================================================================== */
/* ==========================================================================
   A8_STYLE_END | style_key=AOS_AI_STYLE_STT_INLINE_WAVE
   ========================================================================== */
/* A8_V53098_DIRECT_SOURCE_CSS_BEGIN */

#mic,#liveVoice{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border-radius:14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  line-height:1!important;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease!important;
}
#mic svg,#liveVoice svg{
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  pointer-events:none!important;
}
#mic:hover,#liveVoice:hover{transform:translateY(-1px)!important}
#mic:active,#liveVoice:active{transform:translateY(0) scale(.97)!important}
#mic{background:#f6f1ff!important;color:#5f37d7!important;border:1px solid #e0d5ff!important}
#liveVoice{background:#7041e8!important;color:#fff!important;border:1px solid #7041e8!important}
#liveVoice.active,#liveVoice.recording,#liveVoice.listening,#liveVoice.speaking,#liveVoice[aria-pressed="true"]{
  box-shadow:0 0 0 4px rgba(112,65,232,.16)!important;
}

.a8-v53098-collapse-btn{
  position:sticky!important;
  top:8px!important;
  z-index:250!important;
}

[data-a8-v53098-hidden="1"]{display:none!important}

@media(max-width:820px){
  .composer{
    padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
  }
  #chatInput{
    min-width:0!important;
    font-size:16px!important;
  }
  #mic,#liveVoice{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    border-radius:13px!important;
  }
}

/* A8_V53098_DIRECT_SOURCE_CSS_END */

/* ==========================================================================
   A8_STYLE_END | style_key=AOS_AI_STYLE_MIC_LIVE_BUTTONS
   ========================================================================== */
/* A8_V53100_UI_CLEANUP_WAVE_CSS_BEGIN */

.app{transition:grid-template-columns .18s ease!important}
.app.a8-side-fully-collapsed{grid-template-columns:0 minmax(0,1fr)!important}
.app.a8-side-fully-collapsed #side{
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  transform:translateX(-110%)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  border-right:0!important;
  overflow:hidden!important
}
#side{transition:transform .18s ease,opacity .18s ease,width .18s ease!important}

.a8-hamburger-lines{
  width:20px;height:16px;display:inline-flex;flex-direction:column;
  justify-content:space-between;pointer-events:none
}
.a8-hamburger-lines i{
  display:block;width:20px;height:2px;border-radius:999px;background:currentColor
}

#collapse{
  order:-1!important;
  margin-left:0!important;
  margin-right:8px!important;
  width:38px!important;height:38px!important;min-width:38px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border-radius:10px!important
}

.side-toggle-top{
  width:40px;height:40px;min-width:40px;
  border:1px solid #e7e2ef;border-radius:11px;background:#fff;color:#5a4c6d;
  display:none;align-items:center;justify-content:center;cursor:pointer;
  flex:0 0 40px;margin-right:10px
}
.app.a8-side-fully-collapsed .side-toggle-top{display:inline-flex!important}
.side-toggle-top:hover,#collapse:hover{background:#f6f3fb!important}

.top-actions{gap:8px!important}
.preview-note{display:none!important}

/* ==========================================================================
   A8_STYLE_BEGIN | style_key=AOS_AI_STYLE_REAL_MIC_WAVE | 中文=聊天框內真實麥克風聲波 | English=Inline real microphone waveform
   ========================================================================== */
/* Real waveform lives inside the current composer, not an overlay. */
#a8VoiceWave{
  width:150px!important;
  height:38px!important;
  min-width:110px!important;
  max-width:180px!important;
  display:block!important;
  align-self:center!important;
  border-radius:10px!important;
  background:rgba(111,76,200,.035)!important;
  pointer-events:none!important;
  flex:0 1 150px!important
}

/* ==========================================================================
   A8_STYLE_END | style_key=AOS_AI_STYLE_REAL_MIC_WAVE
   ========================================================================== */
/* Owner requested no lower-right ENGINE OFF visual badge. */
[class*="engine-status-badge"],[id*="engineStatusBadge"]{display:none!important}

@media(max-width:900px){
  #a8VoiceWave{
    width:110px!important;
    min-width:72px!important;
    max-width:120px!important;
    flex-basis:110px!important
  }
}
@media(max-width:620px){
  #a8VoiceWave{
    width:72px!important;
    min-width:54px!important;
    max-width:78px!important;
    flex-basis:72px!important
  }
  .side-toggle-top{display:inline-flex!important}
  .app{grid-template-columns:0 minmax(0,1fr)!important}
  #side{
    position:fixed!important;left:0!important;top:0!important;bottom:0!important;
    z-index:1200!important
  }
  .app:not(.a8-side-fully-collapsed) #side{
    width:min(86vw,355px)!important;
    max-width:min(86vw,355px)!important;
    transform:translateX(0)!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important
  }
}

/* A8_V53100_UI_CLEANUP_WAVE_CSS_END */

/* A8_V53102_4D_THEME_CSS_BEGIN */

/* ===== Template menu inside existing + menu ===== */
#a8ThemeTemplateMenu{
  border-top:1px solid rgba(96,73,128,.14);
  margin-top:7px;
  padding-top:8px;
  width:100%;
  box-sizing:border-box
}
#a8ThemeTemplateMenu .a8-theme-template-title{
  font-size:11px;
  padding:2px 8px 7px;
  color:#7b6d8d
}
#a8ThemeTemplateMenu .a8-theme-template-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:0 6px 6px
}
#a8ThemeTemplateMenu button{
  min-height:34px;
  border:1px solid rgba(108,75,160,.18);
  border-radius:9px;
  background:#f7f3ff;
  color:#5d43a7;
  cursor:pointer;
  font-size:11px
}
#a8ThemeTemplateMenu button.active{
  background:linear-gradient(135deg,#6d43e8,#8b57ef);
  border-color:#cdb36e;
  color:#fff;
  box-shadow:0 0 0 1px rgba(231,198,111,.28) inset
}

/* ===== Luxury voice/send controls: same family, no behavior change ===== */
#mic,#liveVoice,#send{
  position:relative!important;
  overflow:hidden!important;
}
#mic svg,#liveVoice svg,#send svg{
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  pointer-events:none!important
}
#mic{
  background:linear-gradient(145deg,#7f50ee,#6840d9)!important;
  color:#fff!important;
  border:1.5px solid #e4c875!important;
  box-shadow:
    0 0 0 2px rgba(229,199,111,.10),
    0 5px 16px rgba(87,57,177,.18)!important
}
#liveVoice{
  background:linear-gradient(145deg,#7f50ee,#6840d9)!important;
  color:#fff!important;
  border:1.5px solid #d7b85f!important;
  box-shadow:0 5px 16px rgba(87,57,177,.16)!important
}
#send{
  background:linear-gradient(145deg,#8c58f2,#6e43e4)!important;
  color:#fff!important;
  border:1.5px solid #d7b85f!important;
  box-shadow:0 5px 16px rgba(87,57,177,.18)!important
}
#mic:hover,#liveVoice:hover,#send:hover{
  box-shadow:
    0 0 0 2px rgba(231,198,111,.16),
    0 7px 22px rgba(87,57,177,.24)!important
}
#mic.active,#mic.recording,#liveVoice.active,#liveVoice.recording,#liveVoice.listening,#liveVoice[aria-pressed="true"]{
  box-shadow:
    0 0 0 3px rgba(235,203,111,.23),
    0 0 24px rgba(137,84,238,.30)!important
}

/* ===== 4D SKY / 四維天空 ===== */
html[data-a8-theme="sky4d"] body{
  background:
    linear-gradient(90deg,rgba(18,10,35,.24),rgba(33,17,58,.06)),
    url("./assets/themes/a8-four-d-sky-v53102.png") center center / cover fixed no-repeat!important;
}

html[data-a8-theme="sky4d"] .app{
  background:transparent!important;
}
html[data-a8-theme="sky4d"] .main,
html[data-a8-theme="sky4d"] .workspace{
  background:transparent!important;
}
html[data-a8-theme="sky4d"] #homePanel{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-a8-theme="sky4d"] #homePanel>.hero{
  display:none!important;
}

/* Sidebar becomes glass, not a second layer. */
html[data-a8-theme="sky4d"] #side{
  background:linear-gradient(180deg,rgba(28,17,49,.86),rgba(24,13,43,.76))!important;
  border-right:1px solid rgba(231,199,111,.26)!important;
  backdrop-filter:blur(18px) saturate(1.12)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.12)!important;
  color:#fff!important;
}
html[data-a8-theme="sky4d"] #side .brand-text b,
html[data-a8-theme="sky4d"] #side .brand-text small,
html[data-a8-theme="sky4d"] #side .group-label,
html[data-a8-theme="sky4d"] #side .txt,
html[data-a8-theme="sky4d"] #side .member-name,
html[data-a8-theme="sky4d"] #side .member-sub{
  color:#fff!important;
}
html[data-a8-theme="sky4d"] #side .item,
html[data-a8-theme="sky4d"] #side .group-head{
  color:#f6f0ff!important;
}
html[data-a8-theme="sky4d"] #side .item.active,
html[data-a8-theme="sky4d"] #side .new{
  background:linear-gradient(135deg,rgba(108,62,229,.92),rgba(139,75,238,.88))!important;
  border-color:rgba(230,199,109,.42)!important;
  color:#fff!important
}

/* Right-side chat composition leaves the world/character visible. */
html[data-a8-theme="sky4d"][data-a8-chat-layout="right"] #homePanel{
  width:min(62vw,940px)!important;
  max-width:940px!important;
  margin-left:auto!important;
  margin-right:3.5vw!important;
}
html[data-a8-theme="sky4d"][data-a8-chat-layout="center"] #homePanel{
  width:min(74vw,1120px)!important;
  max-width:1120px!important;
  margin-left:auto!important;
  margin-right:auto!important
}

html[data-a8-theme="sky4d"] #chatThread{
  padding-top:28px!important;
  padding-bottom:150px!important;
}

/* Existing messages get glass treatment when their known bubble classes exist. */
html[data-a8-theme="sky4d"] #chatThread .bubble,
html[data-a8-theme="sky4d"] #chatThread .message,
html[data-a8-theme="sky4d"] #chatThread .msg{
  backdrop-filter:blur(15px) saturate(1.10)!important;
  -webkit-backdrop-filter:blur(15px) saturate(1.10)!important;
  border:1px solid rgba(233,206,131,.20)!important;
  box-shadow:0 10px 34px rgba(25,10,45,.14)!important
}

/* Existing composer becomes one luxury glass console. */
html[data-a8-theme="sky4d"] .composer{
  background:linear-gradient(135deg,rgba(36,19,59,.78),rgba(58,31,85,.70))!important;
  border:1px solid rgba(231,199,111,.34)!important;
  box-shadow:
    0 18px 55px rgba(22,9,40,.28),
    inset 0 1px 0 rgba(255,255,255,.12)!important;
  backdrop-filter:blur(18px) saturate(1.18)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.18)!important
}
html[data-a8-theme="sky4d"] #chatInput{
  color:#fff!important;
  caret-color:#f1d47d!important;
}
html[data-a8-theme="sky4d"] #chatInput::placeholder{
  color:rgba(255,255,255,.64)!important;
}
html[data-a8-theme="sky4d"] #plus{
  background:rgba(255,255,255,.08)!important;
  color:#f3d77f!important;
  border-color:rgba(231,199,111,.28)!important
}
html[data-a8-theme="sky4d"] #a8WaveBand{
  background:linear-gradient(90deg,rgba(126,74,229,.03),rgba(236,208,124,.08),rgba(126,74,229,.03))!important
}

/* Keep mobile usable: world remains the background, chat goes full width. */
@media(max-width:980px){
  html[data-a8-theme="sky4d"][data-a8-chat-layout="right"] #homePanel,
  html[data-a8-theme="sky4d"][data-a8-chat-layout="center"] #homePanel{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important
  }
  html[data-a8-theme="sky4d"] body{
    background-position:center top!important
  }
}

/* ===== Standard theme stays clean ===== */
html[data-a8-theme="default"] body{
  background:#fff
}

/* A8_V53102_4D_THEME_CSS_END */

/* A8_V53104C_CONTROL_STT_WAVE_CSS_BEGIN */
:root{
  --a8c-bg:url("./assets/themes/a8-world-pure-v53104c.png");
  --a8c-gold:#e2c56b;
  --a8c-purple:#7546e8;
}

/* Keep original top DOM for runtime, remove only the white visual board. */
.top{
  height:0!important;min-height:0!important;padding:0!important;margin:0!important;
  border:0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important
}
.top>*{visibility:hidden!important;pointer-events:none!important}
#a8CLanguageSlot .lang-wrap,
#a8CLanguageSlot .lang-wrap *{visibility:visible!important;pointer-events:auto!important}

.a8c-round{
  width:44px;height:44px;border-radius:50%;border:1px solid rgba(226,197,107,.50);
  background:rgba(39,20,61,.82);color:#fff;display:flex;align-items:center;justify-content:center;
  cursor:pointer;pointer-events:auto!important;z-index:1200!important;
  box-shadow:0 8px 24px rgba(25,10,43,.22);backdrop-filter:blur(14px)
}
.a8c-round svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.a8c-menu-btn{position:fixed;left:16px;top:146px;flex-direction:column;gap:4px}
.a8c-menu-btn span{display:block;width:20px;height:2px;border-radius:99px;background:#fff}
.a8c-top-actions{position:fixed;right:16px;top:146px;display:flex;gap:10px;z-index:1200!important;pointer-events:auto!important}
.a8c-dots{gap:3px}
.a8c-dots i{width:4px;height:4px;border-radius:50%;background:#fff;display:block}
#a8CShareBtn.ok::after{
  content:'已複製';position:absolute;right:54px;top:10px;white-space:nowrap;
  background:#241531;padding:5px 8px;border-radius:8px;font-size:11px;color:#fff
}

.a8c-more{
  position:fixed;right:16px;top:198px;z-index:1210;width:230px;padding:12px;border-radius:15px;
  background:rgba(31,17,50,.96);color:#fff;border:1px solid rgba(226,197,107,.30);
  box-shadow:0 16px 44px rgba(18,8,32,.28);backdrop-filter:blur(18px);pointer-events:auto!important
}
.a8c-more-title{font-weight:700;color:#ead99b;margin:2px 4px 8px}
.a8c-more button,.a8c-more #langBtn{
  width:100%;min-height:38px;margin:4px 0;padding:7px 9px;border-radius:10px;
  border:1px solid rgba(226,197,107,.18);background:rgba(255,255,255,.08);color:#fff;cursor:pointer
}
.a8c-more button.active{background:linear-gradient(135deg,#7546e8,#955bf2);border-color:var(--a8c-gold)}
#a8CLanguageSlot .lang-wrap{position:relative!important;width:100%!important}

/* Old sine line is hidden; the new waveform is a proper multi-bar canvas. */
#a8VoiceWave,.a8-wave-band{display:none!important}
#a8CWave{
  position:fixed;z-index:1180;display:none;pointer-events:none!important;background:transparent!important
}

/* Existing composer: keep functions, only make it more compact/adaptive. */
.composer{
  max-width:min(930px,calc(100vw - 32px))!important;
  min-height:62px!important;padding:8px 10px!important;gap:7px!important;
  flex-wrap:wrap!important;box-sizing:border-box!important
}
.composer #chatInput{
  flex:1 1 220px!important;min-width:120px!important;min-height:42px!important;
  box-sizing:border-box!important;padding-bottom:34px!important
}
.attachment-tray,
[class*="attachment"][class*="tray"],
[class*="preview"][class*="tray"]{
  width:100%!important;max-height:150px!important;overflow:auto!important;order:-1!important
}

#a8CDropHint{
  position:fixed;inset:18px;z-index:1600;display:none;align-items:center;justify-content:center;
  pointer-events:none;border:2px dashed rgba(226,197,107,.90);border-radius:24px;
  background:rgba(43,23,67,.60);color:#fff;font-size:22px;font-weight:700;backdrop-filter:blur(10px)
}
#a8CDropHint.show{display:flex}

/* Theme/background */
html[data-a8-c-theme="world"] body,
html[data-a8-ctheme="world"] body{
  background:linear-gradient(90deg,rgba(20,9,34,.04),rgba(20,9,34,.02)),var(--a8c-bg) center center/cover fixed no-repeat!important
}
html[data-a8-c-theme="white"] body,
html[data-a8-ctheme="white"] body{background:#fff!important}
html[data-a8-c-theme="purple"] body,
html[data-a8-ctheme="purple"] body{background:linear-gradient(135deg,#f8f4ff,#eee5ff 55%,#faf8ff)!important}

@media(max-width:768px){
  .a8c-menu-btn{left:8px;top:136px}
  .a8c-top-actions{right:8px;top:136px}
  .a8c-round{width:40px;height:40px}
  .a8c-more{right:8px;top:184px;width:min(78vw,250px)}
  .composer{
    position:fixed!important;left:6px!important;right:6px!important;bottom:6px!important;
    width:auto!important;max-width:none!important;max-height:42vh!important;z-index:1000!important
  }
  .composer #chatInput{flex:1 1 130px!important;min-width:100px!important;max-height:120px!important}
}
/* A8_V53104C_CONTROL_STT_WAVE_CSS_END */

/* A8_V53104D_MINIMAL_FUNCTION_HOTFIX_CSS_BEGIN */

/* New top controls: highest usable app position. */
#a8DMenuBtn{
  position:fixed!important;
  left:10px!important;
  top:10px!important;
  z-index:2500!important;
}
#a8DTopActions{
  position:fixed!important;
  right:10px!important;
  top:10px!important;
  z-index:2500!important;
  display:flex!important;
  gap:10px!important;
}
.a8d-round{
  width:44px;height:44px;border-radius:50%;
  border:1px solid rgba(226,197,107,.50);
  background:rgba(39,20,61,.84);color:#fff;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;pointer-events:auto!important;
  box-shadow:0 7px 22px rgba(24,10,42,.22);
  backdrop-filter:blur(14px)
}
.a8d-menu{flex-direction:column;gap:4px}
.a8d-menu span{width:20px;height:2px;border-radius:99px;background:#fff;display:block}
.a8d-round svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.a8d-dots{gap:3px}
.a8d-dots i{width:4px;height:4px;border-radius:50%;background:#fff;display:block}

#a8DToast{
  position:fixed;right:12px;top:64px;z-index:2700;
  padding:8px 12px;border-radius:10px;background:rgba(31,17,50,.95);
  color:#fff;border:1px solid rgba(226,197,107,.28);
  box-shadow:0 12px 32px rgba(17,7,30,.22);
  opacity:0;transform:translateY(-6px);pointer-events:none;transition:.16s ease
}
#a8DToast.show{opacity:1;transform:translateY(0)}

/* Skill Center close button */
#a8DSkillClose{
  position:fixed;right:18px;top:86px;z-index:2450;
  width:38px;height:38px;border-radius:50%;
  border:1px solid rgba(117,70,232,.24);
  background:rgba(255,255,255,.94);color:#5b3aa8;
  display:none;align-items:center;justify-content:center;
  font-size:26px;line-height:1;cursor:pointer;
  box-shadow:0 8px 22px rgba(48,27,86,.14)
}

/* Copy / download on generated messages */
.a8d-message-host{position:relative!important}
.a8d-msg-actions{
  position:absolute;right:8px;bottom:6px;
  display:flex;gap:6px;opacity:.18;transition:.14s ease;z-index:20
}
.a8d-message-host:hover>.a8d-msg-actions{opacity:1}
.a8d-msg-actions button{
  min-height:28px;padding:4px 8px;border-radius:8px;
  border:1px solid rgba(117,70,232,.16);
  background:rgba(255,255,255,.90);color:#5a3e91;
  font-size:12px;cursor:pointer
}

/* Make + menu readable without forcing it open. */
#plusMenu{z-index:2350!important}
#plusMenu button,#plusMenu [role="button"]{cursor:pointer!important}

/* Clean world background: no extra tinted film. */
html[data-a8-c-theme="world"] body,
html[data-a8-ctheme="world"] body{
  background-image:var(--a8c-bg)!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important
}

@media(max-width:768px){
  #a8DMenuBtn{left:8px!important;top:8px!important}
  #a8DTopActions{right:8px!important;top:8px!important}
  #a8DSkillClose{right:10px;top:58px}
  .a8d-round{width:40px;height:40px}
  .a8d-msg-actions{opacity:.75}
}
/* A8_V53104D_MINIMAL_FUNCTION_HOTFIX_CSS_END */

/* A8_V53104E_TRUE_HAMBURGER_SHARE_LANGUAGE_CSS_BEGIN */

/* Use the ORIGINAL functional V53102 hamburger, just move it to the top. */
#a8DMenuBtn{display:none!important}

#collapse{
  position:fixed!important;
  left:10px!important;
  top:10px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  z-index:5000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
  cursor:pointer!important;
  border-radius:50%!important;
  border:1px solid rgba(226,197,107,.50)!important;
  background:rgba(39,20,61,.86)!important;
  color:#fff!important;
  box-shadow:0 7px 22px rgba(24,10,42,.22)!important;
  backdrop-filter:blur(14px)!important;
}

/* Top-right: share + existing working 3-dot. */
#a8DTopActions{
  position:fixed!important;
  right:10px!important;
  top:10px!important;
  z-index:5000!important;
  display:flex!important;
  gap:10px!important;
  pointer-events:auto!important;
}
#a8EShareBtn,
#a8DMoreBtn{
  pointer-events:auto!important;
  cursor:pointer!important;
}

/* Visible local share popup. */
#a8EShareMenu{
  position:fixed;
  right:64px;
  top:62px;
  z-index:5100;
  width:170px;
  padding:10px;
  border-radius:14px;
  background:rgba(32,17,50,.97);
  border:1px solid rgba(226,197,107,.34);
  box-shadow:0 16px 42px rgba(18,8,32,.28);
  backdrop-filter:blur(16px);
  color:#fff;
}
#a8EShareMenu[hidden]{display:none!important}
.a8e-share-title{
  color:#ead99b;
  font-weight:700;
  padding:3px 5px 8px;
}
#a8EShareMenu button{
  width:100%;
  min-height:38px;
  margin:4px 0;
  border-radius:10px;
  border:1px solid rgba(226,197,107,.20);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}
#a8EShareMenu button:hover{
  background:linear-gradient(135deg,#7546e8,#955bf2);
  border-color:#e2c56b;
}
#a8EToast{
  position:fixed;
  right:12px;
  top:114px;
  z-index:5200;
  opacity:0;
  transform:translateY(-5px);
  padding:7px 11px;
  border-radius:9px;
  background:#28183a;
  color:#fff;
  border:1px solid rgba(226,197,107,.26);
  pointer-events:none;
  transition:.15s ease;
}
#a8EToast.show{opacity:1;transform:translateY(0)}

/* 40-language menu: purple / gold, no large white board. */
#langMenu.a8e-language-purple,
.a8e-language-purple{
  background:rgba(37,20,57,.98)!important;
  border:1px solid rgba(226,197,107,.34)!important;
  box-shadow:0 16px 42px rgba(18,8,32,.30)!important;
  border-radius:14px!important;
  padding:8px!important;
  color:#fff!important;
  z-index:5300!important;
}

#langMenu.a8e-language-purple button,
#langMenu.a8e-language-purple [role="option"],
#langMenu.a8e-language-purple [data-lang],
#langMenu.a8e-language-purple > *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

#langMenu.a8e-language-purple button,
#langMenu.a8e-language-purple [role="option"],
#langMenu.a8e-language-purple [data-lang]{
  background:rgba(255,255,255,.07)!important;
  border:1px solid rgba(226,197,107,.14)!important;
  border-radius:10px!important;
  margin:4px 0!important;
}

#langMenu.a8e-language-purple button:hover,
#langMenu.a8e-language-purple [role="option"]:hover,
#langMenu.a8e-language-purple [data-lang]:hover,
#langMenu.a8e-language-purple .active,
#langMenu.a8e-language-purple [aria-selected="true"]{
  background:linear-gradient(135deg,#7546e8,#955bf2)!important;
  border-color:#e2c56b!important;
  color:#fff!important;
}

#langBtn.a8e-language-button{
  background:rgba(255,255,255,.09)!important;
  color:#fff!important;
  border:1px solid rgba(226,197,107,.45)!important;
}

/* Keep the existing working 3-dot menu high enough. */
#a8CMoreMenu{
  z-index:5050!important;
}

/* Do NOT touch STT / Live Voice / upload / skill / message actions in this patch. */

@media(max-width:768px){
  #collapse{left:8px!important;top:8px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
  #a8DTopActions{right:8px!important;top:8px!important}
  #a8EShareMenu{right:54px;top:56px;width:min(74vw,180px)}
}
/* A8_V53104E_TRUE_HAMBURGER_SHARE_LANGUAGE_CSS_END */

/* A8_V53104E1_BASE_E_4FIX_CSS_BEGIN */

/* One guaranteed hamburger at the highest app level. */
#a8FMenuBtn,#a8DMenuBtn,#a8CMenuBtn,#a8SafeMenuBtn{
  display:none!important;
}

#a8E1MenuBtn{
  position:fixed!important;
  left:10px!important;
  top:10px!important;
  z-index:2147483000!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  padding:0!important;
  margin:0!important;
  border-radius:50%!important;
  border:1px solid rgba(226,197,107,.52)!important;
  background:rgba(39,20,61,.90)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  box-shadow:0 8px 24px rgba(24,10,42,.24)!important;
  backdrop-filter:blur(14px)!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  visibility:visible!important;
  opacity:1!important;
}
#a8E1MenuBtn span{
  display:block!important;
  width:20px!important;
  height:2px!important;
  min-height:2px!important;
  border-radius:99px!important;
  background:#fff!important;
  pointer-events:none!important;
}

/* STT result can never become white/transparent. */
#chatInput,
#chatInput.a8-wave-input-hidden,
.composer #chatInput,
.a8-input-shell #chatInput{
  color:#2d2340!important;
  -webkit-text-fill-color:#2d2340!important;
  caret-color:#7446e8!important;
  opacity:1!important;
  text-shadow:none!important;
}
#chatInput::placeholder{
  color:#8a8196!important;
  -webkit-text-fill-color:#8a8196!important;
  opacity:1!important;
}

/* Background upload adopts the current purple/gold E menu. */
#a8E1BackgroundBtn{
  width:100%!important;
  min-height:38px!important;
  margin:4px 0!important;
  padding:7px 9px!important;
  border-radius:10px!important;
  border:1px solid rgba(226,197,107,.22)!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  cursor:pointer!important;
}
#a8E1BackgroundBtn:hover{
  background:linear-gradient(135deg,#7546e8,#955bf2)!important;
  border-color:#e2c56b!important;
}

/* IMPORTANT: share, 3-dot, language, STT logic, Live Voice and uploads are untouched. */

@media(max-width:768px){
  #a8E1MenuBtn{
    left:8px!important;
    top:8px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
}
/* A8_V53104E1_BASE_E_4FIX_CSS_END */

/* A8_V53104E2_FIX_CSS_BEGIN */

/* Remove old duplicate hamburger selectors and keep only E2. */
#a8E1MenuBtn,
#a8FMenuBtn,
#a8DMenuBtn,
#a8CMenuBtn,
#a8SafeMenuBtn{
  display:none!important;
}

#a8E2MenuBtn{
  position:fixed!important;
  left:10px!important;
  top:10px!important;
  z-index:2147483000!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  padding:0!important;
  margin:0!important;
  border-radius:50%!important;
  border:1px solid rgba(226,197,107,.52)!important;
  background:rgba(39,20,61,.90)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  visibility:visible!important;
  opacity:1!important;
  box-shadow:0 8px 24px rgba(24,10,42,.24)!important;
  backdrop-filter:blur(14px)!important;
}
#a8E2MenuBtn span{
  display:block!important;
  width:20px!important;
  height:2px!important;
  min-height:2px!important;
  border-radius:99px!important;
  background:#fff!important;
  pointer-events:none!important;
}

/* Only keep the working E1 background upload item. */
#a8CBgBtn,
#a8FBackgroundBtn,
#a8V53104BgUploadBtn,
#a8SafeBgBtn{
  display:none!important;
}

/* Share menu now contains only Copy Link. */
#a8EShareMenu{
  width:170px!important;
}

@media(max-width:768px){
  #a8E2MenuBtn{
    left:8px!important;
    top:8px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
}
/* A8_V53104E2_FIX_CSS_END */


/* ==========================================================================
   A8_STYLE_BEGIN | style_key=AOS_AI_STYLE_VOICE_MESSAGE_WAVE | 中文=麥克風錄音狀態與訊息音波 | English=Mic recording and message waveform
   ========================================================================== */
/* V53104F2 — restore preferred microphone + real waveform inside composer and voice-origin message bubble. */
#mic.preferred-mic-v53104f2{
  font-size:22px!important;
  font-family:"Segoe UI Emoji","Apple Color Emoji",sans-serif!important;
  line-height:1!important;
}
#mic.preferred-mic-v53104f2.recording{
  animation:aosMicPulse .9s ease-in-out infinite!important;
  box-shadow:0 0 0 3px rgba(235,203,111,.23),0 0 24px rgba(137,84,238,.32)!important;
}
#a8RealMicWave{
  min-width:150px!important;
  height:42px!important;
  margin:0 2px!important;
}
.voice-wave-message-v53104f2{
  display:flex;flex-direction:column;gap:6px;margin:0 0 7px;padding:7px 9px;
  border-radius:12px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.20);
  min-width:190px;max-width:360px;
}
.chat-msg.ai .voice-wave-message-v53104f2{background:#f6f1ff;border-color:#e2d7ff}
.voice-wave-label-v53104f2{font-size:10px;font-weight:800;letter-spacing:.03em;opacity:.82}
.voice-wave-bars-v53104f2{height:28px;display:flex;align-items:center;gap:2px;overflow:hidden}
.voice-wave-bars-v53104f2 span{
  width:3px;min-width:2px;height:100%;border-radius:999px;background:currentColor;opacity:.78;
  transform:scaleY(var(--wave-h,.18));transform-origin:center;transition:transform .08s linear;
}
.voice-transcript-text-v53104f2{white-space:pre-wrap;word-break:break-word}
@media(max-width:620px){.voice-wave-message-v53104f2{min-width:150px;max-width:100%}.voice-wave-bars-v53104f2{height:24px}}

/* ==========================================================================
   A8_STYLE_END | style_key=AOS_AI_STYLE_VOICE_MESSAGE_WAVE
   ========================================================================== */

/* ============================================================================
   TRAINING RESIZE + PANEL BUTTON FIX R2 | 2026-09-16
   - Existing Owner Studio only; no STT / Live Voice / TTS changes.
   - Make vertical resize grip visible inside overflow:hidden shell.
   ============================================================================ */
.owner-studio-resize{z-index:20!important;touch-action:none!important}
.owner-studio-resize-left{
  left:0!important;top:22px!important;bottom:22px!important;width:9px!important;
}
.owner-studio-resize-top{
  left:34px!important;right:34px!important;top:0!important;height:12px!important;
  cursor:ns-resize!important;
}
.owner-studio-resize-top::after{
  content:"";
  position:absolute;left:50%;top:3px;transform:translateX(-50%);
  width:min(240px,36%);height:4px;border-radius:999px;
  background:linear-gradient(90deg,transparent,#edcb63,#fff0a3,#edcb63,transparent);
  box-shadow:0 0 8px rgba(237,203,99,.55);
  opacity:.92;
}
.owner-studio-resize-corner{
  left:0!important;top:0!important;width:28px!important;height:28px!important;
}
.owner-size-label{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:22px;padding:0 3px;color:#edcb63;font-size:11px;font-weight:800;
}
.owner-panel-notice{
  margin:-2px 0 8px;padding:6px 9px;border-radius:8px;
  border:1px solid rgba(237,203,99,.20);
  background:rgba(237,203,99,.06);color:#d9c989;font-size:10px;
}
@media(max-width:820px){
  .owner-studio-head-actions [data-owner-height]{display:none!important}
  .owner-studio-head-actions .owner-size-label{display:none!important}
}

/* ============================================================================
   A8_UI_HIDE_AI_RUN_BADGE_R3 | 2026-09-16
   Diagnostic health badge stays in DOM/runtime; visual only is hidden.
   ============================================================================ */
#aos626RunBadge,
.aos626-run-badge{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}


/* ============================================================================
   A8_CHAT_CENTER_SAFE_ZONE_R8 | 2026-09-16
   目的：聊天訊息固定集中在中間，保留左右 Model / 2D / 3D 動畫活動區。
   只調整訊息排列與桌面安全區；不改 STT / Live Voice / TTS / Brain / Runtime。
   ============================================================================ */
@media (min-width: 1101px){
  html[data-a8-theme="sky4d"] #chatThread.chat-thread{
    width:min(56vw,760px)!important;
    max-width:760px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
  }

  html[data-a8-theme="sky4d"] #chatThread .chat-msg{
    width:100%!important;
  }

  html[data-a8-theme="sky4d"] #chatThread .chat-bubble{
    max-width:min(640px,82%)!important;
  }

  /* AI 在中間安全區偏左、使用者在中間安全區偏右；兩邊都不貼 Model 區。 */
  html[data-a8-theme="sky4d"] #chatThread .chat-msg.ai{
    justify-content:flex-start!important;
  }
  html[data-a8-theme="sky4d"] #chatThread .chat-msg.user{
    justify-content:flex-end!important;
  }

  /* 輸入框與訊息區同一中心軸，避免底部控制列跨太寬。 */
  html[data-a8-theme="sky4d"] .composer{
    width:min(760px,56vw)!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
  }
}

/* 中型桌面：仍以中央為主，但保留足夠可讀寬度。 */
@media (min-width: 821px) and (max-width: 1100px){
  html[data-a8-theme="sky4d"] #chatThread.chat-thread{
    width:min(72vw,760px)!important;
    max-width:760px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  html[data-a8-theme="sky4d"] #chatThread .chat-bubble{
    max-width:84%!important;
  }
  html[data-a8-theme="sky4d"] .composer{
    width:min(760px,72vw)!important;
  }
}

/* 手機維持原本自適應，不強迫中央窄欄。 */
/* ============================================================================
   A8_CHAT_CENTER_SAFE_ZONE_R8 END
   ============================================================================ */

