/* 郭掌门 · 统一主题（默认深色 AIStudio 玻璃拟态） */
:root{
  --bg0:#0b0d0f;
  --bg1:#111417;
  --bg2:#171b1f;
  --bg:#0b0d0f;
  --surface:#111417;
  --surface-2:#171b1f;
  --brand:#f1f3f4;
  --brand-deep:#aab1b7;
  --accent:#62e68b;
  --accent-text:#07110a;
  --cta:#f1f3f4;
  --btn-text:#0b0d0f;
  --text:#eef0f2;
  --text-2:#929aa1;
  --text-3:#687078;
  --sub:#929aa1;
  --run:#62e68b;
  --line:rgba(255,255,255,.10);
  --header-bg:rgba(11,13,15,.94);
  --header-border:rgba(255,255,255,.09);
  --input-bg:#15191d;
  --ghost-bg:#15191d;
  --ok:#62e68b;
  --warn:#e8b95f;
  --bad:#ef6b73;
  --r-sm:6px;
  --r-md:8px;
  --r-lg:8px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.22);
  --shadow-md:0 16px 38px rgba(0,0,0,.28);
  --font:"Inter","MiSans","HarmonyOS Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  /* 兼容旧工作台变量，避免页面内历史样式绕过设计系统。 */
  --teal:#eef0f2;
  --cyan:#62e68b;
  --card:#111417;
  --txt:#eef0f2;
  --okbg:#112219;
  --runbg:#14211a;
  --badbg:#261416;
  --panel:#111417;
  --panel2:#171b1f;
  --stroke:#30363c;
  --muted:#929aa1;
  --muted2:#687078;
  --accent2:#8b969e;
}

/* 克莱因蓝（浅色） */
body[data-theme="klein-blue"]{
  --bg:#FAF7F2;
  --surface:#ffffff;
  --surface-2:#F6F1E9;
  --brand:#003C96;
  --brand-deep:#16213E;
  --accent:#D9CAB7;
  --accent-text:#3D3222;
  --cta:#003C96;
  --btn-text:#ffffff;
  --text:#16213E;
  --text-2:#7E8FA9;
  --text-3:#9AA7B8;
  --sub:#7E8FA9;
  --run:#003C96;
  --line:#C9D2DE;
  --header-bg:#003C96;
  --header-border:transparent;
  --input-bg:#ffffff;
  --ghost-bg:#ffffff;
  --ok:#2E7D32;
  --warn:#9A6B1F;
  --bad:#C0392B;
  --shadow-sm:0 1px 2px rgba(22,33,62,.04),0 2px 6px rgba(22,33,62,.05);
  --shadow-md:0 1px 3px rgba(22,33,62,.06),0 8px 24px rgba(22,33,62,.10);
  --bg0:#FAF7F2;
  --bg1:#FFFFFF;
  --bg2:#EDE9E2;
  --panel:rgba(0,0,0,.03);
  --panel2:rgba(0,0,0,.05);
  --stroke:rgba(0,0,0,.12);
  --muted:rgba(0,0,0,.65);
  --muted2:rgba(0,0,0,.50);
  --accent:#003C96;
  --accent2:#5B4DB8;
}

/* 青绿 × 蜜桃（浅色） */
body[data-theme="teal-peach"]{
  --bg:#EBF4F8;
  --surface:#ffffff;
  --surface-2:#F3F8FA;
  --brand:#11616B;
  --brand-deep:#0C474F;
  --accent:#FED9CD;
  --accent-text:#6E3B2E;
  --text:#1F2E33;
  --text-2:#6E8A93;
  --text-3:#9AA9B3;
  --sub:#6E8A93;
  --run:#11616B;
  --line:#D7E4EA;
  --header-bg:#11616B;
  --header-border:transparent;
  --input-bg:#ffffff;
  --ghost-bg:#ffffff;
  --ok:#2E7D32;
  --warn:#B06A1E;
  --bad:#C0392B;
  --cta:#DC8B70;
  --btn-text:#ffffff;
  --bg0:#EBF4F8;
  --bg1:#FFFFFF;
  --bg2:#E1EEF3;
  --panel:rgba(0,0,0,.03);
  --panel2:rgba(0,0,0,.05);
  --stroke:rgba(0,0,0,.12);
  --muted:rgba(0,0,0,.65);
  --muted2:rgba(0,0,0,.50);
  --accent:#11616B;
  --accent2:#DC8B70;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  background-attachment:fixed;
}

/* 顶栏：克莱因蓝 */
header{
  background:var(--header-bg);
  color:#fff;
  padding:16px 26px;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--header-border);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
