:root {
  color-scheme: dark;
  --bg: #07101e;
  --bg-soft: #0a1424;
  --panel: rgba(13, 25, 43, .92);
  --panel-solid: #0d192b;
  --panel-hover: #12223a;
  --line: rgba(148, 171, 207, .13);
  --line-strong: rgba(148, 171, 207, .24);
  --text: #eff5ff;
  --muted: #8b9bb4;
  --muted-2: #61738f;
  --blue: #5b7cff;
  --blue-2: #8298ff;
  --cyan: #40d8ff;
  --green: #35d49a;
  --orange: #f2a96b;
  --pink: #e97dc6;
  --violet: #a783ff;
  --red: #ff667d;
  --shadow: 0 24px 60px rgba(0, 0, 0, .34);
  --sidebar: 268px;
  --settings: 326px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; min-height: 0; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 560px at 57% -22%, rgba(73, 99, 234, .20), transparent 65%),
    radial-gradient(580px 420px at 92% 100%, rgba(25, 166, 204, .08), transparent 72%),
    var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(91, 124, 255, .85);
  outline-offset: 2px;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; z-index: 999; left: 16px; top: -80px; padding: 10px 14px; border-radius: 8px;
  color: white; background: var(--blue); text-decoration: none; transition: top .18s;
}
.skip-link:focus { top: 12px; }

.app-shell { height: 100dvh; min-height: 0; overflow: hidden; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.app-shell.settings-open { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--settings); }

