/* Optional v7 additions only. Original brand headers, composers and toolbars
   retain their own markup and CSS. Runtime theme(anchor) supplies exact fonts. */
/* Business dialogs live outside the captured brand screen. Give their existing
   theme reader an opaque Pollo root palette instead of browser-default black. */
html[data-competitor="pollo"] body {
  color: #f5f5f5;
  background: #0d0d12;
  font: 14px/1.5 PolloObservedInter, Inter, Arial, sans-serif;
}
html[data-competitor="pollo"] .production-workspace-dialog button {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  background: #24242b;
  color: #f5f5f5;
}
html[data-competitor="pollo"] .production-workspace-dialog [data-workspace-submit] {
  background: #fb7d37;
  border-color: transparent;
  color: #101015;
}
@media (min-width:761px) {
  html[data-competitor="pollo"] .home-pollo h1 { font-size:24px; line-height:36px; font-weight:300; }
}
:where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-status]) {
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  min-width: 0;
  --production-surface: Canvas;
  --production-border: currentColor;
  --production-radius: var(--radius, .5rem);
}
/* Missing business controls use the retained sidebar's quiet navigation rhythm. */
[data-production-history-context] {
  border: 0;
  background: transparent;
  border-radius: 0;
  min-width: 0;
}
[data-production-workspace-menu] { position: relative; flex-shrink: 0; font: inherit; color: inherit; }
[data-production-workspace-open] { cursor: pointer; padding: .4rem .5rem; font: inherit; white-space: nowrap; max-width: 192px; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
[data-production-history-context], [data-production-account-context] { pointer-events: auto; }
[data-production-workspace-menu]:not([open]) > [data-production-history-context] { display: none !important; }
[data-production-workspace-menu] > [data-production-history-context] {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 192px;
  max-width: calc(100vw - 2rem);
  padding: .5rem;
  background: var(--production-surface, Canvas);
  color: inherit;
  box-shadow: 0 4px 16px #0002;
}
[data-production-history-context] > button {
  text-align: left;
  padding: .4rem .5rem;
  border: 0;
  border-radius: var(--radius, .4rem);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
[data-production-history-context] > button:hover { background: var(--sidebar-accent, #8882); }
[data-production-history-context] > span { padding-inline: .5rem; overflow-wrap: anywhere; }
[data-production-history-context] > button:focus-visible,
[data-production-account-open]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
[data-production-account-context] { padding: .65rem; display: grid; gap: .4rem; }
[data-production-account-context][popover]:not(:popover-open) { display: none !important; }
[data-production-account-context] > button { padding: .4rem .5rem; }
[data-production-caption] { min-width: 0; overflow-wrap: anywhere; }
html[data-competitor="pollo"] [data-production-native-composer] .p-input-row [contenteditable="true"][data-chat-input] {
  flex: 1 1 0% !important;
  width: 0;
  min-width: 0;
}
html[data-competitor="pollo"] .home-pollo #home-prompt[data-production-native-repair="home-agent"] {
  flex: 1 1 0% !important;
  width: 0;
  min-width: 0;
}
html[data-competitor="pollo"] [data-p-agent-view][data-production-native-composer] {
  margin-top: 0 !important;
  height: auto !important;
  min-height: 100dvh;
}
html[data-competitor="topview"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--tv-panel, #202020);
  --production-border: var(--tv-border, #ffffff1c);
  --production-radius: var(--radius, .65rem);
}
html[data-competitor="pollo"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--p-panel, #18181d);
  --production-border: var(--p-border, #ffffff18);
  --production-radius: var(--radius, .75rem);
}
html[data-competitor="invideo"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--panel-background, #1e1e1e);
  --production-border: var(--border-color, #ffffff1a);
  --production-radius: var(--radius, .5rem);
}
html[data-competitor="libtv"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--l-panel, #202124);
  --production-border: var(--l-border, #ffffff1a);
  --production-radius: var(--radius, .65rem);
}
html[data-competitor="flova"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--overlay-bg, #191b1b);
  --production-border: var(--overlay-border, #ffffff1a);
  --production-radius: var(--radius, .65rem);
}
html[data-competitor="creatok"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: hsl(var(--popover, 0 0% 100%));
  --production-border: var(--production-native-border, #e5e5e5);
  --production-radius: var(--radius, .5rem);
}
html[data-competitor="creatify"] :where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) {
  --production-surface: var(--cr-panel, #141615);
  --production-border: var(--cr-border, #ffffff1c);
  --production-radius: var(--radius, .75rem);
}
html[data-competitor] :is(.production-workspace-dialog, .production-brand-menu) {
  background: var(--production-surface);
  border: 1px solid var(--production-border);
  border-radius: var(--workspace-dialog-radius, var(--production-radius));
  max-width: calc(100vw - 2rem);
  max-height: 80dvh;
  overflow: auto;
}
.production-workspace-dialog::backdrop {
  background: var(--workspace-backdrop, #0008);
}
:where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  max-width: 100%;
}
html[data-competitor] :is(.production-workspace-dialog, .production-brand-menu) :is(input, select) {
  background: var(--input-background, transparent);
  border: 1px solid var(--production-border);
  border-radius: var(--workspace-input-radius, var(--production-radius));
}
.production-workspace-dialog :where(button, input, select):focus-visible,
.production-brand-menu :where(button, input, select):focus-visible,
[data-production-chat] :where(button, input, select, textarea, [contenteditable]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
:where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) [aria-disabled="true"],
:where(.production-workspace-dialog, .production-brand-menu, .production-workspace-navigation, [data-production-chat], [data-production-content="assets"]) :disabled {
  opacity: .55;
  cursor: not-allowed;
}
[data-production-chat] [data-chat-history] {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 0;
  overflow: auto;
}
[data-production-chat] [data-chat-role] {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--production-border);
  border-radius: var(--production-radius);
  padding: .65rem .8rem;
}
[data-production-chat] [data-chat-role="user"] {
  align-self: flex-end;
}
[data-production-chat] [data-chat-role="assistant"] {
  align-self: flex-start;
}
[data-production-chat] [data-chat-role] p,
:where(.production-workspace-dialog, .production-brand-menu, [data-production-status]) :where(p, [role="status"], [role="alert"]) {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-block: .35rem;
}
[data-production-chat] form {
  font: inherit;
  min-width: 0;
}
[data-production-chat] [data-chat-input] {
  font: inherit;
  color: inherit;
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-competitor="flova"] [data-flova-home] [data-production-native-owned="actions"] {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
@media (max-width: 650px) {
  .production-workspace-dialog, .production-brand-menu {
    max-width: calc(100vw - 1rem);
    max-height: 85dvh;
  }
  [data-production-chat] [data-chat-role] {
    padding: .5rem .65rem;
  }
}

/* Owned dialogue history stays a real scroll region; composer markup is retained. */
[data-production-native-log] {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: min(50dvh, 32rem);
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
[data-production-native-model-caption] { font: inherit; overflow-wrap: anywhere; }
/* The full model identity stays in text/title while the retained toolbar shrinks. */
html[data-competitor="pollo"] [data-production-native-composer] .p-composer-bottom > :is([data-p-agent-controls], [data-p-media-controls]) {
  flex: 1 1 0%;
  min-width: 0;
}
html[data-competitor="pollo"] [data-production-native-composer] .p-send-controls { flex-shrink: 0; }
html[data-competitor="pollo"] [data-production-native-composer] [data-p-model] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
html[data-competitor="pollo"] [data-production-native-composer] [data-p-model] [data-production-native-model-caption] {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* The original Flova icon toolbar hides spans; give its owned model label space. */
html[data-competitor="flova"] [data-production-native-composer] #message-form { height: auto !important; }
html[data-competitor="flova"] [data-production-native-composer] #message-form div:has(> button[aria-label="模型"]) { flex: 1 1 0%; min-width: 0; }
html[data-competitor="flova"] [data-production-native-composer] #message-form button[aria-label="模型"] {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  gap: 4px !important;
  padding-inline: 4px !important;
}
html[data-competitor="flova"] [data-production-native-composer] #message-form [data-production-native-model-caption] {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100% !important;
  opacity: 1 !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Retained native history nodes share the original composer column. */
[data-production-native-history-slot]:not([data-production-native-log]) { height: auto !important; max-height: none !important; min-height: 0; }
html[data-competitor="libtv"] [data-l-director][data-production-native-composer] {
  position: fixed;
  height: min(640px, calc(100dvh - 90px));
  max-height: calc(100dvh - 90px);
}
html[data-competitor="flova"] [data-production-native-composer] #messages > [data-production-native-log] {
  width: 100%;
  height: 100%;
}
html[data-competitor="creatok"] [data-production-native-composer] [data-slot="input-group"] {
  height: auto;
  flex-direction: column;
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-composer] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 18px;
  max-height: var(--production-native-visible-height, none);
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-history="true"] .skill-chips {
  flex-shrink: 0;
  max-height: min(130px, 20dvh);
  overflow-y: auto;
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-composer] > [data-chat-log] {
  flex: 1;
  min-height: 80px;
  max-height: none;
  display: flex;
  overflow: hidden;
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-composer] [data-production-native-log] {
  flex: 1;
  max-height: none;
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-composer] .agent-input {
  position: static;
  flex-shrink: 0;
}
html[data-competitor="topview"] [data-agent-pane][data-production-native-composer] > [data-production-native-status] {
  flex-shrink: 0;
  margin-block: .4rem 0;
}

@media (max-height: 750px) {
  html[data-competitor="topview"] [data-agent-pane][data-production-native-history="true"] .skill-chips { max-height: 10dvh; }
  html[data-competitor="pollo"] [data-production-native-composer][data-production-native-history="true"] .p-agent-hero > h1 { margin-top: .5rem; margin-bottom: .5rem; }
  html[data-competitor="pollo"] [data-production-native-composer][data-production-native-history="true"] .p-agent-hero > p { margin-bottom: .5rem; }
}
@media (max-width: 650px) {
  /* The retained mobile sidebar hides direct buttons; keep its owned account entry. */
  html[data-competitor="topview"] .tv-sidebar > [data-production-account-open][data-production-runtime-owned]:not([hidden]) { display: flex; }
  /* Keep the original dialogue model node available before NativeChat resolves it. */
  html[data-competitor="pollo"] [data-p-agent-view] [data-p-model] { display: inline-flex; }
  html[data-competitor="pollo"] [data-production-native-composer] .p-composer-bottom > :is([data-p-agent-controls], [data-p-media-controls]) { flex-wrap: wrap; }
  html[data-competitor="pollo"] [data-production-native-composer] [data-p-model] { flex-basis: 100%; margin-left: 0; order: 1; }
  html[data-competitor="invideo"] [data-production-native-composer] :is(.c-hZKiau,.c-bLfacm):has(#home-prompt) { height: auto; min-height: 78px; }
  html[data-competitor="invideo"] [data-production-native-composer] form[data-product-composer] { height: auto; }
}

/* Owned user library uses the original brand surface and inherited typography. */
html[data-competitor] [data-production-content="assets"] { width:100%; box-sizing:border-box; padding:24px; }
html[data-competitor] [data-production-content="assets"] h2 { margin:0 0 8px; font-size:24px; }
html[data-competitor] [data-production-content="assets"] header p { margin:0 0 20px; opacity:.7; }
html[data-competitor] [data-production-asset-tools] { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:24px; }
html[data-competitor] [data-production-asset-tools] input { flex:1 1 220px; min-width:0; max-width:100%; color:inherit; }
html[data-competitor] [data-production-content="assets"] button, [data-production-asset-tools] input::file-selector-button { background:var(--production-surface,transparent); color:inherit; font:inherit; border:1px solid var(--production-border,#8886); border-radius:var(--production-radius,8px); padding:8px 12px; cursor:pointer; }
html[data-competitor] [data-production-content="assets"] button:disabled { opacity:.45; cursor:not-allowed; }
html[data-competitor] [data-production-content="assets"] :is(button,input):focus-visible { outline:2px solid currentColor; outline-offset:3px; }
html[data-competitor] [data-production-asset-grid] { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr)); gap:16px; }
html[data-competitor] [data-production-asset-grid] article { min-width:0; background:var(--production-surface,transparent); border:1px solid var(--production-border,#8884); border-radius:var(--production-radius,10px); overflow:hidden; }
html[data-competitor] [data-production-asset-grid] video { display:block; width:100%; aspect-ratio:16/9; object-fit:contain; background:#000; }
html[data-competitor] [data-production-asset-grid] article p { margin:12px; font-size:13px; opacity:.75; }
html[data-competitor] [data-production-asset-actions] { display:flex; flex-wrap:wrap; gap:8px; padding:0 12px 12px; }
@media(max-width:600px) { [data-production-content="assets"] { padding:16px; } }
@media(max-width:600px) {
  html[data-competitor="invideo"] .c-bunQQz:has([data-production-content="assets"]) { flex-direction:column; overflow:auto; }
  html[data-competitor="invideo"] .c-bunQQz:has([data-production-content="assets"]) .c-iQbFDg { flex:0 0 auto; width:100%; max-height:120px; overflow:auto; }
  html[data-competitor="invideo"] .c-bunQQz:has([data-production-content="assets"]) .c-juJjdw { width:100%; flex:1 1 auto; padding:0; }
  html[data-competitor="invideo"] .c-jdZgov:has(>[data-production-content="assets"]) { width:100%; margin:0; padding:0; }
}

html[data-competitor="flova"] [data-product-main]:has(>[data-production-content="assets"]) { display:block!important; min-width:0; width:100%; overflow:auto; }
html[data-competitor="pollo"] .p-main:has(>[data-production-content="assets"]) { min-height:calc(100dvh - 76px); overflow:auto; }
/* A confirmed Pollo conversation is a different view from the empty Agent page. */
html[data-competitor="pollo"] [data-production-pollo-conversation] .core-pollo { height:100dvh; min-height:0; overflow:hidden; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .core-pollo > .p-sidebar { display:none; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-p-agent-view] { margin-left:0; height:100dvh !important; min-height:0; display:flex; flex-direction:column; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-topbar { flex:0 0 auto; height:auto; min-height:68px; flex-wrap:wrap; gap:8px; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-topbar > :is(button,[data-production-workspace-menu]) { min-width:0; max-width:100%; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-topbar > button[data-home-open="home"] { width:auto; margin:0; padding:8px; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-main { flex:1; min-height:0; width:100%; padding:0 16px 24px; display:flex; flex-direction:column; overflow:hidden; box-sizing:border-box; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-agent-hero { flex:1; min-height:0; padding:0; margin:0; display:flex; flex-direction:column; }
html[data-competitor="pollo"] [data-production-pollo-conversation] :is(.p-agent-hero > h1,.p-agent-hero > p,.p-main > .p-skill-pills,.p-main > .p-skills-section) { display:none; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-production-native-history-slot] { flex:1; min-width:0; min-height:120px; width:100%; max-width:880px; margin:16px auto; overflow:auto; box-sizing:border-box; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-production-native-log] { height:100%; max-height:none !important; overflow:auto; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-composer { flex:0 0 auto; width:100%; max-width:880px; min-height:118px; margin:0 auto; padding:16px; border-radius:24px; background:rgba(27,27,31,.74); box-sizing:border-box; }
/* Rich repair retains captured inline input sizing; override it only after binding. */
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-input-row { height:auto; min-height:40px; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-input-row [data-chat-input] { flex:1 1 0% !important; width:0; min-width:0; height:auto !important; min-height:40px !important; max-height:160px !important; padding:0 !important; font-size:13px !important; line-height:24px !important; font-weight:300 !important; overflow-y:auto; }
html[data-competitor="pollo"] [data-production-pollo-conversation] .p-composer-bottom { padding-top:12px; }
/* Native marks only verified quiet state idle; failures and recovery stay visible. */
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-production-native-status][data-production-pollo-idle] { display:none; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-production-native-log],
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role] { text-align:left; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role="assistant"] { align-self:flex-start; background:transparent; border:0; padding:0; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role="assistant"] p { margin:8px 0; font-size:14px; line-height:20px; }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role="user"] { align-self:flex-end; width:fit-content; max-width:100%; box-sizing:border-box; padding:8px 12px; border:0; border-radius:8px 0 8px 8px; background:rgba(255,255,255,.05); }
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role="user"] p { margin:0; font-size:14px; line-height:20px; }
/* Retain role text for assistive technology without the prototype role headings. */
html[data-competitor="pollo"] [data-production-pollo-conversation] [data-chat-role] > b { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:650px) {
  html[data-competitor="pollo"] [data-production-pollo-conversation] .p-main { width:100%; padding:0 12px 16px; }
  html[data-competitor="pollo"] [data-production-pollo-conversation] .p-topbar { padding:8px 12px; }
}
html[data-competitor="libtv"] [data-l-grid]:has(>[data-production-content="assets"]) { overflow:auto; }
html[data-competitor="libtv"] [data-production-content="assets"] { padding-top:96px; }

@media(max-width:600px) {
  html[data-competitor="invideo"] .c-bunQQz:has([data-production-content="assets"]) > :not(.c-juJjdw) { flex:0 0 auto; width:100%; height:120px; max-height:120px; overflow:auto; }
}
