/* Quiet scrollbars and one table-header surface, shared by light/dark host themes. */
@property --xx-ca-scroll-thumb {
  syntax: '<color>';
  inherits: true;
  initial-value: transparent;
}
.cc-assistant .ca-replies {
  --xx-ca-scroll-thumb: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--xx-ca-scroll-thumb) transparent;
  transition: --xx-ca-scroll-thumb .5s ease;
}
.cc-assistant .ca-replies:hover,
.cc-assistant .ca-replies:has(:focus-visible) {
  --xx-ca-scroll-thumb: color-mix(in srgb, var(--muted, #9298a1) 45%, transparent);
  transition-duration: .12s;
}
.cc-assistant .ca-replies::-webkit-scrollbar { width: 6px; height: 6px; }
.cc-assistant .ca-replies::-webkit-scrollbar-track { background: transparent; }
.cc-assistant .ca-replies::-webkit-scrollbar-thumb {
  background: var(--xx-ca-scroll-thumb) !important;
  border-radius: 6px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
@media (hover: none), (forced-colors: active) {
  .cc-assistant .ca-replies { scrollbar-color: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-assistant .ca-replies { transition: none; }
}
/* Component chrome wins over the unlayered global editable-field rules.
   A storyboard title cell is a table heading, even when its text is editable. */
@layer canvas-storyboard-chrome {
  .cc .cc-node.type-storyboard {
    --story-top: #353535;
    --story-top-bottom: #292929;
    --story-heading: #303030;
    --story-line: #454545;
    --story-ink: #dedede;
    --story-glint: #ffffff14;
  }
  html[data-theme=light] .cc .cc-node.type-storyboard {
    --story-top: #edf2fc;
    --story-top-bottom: #e4ebf7;
    --story-heading: #edf2f9;
    --story-line: #cbd6e7;
    --story-ink: #334a68;
    --story-glint: #ffffffb3;
  }
  /* Professional-gray follows the same fixed-neutral palette as the timeline. */
  html[data-canvas-appearance=studio-gray] .cc .cc-node.type-storyboard {
    --story-top: #353535;
    --story-top-bottom: #292929;
    --story-heading: #303030;
    --story-line: #454545;
    --story-ink: #dedede;
    --story-glint: #ffffff14;
  }
  .cc .cc-node.type-storyboard > header {
    box-sizing: border-box !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 8px 12px !important;
    background: linear-gradient(var(--story-top), var(--story-top-bottom)) !important;
    color: var(--story-ink) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--story-line) !important;
    box-shadow: inset 0 1px 0 var(--story-glint) !important;
  }
  .cc .cc-node.type-storyboard > header strong {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    color: inherit !important;
  }
  .cc .cc-node.type-storyboard .cc-storyboard-table-wrap table thead th,
  .cc .cc-node.type-storyboard .cc-storyboard-table-wrap table thead th[contenteditable] {
    box-sizing: border-box !important;
    background: var(--story-heading) !important;
    color: var(--story-ink) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 9px !important;
    border: 0 !important;
    border-right: 1px solid var(--story-line) !important;
    border-bottom: 1px solid var(--story-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .cc .cc-node.type-storyboard .cc-storyboard-table-wrap table thead th[contenteditable]:focus-visible {
    outline: 1px solid color-mix(in srgb, var(--accent, #659acb) 65%, transparent) !important;
    outline-offset: -1px !important;
  }
  .cc .cc-node.type-storyboard .cc-storyboard-table-wrap table thead th.is-story-column-selected {
    box-shadow: inset 0 -2px var(--accent, #659acb) !important;
  }
}