.sidebar {
  min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; z-index: 30;
  background: linear-gradient(180deg, rgba(9, 19, 34, .98), rgba(7, 16, 29, .98));
  border-right: 1px solid var(--line); padding: 22px 16px 14px;
}
.brand-row { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 5px 12px; }
.brand-mark {
  width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; flex: 0 0 auto;
  color: white; background: linear-gradient(145deg, #7087ff, #4059df 70%); box-shadow: 0 8px 24px rgba(69, 92, 225, .30);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-mark svg path:first-child { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.72); }
.brand-mark svg path:last-child { stroke-width: 2.2; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 16px; letter-spacing: -.01em; }
.brand-copy span { color: var(--muted-2); font-size: 10px; margin-top: 4px; letter-spacing: .03em; }

.new-task-button {
  height: 43px; border: 1px solid rgba(111, 137, 255, .25); border-radius: 11px; margin: 18px 0 24px;
  display: flex; align-items: center; gap: 9px; padding: 0 12px; color: #eaf0ff;
  background: linear-gradient(180deg, rgba(65, 86, 176, .24), rgba(35, 50, 102, .18));
  transition: border-color .18s, background .18s, transform .18s;
}
.new-task-button:hover { border-color: rgba(111,137,255,.5); background: rgba(65,86,176,.32); transform: translateY(-1px); }
.new-task-button svg { width: 18px; }
.new-task-button span { flex: 1; text-align: left; font-weight: 600; }
.new-task-button kbd { border: 0; color: var(--muted-2); background: transparent; font: 10px inherit; }

.section-label { margin: 0 0 9px 7px; color: #52647f; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.skill-nav { display: flex; flex-direction: column; gap: 3px; }
.skill-item {
  min-height: 52px; display: grid; grid-template-columns: 31px minmax(0,1fr) 24px; align-items: center; gap: 10px;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent;
  text-align: left; transition: background .18s, color .18s, border-color .18s;
}
.skill-item:hover { color: var(--text); background: rgba(80, 103, 147, .08); }
.skill-item.is-active { color: var(--text); border-color: rgba(108, 133, 255, .15); background: linear-gradient(90deg, rgba(83,107,230,.18), rgba(83,107,230,.06)); }
.skill-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.skill-item b { font-size: 13px; font-weight: 600; }
.skill-item small { margin-top: 3px; color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-item em { color: #526783; font-size: 10px; font-style: normal; text-align: center; }
.skill-icon { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.skill-icon svg { width: 17px; }
.skill-gpt { color: #9fb2ff; background: rgba(91,124,255,.13); }
.skill-claude { color: #f4bd8e; background: rgba(230,148,85,.13); }
.skill-gemini { color: #93c8ff; background: rgba(68,143,232,.13); }
.skill-domestic { color: #ff9da5; background: rgba(239,93,104,.13); }
.skill-image { color: #f09bd3; background: rgba(224,86,173,.12); }
.skill-video { color: #bca5ff; background: rgba(141,99,240,.13); }

.history-section { min-height: 0; flex: 1; display: flex; flex-direction: column; margin-top: 25px; border-top: 1px solid var(--line); padding-top: 19px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.section-heading .section-label { margin-bottom: 7px; }
.text-icon-button { width: 28px; height: 28px; border: 0; color: var(--muted-2); background: transparent; padding: 5px; }
.text-icon-button svg { width: 16px; }
.history-search { margin: 4px 2px 7px; }
.history-search input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); background: rgba(255,255,255,.035); outline: none; font-size: 12px; }
.history-list { min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: rgba(98,118,150,.28) transparent; }
.history-empty { margin: 18px 7px; color: #4d5e78; font-size: 11px; }
.history-item { position: relative; width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 9px 8px; text-align: left; background: transparent; }
.history-item:hover, .history-item.is-active { background: rgba(100,121,158,.09); }
.history-item > i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: 0 0 auto; }
.history-item > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.history-item b { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item small { color: #50617a; font-size: 9px; margin-top: 3px; }
.history-delete { opacity: 0; width: 25px; height: 25px; border: 0; color: var(--muted-2); background: transparent; padding: 5px; }
.history-item:hover .history-delete { opacity: 1; }
.history-delete:hover { color: var(--red); }

.sidebar-footer { border-top: 1px solid var(--line); padding-top: 12px; }
.library-button{width:100%;min-height:48px;display:grid;grid-template-columns:30px minmax(0,1fr) 12px;gap:9px;align-items:center;margin:10px 0;border:1px solid rgba(126,151,190,.1);border-radius:10px;padding:7px 9px;color:var(--muted);background:rgba(255,255,255,.018);text-align:left}.library-button>svg{width:27px;height:27px;padding:6px;border-radius:8px;color:#f0a5d8;background:rgba(224,86,173,.1)}.library-button>span{min-width:0;display:flex;flex-direction:column}.library-button b{color:#c9d3e3;font-size:10px}.library-button small{margin-top:3px;color:var(--muted-2);font-size:8px}.library-button em{font-style:normal}.library-button:hover{border-color:var(--line-strong);background:rgba(255,255,255,.035)}
.account-button { width: 100%; display: grid; grid-template-columns: 36px minmax(0,1fr) 16px; align-items: center; gap: 9px; padding: 7px; border: 0; border-radius: 10px; text-align: left; background: transparent; }
.account-button:hover { background: rgba(100,121,158,.08); }
.status-avatar { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(80,103,147,.09); }
.status-avatar svg { width: 19px; }
.status-avatar i { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid var(--bg-soft); border-radius: 50%; background: #68778e; }
.status-avatar i.is-online { background: var(--green); box-shadow: 0 0 8px rgba(53,212,154,.6); }
.account-button > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.account-button b { font-size: 11px; }
.account-button small { color: var(--muted-2); font-size: 9px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.account-button .chevron { width: 14px; color: #50617a; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 8px 0 0; color: #465873; font-size: 9px; }
.privacy-note svg { width: 11px; }

.workspace { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: grid; grid-template-rows: 69px minmax(0,1fr) auto; position: relative; }
.topbar { z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; border-bottom: 1px solid var(--line); background: rgba(7,16,30,.66); backdrop-filter: blur(18px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; }
.topbar-left { min-width: 0; gap: 12px; }
.task-heading { min-width: 0; display: flex; align-items: baseline; gap: 11px; }
.task-heading h1 { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-heading span { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.topbar-actions { gap: 7px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.018); transition: color .18s, background .18s, border-color .18s; }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.icon-button svg { width: 18px; }
.service-pill { height: 31px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.018); font-size: 10px; }
.service-pill i { width: 6px; height: 6px; border-radius: 50%; background: #67768c; }
.service-pill.is-online { color: #b7d9cd; border-color: rgba(53,212,154,.14); background: rgba(53,212,154,.055); }
.service-pill.is-online i { background: var(--green); box-shadow: 0 0 7px rgba(53,212,154,.6); }
.service-pill.is-busy i { background: #f5ba58; animation: pulse 1.2s infinite; }
.service-pill.is-error i { background: var(--red); }
.active-jobs-button{height:34px;display:flex;align-items:center;gap:8px;border:1px solid rgba(245,186,88,.22);border-radius:999px;padding:0 11px;color:#f1d69f;background:rgba(245,186,88,.07);font-family:inherit;font-size:11px;font-weight:600;line-height:1;white-space:nowrap;box-shadow:0 7px 22px rgba(0,0,0,.12);transition:border-color .18s,background .18s,color .18s}.active-jobs-button[hidden]{display:none}.active-jobs-button:hover,.active-jobs-button[aria-expanded="true"]{color:#ffe8b7;border-color:rgba(245,186,88,.42);background:rgba(245,186,88,.13)}.active-jobs-button:focus-visible{outline:2px solid rgba(142,171,255,.82);outline-offset:2px}.active-jobs-button>i{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#f5ba58;box-shadow:0 0 10px rgba(245,186,88,.58);animation:pulse 1.2s infinite}.active-jobs-button>svg{width:13px;flex:0 0 auto;color:#c89e5b;transition:transform .18s}.active-jobs-button[aria-expanded="true"]>svg{transform:rotate(180deg)}
.active-jobs-popover{position:fixed;z-index:120;top:78px;right:18px;width:320px;max-height:min(440px,calc(100dvh - 96px));overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid rgba(139,160,198,.24);border-radius:14px;color:var(--text);background:rgba(10,23,40,.98);box-shadow:0 22px 65px rgba(0,0,0,.46);backdrop-filter:blur(22px);animation:rise .18s ease-out}.active-jobs-popover[hidden]{display:none}.active-jobs-popover>header{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.018)}.active-jobs-popover>header>div{min-width:0;display:flex;flex-direction:column}.active-jobs-popover>header b{font-size:14px}.active-jobs-popover>header small{margin-top:4px;color:#697b96;font-size:10px;line-height:1.45}.active-jobs-popover>header>span{flex:0 0 auto;padding:4px 8px;border:1px solid rgba(245,186,88,.16);border-radius:99px;color:#d9b978;background:rgba(245,186,88,.06);font-size:10px;font-weight:700}.active-jobs-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px;scrollbar-width:thin;scrollbar-color:rgba(97,119,153,.35) transparent}.active-jobs-list:empty::before{content:"暂无运行中的任务";min-height:92px;display:grid;place-items:center;color:var(--muted-2);font-size:12px}.active-job-item,.active-jobs-list>[data-job-id]{min-width:0;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:start;padding:11px 9px;border:1px solid transparent;border-radius:10px;transition:border-color .18s,background .18s}.active-job-item+.active-job-item,.active-jobs-list>[data-job-id]+[data-job-id]{margin-top:3px}.active-job-item:hover,.active-jobs-list>[data-job-id]:hover{border-color:rgba(124,148,190,.13);background:rgba(255,255,255,.025)}.active-job-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:#b9c7ff;background:rgba(91,124,255,.13);font-size:12px;font-weight:800}.active-job-item[data-mode="image"] .active-job-icon,.active-job-item[data-job-type="image"] .active-job-icon{color:#f1a8d8;background:rgba(224,86,173,.12)}.active-job-item[data-mode="video"] .active-job-icon,.active-job-item[data-job-type="video"] .active-job-icon{color:#cbb9ff;background:rgba(141,99,240,.14)}.active-job-main,.active-job-copy{min-width:0}.active-job-heading{display:flex;align-items:center;gap:7px;min-width:0}.active-job-heading b,.active-job-title{display:block;min-width:0;overflow:hidden;color:#dce6f5;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650}.active-job-heading em,.active-job-status{flex:0 0 auto;color:#e0bd79;font-size:9px;font-style:normal;white-space:nowrap}.active-job-meta{margin:5px 0 0;overflow:hidden;color:#667995;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.active-job-progress{height:4px;margin-top:9px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.07)}.active-job-progress>i,.active-job-progress>span{display:block;height:100%;min-width:3%;border-radius:inherit;background:linear-gradient(90deg,#677fff,#62c9e8);transition:width .35s ease}.active-job-actions{display:flex;flex-direction:column;gap:5px}.active-job-actions button,.active-jobs-list [data-job-action]{min-width:52px;height:30px;border:1px solid var(--line);border-radius:7px;padding:0 8px;color:#aebdd2;background:rgba(255,255,255,.025);font-size:10px;white-space:nowrap}.active-job-actions button:hover,.active-jobs-list [data-job-action]:hover{color:white;border-color:rgba(107,133,255,.38);background:rgba(91,124,255,.1)}.active-job-actions [data-job-action="stop"],.active-jobs-list [data-job-action="stop"]{color:#e5a4af;border-color:rgba(255,102,125,.14)}.active-job-actions [data-job-action="stop"]:hover,.active-jobs-list [data-job-action="stop"]:hover{color:#ffc2cc;border-color:rgba(255,102,125,.32);background:rgba(255,102,125,.08)}
.active-job-item,.active-jobs-list>[data-job-id]{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px}.active-job-main{min-width:0;display:grid;grid-column:1;grid-row:1;grid-template-columns:36px minmax(0,1fr);gap:10px;align-items:center}.active-job-icon{color:var(--job-color,#b9c7ff);background:color-mix(in srgb,var(--job-color,#7187ff) 14%,transparent)}.active-job-copy{min-width:0}.active-job-copy>b{display:block;min-width:0;overflow:hidden;color:#dce6f5;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650}.active-job-meta{display:block}.active-job-progress{grid-column:1/-1;grid-row:2;margin-top:1px}.active-job-actions{grid-column:2;grid-row:1;align-self:center}
.menu-button { display: none; }

.content-stage { min-height: 0; height: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; position: relative; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(97,119,153,.28) transparent; }
.welcome-state { min-height: 100%; width: min(770px, calc(100% - 48px)); margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 54px 0 36px; text-align: center; }
.hero-orbit { width: 104px; height: 104px; position: relative; display: grid; place-items: center; margin-bottom: 14px; }
.hero-core { position: relative; z-index: 2; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg,#7389ff,#425ce6 70%); box-shadow: 0 15px 48px rgba(60,85,223,.38), inset 0 1px rgba(255,255,255,.25); transform: rotate(10deg); }
.hero-core span { font-size: 24px; font-weight: 800; transform: rotate(-10deg); }
.orbit { position: absolute; inset: 12px; border: 1px solid rgba(104,128,255,.23); border-radius: 50%; }
.orbit-one { animation: spin 11s linear infinite; }
.orbit-one::after { content: ""; position: absolute; width: 6px; height: 6px; top: 5px; left: 12px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.orbit-two { inset: 1px 17px; transform: rotate(60deg); border-color: rgba(104,128,255,.12); }
.spark { position: absolute; color: #9eaaff; font-style: normal; }
.spark-one { right: 3px; top: 8px; font-size: 13px; animation: float 3s ease-in-out infinite; }
.spark-two { left: 4px; bottom: 15px; font-size: 8px; animation: float 3.5s .5s ease-in-out infinite; }
.spark-three { right: 9px; bottom: 11px; font-size: 23px; color: var(--cyan); }
.eyebrow { margin: 0; color: #7185a5; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.welcome-state h2 { margin: 12px 0 10px; font-size: clamp(25px,3vw,34px); line-height: 1.25; letter-spacing: -.035em; }
.welcome-copy { width: min(585px,100%); margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.starter-grid { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 28px; }
.starter-grid button { min-height: 69px; display: grid; grid-template-columns: 39px minmax(0,1fr) 18px; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: linear-gradient(145deg,rgba(17,31,53,.82),rgba(12,24,42,.76)); text-align: left; transition: transform .18s,border-color .18s,background .18s; }
.starter-grid button:hover { transform: translateY(-2px); border-color: rgba(111,137,255,.3); background: var(--panel-hover); }
.starter-grid button > span:nth-child(2) { display: flex; flex-direction: column; }
.starter-grid b { font-size: 12px; }
.starter-grid small { margin-top: 5px; color: var(--muted-2); font-size: 10px; }
.starter-grid button > svg { width: 15px; color: #4c5f7d; }
.starter-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; font-weight: 700; }
.starter-blue { color:#aebcff;background:rgba(83,111,246,.14); }.starter-orange{color:#f3bd8f;background:rgba(224,137,71,.13)}.starter-pink{color:#f5a9db;background:rgba(224,86,173,.13)}.starter-violet{color:#c6b2ff;background:rgba(141,99,240,.14)}
.model-strip { display: flex; align-items: center; gap: 17px; margin-top: 22px; color: #53657f; font-size: 9px; }
.model-strip > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.model-strip > span i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.model-strip > div { display: flex; gap: 7px; flex-wrap: wrap; }
.model-strip em, .model-strip b { padding: 5px 8px; border: 1px solid rgba(148,171,207,.08); border-radius: 6px; color: #687b98; background: rgba(255,255,255,.018); font-size: 8px; font-style: normal; font-weight: 500; }

.message-list { width: min(850px, calc(100% - 52px)); min-height: 0; margin: 0 auto; padding: 38px 0 28px; }
.message { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 13px; margin-bottom: 25px; animation: rise .26s ease-out; }
.message.user { grid-template-columns: minmax(0,1fr) 35px; }
.message.user .message-avatar { grid-column: 2; }
.message.user .message-main { grid-row: 1; grid-column: 1; justify-self: end; max-width: 82%; }
.message-avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #adbcff; background: rgba(78,101,220,.13); font-size: 11px; font-weight: 700; }
.message.user .message-avatar { color: #b9c5d9; background: rgba(133,151,181,.08); }
.message-main { min-width: 0; }
.message-meta { display: flex; align-items: center; gap: 8px; margin: 1px 0 7px; color: var(--muted-2); font-size: 9px; }
.message-meta b { color: #bfcae0; font-size: 10px; }
.message.user .message-meta { justify-content: flex-end; }
.message-bubble { min-width: 0; color: #dce6f7; line-height: 1.75; word-break: break-word; }
.message.user .message-bubble { padding: 10px 14px; border: 1px solid rgba(104,127,175,.13); border-radius: 14px 4px 14px 14px; background: rgba(45,61,90,.38); }
.message-bubble p { margin: 0 0 10px; }.message-bubble p:last-child{margin-bottom:0}.message-bubble ul,.message-bubble ol{padding-left:21px}.message-bubble li{margin:4px 0}.message-bubble blockquote{margin:10px 0;padding:6px 12px;border-left:3px solid var(--blue);color:var(--muted);background:rgba(91,124,255,.05)}
.message-bubble a { color: #8eabff; text-decoration: underline; text-underline-offset: 2px; }
.message-bubble code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; color: #b9d3ff; background: rgba(0,0,0,.2); font: 12px/1.5 Consolas,monospace; }
.code-block { position: relative; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #07101b; }
.code-block header { height: 32px; display: flex; align-items:center; justify-content:space-between;padding:0 10px;border-bottom:1px solid var(--line);color:var(--muted-2);font-size:9px;background:rgba(255,255,255,.02)}
.code-block button { border:0;color:var(--muted);background:transparent;font-size:9px }.code-block pre{margin:0;padding:13px;overflow:auto}.code-block code{padding:0;border:0;background:transparent;color:#cbd8eb}
.typing-caret::after { content:""; display:inline-block; width:6px; height:15px; margin-left:3px; vertical-align:-2px; border-radius:2px; background:var(--blue-2); animation:blink .8s infinite; }
.thinking-status{min-height:38px;display:flex;align-items:center;gap:9px;margin:0 0 10px;padding:8px 11px;border:1px solid rgba(130,152,255,.14);border-radius:10px;color:#aebbd1;background:rgba(91,124,255,.055);font-size:12px;font-weight:600}.thinking-status i{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#8ea2ff;box-shadow:0 0 9px rgba(142,162,255,.55);animation:pulse 1.15s ease-in-out infinite}.thinking-status span{font-variant-numeric:tabular-nums}
.message-actions { display:flex;gap:3px;margin-top:9px;opacity:0;transition:opacity .18s}.message:hover .message-actions,.message-actions:focus-within{opacity:1}.message-actions button{display:flex;align-items:center;gap:4px;border:0;border-radius:6px;padding:5px 7px;color:var(--muted-2);background:transparent;font-size:9px}.message-actions button:hover{color:var(--text);background:rgba(255,255,255,.04)}.message-actions svg{width:13px}
.generation-status { display:flex;align-items:center;gap:10px;padding:15px;border:1px solid var(--line);border-radius:12px;background:rgba(15,29,49,.65)}
.status-spinner { width:21px;height:21px;border:2px solid rgba(123,146,184,.2);border-top-color:var(--blue-2);border-radius:50%;animation:spin .8s linear infinite }.generation-status span{display:flex;flex-direction:column}.generation-status b{font-size:11px}.generation-status small{margin-top:4px;color:var(--muted-2);font-size:9px}
.media-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}.media-card{position:relative;min-height:180px;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#050b14}.media-card img,.media-card video{display:block;width:100%;height:auto;max-height:520px;object-fit:contain}.media-card-actions{position:absolute;right:8px;bottom:8px;display:flex;gap:5px}.media-card-actions a{width:32px;height:32px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.15);border-radius:8px;color:white;background:rgba(5,11,20,.76);backdrop-filter:blur(8px)}.media-card-actions svg{width:15px}.video-card{grid-column:1/-1}.video-progress{height:5px;margin-top:12px;border-radius:99px;overflow:hidden;background:rgba(255,255,255,.07)}.video-progress i{display:block;height:100%;width:10%;background:linear-gradient(90deg,var(--blue),var(--cyan));transition:width .4s}
.error-card { padding:12px 14px;border:1px solid rgba(255,102,125,.18);border-radius:10px;color:#f3b1bc;background:rgba(255,102,125,.06);font-size:11px;line-height:1.6 }
.error-card small{display:block;margin-top:7px;color:#a87380;font:8px Consolas,monospace;word-break:break-all}
.message-actions.always{gap:6px;margin-top:10px;opacity:1}.message-actions.always button[data-action="pause-video"],.message-actions.always button[data-action="continue-video"],.message-actions.always button[data-action^="stop-"]{min-height:34px;border:1px solid rgba(123,148,190,.2);border-radius:8px;padding:0 11px;color:#c2cee0;background:rgba(255,255,255,.03);font-size:11px;font-weight:600}.message-actions.always button[data-action="pause-video"]{color:#e1bd79;border-color:rgba(245,186,88,.22);background:rgba(245,186,88,.07)}.message-actions.always button[data-action="continue-video"]{color:#bfcaff;border-color:rgba(91,124,255,.25);background:rgba(91,124,255,.09)}.message-actions.always button[data-action^="stop-"]{color:#efabb6;border-color:rgba(255,102,125,.2);background:rgba(255,102,125,.06)}.message-actions.always button:hover{filter:brightness(1.12)}.generation-status{display:grid;grid-template-columns:21px minmax(0,1fr);align-items:center}.generation-status>span{min-width:0}.generation-status::after{content:"生成在后台进行，可切换聊天模型继续提问";grid-column:2;margin-top:6px;color:#7187aa;font-size:10px;line-height:1.45}
.jump-bottom{position:absolute;z-index:14;right:26px;bottom:16px;height:34px;display:flex;align-items:center;gap:6px;border:1px solid var(--line-strong);border-radius:99px;padding:0 12px;color:#cad6e8;background:rgba(13,26,45,.96);box-shadow:0 8px 25px rgba(0,0,0,.3);font-size:9px}.jump-bottom[hidden]{display:none}.jump-bottom svg{width:13px}.jump-bottom:hover{border-color:rgba(91,124,255,.45);color:white}

.composer-wrap { z-index: 12; min-height: 0; flex-shrink: 0; padding: 0 24px 13px; background: linear-gradient(180deg,transparent,rgba(7,16,30,.92) 18%); }
.composer { width: min(850px,100%); margin: 0 auto; border: 1px solid rgba(125,147,186,.22); border-radius: 16px; background: rgba(13,25,43,.94); box-shadow: 0 15px 40px rgba(0,0,0,.22); transition:border-color .18s,box-shadow .18s; }
.composer:focus-within { border-color: rgba(102,128,255,.48); box-shadow:0 15px 40px rgba(0,0,0,.22),0 0 0 3px rgba(91,124,255,.06) }
.composer-meta { min-height: 32px;display:flex;align-items:center;gap:8px;padding:7px 10px 0}.model-chip{height:25px;display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:7px;padding:0 7px;color:#b8c5d9;background:rgba(255,255,255,.025);font-size:9px}.model-chip>span{width:15px;height:15px;display:grid;place-items:center;border-radius:4px;color:#b6c4ff;background:rgba(91,124,255,.16);font-size:8px}.model-chip b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-chip svg{width:11px;flex:0 0 auto;color:var(--muted-2)}.mode-hint{color:#53657e;font-size:8px}.parallel-hint{min-width:0;display:flex;align-items:center;gap:6px;margin-left:auto;padding:4px 7px;border:1px solid rgba(91,124,255,.11);border-radius:7px;color:#7688a5;background:rgba(91,124,255,.035);font-size:10px;line-height:1;white-space:nowrap}.parallel-hint>i{width:6px;height:6px;flex:0 0 auto;border-radius:50%;background:#7189ff;box-shadow:0 0 7px rgba(113,137,255,.48)}.parallel-hint-mobile{display:none}.topbar:has(.active-jobs-button:not([hidden]))~.content-stage+.composer-wrap .parallel-hint{color:#aebcff;border-color:rgba(91,124,255,.2);background:rgba(91,124,255,.075)}
.composer textarea { display:block;width:100%;min-height:54px;max-height:180px;resize:none;border:0;outline:0;padding:10px 15px 5px;color:var(--text);background:transparent;line-height:1.6;font-size:13px;scrollbar-width:thin}.composer textarea::placeholder{color:#5a6c86}
.attachment-tray{display:flex;gap:9px;overflow-x:auto;padding:10px 12px 3px;scrollbar-width:thin}.attachment-tray[hidden]{display:none}.attachment-card{width:244px;min-width:214px;max-width:min(244px,calc(100vw - 52px));height:62px;position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;margin:0;border:1px solid rgba(126,147,180,.24);border-radius:10px;padding:6px 31px 6px 6px;overflow:hidden;background:rgba(255,255,255,.025);transition:border-color .18s,background .18s}.attachment-card:hover{border-color:rgba(111,137,255,.42);background:rgba(91,124,255,.055)}.attachment-card img,.attachment-placeholder{display:grid;width:48px;height:48px;place-items:center;border-radius:7px;object-fit:cover;background:#07101b}.attachment-placeholder svg{width:22px;color:#5f718c}.attachment-card figcaption{min-width:0;display:flex;flex-direction:column;gap:5px;padding:0;overflow:hidden}.attachment-card figcaption b{overflow:hidden;color:#d6deeb;font-size:13px;font-weight:550;text-overflow:ellipsis;white-space:nowrap}.attachment-card figcaption small{color:#7d8da5;font-size:11px;line-height:1;white-space:nowrap}.attachment-card>em{position:absolute;right:8px;bottom:6px;color:#7e8da4;font-size:9px;font-style:normal}.attachment-card.is-unavailable{padding-right:68px}.attachment-card .attachment-remove{position:absolute;right:5px;top:5px;width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:7px;padding:0;color:#91a2ba;background:rgba(9,19,33,.86);font-size:18px;line-height:1;opacity:.42;transform:scale(.94);transition:opacity .15s,transform .15s,color .15s,background .15s}.attachment-card:hover .attachment-remove,.attachment-card:focus-within .attachment-remove{opacity:1;transform:scale(1)}.attachment-card .attachment-remove:hover{color:#ffd9df;background:rgba(199,68,89,.34)}.attachment-card .attachment-remove:focus-visible{opacity:1;outline:2px solid #8297ff;outline-offset:1px}.tool-button.has-attachment{color:#b9c7ff;background:rgba(91,124,255,.11)}.composer.is-processing-attachment .attachment-tray::after{content:'正在处理图片…';align-self:center;padding:0 8px;color:#9cacff;font-size:11px;white-space:nowrap}.composer.is-processing-attachment .tool-button,.composer.is-processing-attachment .send-button{cursor:wait}
.message-attachments{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin:0 0 8px}.message-attachments .attachment-card{width:220px;min-width:190px;max-width:min(220px,100%);padding-right:7px;background:rgba(255,255,255,.035)}
.composer-actions { height:43px;display:flex;align-items:center;justify-content:space-between;padding:4px 8px 8px 12px}.composer-tools{display:flex;align-items:center;gap:9px}.tool-button{height:27px;display:flex;align-items:center;gap:5px;border:0;border-radius:7px;padding:0 6px;color:var(--muted-2);background:transparent;font-size:9px}.tool-button:hover{color:var(--muted);background:rgba(255,255,255,.035)}.tool-button svg{width:14px}.char-count{color:#42536d;font-size:8px}.send-button{height:31px;display:flex;align-items:center;gap:7px;border:0;border-radius:9px;padding:0 12px;color:white;background:linear-gradient(135deg,#617cff,#4560e4);box-shadow:0 5px 15px rgba(55,80,212,.28);font-size:10px;font-weight:600}.send-button:hover{filter:brightness(1.08)}.send-button:disabled{cursor:not-allowed;opacity:.55}.send-button.is-stop{background:linear-gradient(135deg,#ff7b8d,#df526a)}.send-button svg{width:14px}.send-button.is-stop svg{fill:currentColor;stroke:none;width:10px;height:10px}.composer-footnote{text-align:center;margin:7px 0 0;color:#40516a;font-size:8px}

.settings-panel { min-width:0;height:100%;display:none;grid-template-rows:69px minmax(0,1fr) 52px;border-left:1px solid var(--line);background:rgba(8,18,32,.93);backdrop-filter:blur(20px)}
.settings-open .settings-panel{display:grid}.settings-header{display:flex;align-items:center;justify-content:space-between;padding:0 17px 0 20px;border-bottom:1px solid var(--line)}.settings-header h2{margin:4px 0 0;font-size:14px}.settings-body{overflow-y:auto;padding:19px 19px 25px;scrollbar-width:thin;scrollbar-color:rgba(97,119,153,.28) transparent}.field-label{display:block;margin:0 0 7px;color:#72839e;font-size:9px;font-weight:600}.select-wrap{position:relative}.select-wrap select{width:100%;height:39px;appearance:none;border:1px solid var(--line);border-radius:9px;padding:0 34px 0 11px;color:#dbe5f5;background:#0d1a2c;outline:0;font-size:10px}.select-wrap svg{pointer-events:none;position:absolute;right:11px;top:50%;width:13px;color:#60718c;transform:translateY(-50%)}.model-summary{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;margin-top:9px;padding:9px;border:1px solid rgba(148,171,207,.08);border-radius:9px;background:rgba(255,255,255,.018)}.model-summary-icon{width:33px;height:33px;display:grid;place-items:center;border-radius:9px;color:#b3c0ff;background:rgba(91,124,255,.13);font-weight:700;font-size:11px}.model-summary div{min-width:0}.model-summary b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.model-summary p{margin:4px 0 0;color:var(--muted-2);font-size:8px}.setting-group,.task-info{margin-top:22px;padding-top:19px;border-top:1px solid var(--line)}.setting-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.setting-title h3{margin:0;font-size:11px}.setting-title span{color:#465a76;font-size:8px;letter-spacing:.12em}.setting-textarea{width:100%;resize:vertical;border:1px solid var(--line);border-radius:9px;padding:9px 10px;color:#dbe5f5;background:#0d1a2c;outline:0;line-height:1.5;font-size:10px}.setting-textarea:focus,.two-fields input:focus{border-color:rgba(91,124,255,.48)}.range-heading{display:flex;justify-content:space-between;align-items:center;margin-top:15px;color:#72839e;font-size:9px}.range-heading output{color:#aebdff}.range-input{width:100%;height:4px;margin:11px 0 5px;appearance:none;border-radius:99px;background:linear-gradient(90deg,var(--blue) 35%,rgba(125,147,186,.15) 35%)}.range-input::-webkit-slider-thumb{width:14px;height:14px;appearance:none;border:3px solid #aebcff;border-radius:50%;background:#344cb4;box-shadow:0 0 0 3px rgba(91,124,255,.12)}.range-labels{display:flex;justify-content:space-between;color:#40516a;font-size:8px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}.two-fields input{width:100%;height:35px;border:1px solid var(--line);border-radius:8px;padding:0 9px;color:var(--text);background:#0d1a2c;outline:0;font-size:10px}.toggle-row{display:flex;align-items:center;justify-content:space-between;margin-top:15px;cursor:pointer}.toggle-row>span{display:flex;flex-direction:column}.toggle-row b{font-size:9px}.toggle-row small{margin-top:3px;color:var(--muted-2);font-size:8px}.toggle-row input,.remember-row input{position:absolute;opacity:0;pointer-events:none}.toggle-row>i{width:34px;height:18px;position:relative;border-radius:99px;background:#28384f;transition:background .18s}.toggle-row>i::after{content:"";position:absolute;width:14px;height:14px;left:2px;top:2px;border-radius:50%;background:#8b9bb4;transition:transform .18s,background .18s}.toggle-row input:checked+i{background:#465fd4}.toggle-row input:checked+i::after{transform:translateX(16px);background:white}.image-settings .select-wrap,.video-settings .select-wrap{margin-bottom:14px}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.segmented button{height:34px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:rgba(255,255,255,.018);font-size:9px}.segmented button.is-active{color:#c8d2ff;border-color:rgba(91,124,255,.37);background:rgba(91,124,255,.12)}.video-cost-note{display:grid;grid-template-columns:17px 1fr;gap:7px;margin-top:14px;padding:9px;border:1px solid rgba(244,184,87,.12);border-radius:9px;color:#c9a96e;background:rgba(244,184,87,.04)}.video-cost-note svg{width:15px}.video-cost-note p{margin:0;font-size:8px;line-height:1.55}.task-info dl{margin:0}.task-info dl>div{display:flex;justify-content:space-between;padding:6px 0;color:#62738e;font-size:9px}.task-info dd{margin:0;color:#9aa9bf}.settings-footer{display:flex;align-items:center;padding:0 19px;border-top:1px solid var(--line)}.settings-footer button{width:100%;height:32px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:rgba(255,255,255,.02);font-size:9px}.settings-footer button:hover{color:var(--text);border-color:var(--line-strong)}

.model-popover { position:fixed;z-index:100;width:320px;max-height:min(520px,74vh);overflow:hidden;padding:8px;border:1px solid var(--line-strong);border-radius:12px;background:rgba(12,24,42,.98);box-shadow:var(--shadow);backdrop-filter:blur(20px)}.model-results{max-height:min(455px,64vh);overflow:auto;scrollbar-width:thin}.model-search{height:38px;display:flex;align-items:center;gap:7px;position:sticky;top:0;z-index:2;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:#0a1728}.model-search svg{width:14px;color:#61738e}.model-search input{min-width:0;flex:1;border:0;outline:0;color:var(--text);background:transparent;font-size:10px}.model-popover h3{display:flex;justify-content:space-between;margin:10px 9px 5px;color:#566985;font-size:8px;letter-spacing:.12em;text-transform:uppercase}.model-popover h3 em{font-style:normal}.model-option{width:100%;display:grid;grid-template-columns:28px minmax(0,1fr) 15px;gap:8px;align-items:center;border:0;border-radius:8px;padding:8px;color:var(--muted);text-align:left;background:transparent}.model-option:hover,.model-option.is-active{color:var(--text);background:rgba(91,124,255,.1)}.model-option>span:first-child{width:27px;height:27px;display:grid;place-items:center;border-radius:7px;color:#b8c5ff;background:rgba(91,124,255,.12);font-size:9px;font-weight:700}.model-option>span:nth-child(2){min-width:0;display:flex;flex-direction:column}.model-option b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.model-option small{margin-top:3px;color:var(--muted-2);font:8px Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-option svg{width:12px;color:var(--green)}

dialog { color:var(--text) } dialog::backdrop{background:rgba(1,6,14,.75);backdrop-filter:blur(10px)}
.key-dialog{width:min(455px,calc(100% - 28px));border:1px solid rgba(128,151,191,.2);border-radius:20px;padding:0;background:linear-gradient(145deg,#101e33,#0b1728);box-shadow:0 35px 90px rgba(0,0,0,.55)}.key-dialog form{position:relative;padding:34px 37px 25px;text-align:center}.dialog-close{position:absolute;right:15px;top:15px;width:32px;height:32px;border:0;color:var(--muted);background:transparent}.dialog-close svg{width:18px}.dialog-brand{position:relative;width:58px;height:58px;display:grid;place-items:center;margin:0 auto 18px;border-radius:18px;color:white;background:linear-gradient(145deg,#758aff,#425be3);box-shadow:0 14px 35px rgba(60,85,223,.32);font-size:24px;font-weight:800;transform:rotate(8deg)}.dialog-brand span{transform:rotate(-8deg)}.dialog-brand i{position:absolute;right:-3px;bottom:-2px;width:14px;height:14px;border:3px solid #0e1b2f;border-radius:50%;background:var(--green)}.key-dialog h2{margin:9px 0 8px;font-size:22px;letter-spacing:-.025em}.dialog-copy{margin:0 auto 22px;color:var(--muted);font-size:10px;line-height:1.7}.key-field{display:block;text-align:left}.key-field>span{display:block;margin:0 0 7px;color:#8191aa;font-size:9px;font-weight:600}.key-field>div{height:45px;display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:10px;background:#091423;transition:border-color .18s,box-shadow .18s}.key-field>div:focus-within{border-color:rgba(91,124,255,.6);box-shadow:0 0 0 3px rgba(91,124,255,.08)}.key-field div>svg{width:18px;margin-left:12px;color:#5d7090}.key-field input{min-width:0;flex:1;height:100%;border:0;outline:0;padding:0 9px;color:#e9f0ff;background:transparent;font:11px Consolas,monospace;letter-spacing:.035em}.key-field button{width:39px;height:100%;display:grid;place-items:center;border:0;color:#637590;background:transparent}.key-field button svg{width:17px}.endpoint-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;margin-top:9px;padding:0 4px;color:#566984;font-size:8px;text-align:left}.endpoint-row code{overflow:hidden;color:#788aa4;text-overflow:ellipsis;font-size:8px}.endpoint-row i{padding:2px 5px;border-radius:4px;color:#7590da;background:rgba(91,124,255,.09);font-style:normal}.remember-row{display:flex;align-items:center;gap:9px;margin:18px 2px 0;cursor:pointer;text-align:left}.remember-row>i{width:17px;height:17px;position:relative;flex:0 0 auto;border:1px solid var(--line-strong);border-radius:5px;background:#0a1626}.remember-row input:checked+i{border-color:var(--blue);background:var(--blue)}.remember-row input:checked+i::after{content:"";position:absolute;left:5px;top:2px;width:4px;height:8px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.remember-row>span{display:flex;flex-direction:column}.remember-row b{font-size:9px}.remember-row small{margin-top:3px;color:var(--muted-2);font-size:8px}.key-error{margin:13px 0 0;padding:9px;border:1px solid rgba(255,102,125,.2);border-radius:8px;color:#f4abb7;background:rgba(255,102,125,.06);font-size:9px;line-height:1.5;text-align:left}.connect-button{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:19px;border:0;border-radius:10px;color:white;background:linear-gradient(135deg,#637eff,#425de1);box-shadow:0 8px 23px rgba(55,80,212,.24);font-size:10px;font-weight:600}.connect-button:hover{filter:brightness(1.08)}.connect-button:disabled{opacity:.6;cursor:wait}.connect-button svg{width:16px}.trust-row{display:flex;justify-content:center;gap:15px;margin-top:20px;padding-top:15px;border-top:1px solid var(--line);color:#52647e;font-size:7px}.trust-row span{display:flex;align-items:center;gap:4px}.trust-row svg{width:11px}
.confirm-dialog{width:min(370px,calc(100% - 28px));border:1px solid var(--line-strong);border-radius:17px;padding:0;background:#101d30;box-shadow:var(--shadow)}.confirm-dialog form{padding:27px;text-align:center}.confirm-icon{width:44px;height:44px;display:grid;place-items:center;margin:0 auto 12px;border-radius:13px;color:#ff8da0;background:rgba(255,102,125,.11)}.confirm-icon svg{width:21px}.confirm-dialog h2{margin:0;font-size:16px}.confirm-dialog p{margin:8px 0 22px;color:var(--muted);font-size:10px}.confirm-dialog form>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:8px}.confirm-dialog form>div:last-child button{height:37px;border:1px solid var(--line);border-radius:9px;color:var(--muted);background:rgba(255,255,255,.025);font-size:10px}.confirm-dialog .danger{border-color:rgba(255,102,125,.25);color:white;background:#cc4e64}
.library-dialog{width:min(1180px,calc(100% - 28px));height:min(820px,calc(100dvh - 28px));border:1px solid var(--line-strong);border-radius:18px;padding:0;color:var(--text);background:#091524;box-shadow:var(--shadow)}.library-shell{height:100%;display:grid;grid-template-rows:70px auto 34px minmax(0,1fr)}.library-shell>header{display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--line)}.library-shell h2{margin:4px 0 0;font-size:18px}.library-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:12px;padding:14px 20px}.library-toolbar>label{height:38px;display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:9px;padding:0 11px;background:#0c1a2c}.library-toolbar>label svg{width:14px;color:var(--muted-2)}.library-toolbar input{min-width:0;flex:1;border:0;outline:0;color:var(--text);background:transparent;font-size:10px}.library-tabs,.library-actions{display:flex;gap:5px}.library-tabs button,.library-actions button{height:38px;border:1px solid var(--line);border-radius:8px;padding:0 11px;color:var(--muted);background:rgba(255,255,255,.02);font-size:9px}.library-tabs button.is-active{color:#d4dcff;border-color:rgba(91,124,255,.4);background:rgba(91,124,255,.12)}.library-actions .danger{color:#eaa2ad}.library-meta{display:flex;justify-content:space-between;padding:0 21px;color:#50627d;font-size:8px}.library-grid{overflow:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:13px;padding:12px 20px 24px;scrollbar-width:thin}.library-card{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:rgba(13,27,46,.8)}.library-cover{height:170px;position:relative;background:#050c16}.library-cover img,.library-cover video{width:100%;height:100%;display:block;object-fit:cover}.library-cover .placeholder{height:100%;display:grid;place-items:center;color:#536882;font-size:11px}.library-kind{position:absolute;left:8px;top:8px;padding:4px 7px;border-radius:6px;color:white;background:rgba(5,12,22,.78);font-size:8px}.library-favorite{position:absolute;right:7px;top:7px;width:28px;height:28px;border:0;border-radius:8px;color:white;background:rgba(5,12,22,.78)}.library-favorite.is-active{color:#ffd36e}.library-card-body{padding:11px}.library-card-body h3{height:34px;overflow:hidden;margin:0;font-size:10px;line-height:1.65}.library-card-body p{margin:7px 0;color:var(--muted-2);font-size:8px}.library-card-actions{display:grid;grid-template-columns:1fr 1fr 30px;gap:5px}.library-card-actions button{height:30px;border:1px solid var(--line);border-radius:7px;color:var(--muted);background:rgba(255,255,255,.02);font-size:8px}.library-empty{grid-column:1/-1;margin:80px auto;color:var(--muted-2);font-size:11px}.work-detail-dialog{width:min(720px,calc(100% - 28px));max-height:calc(100dvh - 32px);border:1px solid var(--line-strong);border-radius:16px;padding:0;color:var(--text);background:#0b1829}.work-detail{padding:22px}.work-detail header{display:flex;justify-content:space-between;gap:15px}.work-detail h2{margin:0;font-size:17px}.work-detail-close{width:32px;height:32px;border:0;color:var(--muted);background:transparent}.work-detail-media{margin:16px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#050b13}.work-detail-media img,.work-detail-media video{display:block;width:100%;max-height:420px;object-fit:contain}.work-detail dl{display:grid;grid-template-columns:110px 1fr;gap:8px;margin:0;font-size:9px}.work-detail dt{color:var(--muted-2)}.work-detail dd{margin:0;color:#cbd5e5;word-break:break-word}.work-detail-buttons{display:flex;gap:8px;margin-top:18px}.work-detail-buttons button,.work-detail-buttons a{height:36px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;padding:0 13px;color:var(--muted);background:rgba(255,255,255,.025);font-size:9px;text-decoration:none}
.toast-region{position:fixed;right:18px;bottom:18px;z-index:500;display:flex;flex-direction:column;gap:8px;pointer-events:none}.toast{min-width:240px;max-width:360px;display:grid;grid-template-columns:20px 1fr;gap:9px;padding:11px 13px;border:1px solid var(--line-strong);border-radius:10px;color:#d9e3f3;background:rgba(14,27,46,.96);box-shadow:var(--shadow);font-size:10px;line-height:1.5;animation:slide-in .22s ease-out}.toast i{width:17px;height:17px;display:grid;place-items:center;border-radius:50%;color:#07101e;background:var(--green);font-style:normal;font-weight:800}.toast.error i{background:var(--red)}
.prompt-assistant-button{color:#bdc8ff}.prompt-assistant-button svg{color:#aebcff}.prompt-assistant-dialog{width:min(850px,calc(100% - 28px));max-height:calc(100dvh - 28px);border:1px solid var(--line-strong);border-radius:17px;padding:0;color:var(--text);background:#0a1728;box-shadow:var(--shadow)}.prompt-assistant-shell{display:grid;grid-template-rows:65px auto auto minmax(180px,1fr) auto 58px;max-height:calc(100dvh - 30px)}.prompt-assistant-shell>header{display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line)}.prompt-assistant-shell h2{margin:4px 0 0;font-size:16px}.prompt-action-row{display:flex;gap:7px;padding:14px 18px 6px}.prompt-action-row button{height:34px;border:1px solid var(--line);border-radius:8px;padding:0 12px;color:var(--muted);background:rgba(255,255,255,.02);font-size:9px}.prompt-action-row button.is-active{color:#d7deff;border-color:rgba(91,124,255,.42);background:rgba(91,124,255,.12)}.prompt-cost-note{margin:3px 19px 10px;color:#61738d;font-size:8px}.prompt-compare{min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 18px}.prompt-compare section{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:rgba(7,17,29,.65)}.prompt-compare h3{margin:0;padding:10px 12px;border-bottom:1px solid var(--line);color:#71829c;font-size:9px}.prompt-compare section>div{min-height:140px;max-height:300px;overflow:auto;padding:12px;color:#cdd7e7;white-space:pre-wrap;line-height:1.75;font-size:10px}.prompt-result-empty{color:#53657f!important}.prompt-result-loading{color:#93a8ff!important}.prompt-result-error{color:#f0a2ae!important}.prompt-insights{overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 18px 0;padding:10px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.015)}.prompt-insights[hidden]{display:none}.prompt-insights h3{margin:0 0 6px;color:#8fa0b8;font-size:9px}.prompt-insights ul{margin:0;padding-left:17px;color:#b8c4d6;font-size:9px;line-height:1.65}.prompt-assistant-shell>footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 18px;border-top:1px solid var(--line)}.prompt-assistant-shell>footer span{margin-right:auto;color:#60728c;font-size:8px}.prompt-assistant-shell>footer button{height:35px;border:1px solid var(--line);border-radius:8px;padding:0 13px;color:var(--muted);background:rgba(255,255,255,.025);font-size:9px}.prompt-assistant-shell>footer .primary{border:0;color:white;background:linear-gradient(135deg,#617cff,#4560e4)}.prompt-assistant-shell>footer button:disabled{opacity:.45}
.prompt-assistant-dialog{width:min(920px,calc(100% - 28px))}.prompt-assistant-shell{grid-template-rows:72px auto auto auto minmax(210px,1fr) auto 66px}.prompt-assistant-shell>header{padding:0 24px}.prompt-assistant-shell h2{font-size:20px}.prompt-assistant-shell .eyebrow{font-size:9px}.prompt-action-row{padding:17px 22px 8px}.prompt-action-row button{height:40px;padding:0 16px;font-size:12px}.prompt-model-row{display:flex;align-items:center;gap:12px;padding:5px 22px 8px}.prompt-model-mode{display:flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#071320}.prompt-model-mode button{height:34px;border:0;border-radius:7px;padding:0 13px;color:var(--muted);background:transparent;font-size:11px}.prompt-model-mode button.is-active{color:white;background:rgba(91,124,255,.22)}.prompt-model-row label{display:flex;align-items:center;gap:8px;color:#8999b0;font-size:11px}.prompt-model-row select{min-width:240px;height:40px;border:1px solid var(--line);border-radius:8px;padding:0 31px 0 10px;color:var(--text);background:#0c1b2d;font-size:12px}.prompt-model-row>p{margin:0;color:#d3a366;font-size:10px;line-height:1.5}.prompt-cost-note{margin:4px 23px 12px;font-size:11px}.prompt-compare{gap:13px;padding:0 22px}.prompt-compare h3{padding:12px 14px;font-size:12px}.prompt-compare section>div{min-height:165px;max-height:340px;padding:15px;font-size:13px;line-height:1.85}.prompt-insights{gap:12px;margin:13px 22px 0;padding:13px}.prompt-insights h3{font-size:12px}.prompt-insights ul{font-size:11px;line-height:1.75}.prompt-assistant-shell>footer{gap:10px;padding:0 22px}.prompt-assistant-shell>footer span{font-size:11px}.prompt-assistant-shell>footer button{height:40px;padding:0 16px;font-size:12px}
.prompt-assistant-dialog{width:min(960px,calc(100% - 28px))}.prompt-assistant-shell{min-height:0;overflow:hidden;grid-template-rows:76px auto auto auto minmax(220px,1fr) auto 70px}.prompt-assistant-shell>header{padding:0 26px}.prompt-assistant-shell h2{font-size:22px}.prompt-assistant-shell .eyebrow{font-size:10px}.prompt-action-row{gap:9px;padding:18px 24px 9px}.prompt-action-row button{height:42px;padding:0 17px;font-size:13px;font-weight:600}.prompt-model-row{flex-wrap:wrap;gap:10px 14px;padding:6px 24px 9px}.prompt-model-mode button{height:37px;padding:0 15px;font-size:12px;font-weight:600}.prompt-model-row label{font-size:12px}.prompt-model-row select{min-width:270px;height:42px;font-size:13px}.prompt-model-row>p{flex:1 1 100%;font-size:12px;line-height:1.6}.prompt-cost-note{margin:4px 25px 13px;font-size:12px;line-height:1.6}.prompt-compare{gap:14px;padding:0 24px}.prompt-compare h3{padding:13px 15px;font-size:13px}.prompt-compare section>div{min-height:175px;max-height:360px;padding:16px;font-size:14px;line-height:1.82}.prompt-insights{gap:13px;margin:14px 24px 0;padding:14px}.prompt-insights h3{font-size:13px}.prompt-insights ul{font-size:13px;line-height:1.72}.prompt-assistant-shell>footer{gap:10px;padding:0 24px}.prompt-assistant-shell>footer span{font-size:12px}.prompt-assistant-shell>footer button{height:42px;padding:0 18px;font-size:13px;font-weight:600}.prompt-action-row button:focus-visible,.prompt-model-mode button:focus-visible,.prompt-model-row select:focus-visible,.prompt-assistant-shell>footer button:focus-visible{outline:2px solid rgba(142,171,255,.82);outline-offset:2px}
.work-tags-input{width:min(260px,70%);height:30px;border:1px solid var(--line);border-radius:7px;padding:0 8px;color:var(--text);background:#081523;font-size:9px}.work-tags-input+button{height:30px;margin-left:6px;border:1px solid var(--line);border-radius:7px;color:var(--muted);background:rgba(255,255,255,.03);font-size:8px}
.mobile-backdrop{position:fixed;inset:0;z-index:25;background:rgba(0,5,12,.68);backdrop-filter:blur(4px)}.mobile-only{display:none}

@keyframes spin{to{transform:rotate(360deg)}}@keyframes float{50%{transform:translateY(-5px)}}@keyframes pulse{50%{opacity:.35}}@keyframes blink{50%{opacity:0}}@keyframes rise{from{opacity:0;transform:translateY(7px)}}@keyframes slide-in{from{opacity:0;transform:translateX(12px)}}

@media (max-width: 1180px) {
  .app-shell,.app-shell.settings-open{grid-template-columns:76px minmax(0,1fr)}
  .sidebar{padding:20px 10px 12px}.brand-row{justify-content:center;padding-inline:0}.brand-copy,.new-task-button span,.new-task-button kbd,.section-label,.skill-item>span:nth-child(2),.skill-item em,.history-section,.library-button>span,.library-button>em,.account-button>span:nth-child(2),.account-button .chevron,.privacy-note{display:none}.new-task-button{width:43px;margin:18px auto 24px;justify-content:center;padding:0}.skill-item{display:flex;width:48px;min-height:46px;margin:0 auto;padding:7px;justify-content:center}.skill-icon{width:31px;height:31px}.library-button{display:flex;width:48px;margin:10px auto;padding:7px;justify-content:center}.sidebar-footer{margin-top:auto}.account-button{display:flex;justify-content:center;padding:7px}.settings-panel{position:fixed;z-index:45;right:0;top:0;width:var(--settings);box-shadow:-20px 0 50px rgba(0,0,0,.28)}
}
@media (max-width: 760px) {
  body{overflow:hidden}.app-shell,.app-shell.settings-open{display:block}.sidebar{position:fixed;left:0;top:0;width:min(286px,86vw);transform:translateX(-105%);transition:transform .22s ease;box-shadow:20px 0 60px rgba(0,0,0,.42)}.sidebar.is-open{transform:translateX(0)}.brand-row{justify-content:flex-start;padding-inline:5px}.brand-copy,.new-task-button span,.section-label,.skill-item>span:nth-child(2),.skill-item em,.history-section,.account-button>span:nth-child(2),.account-button .chevron,.privacy-note{display:flex}.new-task-button{width:auto;margin:18px 0 24px;justify-content:flex-start;padding:0 12px}.new-task-button kbd{display:none}.skill-item{display:grid;width:100%;min-height:52px;margin:0;padding:7px 9px}.history-section{display:flex}.sidebar-footer{margin-top:0}.account-button{display:grid;justify-content:normal;padding:7px}.mobile-only,.menu-button{display:grid}.brand-row .mobile-only{margin-left:auto}.workspace{height:100dvh;grid-template-rows:59px minmax(0,1fr) auto}.topbar{padding:0 12px}.task-heading{display:block}.task-heading h1{max-width:150px}.task-heading span{display:none}.service-pill{padding:0 8px}.service-pill span{display:none}.settings-panel{width:min(360px,100vw);height:100dvh}.content-stage{padding-bottom:0}.welcome-state{width:calc(100% - 30px);padding:32px 0 20px;justify-content:flex-start}.hero-orbit{width:82px;height:82px}.hero-core{width:48px;height:48px}.welcome-state h2{font-size:24px}.welcome-copy{font-size:11px}.starter-grid{grid-template-columns:1fr;margin-top:22px}.starter-grid button{min-height:60px}.model-strip{display:none}.message-list{width:calc(100% - 26px);padding:25px 0 16px}.message{grid-template-columns:30px minmax(0,1fr);gap:9px}.message.user{grid-template-columns:minmax(0,1fr) 30px}.message-avatar{width:30px;height:30px}.message.user .message-main{max-width:92%}.media-grid{grid-template-columns:1fr}.composer-wrap{padding:0 10px calc(9px + env(safe-area-inset-bottom))}.composer{border-radius:14px}.composer-footnote{display:none}.mode-hint,.tool-button span,.char-count{display:none}.toast-region{right:10px;left:10px;bottom:10px}.toast{min-width:0;max-width:none}.key-dialog form{padding:29px 22px 22px}.trust-row{gap:8px}.trust-row span{font-size:0}.trust-row svg{width:14px}.topbar-actions{gap:4px}
}
@media (max-width:760px){.thinking-status{min-height:40px;font-size:12px}}
@media (max-width:760px){.attachment-tray{padding:9px 10px 2px}.attachment-card{width:226px;min-width:196px;height:58px;grid-template-columns:44px minmax(0,1fr);padding:6px 30px 6px 6px}.attachment-card img,.attachment-placeholder{width:44px;height:44px}.attachment-card figcaption b{font-size:12px}.attachment-card figcaption small{font-size:10px}.attachment-card .attachment-remove{opacity:.8;transform:none}.message-attachments .attachment-card{width:min(226px,100%);padding-right:7px}.message-attachments .attachment-card.is-unavailable{padding-right:68px}.composer:has(.attachment-tray:not([hidden])) textarea{min-height:48px}}
@media (max-width:760px){.jump-bottom{right:14px;bottom:10px}.model-popover{left:10px!important;right:10px;width:auto;max-height:65vh}.model-results{max-height:54vh}}
@media (max-width:760px) and (orientation:landscape){.workspace{height:100dvh;grid-template-rows:52px minmax(0,1fr) auto}.composer textarea{min-height:38px;max-height:88px}.composer-meta{display:none}.composer-actions{height:38px}.message-list{padding-top:18px}.settings-panel{height:100dvh}}
@media (max-height: 720px) and (min-width: 761px) {.welcome-state{justify-content:flex-start;padding-top:30px}.hero-orbit{width:78px;height:78px}.hero-core{width:47px;height:47px}.starter-grid{margin-top:18px}.starter-grid button{min-height:60px}.welcome-state h2{font-size:26px}}
@media(max-width:900px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-toolbar{grid-template-columns:1fr}.library-tabs,.library-actions{overflow-x:auto}.library-meta{gap:8px}.library-button>span{display:flex!important}.library-button>em{display:block!important}.library-button{display:grid!important;width:100%!important;margin:10px 0!important;padding:7px 9px!important}}
@media(max-width:520px){.library-dialog{width:100%;height:100dvh;max-width:none;border-radius:0}.library-grid{grid-template-columns:1fr;padding-inline:12px}.library-toolbar{padding:12px}.library-meta{padding-inline:13px}.library-cover{height:210px}.work-detail{padding:16px}.work-detail dl{grid-template-columns:80px 1fr}}
@media(max-width:620px){.prompt-assistant-dialog{width:100%;height:100dvh;max-height:none;border-radius:0}.prompt-assistant-shell{height:100%;max-height:none;grid-template-rows:58px auto auto auto minmax(0,1fr) auto 64px}.prompt-action-row{overflow-x:auto;padding-inline:12px}.prompt-model-row{align-items:stretch;flex-direction:column;padding-inline:12px}.prompt-model-mode{align-self:flex-start}.prompt-model-row label{align-items:flex-start;flex-direction:column}.prompt-model-row select{width:100%;min-width:0}.prompt-compare{grid-template-columns:1fr;overflow:auto;padding-inline:12px}.prompt-compare section>div{min-height:110px;max-height:210px;font-size:13px}.prompt-insights{grid-template-columns:1fr;margin-inline:12px}.prompt-assistant-shell>footer{padding-inline:12px}.prompt-assistant-shell>footer span{display:none}}
@media(min-width:1181px){.app-shell.settings-open~.active-jobs-popover{right:calc(var(--settings) + 18px)}}
@media(max-width:760px){
  .topbar:has(.active-jobs-button:not([hidden])) .task-heading h1{max-width:108px}
  .topbar-actions:has(.active-jobs-button:not([hidden])) .service-pill{display:none}
  .active-jobs-button{width:44px;height:34px;justify-content:center;gap:6px;padding:0 8px}
  .active-jobs-button>span{width:1ch;overflow:hidden;font-size:12px;text-overflow:clip;white-space:nowrap}
  .active-jobs-button>svg{display:none}
  .active-jobs-popover{top:67px;right:10px;left:10px;width:auto;max-height:min(360px,calc(100dvh - 150px - env(safe-area-inset-bottom)));border-radius:13px}
  .active-jobs-popover>header{min-height:60px;padding:10px 13px}
  .active-jobs-popover>header b{font-size:14px}
  .active-jobs-popover>header small{font-size:10px}
  .active-jobs-list{padding:5px}
  .active-job-item,.active-jobs-list>[data-job-id]{grid-template-columns:minmax(0,1fr) auto;gap:8px 9px;padding:10px 8px}
  .active-job-heading b,.active-job-title{font-size:12px}
  .active-job-meta{font-size:10px}
  .active-job-actions button,.active-jobs-list [data-job-action]{min-width:50px;height:40px;font-size:11px}
  .composer-meta{gap:6px;padding-inline:9px}
  .composer-meta .model-chip{min-width:0;max-width:calc(100% - 84px)}
  .parallel-hint{flex:0 0 auto;gap:5px;margin-left:auto;padding:4px 6px;font-size:10px}
  .parallel-hint-desktop{display:none}
  .parallel-hint-mobile{display:inline}
  .generation-status{padding:13px}
  .generation-status::after{font-size:10px}
  .message-actions.always button[data-action="pause-video"],.message-actions.always button[data-action="continue-video"],.message-actions.always button[data-action^="stop-"]{min-height:40px;padding:0 12px;font-size:11px}
  .toast-region{bottom:calc(10px + env(safe-area-inset-bottom))}
}
@media(max-width:620px){
  .prompt-assistant-dialog{width:100%;height:100dvh;max-height:100dvh;overflow:hidden;border-radius:0}
  .prompt-assistant-shell{height:100%;max-height:none;overflow:hidden;grid-template-rows:60px auto auto auto minmax(0,1fr) auto minmax(68px,auto)}
  .prompt-assistant-shell>header{padding:0 15px}
  .prompt-assistant-shell h2{font-size:20px}
  .prompt-assistant-shell .eyebrow{font-size:9px}
  .prompt-action-row{gap:8px;overflow-x:auto;padding:12px 12px 7px;scrollbar-width:none}
  .prompt-action-row button{height:42px;padding:0 14px;font-size:13px;white-space:nowrap}
  .prompt-model-row{align-items:stretch;flex-direction:column;gap:9px;padding:5px 12px 8px}
  .prompt-model-mode{align-self:flex-start}
  .prompt-model-mode button{height:38px;font-size:12px}
  .prompt-model-row label{align-items:flex-start;flex-direction:column;font-size:12px}
  .prompt-model-row select{width:100%;min-width:0;height:44px;font-size:14px}
  .prompt-model-row>p{font-size:12px;line-height:1.55}
  .prompt-cost-note{margin:4px 13px 10px;font-size:12px;line-height:1.55}
  .prompt-compare{min-height:0;grid-template-columns:1fr;overflow:auto;gap:10px;padding:0 12px;overscroll-behavior:contain}
  .prompt-compare h3{padding:12px 13px;font-size:13px}
  .prompt-compare section>div{min-height:118px;max-height:220px;padding:14px;font-size:14px;line-height:1.78}
  .prompt-insights{grid-template-columns:1fr;gap:10px;margin:10px 12px 0;padding:12px}
  .prompt-insights h3,.prompt-insights ul{font-size:13px}
  .prompt-assistant-shell>footer{min-height:68px;gap:8px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
  .prompt-assistant-shell>footer span{display:none}
  .prompt-assistant-shell>footer button{min-width:0;height:44px;padding:0 15px;font-size:13px}
}
@media(max-width:760px) and (orientation:landscape){
  .active-jobs-popover{top:60px;max-height:calc(100dvh - 138px)}
}
@media(max-width:620px) and (orientation:landscape){
  .prompt-assistant-shell{grid-template-rows:52px auto auto auto minmax(0,1fr) auto 56px}
  .prompt-assistant-shell .eyebrow{display:none}
  .prompt-action-row{padding-top:7px}
  .prompt-model-row{display:grid;grid-template-columns:auto minmax(220px,1fr);align-items:start}
  .prompt-model-row>p{grid-column:1/-1}
  .prompt-cost-note{margin-bottom:7px}
  .prompt-compare section>div{min-height:90px;max-height:150px}
  .prompt-assistant-shell>footer{min-height:56px;padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}
}
/* Keep the footer in the last explicit grid row when insights are hidden. */
.prompt-assistant-shell>.prompt-insights{grid-row:6}
.prompt-assistant-shell>footer{grid-row:7}
@media(max-width:620px){.prompt-assistant-dialog{max-width:none}}
@media(min-width:761px){.active-jobs-popover{max-height:min(360px,calc(100dvh - 96px))}}
@media (prefers-reduced-motion: reduce) {*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