header h1{
  margin:0;
  font-size:20px;
  font-weight:600;
  letter-spacing:0;
}
header a{
  color:rgba(255,255,255,.86);
  text-decoration:none;
  font-size:13px;
  transition:color .2s ease;
}
header a:hover{color:#fff;}
header .tag{
  background:transparent;
  border:1px solid transparent;
  border-radius:6px;
  padding:4px 9px;
  font-size:12px;
}
header .tag:hover{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.09);}
header .budget{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  border-radius:6px;
  padding:5px 12px;
  font-size:13px;
}
header .theme-select{
  background:rgba(255,255,255,.14);
  color:#fff;
  border:1px solid rgba(255,255,255,.2);
  border-radius:6px;
  padding:4px 10px;
  font-size:12px;
  outline:none;
  cursor:pointer;
}
header .theme-select option{color:#16213E;}

/* 主容器留白 */
main,.wrap{
  max-width:1240px;
  margin:0 auto;
  padding:22px 24px 40px;
}

/* 卡片：统一圆角 + 柔和分层阴影，弱化硬边框 */
.panel,.card,[class*="panel"]{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  padding:16px 18px;
  margin-bottom:14px;
  box-shadow:var(--shadow-sm);
}
.panel h3{
  margin:0 0 12px;
  font-size:15px;
  font-weight:600;
  color:var(--brand);
  letter-spacing:0;
}

/* 按钮 */
button,.btn{
  border:0;
  border-radius:var(--r-sm);
  padding:9px 18px;
  cursor:pointer;
  font-family:var(--font);
  font-size:14px;
  font-weight:600;
  background:var(--cta);
  color:var(--btn-text);
  box-shadow:0 2px 8px rgba(15,23,42,.18);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
button:hover,.btn:hover{filter:brightness(1.06);box-shadow:0 4px 14px rgba(15,23,42,.26);}
button:active,.btn:active{transform:translateY(1px);}
button:disabled,.btn:disabled{background:#cbd5e1;box-shadow:none;cursor:not-allowed;}
.btn.ghost{
  background:var(--ghost-bg);
  color:var(--text);
  border:1px solid var(--line);
  box-shadow:none;
}

/* 输入控件 */
textarea,select,input[type="text"],input[type="password"],input[type="number"]{
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  padding:9px 11px;
  font-family:var(--font);
  font-size:14px;
  background:var(--input-bg);
  color:var(--text);
  transition:border-color .16s ease,box-shadow .16s ease;
}
textarea:focus,select:focus,input:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(0,60,150,.12);
}

/* 表格：分割线代替边框 */
table{width:100%;border-collapse:collapse;font-size:13px;}
th{
  text-align:left;
  padding:8px 10px;
  color:var(--text-2);
  font-weight:600;
  font-size:12px;
  letter-spacing:0;
  border-bottom:1px solid var(--line);
  background:transparent;
}
td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top;}
tr:last-child td{border-bottom:0;}

/* 标签 / 状态胶囊 */
.chip,.st,.tab{
  border-radius:999px;
  font-size:12px;
}
.chip{background:var(--accent);color:var(--accent-text);padding:2px 9px;}
.tab{
  padding:8px 12px;
  background:var(--surface-2);
  color:var(--text-2);
  border:1px solid var(--line);
  cursor:pointer;
  font-weight:600;
}
.tab.active{
  background:var(--cta);
  color:var(--btn-text);
  border-color:transparent;
}

/* 状态色 */
.status.running{color:var(--run);}
.status.done{color:var(--ok);}
.status.failed{color:var(--bad);}

/* 侧栏面板标题层级 */
.side .panel{margin-bottom:14px;}

/* 动效克制：统一 200ms ease-out */
a,button,select,input,textarea,.tab,.chip,.mcard{transition:all .2s ease-out;}

/* M3 组件统一：圆角 + 柔和阴影，弱化硬边框 */
.dag-node,.mcard,.char-card,.shot-block,.acard,.proj,.pkg,.final,.modal{
  border-radius:var(--r-md);
  box-shadow:var(--shadow-sm);
}
.dag-node,.mcard,.char-card,.shot-block,.acard,.proj,.pkg{
  border:1px solid var(--line);
  background:var(--surface);
}
.mcard:hover,.proj:hover,.pkg:hover{
  border-color:var(--brand);
  box-shadow:var(--shadow-md);
}

.mcard .scr,.char-card .views{
  border-radius:var(--r-md) var(--r-md) 0 0;
}

/* 深色模式下的 M3 细节 */
body[data-theme="dark"] .modal{background:#111417;color:var(--text);}
body[data-theme="dark"] .modal h3{color:var(--brand);}
body[data-theme="dark"] .modal input[type="text"],
body[data-theme="dark"] .modal input[type="password"]{background:var(--input-bg);color:var(--text);border-color:var(--line);}
body[data-theme="dark"] .final{background:var(--surface);}
body[data-theme="dark"] .pkg{background:var(--surface);}
body[data-theme="dark"] .pkg.on,body[data-theme="dark"] .proj:hover{background:var(--surface-2);}
body[data-theme="dark"] #shotTable td[contenteditable]{background:rgba(93,214,255,.12);}
body[data-theme="dark"] .mask{background:rgba(3,5,7,.72);}

/* v7: 全站产品界面基线。页面可以保留布局差异，但控件语言保持一致。 */
body:not(.home-page){background:#0b0d0f;color:#eef0f2;}
body:not(.home-page) > header{
  min-height:58px;
  padding:10px 22px;
  gap:18px;
  flex-wrap:nowrap;
  background:#0b0d0f;
  border-bottom:1px solid #24292e;
  box-shadow:none;
  position:sticky;
  top:0;
  z-index:40;
}

/* Universal hover cue: green edge + green label. */
button:not(:disabled):hover,.btn:not(:disabled):hover,
a.tag:hover,.tab:not(.active):hover,.chip:hover,
.expert:hover,.skill:hover,.mcard:hover,.proj:hover,.pkg:hover,
.workspace-card:hover,.drop-zone:hover,.outRow:hover,.hitem:hover,
.node:hover,.tcard:hover,.gTab:hover{
  border-color:#62e68b!important;
  color:#62e68b!important;
}
button:not(:disabled):hover i,.btn:not(:disabled):hover i,
a.tag:hover i,.expert:hover b,.expert:hover span,
.workspace-card:hover h3,.workspace-card:hover p,.workspace-card:hover .arrow,
.skill:hover .sname,.skill:hover .sdesc,.outRow:hover .nm{
  color:#62e68b!important;
}
button.btnDanger:not(:disabled):hover,.btnDanger:not(:disabled):hover,
.node .del:hover{border-color:#d36572!important;color:#fff!important;background:#b84755!important;}

/* Shared interaction language: quiet by default, green on intent. */
button:not(:disabled):hover,.btn:not(:disabled):hover{
  color:var(--brand)!important;
  border-color:var(--brand)!important;
  background:color-mix(in srgb,var(--brand) 12%,var(--surface))!important;
  filter:none;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,0,0,.18), inset 0 0 0 1px color-mix(in srgb,var(--brand) 22%,transparent);
}
button.btnPrimary:not(:disabled):hover,button.btn-primary:not(:disabled):hover,.btnPrimary:not(:disabled):hover,.btn-primary:not(:disabled):hover,
button[style*="background"]:not(:disabled):hover{
  color:var(--btn-text)!important;
  background:var(--brand)!important;
  border-color:var(--brand)!important;
}
button.btnDanger:not(:disabled):hover,.btnDanger:not(:disabled):hover{color:#fff!important;background:#b84755!important;border-color:#d36572!important;}
body:not(.home-page) > header h1{font-size:15px;font-weight:730;white-space:nowrap;color:#f1f3f4;}
.app-brand-mini{display:inline-flex;align-items:center;gap:8px;flex:none;color:#f3f5f6!important;text-decoration:none;}
.app-brand-mark{width:28px;height:28px;display:grid;place-items:center;border-radius:5px;background:#f3f5f6;color:#0b0d0f;font-size:12px;font-weight:800;}
.app-brand-word{font-size:13px;font-weight:760;white-space:nowrap;}
.app-page-title{display:flex;align-items:center;gap:14px;color:#c9ced2!important;font-size:13px!important;font-weight:650!important;}
.app-page-title::before{content:"";width:1px;height:22px;background:#30363c;}
body:not(.home-page) > header nav{display:flex;align-items:center;gap:2px!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;}
body:not(.home-page) > header nav::-webkit-scrollbar{display:none;}
body:not(.home-page) > header .tag{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  color:#858d94;
  background:transparent;
  border:1px solid transparent;
  border-radius:4px;
  white-space:nowrap;
  opacity:1;
}
body:not(.home-page) > header .tag:hover{color:#f1f3f4;background:#15191d;border-color:#292f34;}
body:not(.home-page) > header .tag.is-current{color:#dff8e6;background:#151c18;border-color:#31513b;}
body:not(.home-page) > header .tag.is-current::before{content:"";width:5px;height:5px;margin-right:7px;border-radius:50%;background:#62e68b;}
header .theme-select{display:none!important;}
#btnAccount{
  min-height:32px!important;
  margin-left:auto!important;
  padding:0 11px!important;
  border:1px solid #30363c!important;
  border-radius:5px!important;
  background:#15191d!important;
  color:#cbd0d4!important;
  font-size:11px!important;
  box-shadow:none!important;
  white-space:nowrap;
}
#btnAccount:hover{background:#1b2025!important;border-color:#41484f!important;color:#fff!important;}

body:not(.home-page) main,body:not(.home-page) .wrap{width:min(1240px,calc(100% - 40px));max-width:none;margin:28px auto 60px;padding:0;}
.panel,.card,[class*="panel"],.sb-card,.asset-card,.dag-node,.mcard,.char-card,.shot-block,.acard,.proj,.pkg,.final,.modal{
  border-color:#282e33;
  border-radius:6px;
  box-shadow:none;
}
.panel,.card,[class*="panel"]{background:#111417;}
.panel h2,.panel h3,.card h2,.card h3{color:#f0f2f3;font-weight:700;letter-spacing:0;}
label{color:#858d94;font-size:12px;font-weight:600;}

button,.btn{
  min-height:36px;
  padding:8px 14px;
  border:1px solid #eef0f2;
  border-radius:6px;
  background:#eef0f2;
  color:#0b0d0f;
  box-shadow:none;
  font-size:13px;
  font-weight:700;
  transform:none;
}
button:hover,.btn:hover{filter:none;background:#fff;border-color:#fff;box-shadow:none;transform:none;}
button:active,.btn:active{background:#dfe3e6;transform:none;}
button:disabled,.btn:disabled{background:#252a2f;color:#687078;border-color:#30363c;opacity:1;}
.btn.ghost,button.ghost,.secondary{
  background:#15191d;
  color:#c9ced2;
  border-color:#30363c;
  box-shadow:none;
}
.btn.ghost:hover,button.ghost:hover,.secondary:hover{background:#1b2025;color:#fff;border-color:#41484f;}

textarea,select,input[type="text"],input[type="password"],input[type="number"],input[type="email"],input[type="tel"],input[type="url"]{
  border-color:#30363c;
  border-radius:6px;
  background:#15191d;
  color:#e9ecee;
  box-shadow:none;
}
textarea::placeholder,input::placeholder{color:#5f676e;}
textarea:focus,select:focus,input:focus{border-color:#68727a;box-shadow:0 0 0 2px rgba(98,230,139,.08);}
select option{background:#15191d;color:#e9ecee;}
:focus-visible{outline:2px solid rgba(98,230,139,.78);outline-offset:2px;}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:0;}

.chip,.st,.tab{border-radius:4px;}
.chip,.st{background:#181d21;color:#9da5ab;border:1px solid #2d3338;}
.tab{background:transparent;color:#858d94;border-color:transparent;border-bottom-color:#30363c;}
.tab.active{background:#1a1f23;color:#f1f3f4;border-color:#343a40;}
.progress-track{background:#252b30!important;border-radius:3px!important;}
.progress-fill{background:#62e68b!important;border-radius:3px!important;}
table{color:#d8dcdf;}
th{color:#7f878e;background:#0e1113;}
th,td{border-color:#282e33;}
.modal{background:#111417!important;color:#eef0f2!important;border:1px solid #343a40!important;}
.mask{background:rgba(3,5,7,.72)!important;backdrop-filter:blur(4px);}
.drop-zone,.empty-plan,.render-output,.material,.history-item,.plan-meta div,.pipe,.cut,.timeline,.skill,.hitem,.tcard,#minimap,#palette{
  border-radius:6px!important;
  box-shadow:none!important;
}
.drop-zone,.empty-plan{background:#0e1113!important;border-color:#30363c!important;}
.drop-zone:hover{border-color:#59636b!important;color:#c9ced2!important;}
.skill-btn,.htab{border-radius:4px!important;}
.mcard .scr,.final .player{background:#0d1012!important;color:#aeb5bb!important;}
.final{border:1px solid #343a40!important;background:#111417!important;text-align:left!important;}
.confirm-strip{background:#171a16!important;border-color:#4b5136!important;border-radius:6px!important;}
#shotTable td[contenteditable]{background:#171b1f!important;}
#shotTable td[contenteditable]:focus{background:#1b2025!important;outline:2px solid rgba(98,230,139,.28)!important;}
#logBox,pre.json{background:#090b0d!important;border:1px solid #282e33;border-radius:6px!important;}
[data-page="canvas"] .node,[data-page="canvas"] .group,[data-page="canvas"] .tb{border-radius:6px!important;box-shadow:none!important;}
[data-page="canvas"] #viewport{background:#090b0d;}
[role="status"]:empty{min-height:1.4em;}
button[aria-busy="true"]{cursor:wait;opacity:.72;}
button[aria-busy="true"]::after{content:"";display:inline-block;width:11px;height:11px;margin-left:8px;border:1px solid currentColor;border-right-color:transparent;border-radius:50%;animation:gzm-spin .7s linear infinite;}
@keyframes gzm-spin{to{transform:rotate(360deg);}}

::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-track{background:#0b0d0f;}
::-webkit-scrollbar-thumb{background:#30363c;border:2px solid #0b0d0f;border-radius:6px;}
::-webkit-scrollbar-thumb:hover{background:#444c53;}

@media (max-width:760px){
  body:not(.home-page) > header{width:100%;min-width:0;max-width:100vw;padding:9px 14px;gap:10px;flex-wrap:wrap;position:relative;overflow:hidden;}
  body:not(.home-page) > header > *{min-width:0;}
  body:not(.home-page) > header > div{width:100%;max-width:100%;display:flex!important;min-width:0;}
  body:not(.home-page) > header nav{order:3;width:100%;min-width:0;max-width:100%;overflow-x:auto!important;overflow-y:hidden;padding-bottom:2px;}
  body:not(.home-page) > header nav .tag{flex:none;}
  body:not(.home-page) main,body:not(.home-page) .wrap{width:calc(100% - 24px);margin:18px auto 42px;}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
}

/* AI Studio：独立工作台重构。保留三栏生产结构，彻底接管旧玻璃拟态组件。 */
.studio-page{
  --bg0:#090b0d;--bg1:#0b0d0f;--bg2:#0d1012;
  --panel:#111417;--panel2:#171b1f;--stroke:#2b3136;
  --text:#eef0f2;--muted:#929aa1;--muted2:#687078;
  --good:#62e68b;--warn:#e8b95f;--bad:#ef6b73;
  --accent:#eef0f2;--accent2:#8a949c;--shadow:none;
  --radius:6px;--radius2:6px;--gap:10px;
  background:#090b0d!important;
}
.studio-page > .studio-global-header{height:58px;min-height:58px;}
.studio-page .app{
  height:calc(100vh - 58px);
  padding:10px;
  gap:10px;
  background:#090b0d;
  grid-template-columns:minmax(270px,320px) minmax(520px,1fr) minmax(280px,330px);
}
.studio-page .app > .panel{
  margin:0;
  padding:0;
  background:#111417;
  border:1px solid #282e33;
  border-radius:6px;
  box-shadow:none;
  backdrop-filter:none;
}
.studio-page .app > .center{background:#0c0f11;border-color:#242a2f;}
.studio-page .panelHeader{
  min-height:52px;
  padding:10px 13px;
  background:#111417;
  border-bottom:1px solid #282e33;
}
.studio-page .title,.studio-page .gradTitle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#e7eaec!important;
  background:none!important;
  -webkit-text-fill-color:initial!important;
  font-size:13px!important;
  font-weight:700!important;
  letter-spacing:0!important;
}
.studio-page .title i,.studio-page .gradTitle i,.studio-page .sectionTitle i{
  color:#62e68b!important;
  background:none!important;
  -webkit-text-fill-color:initial!important;
  width:15px;
  text-align:center;
}
.studio-page .sub,.studio-page .smallMuted{color:#747d84;font-family:var(--font);font-size:11px;}
.studio-page .panelBody{padding:0 13px 16px;scrollbar-gutter:stable;}
.studio-page .left .panelBody,.studio-page .right .panelBody{padding-top:4px;}
.studio-page .section{
  padding:16px 0;
  margin:0;
  border:0;
  border-bottom:1px solid #252b30;
  background:transparent;
  border-radius:0;
  box-shadow:none;
}
.studio-page .section:last-child{border-bottom:0;}
.studio-page .sectionTitle{min-height:28px;margin-bottom:10px;padding-left:9px;border-left:2px solid #62e68b;color:#dfe3e6;font-size:12px;font-weight:700;}
.studio-page .sectionTitle::before{
  display:none;
}
.studio-page .sectionTitle .gradTitle i,.studio-page .sectionTitle > span > i{display:none;}
.studio-page label{margin:10px 0 5px;color:#858d94;font-size:11px;font-weight:650;}
.studio-page .input{
  min-height:38px;
  padding:0 10px;
  gap:8px;
  border:1px solid #30363c;
  border-radius:5px;
  background:#15191d;
  box-shadow:none;
}
.studio-page .input:focus-within{border-color:#68727a;box-shadow:0 0 0 2px rgba(98,230,139,.07);}
.studio-page .input > i{color:#6f7880;width:14px;text-align:center;}
.studio-page .input input,.studio-page .input select,.studio-page .input textarea{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#e9ecee!important;
  padding:9px 0!important;
}
.studio-page .row{gap:8px;}
.studio-page .btn,.studio-page button{
  min-height:34px;
  padding:7px 11px;
  gap:7px;
  border:1px solid #343a40;
  border-radius:5px;
  background:#171b1f;
  color:#cbd0d4;
  box-shadow:none;
  font-size:11px;
  font-weight:680;
}
.studio-page .btn:hover,.studio-page button:hover{background:#1d2227;border-color:#4a5259;color:#fff;transform:none;box-shadow:none;}
.studio-page .btnPrimary,.studio-page .pluginDrawer-submit{
  background:#62e68b!important;
  color:#07110a!important;
  border-color:#62e68b!important;
}
.studio-page .btnPrimary:hover,.studio-page .pluginDrawer-submit:hover{background:#75ee98!important;border-color:#75ee98!important;}
.studio-page .btnPrimary:active,.studio-page .pluginDrawer-submit:active{background:#50cf76!important;border-color:#50cf76!important;}
.studio-page .btnDanger{background:#1b1416!important;color:#ef8b91!important;border-color:#513035!important;}
.studio-page .btnDanger:hover{background:#25181b!important;border-color:#734047!important;}
.studio-page .iconBtn{width:32px;height:32px;padding:0;border-radius:5px;}
.studio-page .chip,.studio-page .chipX,.studio-page .nPill,.studio-page .tag,.studio-page .kbd{
  min-height:25px;
  padding:3px 7px;
  border:1px solid #30363c;
  border-radius:4px;
  background:#171b1f;
  color:#8e979e;
  box-shadow:none;
}
.studio-page .dot{width:6px;height:6px;background:#62e68b;box-shadow:none;}
.studio-page .chipX.on,.studio-page .nPill.on{background:#17221b;border-color:#4a7b59;color:#baf0c8;box-shadow:inset 0 -2px #62e68b;}
.studio-page .centerTop{display:none;}
.studio-page .workspace{padding:12px;gap:10px;background:#0c0f11;}
.studio-page .workspace > .card{
  width:100%;
  min-width:0;
  margin:0;
  padding:16px;
  border:1px solid #282e33;
  border-radius:6px;
  background:#111417;
  box-shadow:none;
}
.studio-page .center{min-width:0;}
.studio-page .right{min-width:0;}
.studio-page .app > .panel.center{width:100%;justify-self:stretch;}
.studio-page .app > .panel.right{width:100%;justify-self:stretch;}
.studio-page .promptArea{grid-template-columns:minmax(0,1fr) 220px;gap:18px;align-items:start;}
.studio-page #prompt{min-height:126px;line-height:1.65;}
.studio-page .refWrap{margin-top:14px;padding-top:14px;border-top:1px solid #282e33;}
.studio-page .dropzone{
  margin-top:8px;
  padding:14px;
  border:1px dashed #343b41;
  border-radius:6px;
  background:#0d1012;
}
.studio-page .dropzone:hover{border-color:#5b656d;background:#101417;}
.studio-page .dzHint{color:#626b72;font-size:10px;line-height:1.65;}
.studio-page .miniPreview{
  border:1px solid #282e33;
  border-radius:6px;
  background:#0d1012;
  box-shadow:none;
  overflow:hidden;
  align-self:start;
  height:300px;
  max-height:300px;
  width:220px;
  max-width:100%;
}
.studio-page .miniPreview .img{height:245px;background:#090b0d;}
.studio-page .miniPreview .meta{border-top:1px solid #282e33;background:#111417;}
.studio-page .progressRow{padding:4px 0;gap:14px;}
.studio-page .bigPct{color:#f0f2f3;font-size:24px;font-variant-numeric:tabular-nums;}
.studio-page .bar{height:5px;border-radius:3px;background:#252b30;box-shadow:none;}
.studio-page .bar > div{background:#62e68b!important;border-radius:3px;}
.studio-page .preset,.studio-page .assetItem,.studio-page .mCard,.studio-page .shotCard,.studio-page .qsCard{
  border:1px solid #2b3136;
  border-radius:6px;
  background:#111417;
  box-shadow:none;
}
.studio-page .preset:hover,.studio-page .assetItem:hover,.studio-page .mCard:hover,.studio-page .shotCard:hover,.studio-page .qsCard:hover{border-color:#4b545b;transform:none;box-shadow:none;}
.studio-page .preset.on,.studio-page .assetItem.on,.studio-page .mCard.on{border-color:#568166!important;box-shadow:inset 3px 0 #62e68b!important;background:#141c17!important;}
.studio-page .preset.on::after,.studio-page .assetItem.on::after{
  content:"✓";
  position:absolute;
  top:6px;
  right:6px;
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#62e68b;
  color:#07110a;
  font-size:10px;
  font-weight:900;
}
.studio-page .preset,.studio-page .assetItem{position:relative;}
.studio-page .quickStartGrid,.studio-page .presetGrid,.studio-page .assetGrid,.studio-page .gallery{gap:8px;}
.studio-page .qsIcon{
  width:30px;height:30px;border-radius:5px!important;
  background:#181d21!important;color:#9ca5ac!important;border:1px solid #30363c;
  box-shadow:none!important;
}
.studio-page .pillTabs,.studio-page .galleryTabs{gap:0;padding:3px;border:1px solid #2c3237;border-radius:6px;background:#0d1012;}
.studio-page .pillTabs .tab,.studio-page .gTab{
  min-height:30px;
  border:0!important;
  border-radius:4px!important;
  background:transparent!important;
  color:#737c83!important;
}
.studio-page .pillTabs .tab.active,.studio-page .gTab.active{background:#17201a!important;color:#c8f4d4!important;box-shadow:inset 0 -2px #62e68b!important;}
.studio-page .pillTabs .tab.active i,.studio-page .gTab.active i{color:#62e68b!important;}
.studio-page .gTabCnt{background:#292f34!important;color:#899299!important;border-radius:3px!important;}
.studio-page .node,.studio-page .histRow,.studio-page .codeBox{
  border:1px solid #282e33;
  border-radius:5px;
  background:#0d1012;
  box-shadow:none;
}
.studio-page .toast{border:1px solid #343a40;border-radius:6px;background:#15191d;color:#dfe3e6;box-shadow:0 12px 30px rgba(0,0,0,.34);}
.studio-page .modalMask,.studio-page .pluginDrawer-backdrop{background:rgba(3,5,7,.76);backdrop-filter:blur(4px);}
.studio-page .modal,.studio-page .pluginDrawer,.studio-page .cvPickerBox{
  border:1px solid #343a40!important;
  border-radius:7px!important;
  background:#111417!important;
  box-shadow:0 20px 50px rgba(0,0,0,.42)!important;
}
.studio-page .modalHead,.studio-page .pluginDrawer-header,.studio-page .cvHead{background:#111417!important;border-bottom:1px solid #282e33!important;}
.studio-page .modalFoot,.studio-page .cvFoot{background:#0e1113!important;border-top:1px solid #282e33!important;}
.studio-page .pluginDrawer-param,.studio-page .pluginDrawer-upload{border-radius:5px;background:#15191d;border-color:#30363c;}
.studio-page .miniAct{border-radius:4px!important;background:#171b1f!important;color:#aeb5bb!important;border-color:#343a40!important;}
.studio-page .miniAct:hover{background:#20252a!important;color:#fff!important;border-color:#505960!important;}
.studio-page .miniAct.primary,.studio-page #maskBrush{background:#62e68b!important;color:#07110a!important;border-color:#62e68b!important;}
.studio-page .shotCard textarea:focus,.studio-page .cvNode textarea:focus{border-color:#68727a!important;box-shadow:0 0 0 2px rgba(98,230,139,.08)!important;}
.studio-page .cvNode{
  background:#111417!important;
  border:1px solid #30363c!important;
  border-radius:6px!important;
  box-shadow:0 8px 24px rgba(0,0,0,.28)!important;
}
.studio-page .cvNode.selected{border-color:#568166!important;box-shadow:0 0 0 2px rgba(98,230,139,.16),0 8px 24px rgba(0,0,0,.28)!important;}
.studio-page .cvHead{border-radius:6px 6px 0 0!important;color:#dfe3e6!important;}
.studio-page .cvImgWrap{background:#090b0d!important;border-radius:5px!important;}
.studio-page .cvPickerGrid img{border-radius:5px!important;}
.studio-page .cvPickerGrid img:hover{border-color:#568166!important;}
.studio-page #pluginPrompt{background:#15191d!important;border-color:#30363c!important;border-radius:5px!important;color:#eef0f2!important;}
.studio-page #maskCanvasWrap{background:#090b0d!important;border-color:#343a40!important;border-radius:5px!important;}
.studio-page #canvasOverlay{background:#090b0d!important;}
.studio-page #canvasToolbar{background:#0e1113!important;border-color:#282e33!important;}
.studio-page #canvasViewport{
  background-color:#090b0d!important;
  background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px)!important;
}
.studio-page #expertOverlay > div{background:#111417!important;border-color:#343a40!important;border-radius:7px!important;box-shadow:0 20px 50px rgba(0,0,0,.42)!important;}

@media (max-width:1200px){
  .studio-page .app{grid-template-columns:minmax(240px,270px) minmax(460px,1fr) minmax(250px,280px);padding:8px;gap:8px;}
}
@media (max-width:900px){
  .studio-page{overflow:auto!important;}
  .studio-page > .studio-global-header{height:auto;min-height:58px;}
  .studio-page .app{width:100%;height:auto;min-height:calc(100vh - 58px);grid-template-columns:minmax(0,1fr);overflow:visible;}
  .studio-page .app,.studio-page .app > .panel,.studio-page .panelBody,.studio-page .workspace,.studio-page .workspace > .card,.studio-page .promptArea,.studio-page .promptArea > *{min-width:0;max-width:100%;}
  .studio-page .app > .panel{min-height:0;}
  .studio-page .promptArea{grid-template-columns:minmax(0,1fr);}
  .studio-page .workspace{padding:8px;}
  .studio-page .workspace > .card{padding:13px;overflow:hidden;}
  .studio-page .sectionTitle{align-items:flex-start;flex-wrap:wrap;height:auto;}
  .studio-page .sectionTitle .smallMuted{width:100%;padding-left:10px;}
  .studio-page .presetGrid,.studio-page .assetGrid{max-height:420px;overflow:auto;overscroll-behavior:contain;}
  .studio-page .masonryGrid{display:block;columns:auto!important;column-count:auto!important;max-height:420px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;}
  .studio-page .masonryGrid .mCard{display:block;width:100%;max-width:100%;margin:0 0 8px;break-inside:auto;}
  .studio-page .mCardBadge{max-width:calc(100% - 12px);left:6px!important;right:auto!important;white-space:normal;line-height:1.35;}
  .studio-page textarea,.studio-page select,.studio-page input{max-width:100%;}
  .studio-page .progressRow{display:grid;grid-template-columns:1fr;gap:10px;}
  .studio-page .progressRow > *{min-width:0;width:100%;}
  .studio-page .progressRow > div:last-child{justify-content:stretch!important;}
  .studio-page #btnOpenFolder{width:100%;max-width:none!important;justify-content:center;}
}

/* v11: 全工作台共享的品牌绿色语义。绿色用于行动、选择与运行，不用于普通装饰。 */
body:not(.home-page) main .panel > h3,
body:not(.home-page) main .card > h3{position:relative;padding-left:10px;}
body:not(.home-page) main .panel > h3::before,
body:not(.home-page) main .card > h3::before{
  content:"";position:absolute;left:0;top:.35em;width:2px;height:1em;border-radius:1px;background:#62e68b;
}
body[data-page="manga"] #btnSplit,
body[data-page="m3"] #btnRun,
body[data-page="m3"] #btnConfirm,
body[data-page="m3"] #btnFinal,
body[data-page="h3"] #run,
body[data-page="workbench"] #run,
body[data-page="edit"] #planBtn,
body[data-page="edit"] #aiDubGo,
body[data-page="expert"] #run,
body[data-page="expert"] #distillBtn,
body[data-page="canvas"] #runAll{
  background:#62e68b!important;color:#07110a!important;border-color:#62e68b!important;box-shadow:none!important;
}
body[data-page="manga"] #btnSplit:hover,
body[data-page="m3"] #btnRun:hover,
body[data-page="m3"] #btnConfirm:hover,
body[data-page="m3"] #btnFinal:hover,
body[data-page="h3"] #run:hover,
body[data-page="workbench"] #run:hover,
body[data-page="edit"] #planBtn:hover,
body[data-page="edit"] #aiDubGo:hover,
body[data-page="expert"] #run:hover,
body[data-page="expert"] #distillBtn:hover,
body[data-page="canvas"] #runAll:hover{background:#75ee98!important;border-color:#75ee98!important;}

body[data-page="manga"] .sb-card,
body[data-page="edit"] .material,
body[data-page="edit"] .cut,
body[data-page="edit"] .history-item,
body[data-page="expert"] .agent,
body[data-page="workbench"] .asset-card{border-radius:6px!important;box-shadow:none!important;}
body[data-page="manga"] .sb-card:hover,
body[data-page="edit"] .history-item:hover{border-color:#4a6652!important;}
body[data-page="manga"] .sb-card .no,
body[data-page="edit"] .cut-no{color:#62e68b!important;}

body[data-page="canvas"] .tb.primary,
body[data-page="canvas"] .htab.on,
body[data-page="expert"] .tab.on,
body[data-page="workbench"] .tab.active{
  background:#17201a!important;color:#c8f4d4!important;border-color:#41634b!important;box-shadow:inset 0 -2px #62e68b!important;
}
body[data-page="canvas"] #runAll{box-shadow:none!important;}
body[data-page="canvas"] .node.selected{border-color:#568166!important;box-shadow:0 0 0 2px rgba(98,230,139,.15)!important;}
body[data-page="canvas"] .node .status.running,
body[data-page="m3"] .dag-node.running .dot,
body[data-page="m3"] .agent-li.run .dot2{background:#62e68b!important;}

body[data-page="edit"] .skill-btn.on{
  background:#17221b!important;color:#baf0c8!important;border-color:#4a7b59!important;box-shadow:inset 0 -2px #62e68b;
}
body[data-page="edit"] .pipe.ready{border-left-color:#62e68b!important;background:#121a15;}
body[data-page="edit"] .drop-zone.on{border-color:#62e68b!important;color:#baf0c8!important;background:#111a14!important;}
body[data-page="edit"] button:not(:disabled):hover,
body[data-page="edit"] .btn:not(:disabled):hover,
body[data-page="edit"] .skill-btn:hover,
body[data-page="edit"] .material:hover,
body[data-page="edit"] .cut:hover,
body[data-page="edit"] .history-item:hover,
body[data-page="edit"] .pipe:hover,
body[data-page="edit"] .drop-zone:hover{
  border-color:#62e68b!important;color:#62e68b!important;background:#141c17!important;transform:translateY(-1px);box-shadow:0 5px 14px rgba(0,0,0,.18)!important;
}
body[data-page="edit"] button:not(:disabled):hover i,
body[data-page="edit"] .btn:not(:disabled):hover i{color:#62e68b!important;}
body[data-page="edit"] .skill-btn.on:hover,
body[data-page="edit"] #planBtn:hover,
body[data-page="edit"] #aiDubGo:hover{background:#78ee9c!important;color:#07110a!important;border-color:#62e68b!important;}

body[data-page="manga"] button:not(:disabled):hover,
body[data-page="manga"] .btn:not(:disabled):hover,
body[data-page="manga"] .sb-card:hover,
body[data-page="manga"] .mcard:hover,
body[data-page="manga"] .shot-block:hover{border-color:#62e68b!important;color:#62e68b!important;background:#141c17!important;}

/* Studio uses local component rules, so keep its hover state explicit. */
body[data-page="studio"] .btn:hover,
body[data-page="studio"] button:hover,
body[data-page="studio"] .chipX:hover,
body[data-page="studio"] .preset:hover,
body[data-page="studio"] .assetItem:hover,
body[data-page="studio"] .mCard:hover,
body[data-page="studio"] .shotCard:hover,
body[data-page="studio"] .qsCard:hover,
body[data-page="studio"] .gTab:hover,
body[data-page="studio"] .miniAct:hover{border-color:#62e68b!important;color:#62e68b!important;background:#141c17!important;transform:translateY(-1px)!important;}
body[data-page="studio"] .btnPrimary:hover,
body[data-page="studio"] .pluginDrawer-submit:hover{background:#78ee9c!important;color:#07110a!important;border-color:#62e68b!important;}

body[data-page="m3"] .dag-node.running,
body[data-page="m3"] .pkg.on,
body[data-page="m3"] .mcard.sel{
  border-color:#568166!important;background:#141c17!important;outline:0!important;box-shadow:inset 3px 0 #62e68b!important;
}
body[data-page="m3"] .final{border-color:#568166!important;}
body[data-page="m3"] .bbar i{background:#62e68b!important;}
body[data-page="h3"] .status.running,
body[data-page="workbench"] .status.running,
body[data-page="expert"] .status.running{color:#62e68b!important;}

/* 智能剪辑：移动端字段必须保持明确的标签/控件纵向关系。 */
body[data-page="edit"] .edit-side .panel > label{display:block;width:100%;margin:12px 0 6px;}
body[data-page="edit"] .edit-side .panel > input,
body[data-page="edit"] .edit-side .panel > textarea{display:block;width:100%;max-width:100%;}
body[data-page="edit"] .field-grid > div > label,
body[data-page="edit"] .option-grid > div > label{display:block;margin:0 0 6px;}
body[data-page="edit"] .field-grid input,
body[data-page="edit"] .field-grid select,
body[data-page="edit"] .option-grid select{width:100%;max-width:100%;}
@media(max-width:560px){
  body[data-page="edit"] .field-grid,body[data-page="edit"] .option-grid{grid-template-columns:minmax(0,1fr)!important;}
  body[data-page="edit"] .search-row{display:grid!important;grid-template-columns:1fr 1fr;gap:6px;}
  body[data-page="edit"] .search-row input{grid-column:1 / -1;width:100%;}
  body[data-page="edit"] .checks{grid-template-columns:minmax(0,1fr)!important;}
}
