/* Compact native workbench; entirely scoped to Creato, no landing/admin edits. */
body.creato-compact-active {
  --cc-bg:#101014; --cc-panel:#18181e; --cc-line:#ffffff14;
  --cc-text:#eeedf3; --cc-muted:#a5a2b2; --cc-accent:#bea3fa;
}
body.creato-compact-active .app-main { min-height:0!important; }
body.creato-compact-active main.content-area,
body.creato-compact-active main#main-content {
  padding:0!important; height:auto!important; min-height:0!important;
  overflow:hidden!important; overscroll-behavior:contain;
}
body.creato-compact-active .aim-playground-studio-root {
  height:auto!important; min-height:0!important; overflow:hidden!important;
}
.cc-workspace, .cc-workspace * { box-sizing:border-box; }
.cc-workspace {
  color-scheme:dark;
  position:relative; display:grid; grid-template-rows:54px 46px minmax(0,1fr);
  width:100%; height:var(--cc-height,calc(100dvh - 88px)); min-height:0;
  overflow:hidden; color:var(--cc-text); background:var(--cc-bg);
  font:13px/1.5 "Instrument Sans","Segoe UI",system-ui,sans-serif;
}
.cc-workspace [hidden] { display:none!important; }
.cc-workspace.is-loading { grid-template-rows:54px minmax(0,1fr); }
.cc-workspace svg { flex-shrink:0; vertical-align:middle; }
.cc-workspace button,.cc-workspace input,.cc-workspace textarea,.cc-workspace select {
  font-family:inherit; font-size:13px; color:inherit; letter-spacing:0;
}
.cc-workspace button,.cc-workspace a,.cc-workspace summary { -webkit-tap-highlight-color:transparent; }
.cc-workspace button:disabled { opacity:.45; cursor:not-allowed; }
.cc-workspace :is(button,a,input,select,textarea,summary):focus-visible {
  outline:2px solid #cdb7ff!important; outline-offset:3px;
}
.cc-workspace button { cursor:pointer; }
.cc-header { display:flex; align-items:center; gap:14px; padding:0 18px; border-bottom:1px solid var(--cc-line); background:#131317; min-width:0; }
.cc-brand { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.cc-brand strong { font-size:17px; letter-spacing:-.035em; font-weight:650; }
.cc-brand img { display:block; width:26px; height:26px; }
.cc-header-spacer { flex:1; }
.cc-workspace .cc-studio {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:34px; padding:0 12px; border:1px solid #ad8ee95c;
  border-radius:8px; color:#f0e8ff; background:#b793ff16; text-decoration:none;
  font-weight:600; font-size:12px; white-space:nowrap;
}
.cc-studio>svg:last-child { width:13px; height:13px; }
.cc-workspace .cc-studio:hover { background:#b793ff2c; border-color:#b793ff; }
.cc-history-toggle,.cc-settings-toggle,.cc-icon-button {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border:1px solid transparent; background:transparent; border-radius:8px; min-height:34px;
  padding:0 9px; color:var(--cc-muted)!important; font-weight:500;
}
.cc-history-toggle:hover,.cc-settings-toggle:hover,.cc-icon-button:hover { background:#ffffff09; color:#eeedf3!important; }
.cc-icon-button { width:34px; padding:0; }
.cc-toolbar { display:flex; align-items:center; gap:10px; min-width:0; padding:0 18px; border-bottom:1px solid var(--cc-line); }
.cc-modes { display:flex; align-items:center; gap:3px; min-width:0; }
.cc-mode { min-height:32px; padding:0 12px; border:0; border-radius:7px; background:transparent; color:var(--cc-muted)!important; font-size:12px!important; font-weight:550; white-space:nowrap; }
.cc-mode.is-active { color:#e9d9ff!important; background:#b793ff1c; }
.cc-mode:hover { background:#ffffff08; }
.cc-settings-toggle { margin-left:auto; font-size:12px!important; }
.cc-body { display:grid; grid-template-columns:minmax(0,1fr); min-height:0; overflow:hidden; }
.cc-workspace.has-inspector .cc-body { grid-template-columns:minmax(0,1fr) 274px; }
.cc-main { min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; position:relative; }
.cc-empty {
  flex:1 1 auto; min-height:0; overflow:auto; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:10px; padding:20px 28px; text-align:center;
}
.cc-empty>img { width:38px; height:38px; margin:0 0 5px; }
.cc-empty h1 { font-size:clamp(21px,2.2vw,29px)!important; line-height:1.2; margin:0!important; font-weight:620; letter-spacing:-.04em; }
.cc-empty>p { margin:0; max-width:430px; color:var(--cc-muted); line-height:1.6; font-size:13px; }
.cc-empty-note { color:var(--cc-muted); font-size:11px; }
.cc-examples { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; max-width:570px; margin-top:12px; }
.cc-example { background:#ffffff03; color:#b6b0c6!important; padding:8px 11px; border:1px solid var(--cc-line); border-radius:9px; font-size:11px!important; max-width:260px; text-align:left; }
.cc-example:hover { background:#ffffff09; border-color:#ffffff30; }
.cc-results {
  flex:1 1 0; min-height:0; max-height:none!important; overflow:auto; overscroll-behavior:contain;
  padding:24px max(20px,calc((100% - 800px)/2)); scrollbar-width:thin; scrollbar-color:#49404f transparent;
}
.cc-message { margin:0 0 26px; padding:0; font-size:14px; line-height:1.75; }
.cc-message.is-user { margin-left:auto; width:fit-content; max-width:min(90%,690px); padding:12px 16px; background:#24232c; border-radius:15px 15px 3px 15px; }
.cc-message-head { display:flex; align-items:center; gap:8px; color:#aba5b8; font-size:11px; margin-bottom:8px; }
.cc-message-text { white-space:pre-wrap; overflow-wrap:anywhere; margin:0 0 8px; font-size:14px; }
.cc-message.is-error { color:#f4b8bc; }
.cc-workspace .cc-media { display:block; width:auto; max-width:100%; max-height:380px; border-radius:10px; object-fit:contain; background:#08080c; }
.cc-workspace audio.cc-media { width:min(100%,460px); height:42px; background:transparent; }
.cc-result-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:9px; color:var(--cc-muted); }
.cc-result-actions:empty { display:none; }
.cc-result-actions>[role=status] { font-size:11px; flex-basis:100%; }
.cc-action,.cc-download { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--cc-line); border-radius:7px; padding:5px 9px; background:transparent; color:#bdb6cc!important; font-weight:500; font-size:11px!important; line-height:1.5; text-decoration:none; }
.cc-download { background:#b793ff1a; border-color:#b793ff4d; color:#e6d4ff!important; font-weight:650!important; }
.cc-action:hover,.cc-download:hover { background:#ffffff0c; }
.cc-action svg,.cc-download svg { width:14px; height:14px; }
.cc-main>.cc-composer.aim-studio-card {
  position:relative; flex:0 0 auto; width:min(820px,calc(100% - 40px))!important; min-width:0;
  margin:0 auto 18px!important; border:1px solid #ffffff21!important; border-radius:15px!important;
  background:#1c1c23!important; box-shadow:0 6px 24px #00000018!important; overflow:visible!important;
}
.cc-composer .cc-composer-inner.aim-studio-input { display:block!important; padding:12px 14px 9px!important; }
.cc-composer textarea[data-prompt] {
  display:block; width:100%; min-height:60px!important; max-height:150px!important; height:64px;
  padding:4px 2px 6px; border:0!important; outline:none; resize:vertical; box-shadow:none!important;
  color:#eeeaf4!important; background:transparent!important; font-size:14px!important; line-height:1.6;
}
.cc-composer textarea[data-prompt]::placeholder { color:#92909f; }
.cc-composer-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.cc-model { display:flex; align-items:center; min-width:0; max-width:240px; flex:1 1 145px; gap:5px; }
.cc-model>span { display:none; }
.cc-model select { width:100%; min-width:0; max-width:100%; height:34px; padding:0 24px 0 8px; border:0; border-radius:7px; background:#24242b; color:#dbd6e5; font-size:12px!important; text-overflow:ellipsis; }
.cc-upload { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:34px; padding:0 8px; cursor:pointer; border-radius:7px; font-size:11px; color:#b9b2c8; }
.cc-upload:hover { background:#ffffff0a; }
.cc-upload input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.cc-upload:focus-within { outline:2px solid #cdb7ff; outline-offset:2px; }
.cc-upload svg { width:16px; height:16px; }
.cc-send { display:inline-flex; align-items:center; justify-content:center; gap:7px; margin-left:auto; min-height:36px; padding:0 13px; color:#21162f!important; background:#bea3fa; border:1px solid transparent; border-radius:9px; font-weight:650; font-size:12px!important; white-space:nowrap; }
.cc-send:hover { background:#cdb9fc; }
.cc-send svg { width:16px; height:16px; }
.cc-composer-note { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px; font-size:10px; color:#898493; margin:9px 2px 0; }
.cc-error { margin:10px 0 0; font-size:12px; color:#f8b6bf; }
.cc-file-preview { display:flex; align-items:center; gap:9px; min-width:0; border-bottom:1px solid var(--cc-line); margin:0 0 10px; padding-bottom:10px; }
.cc-file-preview>img { width:50px; height:50px; object-fit:cover; border-radius:8px; }
.cc-file-preview>audio { width:100%; min-width:0; max-width:350px; height:36px; }
.cc-file-preview>span { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-file-preview>button { margin-left:auto; background:transparent; border:0; padding:7px; color:#aaa2b9; }
.cc-audio-prompt { display:flex; gap:10px; align-items:center; padding:7px 0 16px; color:#bbb4c9; }
.cc-audio-prompt>span { display:grid; place-items:center; width:34px; height:34px; background:#ffffff06; border-radius:9px; color:#c8b2f3; }
.cc-audio-prompt p { margin:0; font-size:12px; }
.cc-audio-prompt>.is-recording { color:#f698a6; }
.cc-record { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:34px; padding:0 8px; border:0; background:transparent; color:#bbb4c9; font-size:11px!important; border-radius:7px; }
.cc-record svg { width:15px; height:15px; }
.cc-inspector { display:flex; flex-direction:column; min-width:0; min-height:0; border-left:1px solid var(--cc-line); background:#141419; }
.cc-inspector>header { display:flex; align-items:center; justify-content:space-between; padding:8px 14px; border-bottom:1px solid var(--cc-line); min-height:42px; }
.cc-inspector>header strong { font-size:12px; font-weight:600; }
.cc-inspector>header>button { display:none; }
.cc-inspector-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#49404f transparent; padding:16px 14px; }
.cc-inspector-section { display:grid; gap:12px; margin-bottom:10px; }
.cc-inspector h3 { font-size:12px; margin:0 0 1px; font-weight:600; }
.cc-fields { display:grid; gap:12px; }
.cc-field { display:grid; gap:5px; min-width:0; }
.cc-field>span { color:#a6a0b3; font-size:11px; }
.cc-workspace .cc-field :is(select,input,textarea) { display:block; width:100%; min-width:0; min-height:34px; padding:7px 9px; border:1px solid var(--cc-line); border-radius:7px; background:#1d1d24; font-size:12px; line-height:1.5; }
.cc-field textarea { resize:vertical; max-height:140px; }
.cc-hint { margin:0; font-size:10px; line-height:1.6; color:#8b8598; }
.cc-inspector :is(button:not(.cc-icon-button),.cc-studio-inline) { min-height:32px; padding:6px 10px; border:1px solid #ffffff1b; border-radius:7px; background:#24232d; color:#c8bfd8; font-size:11px; text-align:left; text-decoration:none; }
.cc-details { border-top:1px solid var(--cc-line); padding:12px 0; }
.cc-details>summary { cursor:pointer; color:#c8c1d6; font-size:12px; }
.cc-details>summary>span { color:#91869e; margin-left:7px; }
.cc-details-body { display:grid; gap:12px; padding-top:14px; }
.cc-shots { display:grid; gap:5px; }
.cc-shot { display:flex; border:1px solid transparent; border-radius:8px; }
.cc-shot.is-active { border-color:#aa89df70; background:#ab89df0d; }
.cc-shot>button:first-child { flex:1; border:0; background:transparent; display:flex; justify-content:space-between; gap:6px; }
.cc-shot strong { font-size:11px; }
.cc-shot small { color:#94889f; font-size:10px; }
.cc-inline-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.cc-inline-actions>span { font-size:11px; }
.cc-history { position:absolute; top:54px; right:12px; bottom:12px; z-index:30; display:flex; flex-direction:column; min-height:0; width:min(330px,calc(100% - 24px)); padding:14px; background:#1a1922; border:1px solid #ffffff24; border-radius:12px; box-shadow:0 14px 55px #00000066; }
.cc-history>header { display:flex; align-items:center; justify-content:space-between; }
.cc-history>p { color:#aaa2b7; font-size:11px; line-height:1.6; margin:8px 0 15px; }
.cc-history-list { flex:1; min-height:0; overflow:auto; }
.cc-history-list>button { display:block; width:100%; text-align:left; padding:9px; margin-bottom:5px; border:1px solid #ffffff0e; border-radius:8px; background:#ffffff03; font-size:12px; color:#d1cadc; }
.cc-history-list>button>span { display:block; font-size:10px; color:#9e8ab8; }
.cc-history-list>p { color:#aaa2b7; font-size:12px; }
.cc-history>footer { display:flex; justify-content:space-between; gap:8px; padding-top:12px; border-top:1px solid var(--cc-line); }
.cc-history>footer>button { min-height:34px; padding:6px 9px; border:1px solid var(--cc-line); border-radius:8px; background:transparent; font-size:11px; }
.cc-state { display:grid; place-content:center; min-height:0; padding:24px; gap:12px; text-align:center; color:#aaa2b7; font-size:13px; }
.cc-state h1 { margin:0; font-size:20px; }
.cc-state button { min-height:40px; padding:8px 16px; border:1px solid #b793ff4d; border-radius:8px; background:#b793ff1a; }
.cc-sr { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.cc-composer.aim-creato-drop-active { outline:2px dashed #bea3fa; outline-offset:3px; }
/* Shared help widgets shouldn't mask a message field in the compact editor. */
body.creato-compact-active .support-launcher { bottom:12px!important; right:12px!important; width:36px!important; height:36px!important; }
body.creato-compact-active .ops-help-container { display:none!important; }
body.creato-compact-active .aim-pwa-install-launcher { bottom:9px!important; right:56px!important; font-size:10px!important; min-height:28px!important; padding:0 8px!important; }
body.creato-compact-active:has(.cc-history:not([hidden])) :is(.support-launcher,.aim-pwa-install-launcher) { visibility:hidden!important; }
@media (min-width:1051px) { .cc-settings-toggle { display:none; } }

@media (max-width:1050px) {
  body.creato-compact-active:has(.cc-workspace.settings-open) :is(.support-launcher,.aim-pwa-install-launcher) { visibility:hidden!important; }
  .cc-workspace.has-inspector .cc-body { grid-template-columns:minmax(0,1fr); }
  .cc-workspace .cc-inspector { display:none; position:absolute; right:8px; top:100px; bottom:8px; z-index:25; width:min(300px,calc(100% - 16px)); border:1px solid #ffffff24; border-radius:12px; box-shadow:0 18px 55px #00000070; }
  .cc-workspace.settings-open .cc-inspector { display:flex; }
  .cc-inspector>header>button { display:inline-flex; }
}
@media (max-width:599px) {
  .cc-workspace { grid-template-rows:50px 45px minmax(0,1fr); }
  .cc-workspace.is-loading { grid-template-rows:50px minmax(0,1fr); }
  .cc-header { padding:0 12px; gap:10px; }
  .cc-brand { gap:6px; }
  .cc-brand strong { font-size:15px; }
  .cc-brand img { width:24px; height:24px; }
  .cc-workspace .cc-studio { min-height:34px; padding:0 8px; gap:5px; font-size:11px; }
  .cc-studio>svg:first-child { width:15px; height:15px; }
  .cc-studio>svg:last-child { display:none; }
  .cc-history-toggle { width:32px; min-width:32px; padding:0; }
  .cc-history-toggle>span { display:none; }
  .cc-toolbar { padding:0 8px; gap:4px; }
  .cc-mode { padding:0 9px; min-height:42px; font-size:12px!important; }
  .cc-workspace :is(.cc-send,.cc-record,.cc-upload,.cc-download,.cc-action) { min-height:40px; }
  .cc-settings-toggle { padding:0 5px; min-width:40px; min-height:40px; }
  .cc-settings-toggle>span { display:none; }
  .cc-empty { padding:14px 18px; gap:8px; }
  .cc-empty h1 { font-size:22px!important; }
  .cc-empty>p { font-size:12px; max-width:300px; }
  .cc-empty>img { width:30px; height:30px; margin:0; }
  .cc-examples { gap:6px; margin-top:8px; width:100%; }
  .cc-example { font-size:10px!important; max-width:260px; padding:7px 9px; }
  .cc-main>.cc-composer.aim-studio-card { width:calc(100% - 20px)!important; margin:0 auto max(48px,env(safe-area-inset-bottom))!important; border-radius:13px!important; }
  .cc-composer .cc-composer-inner.aim-studio-input { padding:9px 10px 8px!important; }
  .cc-composer textarea[data-prompt] { min-height:46px!important; height:54px; max-height:110px!important; font-size:16px!important; line-height:1.45; }
  .cc-model { flex:1 1 140px; max-width:none; }
  .cc-model select { height:38px; font-size:16px!important; }
  .cc-inspector :is(input,textarea,select) { font-size:16px!important; min-height:38px; }
  .cc-composer-toolbar { gap:5px; }
  .cc-upload { padding:0 5px; }
  .cc-upload>span { display:none; }
  .cc-send { min-height:36px; padding:0 9px; font-size:11px!important; gap:4px; }
  .cc-send svg { width:14px; height:14px; }
  .cc-composer-note { font-size:9px; margin-top:7px; }
  .cc-composer-note>span:last-child { display:none; }
  .cc-record { font-size:10px!important; padding:0 4px; }
  .cc-results { padding:16px 16px 4px; }
  .cc-message { font-size:14px; margin-bottom:18px; }
  .cc-media { max-height:270px!important; }
  .cc-file-preview>audio { height:34px; }
  .cc-file-preview:has(audio)>span { display:none; }
  .cc-history { top:50px; }
}
@media (min-width:360px) and (max-width:599px) {
  .cc-settings-toggle>span { display:inline; font-size:11px; }
  .cc-settings-toggle svg { width:14px; height:14px; }
}
@media (max-height:660px) {
  .cc-examples { display:none; }
  .cc-empty { gap:6px; padding-block:12px; }
  .cc-empty>img { display:none; }
  .cc-empty h1 { font-size:20px!important; }
}
@media (prefers-reduced-motion:reduce) {
  .cc-workspace * { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}
