/* Light-only accents and complete nested surfaces. Dark theme stays with original styles. */
html[data-theme=light]{--lc-ink:#244267;--lc-muted:#506b90;--lc-line:#b8cdeb;--lc-blue:#2166e3;--lc-panel:linear-gradient(130deg,#f4faffdf,#e2edffe8)}
html[data-theme=light] body .workspace{background:radial-gradient(ellipse at 95% 5%,#d7e6ff77,transparent 52%),radial-gradient(ellipse at 0 100%,#d9f5fa77,transparent 50%),#f2f6fd}
/* Scope to the complete history subtree, not only its outside container. */
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector :is(.cc-history-layout,.cc-history-body,.cc-history-toolbar,.cc-history-pagination,.cc-task-list,.cc-history-empty){background:transparent!important;color:var(--lc-ink)!important;border-color:var(--lc-line)!important}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector .cc-history-item{background:linear-gradient(135deg,#ffffffcc,#e5efffb8)!important;border:1px solid #b6cdee!important;border-radius:12px!important;padding:12px!important;margin:10px 0!important;box-shadow:inset 0 1px #fff,0 5px 12px #3c64a012}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector :is(.cc-history-heading,.cc-history-heading b,.cc-history-help,.cc-history-prompt,.cc-history-prompt summary,.cc-history-facts,.cc-history-expiry,.cc-history-item small,.cc-history-item time,.cc-history-pagination span){color:var(--lc-ink)!important}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector :is(.cc-history-facts,.cc-history-expiry,.cc-history-heading small){color:var(--lc-muted)!important}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector :is(.cc-history-pagination,.cc-history-actions){border-color:var(--lc-line)!important}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector :is(.cc-history-add,.cc-history-pagination button){background:linear-gradient(135deg,#e2ecff,#cbdfff)!important;color:#2459a9!important;border:1px solid #a8c3ec!important;border-radius:8px;box-shadow:inset 0 1px #fff}
html:root[data-theme=light] body .cc .cc-side-shell #ccInspector button:disabled{color:#617792!important;background:#dce6f2!important;opacity:.72!important;box-shadow:none!important}
html:root[data-theme=light] body .cc .cc-panel-navigation :is(.cc-panel-tabs,button[data-panel-group],.cc-panel-subtabs){background:transparent!important;color:var(--lc-ink)!important;border-color:var(--lc-line)!important}
html:root[data-theme=light] body .cc .cc-panel-navigation button[data-panel-group].active{background:linear-gradient(125deg,#d5e9ff,#dce0ff)!important;color:#215ac4!important;box-shadow:inset 0 1px #fff!important}
html:root[data-theme=light] body .cc #ccAssistantHost{--text:#244267;--muted:#587396;--line:#b8cdeb;--panel:#eaf3ff;--surface:#f6faff;color:var(--lc-ink)!important;background:var(--lc-panel)!important}
html:root[data-theme=light] body :is(#ccAssistantHost .ca-head,#ccAssistantHost .ca-settings,#ccAssistantHost .ca-messages,#ccAssistantHost .ca-welcome,#ccAssistantHost .ca-composer,#ccAssistantHost .ca-state,.ca-popover){color:var(--lc-ink)!important;background:var(--lc-panel)!important;border-color:var(--lc-line)!important}
html:root[data-theme=light] body #ccAssistantHost :is(button,input,textarea,select,.ca-settings-choice){color:var(--lc-ink)!important;background:#f6faffd9!important;border-color:var(--lc-line)!important}
html:root[data-theme=light] body #ccAssistantHost :is(.ca-state,.ca-settings-note,.ca-empty,small){color:var(--lc-muted)!important}
html:root[data-theme=light] body .ca-popover button{background:transparent!important;color:var(--lc-ink)!important}.ca-popover button:focus-visible{outline:2px solid #4a88eb;outline-offset:-2px}
html:root[data-theme=light] body .cc #ccInspector :is(.cc-local-links,.cc-media-manager,.cc-asset-grid article,.cc-identity-guide,.cc-model-capacity,.cc-submit-review){background:#e9f2ffd9!important;color:var(--lc-ink)!important;border-color:var(--lc-line)!important}
html:root[data-theme=light] body .cc #ccInspector :is(.cc-identity-label,.cc-identity-card dt,.cc-identity-card dd,.cc-identity-guide b,.cc-reference-help){color:var(--lc-ink)!important}
/* Membership uses blue, cyan, violet and amber accents with consistently dark readable text. */
html[data-theme=light] .mp-page{--text:#244267;--muted:#526d91;--line:#b7cdea;color:#244267}
html[data-theme=light] body .mp-card{--plan-accent:#286cd5;--plan-tint:#d4e7ff;background:linear-gradient(145deg,#f7fbff,var(--plan-tint))!important;border:1px solid color-mix(in srgb,var(--plan-accent) 35%,white)!important;box-shadow:inset 0 1px #fff,0 10px 26px #335f9a14!important}
html[data-theme=light] body .mp-card:nth-child(2){--plan-accent:#087d9d;--plan-tint:#d1eff4}html[data-theme=light] body .mp-card:nth-child(3){--plan-accent:#7946cc;--plan-tint:#e6dcfa}html[data-theme=light] body .mp-card:nth-child(4){--plan-accent:#99621b;--plan-tint:#f6e5c9}
html[data-theme=light] body .mp-card :is(h2,h3,.mp-price,.mp-price span,.mp-price small,.mp-description,.mp-period-note,.mp-period-note small,.mp-period-note span,.mp-benefits span,li){color:#28446b!important}
html[data-theme=light] body .mp-card :is(.mp-emblem,.mp-benefits strong){color:var(--plan-accent)!important}
html[data-theme=light] body .mp-card .mp-ribbon{background:linear-gradient(110deg,var(--plan-tint),#ffffff77)!important;color:var(--plan-accent)!important;border-bottom:1px solid color-mix(in srgb,var(--plan-accent) 28%,white)!important}
html[data-theme=light] body .mp-card .mp-cta{color:#fff!important;background:linear-gradient(110deg,var(--plan-accent),color-mix(in srgb,var(--plan-accent) 75%,#62baff))!important;border:1px solid color-mix(in srgb,var(--plan-accent) 65%,white)!important;box-shadow:inset 0 1px #ffffff77,0 5px 12px #304e7914!important}
html[data-theme=light] body .mp-card .mp-cta:disabled{opacity:.72!important}
html[data-theme=light] body .mp-page :is(.mp-period,.mp-recharge,.mp-pack,.mp-unit-notice){background:linear-gradient(130deg,#f7fbff,#daeaff)!important;color:#29476c!important;border-color:#b5cbed!important}
html[data-theme=light] body .mp-page :is(.mp-footnotes,.mp-disclosure,.mp-recharge-head p,.mp-pack-price,.mp-period button,.mp-period span){color:#49688f!important}
html[data-theme=light] body .mp-page .mp-period button.active{background:#286de5!important;color:white!important}
html:root[data-theme=light] body .mp-page .mp-period button[aria-pressed=true],html:root[data-theme=light] body .mp-page .mp-period button[aria-pressed=true] :is(b,small,span){background:#286de5!important;color:#fff!important}
html[data-theme=light] body .cc .cc-history-pagination:has(button:first-child:disabled):has(button:last-child:disabled){display:none!important}
/* Dialog owns its size; the file list is the only scroll container. */
html body dialog.agent-cloud-picker.xm-browser[open]{box-sizing:border-box!important;display:flex!important;flex-direction:column;gap:10px;width:var(--xm-width,480px)!important;height:var(--xm-height,440px)!important;min-width:min(340px,calc(100vw - 16px));min-height:320px;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 24px)!important;resize:none;overflow:hidden!important;padding:14px!important;border-radius:16px!important;line-height:1.4}
html body dialog.xm-browser header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:0}
html body dialog.xm-browser header h2{font-size:15px;margin:0}html body dialog.xm-browser header p{display:none}
html body dialog.xm-browser button{font:inherit;font-size:12px;min-height:0;border-radius:8px;line-height:1.4;box-shadow:none}
html body dialog.xm-browser .agent-cloud-close{display:grid;place-items:center;flex:0 0 28px;width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;margin:0;background:color-mix(in srgb,var(--theme-text) 7%,transparent);color:var(--theme-text);border:1px solid var(--line);font-size:19px}
html body dialog.xm-browser .agent-cloud-search{display:flex;flex:0 0 auto;gap:8px;margin:0}html body dialog.xm-browser .agent-cloud-search input{height:32px;min-height:32px;min-width:0;flex:1;padding:6px 10px;margin:0;font-size:12px}html body dialog.xm-browser .agent-cloud-search button{height:32px;padding:5px 13px;flex:none}
html body dialog.xm-browser .xm-path{flex:0 0 auto;padding:0;margin:0;min-height:24px;max-height:26px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;gap:5px}
html body dialog.xm-browser .xm-files{flex:1 1 0;min-height:0;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;align-content:start;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:3px;margin:0}
html body dialog.xm-browser .xm-files>button{min-height:100px;padding:8px;gap:5px;align-self:start;border-radius:11px}
html body dialog.xm-browser .xm-drive-icon{transform:rotate(-6deg) scale(.8);margin:0;height:54px;flex:none}html body dialog.xm-browser .xm-files small{font-size:10px}
html body dialog.xm-browser p[role=status]{flex:0 0 auto;margin:0;font-size:11px;min-height:16px;line-height:1.5}
html body dialog.xm-browser footer{flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:15px;margin:0;padding:7px 0 0;border-top:1px solid var(--line);font-size:12px}
html body dialog.xm-browser footer button{width:auto!important;min-width:64px;height:28px!important;padding:4px 10px!important;margin:0}
html body dialog.xm-browser :is(footer,.xm-path)[hidden]{display:none!important}
html[data-theme=light] body dialog.xm-browser{background:linear-gradient(135deg,#f4fbfff5,#dfebfff2)!important;border-color:#a8c5ee;box-shadow:inset 0 1px #fff,0 18px 50px #25497533;backdrop-filter:blur(18px)}
html[data-theme=light] body dialog.xm-browser .xm-drive{background:linear-gradient(135deg,#fff,#dceaff)!important;border-color:#adcaf0;box-shadow:inset 0 1px #fff,0 4px 10px #4f7ab515}
html[data-theme=light] body dialog.xm-browser .xm-drive:nth-child(2){background:linear-gradient(135deg,#f5ffff,#cceff1)!important;border-color:#a2d6df}html[data-theme=light] body dialog.xm-browser .xm-drive:nth-child(3){background:linear-gradient(135deg,#faf8ff,#e0dafa)!important;border-color:#c5b7ec}
.xe-guide{position:relative;padding:12px 30px 12px 16px;border:1px solid var(--line);border-radius:12px;font-size:12px}.xe-guide p{margin:0}.xe-guide-dismiss{position:absolute;right:7px;top:7px;display:grid;place-items:center;width:22px;height:22px;min-height:0;padding:0;font-size:16px;background:transparent;border:0;color:var(--theme-text-muted)}
html body #userCenterButton .home-workspace-label{padding:9px 17px!important;font-size:14px!important;background:linear-gradient(110deg,#1767ec,#4e5de7)!important;box-shadow:0 4px 12px #2864db33,inset 0 1px #ffffff55;font-weight:650}
@media(max-width:420px){html body dialog.agent-cloud-picker.xm-browser[open]{width:calc(100vw - 16px)!important;min-width:0;height:var(--xm-height,420px)!important;min-height:260px}html body dialog.xm-browser .xm-files>button{padding:6px}.xm-files strong{font-size:11px}}
html body dialog.xm-browser .xm-resize{position:absolute;bottom:2px;right:3px;width:18px;height:18px!important;min-height:0!important;padding:0!important;background:transparent!important;border:0!important;color:var(--theme-text-muted);cursor:nwse-resize;touch-action:none;line-height:1}
html[data-theme=light] body .mp-card :is(.mp-value,.mp-value span,.mp-value small,.mp-value b,.mp-benefits small){color:#345174!important}
