/* Shared chrome; palette variables are defined below for both themes. */
:root[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] :is(.session-tool[data-tool=codex] img,.session-tool[data-tool=grok] img,.tool-picker button[data-tool=codex] img,.tool-picker button[data-tool=grok] img){filter:brightness(0) invert(1)}
.composer-gate-action{margin:0 2px;padding:2px 7px;border-radius:5px;font-size:inherit;line-height:inherit;vertical-align:baseline}
/* Brand atmosphere for sign-in, shared by the web portal and desktop Agent. */
.login-page,.auth-view{background:radial-gradient(ellipse at 8% 20%,#23414b99,transparent 44%),radial-gradient(ellipse at 76% 64%,#50337666,transparent 48%),#0c1424;position:relative;isolation:isolate}
.login-page::before,.auth-view::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(#92afd909 1px,transparent 1px),linear-gradient(90deg,#92afd909 1px,transparent 1px);background-size:64px 64px;mask-image:linear-gradient(135deg,#000,transparent 80%)}
.login-page>header{position:relative;background:#0c142466;border-color:#ffffff10;padding-inline:max(28px,calc((100vw - 1120px)/2));backdrop-filter:blur(16px);font-size:17px}
.login-brand-logo{display:block;width:38px;height:38px;flex:none;margin-right:10px}
.auth-layout,.auth-view{display:grid;grid-template-columns:minmax(0,1fr) 420px;align-items:center;gap:clamp(40px,8vw,110px);max-width:1180px;margin:auto;padding:54px 30px;min-height:calc(100dvh - 78px)}
.auth-view{max-width:none;min-height:100dvh;padding-inline:max(40px,calc((100vw - 1120px)/2));gap:60px}
.auth-story{position:relative;min-width:0;color:#ecf2ff}
.auth-eyebrow{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:650;letter-spacing:.2em;color:#a5b8d4}
.auth-eyebrow>span{width:7px;height:7px;border-radius:50%;background:#6ce0ba;box-shadow:0 0 0 5px #6ce0ba12}
.auth-story h2{font-size:clamp(34px,4vw,52px);font-weight:650;letter-spacing:-.05em;line-height:1.27;margin:25px 0 18px;color:inherit}
.auth-story>p{font-size:14px;color:#a5b8d4;line-height:1.9;margin:0}
.auth-capabilities{display:flex;gap:18px;flex-wrap:wrap;font-size:11px;color:#a5b8d4;margin-top:16px}
.auth-capabilities>span{display:flex;align-items:center;gap:7px}.auth-capabilities>span::before{content:"";width:4px;height:4px;border-radius:50%;background:#818eb2}
.connection-art{position:relative;width:300px;height:180px;margin:20px 0 0;overflow:hidden}
.orbit{position:absolute;border:1px solid #a0bdd52b;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-24deg)}
.orbit-one{width:290px;height:105px}.orbit-two{width:190px;height:160px;transform:translate(-50%,-50%) rotate(40deg);border-style:dashed;opacity:.6}
.connection-core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:68px;height:68px;border-radius:20px;background:linear-gradient(135deg,#4d7c8e88,#7965ba88);border:1px solid #bad3ee45;box-shadow:0 0 60px #7da1f522;display:flex;align-items:center;justify-content:center;gap:3px;color:#ddfff5;font-size:30px;font-weight:650}
.connection-core>img{display:block;width:52px;height:52px}
.connection-node{position:absolute;display:grid;place-items:center;width:42px;height:32px;background:#17263be6;border:1px solid #9db5d333;border-radius:9px;font-size:9px;letter-spacing:.1em;color:#c1d2eb}
.node-one{left:12px;top:99px}.node-two{right:8px;top:34px}.node-three{right:71px;bottom:5px}
.login-page .auth-layout>main,.auth-view .auth-panel{position:relative;width:100%;max-width:440px;margin:0;padding:32px;border:1px solid #ffffff1c;border-radius:22px;background:linear-gradient(145deg,#192339f5,#111b2ef5);box-shadow:0 25px 80px #0003;backdrop-filter:blur(20px)}
.login-page main:before{content:'欢迎回到你的工作空间';font-size:12px;letter-spacing:.02em;margin-bottom:12px;color:#a5b8d4}
.login-page h1{font-size:25px;letter-spacing:-.03em;margin-bottom:24px}
.login-page .mode{margin-bottom:24px}.login-page input{min-height:46px}.login-page #submit{min-height:46px}
.login-page footer{padding-top:18px;border-top:1px solid #ffffff10;margin-top:12px;font-size:11px}.login-page footer a{text-decoration:none}
html[data-theme=light] :is(.login-page,.auth-view){background:radial-gradient(ellipse at 4% 18%,#c5e6e0b3,transparent 46%),radial-gradient(ellipse at 86% 82%,#d8cef1c9,transparent 50%),linear-gradient(125deg,#eaf0f8,#f4f5fb 60%,#e9eef8)}
html[data-theme=light] :is(.login-page::before,.auth-view::before){background-image:linear-gradient(#526d9b09 1px,transparent 1px),linear-gradient(90deg,#526d9b09 1px,transparent 1px)}
html[data-theme=light] .login-page>header{background:#ffffff40;border-color:#42516f16}
html[data-theme=light] .auth-story{color:#24364d}
html[data-theme=light] :is(.auth-eyebrow,.auth-story>p,.auth-capabilities,.login-page main:before){color:#65788d}
html[data-theme=light] .orbit{border-color:#597c9d33}
html[data-theme=light] .connection-core{background:linear-gradient(135deg,#d3e9e8,#d8d9f4);border-color:#fff;color:#49678c;box-shadow:0 0 70px #718bd026}
html[data-theme=light] .connection-node{background:#f6f9ffcc;color:#536b8d;border-color:#bacddd}
html[data-theme=light] :is(.login-page .auth-layout>main,.auth-view .auth-panel){background:linear-gradient(145deg,#ffffffed,#f9fbffdb);border-color:#fff;box-shadow:0 20px 70px #384b7c16,inset 0 1px #fff}
html[data-theme=light] .login-page footer{border-color:#dce3ee}
html[data-theme=light] .login-page input{background:#f3f6fb}
@media(max-width:950px){.auth-layout,.auth-view{grid-template-columns:minmax(0,1fr);gap:28px;padding:32px 22px;min-height:calc(100dvh - 64px);max-width:490px}.auth-view{max-width:none;min-height:100dvh;justify-items:center}.auth-view .auth-story{width:min(440px,100%)}.auth-story h2{font-size:30px;margin:16px 0 10px}.auth-story h2 br{display:none}.auth-story>p{font-size:13px}.connection-art,.auth-capabilities{display:none}.auth-eyebrow{font-size:9px}.story-break{display:none}.login-page .auth-layout>main,.auth-view .auth-panel{max-width:none;padding:26px}.auth-view .auth-panel{max-width:440px}.login-page>header{height:64px;padding-inline:22px;font-size:15px}}
@media(prefers-reduced-transparency:reduce){.login-page .auth-layout>main,.auth-view .auth-panel{backdrop-filter:none}}
/* Fit the mobile sign-in form without stretching the story or card vertically. */
@media(max-width:600px){
  .login-page>header{height:56px;padding-inline:20px;font-size:16px}
  .login-page .login-brand-logo{width:34px;height:34px}
  .login-page .auth-layout{display:flex;flex-direction:column;align-items:stretch;gap:20px;min-height:0;padding:24px 18px 28px;max-width:440px}
  .login-page .auth-eyebrow{font-size:9px;letter-spacing:.14em}
  .login-page .auth-story h2{font-size:25px;line-height:1.35;margin:12px 0 10px}
  .login-page .auth-story>p{font-size:12px;line-height:1.7}
  .login-page .auth-layout>main{padding:22px 20px 18px;border-radius:18px;flex:none}
  .login-page main:before{font-size:11px;margin-bottom:8px}
  .login-page h1{font-size:22px;margin:0 0 16px}
  .login-page .mode{margin-bottom:18px}
  .login-page .mode button{padding:9px 12px;font-size:13px}
  .login-page form{gap:12px}
  .login-page label{font-size:12px}
  .login-page input{min-height:44px;margin-top:6px;padding:10px 11px;font-size:16px}
  .login-page #submit{min-height:44px;padding:10px 12px;font-size:14px}
  .login-page .code-row{gap:6px}
  .login-page .code-row button{flex-basis:112px;padding:8px;font-size:12px}
  .login-page #message{min-height:0}
  .login-page #message:empty{display:none}
}
:root[data-theme=light]{color-scheme:light}
/* Preserve waiting status semantics over mobile list color overrides. */
body .session-status[data-status=waiting]{color:#f0c875}
html[data-theme=light] body .session-status[data-status=waiting]{color:#916211}
.theme-toggle{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 30px;width:30px;min-width:30px;height:30px;min-height:30px;padding:0!important;border:1px solid var(--v-line,#35445c)!important;border-radius:9px!important;background:var(--v-control,#172235)!important;color:var(--v-text,#e8eef8)!important;font:16px/1 system-ui!important;cursor:pointer;white-space:nowrap;box-shadow:none!important}
.theme-toggle:hover{border-color:var(--v-focus,#647eff)!important;background:var(--v-hover,#202d45)!important}
.theme-toggle:focus-visible{outline:2px solid var(--v-focus,#647eff);outline-offset:3px}
header>.theme-toggle{margin-left:auto}
.auth-panel .brand .theme-toggle{margin-left:auto}
.header-actions>a.button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:9px 12px;border:1px solid var(--v-line,#35445c);border-radius:8px;background:var(--v-control,#172235);color:var(--v-text,#e8eef8);font:inherit;font-size:13px;line-height:1.25;white-space:nowrap;text-decoration:none}
.header-actions>a.button:hover{background:var(--v-hover,#202d45);border-color:var(--v-focus,#647eff)}
.app-shell>header>a.button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:9px 12px;border:1px solid var(--v-line,#35445c);border-radius:8px;background:var(--v-control,#172235);color:var(--v-text,#e8eef8);font:inherit;font-size:13px;line-height:1.25;white-space:nowrap;text-decoration:none}
.app-shell>header>a.button:hover{background:var(--v-hover,#202d45);border-color:var(--v-focus,#647eff)}
html[data-theme=dark] .app-shell>header>a.button{background:#172235!important;color:#fff!important}
html[data-theme=dark] .app-shell>header>a.button:hover{background:#202d45!important}
html[data-theme=dark] a.button[href="/"]{background:#172235!important;color:#fff!important;border-color:#35445c!important}
html[data-theme=dark] a.button[href="/"]:hover{background:#202d45!important;border-color:#647eff!important}
.header-actions>a.button.primary{background:#5a78ff;border-color:#6e89ff;color:#fff}

html[data-theme=light] dialog::backdrop{background:#19253d55}
html[data-theme=light] :is(button.primary,.primary,#submit,#sendCode){color:#fff}
html[data-theme=light] :is(.error,.missing,#contentError,#authError){color:#b92c47}
html[data-theme=light] :is(.status,.online,.indicator.online,.session-status[data-status=completed],.session-status[data-status=running]){color:#13785c}
html[data-theme=light] .bubble.user{background:#e4ebff;color:#203c81}
html[data-theme=light] .bubble.user a{color:#3154bd}
html[data-theme=light] :is(.approval-card,.approval-card pre){background:#fff8e9;border-color:#d9bd77;color:#574721}
html[data-theme=light] :is(.approval-card>strong,.approval-card p){color:#805d15}
html[data-theme=light] .activity.working #activityText{color:#586780}
html[data-theme=light] :is(.mode button[aria-selected=true],.tool-picker button[aria-checked=true]){color:#4937a4}
html[data-theme=light] :is(.control-state[data-state=attached],.bubble.tool-fileChange){background:#eaf7ef;color:#206c49;border-color:#a9d6bb}
html[data-theme=light] :is(.control-state[data-state=connecting],.badge[data-status=waiting]){background:#fff5db;color:#8e6310;border-color:#ddc58c}
html[data-theme=light] :is(.control-state[data-state=detached],.control-state[data-state=attachFailed],.control-state[data-state=disconnected]){background:#fff0f2;color:#a63850;border-color:#e4afba}
html[data-theme=light] .session-tool-tag[data-tool=codex]{background:#e8f3fc;color:#286387;border-color:#abcde3}
html[data-theme=light] .session-tool-tag[data-tool=codebuddy]{background:#f0eaff;color:#7350a4;border-color:#d3bfe9}
html[data-theme=light] .session-tool-tag[data-tool=claude]{background:#fff1dd;color:#96611d;border-color:#e3c699}
html[data-theme=light] select{color-scheme:light}
html[data-theme=light] .tool-filter{background:#eaf0f9;border-color:#c8d2e2}
html[data-theme=light] .tool-filter select{background-color:#fff;color:#243249}

/* Light desktop home header: a soft surface separates the chrome from the workspace. */
@media (min-width:761px){
  :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header{
    width:100%;
    margin:0;
    box-sizing:border-box;
    border-radius:0!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) #restartAgentBtn,
  :is(body[data-mobile-view=list],body[data-mobile-view=detail]) #restartAgentBtn{
    height:38px;
    min-height:38px;
    padding:9px 12px;
    line-height:1.25;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header{
    background:linear-gradient(110deg,#edf5ff 0%,#f7f3ff 52%,#eef9f4 100%)!important;
    border:1px solid #cbd8ea!important;
    border-radius:16px!important;
    box-shadow:0 8px 24px rgba(68,91,132,.10)!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header :is(.header-actions>a.button,#agentSelect:not([hidden]),.theme-toggle,#restartAgentBtn){
    background:rgba(255,255,255,.80)!important;
    border-color:#c7d4e6!important;
    color:#263b59!important;
    box-shadow:0 2px 6px rgba(67,88,125,.08)!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header :is(.header-actions>a.button:hover,.theme-toggle:hover,#restartAgentBtn:hover){
    background:#fff!important;
    border-color:#8eabd1!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header #agentSelect:not([hidden]){
    background-color:rgba(255,255,255,.80)!important;
    color:#263b59!important;
    border-color:#c7d4e6!important;
  }
  /* Preserve the compact filled chevron used by the dark desktop control;
     the header background shorthand above otherwise clears its image. */
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header #agentSelect:not([hidden]){
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.25 6 8l4-3.75z' fill='%23526783'/%3E%3C/svg%3E")!important;
    background-repeat:no-repeat!important;
    background-size:12px 12px!important;
    background-position:right 9px center!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header #health{color:#147b59!important}
}

/* Desktop top chrome is a full-width rectangle; phone keeps its rounded shell. */
@media (min-width:761px){
  :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header{
    border-radius:0!important;
  }
  html[data-theme=light] :is(body[data-mobile-view=list],body[data-mobile-view=detail]) .app-header{
    border-radius:0!important;
  }
}

/* Compact, centered mobile header controls. */
@media (max-width:760px){
  body[data-mobile-view=list] .app-header :is(#agentSelect:not([hidden]),#resourcesLink,#hostResourcesLink,.header-actions>#devicesLink,.header-actions>#remoteControlLink,#restartAgentBtn){height:30px!important;min-height:30px!important;line-height:1;display:flex;align-items:center;justify-content:center;padding-top:0;padding-bottom:0}
  body[data-mobile-view=list] #agentSelect:not([hidden]){text-align:center;text-align-last:center}
  body[data-mobile-view=list] #newBtn,body[data-mobile-view=list] #refreshBtn{height:30px!important;min-height:30px!important;line-height:1;display:flex;align-items:center;justify-content:center}
  body[data-mobile-view=list] .session-shell.selected>.session,body[data-mobile-view=list] .session.selected{box-shadow:none!important;border-left-color:transparent!important}
}
html[data-theme=light] .app-header>div:first-child .muted{color:#65748b}
html[data-theme=light] #agentSelect{background-color:#edf1f8!important;color:#243249!important;border-color:#c8d2e2!important}
html[data-theme=light] :is(.slash-command-menu,.slash-command-option,.app-toast,.bubble pre,.bubble code,.bubble th,.bubble td){background:#edf1f8;color:#354664;border-color:#c8d2e2}
html[data-theme=light] .slash-command-option:hover{background:#e4eaf6}
html[data-theme=light] .session-shell.selected>.session{background:#e4eaf6}
html[data-theme=light] .question-option{background:#fff8e9;border-color:#ddc58c}
html[data-theme=light] .question-option:has(input:checked){background:#fff0c9;border-color:#c6a04a}
html[data-theme=light] :is(.question-option small,.question-chip){color:#805d15}
html[data-theme=light] .question-chip{background:#f6e7bc}
html[data-theme=light] .question-other{background:#fff;color:#243249}
.plan-preview{max-height:260px;overflow:auto;white-space:pre-wrap;margin:10px 0;padding:10px;border:1px solid var(--v-border,#39465a);border-radius:8px;background:rgba(0,0,0,.12);color:var(--v-text,#edf1f7)}
.plan-revision{width:100%;box-sizing:border-box;resize:vertical;margin:4px 0 10px;padding:8px;border:1px solid var(--v-border,#39465a);border-radius:8px;background:var(--v-panel,#141a25);color:var(--v-text,#edf1f7)}
html[data-theme=light] .plan-preview{background:#fff8e9;color:#243249;border-color:#ddc58c}html[data-theme=light] .plan-revision{background:#fff;color:#243249;border-color:#ddc58c}
html[data-theme=light] body[data-mobile-view=list] .header-actions>a.primary{background:#5a78ff;color:#fff;border-color:#6e89ff}
html[data-theme=light] .primary:hover{background:#4c63d9;color:#fff}
html[data-theme=light] body>header{background:#f4f6fbeb}
html[data-theme=light] body:has(#authForm)>main{box-shadow:0 20px 64px #24324916}
html[data-theme=light] .auth-panel{box-shadow:0 20px 64px #24324916}
html[data-theme=light] .brand img{background:transparent}
html[data-theme=light] .resource-card .primary{background:#5a78ff;color:#fff}
@media(max-width:760px){
  body[data-mobile-view=list] .app-header .theme-toggle{position:absolute;right:16px;top:15px;width:28px;min-width:28px;flex-basis:28px;height:28px;min-height:28px;font-size:16px!important}
  body[data-mobile-view=list] #health{top:51px!important;right:16px!important}
  body[data-mobile-view=list] .app-header>div:first-child{right:58px!important}
  body[data-mobile-view=detail] .app-header .theme-toggle{width:28px;min-width:28px;flex-basis:28px;height:28px;min-height:28px}
  html[data-theme=light] body[data-mobile-view=list]{background:#f5f6f8;color:#202733}
  html[data-theme=light] :is(body[data-mobile-view=list] .app-header,.app-shell>header){background:#fff}
  html[data-theme=light] body[data-mobile-view=list] .app-header h1{color:#243249}
  html[data-theme=light] .select-trigger::after{border-color:#63738b}
}

:root[data-theme=light]{
  --v-page:#f5f6f8;
  --v-surface:#ffffff;
  --v-control:#f7f8fa;
  --v-hover:#edf1f7;
  --v-selected:#eaf1ff;
  --v-border:#e0e4ea;
  --v-line:#cbd2dc;
  --v-text:#202733;
  --v-muted:#646f80;
  --v-soft-text:#445063;
  --v-link:#275cc5;
  --v-purple:#633c9c;
  --v-danger-bg:#fff0f2;
  --v-danger-text:#b92c47;
  --v-danger-line:#e4afba;
  --v-success:#147b59;
  --v-header-tint:#f5f6f8;
  --v-focus:#3975dc;
}

/* Final light palette: readable copy, visible boundaries, and restrained accents. */
html[data-theme=light] :is(.muted,.subtitle,.empty-copy,.detail-grid dt,.resource-path,.resource-meta,.resource-time,.summary,.session small,.completed-time,.session-group h3,.group-heading span,.session-option small,.session-option-meta,.session-option-meta time,.role,.activity-detail,.attachment small,.startup-toggle,.device-row small,.device-row .indicator,.sidebar-heading span,.brand-copy>small,.brand small,.brand-copy small,.auth-eyebrow,.auth-story>p,.auth-capabilities,.field-hint,footer,#email){color:#4e607a}
html[data-theme=light] :is(.login-page main:before,.auth-layout>main:before){color:#4e607a}
html[data-theme=light] :is(button.primary,a.primary,#submit,#sendCode,#authSubmit){background:#3067cf;border-color:#3067cf;color:#fff}
html[data-theme=light] :is(button.primary,a.primary,#submit,#sendCode,#authSubmit):hover{background:#2457b5;border-color:#2457b5;color:#fff}
html[data-theme=light] .header-actions>a.button.primary{background:#3067cf;border-color:#3067cf;color:#fff}
html[data-theme=light] :is(.categories button[aria-pressed=true],.view-modes button[aria-pressed=true],.apps-tabs button.active,.session-option[data-value=""]){background:#eaf1ff;color:#275cc5;border-color:#bdd0f1}
html[data-theme=light] :is(.file-name,.resource-table td,.group-heading,.session strong,.content h1,.content h2){color:#192a43}
html[data-theme=light] :is(.resource-table th,.categories button,.view-modes button,.session-filter .select-trigger){color:#374d6b}
html[data-theme=light] :is(.tool-filter,.tool-filter select,.slash-command-menu,.slash-command-option,.bubble pre,.bubble code,.bubble th,.bubble td){color:#253e61;border-color:#aebed3}
html[data-theme=light] :is(.status,.online,.indicator.online,.device-row .indicator.online){color:#116748}
html[data-theme=light] .login-page input{background:#f1f4fa;border-color:#aebed3}
html[data-theme=light] .select-trigger::after{border-color:#4e607a}

/* Light workspace: neutral surfaces with blue reserved for selection and actions. */
/* Keep the sign-in visual identity independent of workspace palette refinements. */
html[data-theme=light] .login-page>header{background:#ffffff40;border-color:#42516f16}
html[data-theme=light] .login-page .auth-story{color:#24364d}
html[data-theme=light] .login-page :is(.auth-eyebrow,.auth-story>p,.auth-capabilities){color:#65788d}
html[data-theme=light] .login-page main:before{color:#9bafd1}
html[data-theme=light] .login-page .auth-layout>main{background:linear-gradient(145deg,#ffffffed,#f9fbffdb);border-color:#fff;box-shadow:0 20px 70px #384b7c16,inset 0 1px #fff}
html[data-theme=light] .login-page label{color:#44556e}
html[data-theme=light] .login-page input{background:#f3f6fb;border-color:#c8d4e8;color:#24364d}
html[data-theme=light] .login-page .mode{border-color:#ccd7e9}
html[data-theme=light] .login-page .mode button{color:#65788d}
html[data-theme=light] .login-page .mode button[aria-selected=true]{color:#6650b8;border-bottom-color:#a56dff}
html[data-theme=light] .login-page :is(#submit,#sendCode){background:#5a78ff;border-color:#6e89ff;color:#fff}
html[data-theme=light] .login-page :is(#submit,#sendCode):hover{background:#4c63d9;border-color:#5a78ff}
html[data-theme=light] body:has(.layout){background:var(--v-page)}
html[data-theme=light] .app-header{background:#fff;border-bottom-color:var(--v-border)}
html[data-theme=light] .layout aside{background:#f5f6f8}
html[data-theme=light] .layout .content{background:#fff}
html[data-theme=light] .layout .session{background:transparent;border-bottom-color:#e5e8ed}
html[data-theme=light] .layout .session:hover{background:#edf1f7}
html[data-theme=light] .layout :is(.session.selected,.session-shell.selected>.session){background:#eaf1ff;box-shadow:inset 3px 0 #3975dc}
html[data-theme=light] .tool-filter{background:#fff;border-color:#dce1e8}
html[data-theme=light] #detail>.detail-toolbar{background:#fff;border-color:#e0e4ea;box-shadow:0 2px 8px #20273304}
html[data-theme=light] #detail>.conversation-card{background:#fff;border-color:#e0e4ea}
html[data-theme=light] #output{background:#fff;color:#202733}
html[data-theme=light] .bubble:not(.user){border:1px solid transparent;border-radius:12px;padding:14px 16px;margin:14px 0;line-height:1.75}
html[data-theme=light] .bubble.assistant{background:#f7f8fa;color:#202733;border-color:#e0e4ea}
html[data-theme=light] .bubble p{color:inherit}
html[data-theme=light] .bubble.user{background:#edf3ff;color:#253c62;box-shadow:inset 0 0 0 1px #dce7fb}
html[data-theme=light] .bubble.user a{color:#275cc5}
html[data-theme=light] .bubble.tool{background:#f6f7f9;color:#445063;border-color:#e2e6ec;font-size:12px;line-height:1.6}
html[data-theme=light] .bubble.tool-fileChange{background:#edf8f0;color:#256341;border-color:#c5e3cf}
html[data-theme=light] :is(.bubble .role,.bubble.tool-command .role,.bubble.tool-generic .role){color:#646f80;font-weight:550}
html[data-theme=light] :is(.bubble.tool-completed .role,.bubble.tool-fileChange .role){color:#23704f}
html[data-theme=light] :is(.bubble.tool-running .role,.bubble.tool-waiting .role,.activity.waiting){color:#916211}
html[data-theme=light] .bubble.tool-failed .role{color:#b63749}
html[data-theme=light] .bubble blockquote{background:#f5f7fb;border-left-color:#a4badd;color:#526075}
html[data-theme=light] .bubble code{background:#edf0f4;color:#40516b;border:0}
html[data-theme=light] .bubble pre{background:#f6f7f9;color:#344054;border-color:#e0e4ea}
html[data-theme=light] .bubble pre code{background:transparent;color:inherit}
html[data-theme=light] .bubble :is(th,td){border-color:#e0e4ea;color:#344054}
html[data-theme=light] .bubble th{background:#edf0f4}
html[data-theme=light] .bubble td{background:#fff}
html[data-theme=light] .bubble tr:nth-child(even) td{background:#f8f9fb}
html[data-theme=light] .file-change-item{background:#fff;border-color:#dce2e9}
html[data-theme=light] .file-change-head{background:#edf0f4;color:#344054;border-bottom:1px solid #dce2e9}
html[data-theme=light] .file-change-head span{color:#646f80}
html[data-theme=light] .file-change-item pre{background:#fff;color:#445063;border:0;border-radius:0}
html[data-theme=light] .file-change-item .diff-context{color:#526075}
html[data-theme=light] .file-change-item .diff-add{background:#e8f5ec;color:#21663d}
html[data-theme=light] .file-change-item .diff-remove{background:#fdecee;color:#a43246}
html[data-theme=light] .file-change-empty{color:#646f80}
html[data-theme=light] .detail-tags .model-name{background:#f2f4f8;color:#526075;border-color:#dce2e9}
html[data-theme=light] #eventCount{background:#f2f4f8;color:#646f80}
html[data-theme=light] #composer{background:#fff;border-top:1px solid #e8ebf0;padding-top:12px}
html[data-theme=light] #composer textarea{background:#f8f9fb;color:#202733;border-color:#cbd2dc;border-radius:10px;line-height:1.55}
html[data-theme=light] #composer textarea::placeholder{color:#788394}
html[data-theme=light] #composer textarea:focus{outline:0;border-color:#3975dc;box-shadow:0 0 0 3px #3975dc14;background:#fff}
html[data-theme=light] :is(.slash-command-menu,.app-toast){background:#fff;box-shadow:0 8px 28px #20273318;border-color:#dce2e9}
html[data-theme=light] .slash-command-option{background:transparent}
html[data-theme=light] .slash-command-option:is(:hover,[aria-selected=true]){background:#eaf1ff}
html[data-theme=light] .slash-command-option strong{color:#202733}
html[data-theme=light] .slash-command-option small{color:#646f80}
html[data-theme=light] .approval-actions button:is([data-choice=accept],[data-choice=approved]){background:#3067cf;border-color:#3067cf;color:#fff}
@media(max-width:760px){
  html[data-theme=light] .bubble:not(.user){padding:11px 12px;margin:12px 0;line-height:1.7}
  html[data-theme=light] #composer{padding-top:8px}
}

/* Keep the compact phone home screen on two shared alignment rails. */
@media (max-width:760px){
  body[data-mobile-view=list] .app-header{height:110px!important;min-height:110px!important}
  body[data-mobile-view=list] .layout{height:calc(100dvh - 136px)!important}
  body[data-mobile-view=list] .app-header>div.home-brand:first-child{left:12px!important}
  body[data-mobile-view=list] #agentSelect:not([hidden]){left:12px!important}
  body[data-mobile-view=list] #resourcesLink{left:79px!important}
  body[data-mobile-view=list] #hostResourcesLink{left:144px!important}
  body[data-mobile-view=list] .app-header .theme-toggle{right:12px!important}
  body[data-mobile-view=list] #health{right:12px!important}
  body[data-mobile-view=list] .header-actions>#devicesLink{right:129px!important}
  body[data-mobile-view=list] .header-actions>#remoteControlLink{right:62px!important}
  body[data-mobile-view=list] #restartAgentBtn{right:12px!important}
  body[data-mobile-view=list] aside>.row{padding-left:12px!important;padding-right:12px!important}
}
@media (max-width:360px){
  body[data-mobile-view=list] #resourcesLink{left:69px!important}
  body[data-mobile-view=list] #hostResourcesLink{left:129px!important}
  body[data-mobile-view=list] .header-actions>#devicesLink{right:121px!important}
  body[data-mobile-view=list] .header-actions>#remoteControlLink{right:58px!important}
  body[data-mobile-view=list] aside>.row{padding-left:10px!important;padding-right:10px!important}
}

@media (max-width:760px){
  html[data-theme=light] body[data-mobile-view=list] :is(.session.selected,.session-shell.selected>.session){
    border-color:var(--v-border,#e0e4ea)!important;
    box-shadow:none!important;
  }
}

/* Give the light mobile home header a layered product surface and clearer controls. */
@media (max-width:760px){
  html[data-theme=light] body[data-mobile-view=list] .app-header{
    background:linear-gradient(135deg,#edf5ff 0%,#f5f1ff 54%,#eef9f4 100%)!important;
    border-color:#cbd8ea!important;
    box-shadow:0 8px 24px rgba(68,91,132,.10)!important;
  }
  html[data-theme=light] body[data-mobile-view=list] .app-header :is(#agentSelect:not([hidden]),#resourcesLink,#hostResourcesLink,.header-actions>#devicesLink,.header-actions>#remoteControlLink,#restartAgentBtn){
    background-color:rgba(255,255,255,.78)!important;
    border-color:#c7d4e6!important;
    color:#263b59!important;
    box-shadow:0 2px 6px rgba(67,88,125,.08)!important;
  }
  html[data-theme=light] body[data-mobile-view=list] #agentSelect:not([hidden]){
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.4 4.4 3.6 3.6 3.6-3.6' fill='none' stroke='%23526783' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  }
  html[data-theme=light] body[data-mobile-view=list] .app-header .theme-toggle{
    background:rgba(255,255,255,.82)!important;
    border-color:#c7d4e6!important;
    color:#304a6d!important;
    box-shadow:0 2px 6px rgba(67,88,125,.08)!important;
  }
  html[data-theme=light] body[data-mobile-view=list] #health{color:#147b59!important}
}


.history-retry{margin-top:8px;padding:6px 14px;border-radius:8px}


/* Phone home: device management sits beside the theme control. */
@media (max-width:760px){
 body[data-mobile-view=list] .app-header #devicesLink{top:15px!important;right:48px!important;left:auto!important;width:44px!important;height:28px!important;min-height:28px!important}
 body[data-mobile-view=list] .app-header #remoteControlLink{top:71px!important;right:12px!important;left:auto!important;width:64px!important}
 body[data-mobile-view=list] .app-header #agentSelect:not([hidden]){width:calc((100% - 109px)/3)!important;left:12px!important}
 body[data-mobile-view=list] .app-header #resourcesLink{right:auto!important;width:calc((100% - 109px)/3)!important;left:calc(19px + (100% - 109px)/3)!important}
 body[data-mobile-view=list] .app-header #hostResourcesLink{width:calc((100% - 109px)/3)!important;left:calc(26px + (100% - 109px)*2/3)!important}
 body[data-mobile-view=list] .app-header #feedbackLink{display:none!important}
}
