:root{color-scheme:dark;--tool-bg:#0b0e13;--tool-card:#131821;--tool-line:#293140;--tool-muted:#8e98aa;--tool-accent:#7469ff}*{box-sizing:border-box}body.tool-page{margin:0;min-height:100vh;background:radial-gradient(circle at 80% 0,#241f4a55,transparent 32%),var(--tool-bg);color:#eef1f7;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif}.tool-header{height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 clamp(14px,3vw,40px);border-bottom:1px solid var(--tool-line);background:#0e1218e8;backdrop-filter:blur(12px);position:sticky;top:0;z-index:5}.tool-brand{display:flex;align-items:center;gap:11px;min-width:0}.tool-brand-mark{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#28254a;color:#d8d4ff;font-weight:800}.tool-brand b{display:block;font-size:15px}.tool-brand small{display:block;color:var(--tool-muted);font-size:11px;margin-top:2px}.tool-actions{display:flex;align-items:center;gap:8px}.tool-btn,.tool-link{border:1px solid #353e50;background:#1b212c;color:#e5e9f1;border-radius:9px;padding:9px 13px;font-size:12px;font-weight:600;font-family:inherit;text-decoration:none;cursor:pointer}.tool-btn.primary{border-color:#7167ff;background:linear-gradient(135deg,#665cff,#8b67ff);color:white}.tool-btn:disabled{opacity:.55;cursor:not-allowed}.tool-main{width:min(1180px,calc(100% - 28px));margin:0 auto;padding:26px 0 60px}.tool-hero{margin-bottom:18px}.tool-hero h1{font-size:clamp(27px,4vw,42px);margin:0 0 8px}.tool-hero p{color:var(--tool-muted);margin:0;line-height:1.7}.tool-grid{display:grid;grid-template-columns:minmax(320px,.82fr) minmax(0,1.35fr);gap:16px}.tool-card{background:#121720e8;border:1px solid var(--tool-line);border-radius:17px;padding:18px;box-shadow:0 18px 55px #0003}.tool-card h2{font-size:16px;margin:0 0 15px}.tool-field{display:grid;gap:7px;margin-bottom:13px}.tool-field label{color:#cbd1dc;font-size:12px}.tool-field textarea,.tool-field select,.tool-field input{width:100%;border:1px solid #343d4d;background:#0b0f15;color:#eef1f7;border-radius:10px;padding:11px 12px;font:13px/1.5 inherit;outline:none}.tool-field textarea{min-height:210px;resize:vertical}.tool-field textarea:focus,.tool-field select:focus{border-color:#6963be;box-shadow:0 0 0 3px #665cff15}.tool-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tool-meta{font-size:11px;color:var(--tool-muted);line-height:1.6}.tool-status{min-height:22px;margin:10px 0;color:#b8c0cf;font-size:12px}.tool-status.error{color:#ff9aa8}.tool-status.ok{color:#76e1b2}.image-result-stage{min-height:520px;border:1px dashed #333c4d;border-radius:14px;background:#090d12;display:grid;place-items:center;overflow:hidden;position:relative}.image-result-stage img{max-width:100%;max-height:70vh;object-fit:contain;display:block}.image-empty{max-width:360px;text-align:center;color:#737e91;line-height:1.7;padding:28px}.result-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.chat-shell{display:grid;grid-template-rows:auto minmax(360px,1fr) auto;height:calc(100vh - 130px);min-height:560px}.chat-top{display:flex;align-items:end;gap:12px;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid var(--tool-line)}.chat-model-field{min-width:min(420px,60vw)}.chat-stream{overflow:auto;padding:18px 2px;display:flex;flex-direction:column;gap:13px}.chat-bubble{max-width:min(760px,88%);border-radius:15px;padding:12px 14px;white-space:pre-wrap;line-height:1.65;font-size:13px;border:1px solid #2d3544}.chat-bubble.user{align-self:flex-end;background:#292652;border-color:#464079}.chat-bubble.assistant{align-self:flex-start;background:#161c26}.chat-bubble small{display:block;color:#8993a6;margin-top:7px;font-size:10px}.chat-compose{border-top:1px solid var(--tool-line);padding-top:13px}.chat-compose textarea{min-height:95px;max-height:220px}.chat-compose-actions{display:flex;justify-content:space-between;gap:10px;align-items:center}.api-history-tools{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.api-history-list{display:grid;gap:10px}.api-history-row{border:1px solid var(--tool-line);background:#10151d;border-radius:13px;padding:14px;display:grid;grid-template-columns:minmax(150px,1.2fr) minmax(120px,.7fr) minmax(120px,.7fr) minmax(170px,1fr) auto;gap:12px;align-items:center}.api-history-row b{font-size:12px;display:block;word-break:break-all}.api-history-row small{color:var(--tool-muted);font-size:10px;display:block;margin-top:4px}.api-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#252d3b;color:#c8cfdb;font-size:10px}.api-badge.ok{background:#12362b;color:#83e7ba}.api-badge.run{background:#172e48;color:#9bc9ff}.api-badge.bad{background:#3c2027;color:#ff9dac}.api-history-empty{padding:40px 12px;text-align:center;color:var(--tool-muted)}@media(max-width:850px){.tool-grid{grid-template-columns:1fr}.image-result-stage{min-height:330px}.tool-row{grid-template-columns:1fr}.api-history-row{grid-template-columns:1fr 1fr}.api-history-row>div:first-child{grid-column:1/-1}.chat-shell{height:auto;min-height:calc(100vh - 120px)}}@media(max-width:520px){.tool-header{height:auto;min-height:58px;padding:10px 10px}.tool-brand small{display:none}.tool-actions{gap:5px}.tool-btn,.tool-link{padding:8px 9px}.tool-main{width:min(100% - 18px,1180px);padding-top:16px}.tool-card{padding:13px}.api-history-row{grid-template-columns:1fr}.api-history-row>div:first-child{grid-column:auto}.chat-model-field{min-width:0;flex:1}.chat-top{align-items:stretch;flex-direction:column}}


/* v6.2.1 premium standalone workbenches */
.tool-page-premium{background:radial-gradient(circle at 84% -8%,rgba(102,92,255,.15),transparent 34%),radial-gradient(circle at 8% 20%,rgba(58,160,210,.08),transparent 28%),var(--tool-bg)}
.tool-page-premium .tool-header{height:70px;padding-inline:clamp(18px,4vw,54px);border-bottom-color:color-mix(in srgb,var(--tool-line) 82%,transparent);box-shadow:0 12px 45px rgba(0,0,0,.1)}
.tool-page-premium .tool-brand-mark{width:38px;height:38px;border-radius:13px;background:linear-gradient(145deg,#5d55dd,#8a6eff);box-shadow:0 9px 26px rgba(101,89,230,.24)}
.tool-main-premium{width:min(1380px,calc(100% - 48px));padding:38px 0 72px}
.tool-hero-premium{display:flex;justify-content:space-between;gap:34px;align-items:flex-end;margin-bottom:26px;padding:0 3px}.tool-hero-premium>div:first-child{max-width:760px}.tool-eyebrow{display:block;color:#9c96ff;font-size:10px;font-weight:800;letter-spacing:.2em;margin-bottom:8px}.tool-hero-premium h1{font-size:clamp(34px,4.6vw,58px);letter-spacing:-.045em;line-height:1.02;margin-bottom:12px}.tool-hero-premium p{font-size:13px;max-width:720px}.tool-hero-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.tool-hero-badges span{border:1px solid #323a4b;background:rgba(19,24,33,.7);border-radius:999px;padding:8px 11px;color:#aab3c4;font-size:10px;backdrop-filter:blur(12px)}
.image-workbench-grid{grid-template-columns:minmax(360px,430px) minmax(0,1fr);gap:22px;align-items:start}.image-workbench-grid>.tool-card{padding:22px;border-radius:22px}.image-workbench-grid>.tool-card:first-child{position:sticky;top:92px}.image-workbench-grid .image-result-stage{min-height:min(68vh,760px);border-radius:18px;background:radial-gradient(circle at 50% 40%,#171b27,#080b10 70%);border-style:solid}.image-workbench-grid .tool-field textarea{min-height:260px}.image-workbench-grid #imageGenerate{width:100%;min-height:46px;font-size:13px}
.chat-main-premium{padding-bottom:34px}.chat-hero{margin-bottom:18px}.chat-shell-premium{height:calc(100vh - 255px);min-height:610px;border-radius:24px;padding:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.chat-shell-premium .chat-top{padding:19px 22px;background:linear-gradient(180deg,rgba(255,255,255,.018),transparent)}.chat-shell-premium .chat-stream{padding:22px clamp(16px,5vw,72px);gap:16px}.chat-shell-premium .chat-bubble{max-width:min(840px,82%);font-size:14px;border-radius:18px;padding:14px 16px;box-shadow:0 10px 28px rgba(0,0,0,.09)}.chat-shell-premium .chat-compose{padding:16px 22px 20px;background:linear-gradient(0deg,rgba(9,12,17,.78),rgba(12,16,23,.58));backdrop-filter:blur(18px)}.chat-shell-premium .chat-compose textarea{min-height:88px;border-radius:14px}.chat-shell-premium #chatSend{min-width:108px;min-height:42px}.chat-shell-premium .chat-model-field{min-width:min(460px,44vw);margin:0}
html[data-theme="light"] .tool-hero-badges span{background:rgba(255,255,255,.76);border-color:#d9dde6;color:#667085}html[data-theme="light"] .image-workbench-grid .image-result-stage{background:radial-gradient(circle at 50% 40%,#fff,#edf0f4 76%)}html[data-theme="light"] .chat-shell-premium .chat-compose{background:rgba(249,250,251,.85)}
@media(max-width:1020px){.tool-main-premium{width:min(100% - 30px,1380px);padding-top:28px}.tool-hero-premium{align-items:flex-start;flex-direction:column;gap:14px}.tool-hero-badges{justify-content:flex-start}.image-workbench-grid{grid-template-columns:minmax(300px,38%) minmax(0,1fr);gap:14px}.image-workbench-grid>.tool-card{padding:17px}.image-workbench-grid>.tool-card:first-child{top:82px}.chat-shell-premium{height:calc(100vh - 285px);min-height:590px}.chat-shell-premium .chat-top{align-items:flex-end;flex-direction:row}.chat-shell-premium .chat-model-field{min-width:300px}}
@media(max-width:820px){.tool-page-premium .tool-header{padding-inline:14px}.tool-main-premium{width:min(100% - 22px,1380px);padding-top:22px}.tool-hero-premium h1{font-size:clamp(30px,8vw,44px)}.image-workbench-grid{grid-template-columns:1fr}.image-workbench-grid>.tool-card:first-child{position:static}.image-workbench-grid .tool-field textarea{min-height:190px}.image-workbench-grid .image-result-stage{min-height:52vh}.chat-main-premium{padding-bottom:20px}.chat-shell-premium{height:calc(100dvh - 250px);min-height:590px}.chat-shell-premium .chat-top{padding:16px;display:grid;grid-template-columns:1fr auto;align-items:end}.chat-shell-premium .chat-model-field{min-width:0;grid-column:1/-1}.chat-shell-premium .chat-stream{padding:17px}.chat-shell-premium .chat-bubble{max-width:92%}.chat-shell-premium .chat-compose{padding:13px 16px 16px}}
@media(max-width:560px){.tool-main-premium{width:min(100% - 16px,1380px)}.tool-hero-premium{margin-bottom:16px}.tool-hero-badges{display:none}.chat-hero{display:none}.chat-shell-premium{height:calc(100dvh - 86px);min-height:0;border-radius:18px}.chat-shell-premium .chat-top{grid-template-columns:1fr auto;padding:12px}.chat-shell-premium .chat-stream{padding:13px 10px}.chat-shell-premium .chat-bubble{max-width:96%;font-size:13px}.chat-shell-premium .chat-compose{padding:10px 12px 12px}.image-workbench-grid>.tool-card{padding:14px;border-radius:18px}}
/* v6.4.0 Agent Skill selectors */
.chat-selector-row{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.chat-selector-row .chat-model-field{min-width:min(300px,42vw)}.chat-skill-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;margin:10px 0 0;border:1px solid #293245;border-radius:11px;background:#0c1119;color:#98a4b7;font-size:10px}.chat-skill-status a{color:#9b94ff;text-decoration:none}.chat-step-list{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.chat-step-list span{font-size:9px;padding:4px 6px;border:1px solid #344056;background:#111825;border-radius:7px;color:#9aa7ba}
html[data-theme="light"] .chat-skill-status{background:#f6f8fb!important;border-color:#dbe3ec!important;color:#657287!important}html[data-theme="light"] .chat-step-list span{background:#f3f6f9!important;border-color:#d8e1eb!important;color:#5f6d82!important}@media(max-width:850px){.chat-selector-row{width:100%}.chat-selector-row .chat-model-field{min-width:0;flex:1 1 260px}}
.chat-pricing-strip{margin:0 14px 8px;padding:8px 10px;border:1px solid #2d3646;border-radius:10px;background:rgba(106,95,229,.06);color:#8995a8;font-size:9.5px;line-height:1.55}
