/* Shared workspace tokens. Content remains solid; chrome uses restrained translucency. */
body.unified-workspace{--ui-ink:#18364e;--ui-muted:#6c8093;--ui-line:#d9e3ee;--ui-blue:#2568d7;--ui-violet:#725bd1;--ui-paper:#fff;--ui-canvas:#f4f7fb;color:var(--ui-ink);font-size:14px;line-height:1.6}
body.unified-workspace :is(button,input,select,textarea){font-family:inherit}
body.unified-workspace :is(.btn,.tsc-search button,.tsc-advice-btn,.ai-gen-btn){border-radius:8px!important;min-height:38px;font-size:13px;font-weight:600;transition:background .16s,box-shadow .16s,border-color .16s;letter-spacing:0}
body.unified-workspace :is(.btn-primary,#send,.ai-gen-btn){background:linear-gradient(110deg,#2568d7,#5064cf)!important;color:#fff!important;box-shadow:0 4px 12px #2a5da620}
body.unified-workspace :is(.btn-ghost,.btn-outline){background:#fff!important;color:#355570!important;border:1px solid var(--ui-line)!important;box-shadow:none!important}
body.unified-workspace button:disabled{cursor:not-allowed;opacity:.6;box-shadow:none!important}
body.unified-workspace :is(input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){border-radius:8px!important;font-size:14px;line-height:1.6}
body.unified-workspace :is(input,textarea,select):focus-visible{outline:2px solid #78a8ed!important;outline-offset:2px!important;box-shadow:0 0 0 4px #4285db10!important}
body.unified-workspace :is(button,a,summary):focus-visible{outline:2px solid #4d86d5!important;outline-offset:3px!important}
body.unified-workspace :is(.agent-head h2,.ai-page-header-title,.uc-card-head h3,.wb-sec-head h2){color:var(--ui-ink);font-weight:650;letter-spacing:-.3px}
body.unified-workspace .agent-head{padding:18px 24px!important;background:#f8faff!important}
body.unified-workspace .agent-head .a-sub{font-size:12px!important;line-height:1.6;color:var(--ui-muted)!important}
body.unified-workspace :is(.agent-head .a-ic,.uc-card-icon){background:#eaf1fc!important;color:#2d67b9!important;border-radius:9px!important;box-shadow:none!important}
body.unified-workspace :is(.uc-card,.ctl-group,.pcard,.ai-center,.ai-scenes,.ai-history,.pt-config,.wb-card){border:1px solid var(--ui-line)!important;border-radius:12px!important;box-shadow:0 5px 18px #28476708!important}
body.unified-workspace .rail-group-title{color:#688098!important;font-size:11px!important;letter-spacing:.6px}
body.unified-workspace .rail-item{border:1px solid transparent!important;box-shadow:none!important}
body.unified-workspace .rail-item.active{background:#e9f1ff!important;border-color:#cbdcf5!important;color:#1c61c5!important;box-shadow:inset 3px 0 #3975d9!important}
body.unified-workspace .rail-item:hover{background:#edf3fc!important}
body.unified-workspace .rail-label{font-weight:500}
body.unified-workspace :is(.dash-tile-num,.rc-row b,.bal-cell,.time-cell,.usage-stat-num,.tsc-kv .v){font-variant-numeric:tabular-nums;font-feature-settings:'tnum';letter-spacing:0}
/* Reading and output actions */
body.unified-workspace .msg.assistant{background:#fff!important;border:1px solid #dce6ef!important;border-radius:12px!important;box-shadow:0 4px 16px #25476706!important;color:#263e53!important;font-size:14px;line-height:1.85;padding:20px 22px}
body.unified-workspace .msg.user{background:#eaf2ff!important;color:#214468!important;border:1px solid #ccdcf1!important;border-radius:10px!important}
body.unified-workspace .msg.assistant :is(h1,h2,h3,h4){line-height:1.5;margin:20px 0 10px;color:#18364e}
body.unified-workspace .msg.assistant p{margin:10px 0}
body.unified-workspace .msg.assistant pre{background:#f3f6fa!important;color:#29415a!important;border:1px solid #dce5ee;border-radius:8px;padding:14px;overflow:auto;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace}
body.unified-workspace .msg.assistant table{font-size:13px;border-collapse:collapse;max-width:100%}
body.unified-workspace .msg.assistant :is(th,td){padding:9px 12px;border:1px solid #dae4ee}body.unified-workspace .msg.assistant th{background:#eff4fa}
body.unified-workspace .msg-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;margin-top:12px;border-top:1px solid #e1e9f2;opacity:1!important}
body.unified-workspace .msg-actions .btn{min-height:32px;padding:5px 10px;font-size:12px}
body.unified-workspace .composer{background:#f9fbfd!important;border-top:1px solid var(--ui-line)!important;box-shadow:0 -4px 18px #27476806!important}
body.unified-workspace .composer textarea{background:#fff!important;color:#29445c!important;border:1px solid #cbd9e9!important;min-height:46px}
.ui-run-state{display:flex;align-items:center;gap:7px;color:#617991;font-size:11px;padding:7px 2px;min-height:20px}.ui-run-state:before{content:'';width:6px;height:6px;border-radius:50%;background:#8b9bad}.ui-run-state[data-state=running]:before{background:#557bde;animation:ui-status-pulse 1.4s ease-in-out infinite}.ui-run-state[data-state=done]:before{background:#2b9c7d}.ui-run-state[data-state=error]:before{background:#be7337}.ui-retry{margin-top:10px}
body.unified-workspace .ai-queue-card{border:1px solid #d6e2ef;border-radius:10px;background:#fff;box-shadow:none}body.unified-workspace .ai-queue-card[data-status=error]{border-color:#e7cdb8;background:#fffaf6}.ai-queue-progress.indeterminate{opacity:.55}
body.unified-workspace :is(.ai-queue-acts,.poster-export-actions,.gen-actions){gap:8px}body.unified-workspace .ai-queue-acts button{min-height:34px;border-radius:8px!important;padding:6px 10px}
body.unified-workspace :is(.pc-img-wrap,.ai-hist-thumb){background:linear-gradient(135deg,#edf2f8,#e6edf5)}
body.unified-workspace .tsc-advice{font-size:14px;line-height:1.85;color:#29415a}body.unified-workspace .tsc-advice h4{color:#264d77;border-left-color:#668acf}
body.unified-workspace .uw-header nav{gap:22px}body.unified-workspace .uw-header nav a{font-size:13px}
@keyframes ui-status-pulse{50%{opacity:.35}}
@media(max-width:700px){body.unified-workspace .msg.assistant{padding:15px;font-size:14px}body.unified-workspace .agent-head{padding:14px!important}body.unified-workspace .uw-header nav{gap:12px}body.unified-workspace .uw-header nav a{font-size:12px}.ui-run-state{font-size:11px}body.unified-workspace .msg-actions .btn{min-height:36px}}
@media(prefers-reduced-motion:reduce){body.unified-workspace :is(button,.btn){transition:none}.ui-run-state:before{animation:none!important}}

.ui-result-actions{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid #e1e9f2;margin-top:18px;padding-top:14px}body.unified-workspace .ui-result-actions .btn{min-height:32px;padding:5px 10px;font-size:12px}
body.unified-workspace .composer-row{display:flex!important;align-items:flex-end!important;gap:10px;width:100%}body.unified-workspace .composer-row textarea{flex:1;min-width:0;width:0;max-height:180px;margin:0!important}body.unified-workspace .composer-btns{display:flex!important;flex-direction:row!important;align-items:center;gap:7px;flex:none}body.unified-workspace .composer-btns button{width:42px;height:44px;min-height:44px;border-radius:8px!important}body.unified-workspace .composer #stopBtn{background:#fff4eb;color:#a45624;border:1px solid #e2bc9c;box-shadow:none}
body.unified-workspace :is(.wb-battle,.wb-mission,.wb-score,.wb-hist){border-radius:12px!important;border:1px solid #d9e3ee!important;box-shadow:0 5px 18px #28476708!important;background:#fff!important;padding:24px!important}body.unified-workspace .wb-gen-go{background:linear-gradient(110deg,#2568d7,#5064cf)!important;color:#fff;border-radius:8px!important;min-height:40px;font-size:13px}body.unified-workspace :is(.wb-gen-act,.wb-gen-actions button){border-radius:8px!important;min-height:32px;font-size:12px}body.unified-workspace .wb-sec-sub{font-size:13px;color:#6c8093}body.unified-workspace .wb-loop{background:#f1f5fb;border-color:#d7e3f1}body.unified-workspace .wb-gen-input{border:1px solid #cbd9e9;background:#fff}
@media(max-width:700px){body.unified-workspace .composer{padding:12px!important}body.unified-workspace .composer-row{gap:6px}body.unified-workspace .composer-btns{gap:5px}body.unified-workspace .composer-btns button{width:34px;height:42px;min-height:42px}body.unified-workspace :is(.wb-battle,.wb-mission,.wb-score,.wb-hist){padding:16px!important}}
body.unified-workspace .sum-card:not(.dash) .rc-row :is(span,b){color:#345676!important}body.unified-workspace .sum-card:not(.dash) .sum-card-title svg{color:#5978b3!important}

/* The latest-message control stays close to the composer, outside reading content. */
body.unified-workspace .agent-main .composer { position:relative; }
body.unified-workspace .ui-latest-message { position:absolute;right:24px;bottom:calc(100% + 12px);z-index:4;min-height:38px;padding:8px 14px;border:1px solid #b9cde5;border-radius:8px;background:rgba(255,255,255,.96);color:#205697;box-shadow:0 5px 18px #203e6420;font-size:13px;font-weight:600;cursor:pointer; }
body.unified-workspace .ui-latest-message[hidden] { display:none!important; }
body.unified-workspace .ui-latest-message:hover { background:#edf5ff; }
body.unified-workspace .ui-latest-message:focus-visible { outline:2px solid #2568d7;outline-offset:3px; }
@media(max-width:700px) { body.unified-workspace .ui-latest-message { right:12px; } }
