@property --s5-settings-width {
  syntax: '<length>';
  inherits: true;
  initial-value: 380px;
}

body.studio-app {
  --agent-panel-width: 0px;
}

body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) #ideas-container,
body.studio-app.studio-agent-entering:not(.ai-generate-mode) #ideas-container,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .s1-make-idea,
body.studio-app.studio-agent-entering:not(.ai-generate-mode) .s1-make-idea {
  right: var(--agent-panel-width) !important;
  top: 128px !important;
  bottom: 16px !important;
  width: auto !important;
}

body.studio-app.studio-agent-entering:not(.ai-generate-mode) #chatBar.chat-container,
body.studio-app.studio-agent-entering:not(.ai-generate-mode) #s2-chatBar.chat-container,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) #chatBar.chat-container,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) #s2-chatBar.chat-container {
  transform: translateY(110%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) #stage-2 #stage2-flow {
  padding-bottom: 16px !important;
}

.s1-agent-layout-slot {
  display: none;
  position: fixed;
  top: 86px;
  right: calc(var(--agent-panel-width, 0px) + 16px);
  z-index: 35;
}

body.studio-app.studio-agent-entering:not(.ai-generate-mode) .s1-agent-layout-slot.is-on,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .s1-agent-layout-slot.is-on,
html:not(.app-phone) body.studio-early-agent .s1-agent-layout-slot.is-on {
  display: flex;
}

.s1-agent-layout-slot .view-toggle-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: none;
}

.s1-agent-layout-slot .view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: none;
  color: #fff;
}

.s1-agent-layout-slot .s1-layout-chat,
.s1-agent-layout-slot .s1-layout-cols,
.s1-agent-layout-slot .s1-layout-rows,
.s1-agent-layout-slot .s1-layout-masonry,
#chatBar .s1-layout-chat,
#chatBar .s1-layout-cols,
#chatBar .s1-layout-rows,
#chatBar .s1-layout-masonry {
  display: none;
}

#s1-layout-btn[data-layout="vertical"] .s1-layout-chat,
#s1-layout-btn[data-layout="horizontal"] .s1-layout-cols,
#s1-layout-btn[data-layout="masonry"] .s1-layout-masonry {
  display: block;
}

#stage-1:not(.active) .s1-agent-layout-slot {
  display: none !important;
}

.studio-agent-panel {
  position: relative;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(48px);
  background: #0a0a0c;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #e8e8ed;
  transition:
    flex-basis 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

body.studio-app.studio-agent-entering:not(.ai-generate-mode) .studio-agent-panel,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .studio-agent-panel {
  flex: 0 0 var(--agent-panel-width);
  width: var(--agent-panel-width);
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  overflow: visible;
  z-index: 10020;
}

body.studio-app.studio-agent-entering:not(.ai-generate-mode) .s3-modal.active,
body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .s3-modal.active {
  left: 0;
  right: var(--agent-panel-width, 0px);
  width: auto;
}

.studio-agent-resize {
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: 2;
}

.studio-agent-header {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
  overflow: visible;
  position: relative;
  z-index: 6;
}

.studio-agent-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font: 600 13px/1.2 var(--font-main, system-ui);
  letter-spacing: 0.02em;
}

.studio-agent-title > #studioAgentTitle {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-agent-history-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8e8ed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.studio-agent-history-btn:hover,
.studio-agent-history-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-history-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.studio-agent-history-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 8px;
  right: 8px;
  width: auto;
  max-height: min(360px, 52vh);
  overflow: auto;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161618;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.studio-agent-history-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-agent-history-item {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d2d2d7;
  font: 500 13px/1.25 var(--font-main, system-ui);
  text-align: start;
  cursor: pointer;
}

.studio-agent-history-item:hover,
.studio-agent-history-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-history-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-agent-history-when {
  flex: 0 0 auto;
  color: #8e8e96;
  font-size: 11px;
}

.studio-agent-history-empty {
  padding: 10px 12px;
  color: #8e8e96;
  font: 500 12px/1.4 var(--font-main, system-ui);
}

.studio-agent-stage {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #b8b8c0;
  font: 500 11px/1.2 var(--font-main, system-ui);
  white-space: nowrap;
}

.studio-agent-icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f2f2f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.studio-agent-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-icon-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.studio-agent-collapse {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.studio-agent-collapse:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.studio-agent-collapse svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.studio-agent-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-agent-thread[hidden],
.studio-agent-gen-blank[hidden] {
  display: none !important;
}

.studio-agent-gen-blank {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8e8e96;
  font: 400 13px/1.5 var(--font-main, system-ui);
}

.studio-agent-gen-blank strong {
  display: block;
  color: #f2f2f5;
  font-weight: 600;
  margin-bottom: 6px;
}

.studio-agent-empty {
  margin: auto 8px;
  text-align: center;
  color: #8e8e96;
  font: 400 13px/1.5 var(--font-main, system-ui);
}

.studio-agent-empty strong {
  display: block;
  color: #f2f2f5;
  font-weight: 600;
  margin-bottom: 6px;
}

.studio-agent-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  user-select: text;
}

.studio-agent-msg[data-role="user"] {
  align-items: flex-end;
}

.studio-agent-msg[data-role="assistant"] {
  align-items: flex-start;
}

.studio-agent-msg-body {
  min-width: 0;
  max-width: 100%;
  font: 400 14.5px/1.65 var(--font-main, system-ui);
  color: #ececf1;
  white-space: pre-wrap;
  word-break: break-word;
  unicode-bidi: isolate;
}

.studio-agent-msg-body[dir="rtl"] {
  text-align: right;
}

.studio-agent-msg-body[dir="ltr"] {
  text-align: left;
}

.studio-agent-msg[data-role="assistant"][data-dir="rtl"] .studio-agent-msg-actions {
  justify-content: flex-end;
}

.studio-agent-msg-media {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.studio-agent-msg-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.studio-agent-msg-thumb img,
.studio-agent-msg-media-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-agent-msg-media-icon {
  display: grid;
  place-items: center;
  color: #f2f2f4;
  font-size: 16px;
}

.studio-agent-msg[data-role="user"] .studio-agent-msg-body {
  max-width: min(100%, 92%);
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-agent-msg[data-role="assistant"] .studio-agent-msg-body {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
}

.studio-agent-msg-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.studio-agent-msg[data-role="user"] .studio-agent-msg-actions {
  justify-content: flex-end;
}

.studio-agent-msg[data-role="assistant"] .studio-agent-msg-actions {
  justify-content: flex-start;
}

.studio-agent-act {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6e6e73;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.studio-agent-act svg {
  width: 15px;
  height: 15px;
}

.studio-agent-act:hover {
  color: #d2d2d7;
  background: rgba(255, 255, 255, 0.06);
}

.studio-agent-act.is-copied {
  color: #7ddea5;
}

.studio-agent-edit-card {
  width: min(100%, 92%);
  padding: 10px 10px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-agent-edit-input {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 240px;
  margin: 0;
  padding: 4px 6px 10px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: #f5f5f7;
  font: 400 14.5px/1.5 var(--font-main, system-ui);
}

.studio-agent-edit-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.studio-agent-edit-cancel {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a9aa3;
  cursor: pointer;
  font: 500 12px/1 var(--font-main, system-ui);
}

.studio-agent-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-agent-tool {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #c9c9d1;
  font: 500 12px/1.3 var(--font-main, system-ui);
}

.studio-agent-tool-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-agent-tool.has-review .studio-agent-tool-head {
  cursor: pointer;
  user-select: none;
}

.studio-agent-tool-review {
  padding: 2px 0 0 21px;
  color: #9a9aa3;
  font: 400 12px/1.45 var(--font-main, system-ui);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.studio-agent-tool.is-collapsed .studio-agent-tool-review {
  display: none;
}

.studio-agent-tool[data-ok="false"] {
  border-color: rgba(255, 90, 90, 0.35);
  color: #ffb4b4;
}

.studio-agent-tool svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.studio-agent-thinking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px 10px;
}

.studio-agent-thinking[hidden] {
  display: none !important;
}

.studio-agent-thinking-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-top: 2px;
}

.studio-agent-thinking-label {
  margin-inline-end: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #8e8e93;
  background: linear-gradient(
    105deg,
    #6e6e73 0%,
    #6e6e73 38%,
    #f5f5f7 50%,
    #6e6e73 62%,
    #6e6e73 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: studio-agent-think-shine 1.7s ease-in-out infinite;
}

.studio-agent-thinking i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e8e93;
  animation: studio-agent-think-dot 1s infinite ease-in-out;
}

.studio-agent-thinking i:nth-of-type(1) { animation-delay: 0s; }
.studio-agent-thinking i:nth-of-type(2) { animation-delay: 0.15s; }
.studio-agent-thinking i:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes studio-agent-think-shine {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

@keyframes studio-agent-think-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.studio-agent-cancel {
  margin-left: 4px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: #d2d2d7;
  font: 500 12px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-error {
  display: none;
  margin: 0 14px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 71, 87, 0.12);
  color: #ffb4b4;
  font: 500 12px/1.4 var(--font-main, system-ui);
}

.studio-agent-error.is-on {
  display: block;
}

.studio-agent-composer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 8px 12px 16px;
}

.studio-agent-autospend {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 8px;
  cursor: pointer;
  user-select: none;
  color: #9a9aa3;
}

.studio-agent-autospend input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.studio-agent-autospend-box {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: transparent;
  display: grid;
  place-items: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.studio-agent-autospend-box svg {
  width: 11px;
  height: 11px;
}

.studio-agent-autospend.is-on .studio-agent-autospend-box,
.studio-agent-autospend input:checked + .studio-agent-autospend-box {
  background: #f5f5f7;
  border-color: #f5f5f7;
  color: #111;
  box-shadow: 0 0 0 3px rgba(245, 245, 247, 0.08);
}

.studio-agent-autospend-copy {
  display: flex;
  min-width: 0;
}

.studio-agent-autospend-copy strong {
  font: 600 11.5px/1.25 var(--font-main, system-ui);
  color: #d8d8de;
  letter-spacing: 0.01em;
}

.studio-agent-autospend-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 22, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  color: #d8d8de;
  font: 400 11.5px/1.45 var(--font-main, system-ui);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  transition-delay: 0s;
}

.studio-agent-autospend:hover .studio-agent-autospend-tip,
.studio-agent-autospend:focus-within .studio-agent-autospend-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.45s;
}

.studio-agent-autospend:hover .studio-agent-autospend-copy strong {
  color: #f5f5f7;
}

.studio-agent-autospend:focus-within .studio-agent-autospend-box {
  box-shadow: 0 0 0 3px rgba(245, 245, 247, 0.18);
}

.studio-agent-spend {
  margin: 0;
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.86);
  box-shadow: none;
}

.studio-agent-spend[hidden] {
  display: none !important;
}

.studio-agent-spend-kicker {
  margin: 0 0 6px;
  font: 600 10px/1 var(--font-main, system-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e93;
}

.studio-agent-spend-summary {
  margin: 0;
  font: 600 13px/1.35 var(--font-main, system-ui);
  color: #f5f5f7;
}

.studio-agent-spend-cost {
  margin: 6px 0 0;
  font: 400 12px/1.4 var(--font-main, system-ui);
  color: #b4b4bb;
}

.studio-agent-spend-cost strong {
  color: #fff;
  font-weight: 650;
}

.studio-agent-spend-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.studio-agent-spend-cancel,
.studio-agent-spend-confirm {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font: 600 12px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-spend-cancel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #d2d2d7;
}

.studio-agent-spend-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-spend-confirm {
  border: 0;
  background: #f5f5f7;
  color: #111;
}

.studio-agent-spend-confirm:hover {
  background: #fff;
}

.studio-agent-spend-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f7;
}

.studio-agent-panel.is-generate .studio-agent-autospend,
.studio-agent-panel.is-generate .studio-agent-spend,
.studio-agent-panel.is-prompter .studio-agent-autospend,
.studio-agent-panel.is-prompter .studio-agent-spend {
  display: none !important;
}

.studio-agent-form {
  position: relative;
  padding: 8px;
  cursor: text;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.72);
  box-shadow: none;
  overflow: visible;
}

.studio-agent-form:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
}

.studio-agent-form-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.studio-agent-plus,
.studio-agent-expand {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8e8e93;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.studio-agent-plus svg,
.studio-agent-expand svg {
  width: 18px;
  height: 18px;
}

.studio-agent-plus:hover,
.studio-agent-expand:hover {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.08);
}

.studio-agent-expand {
  display: none;
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
}

.studio-agent-expand[hidden] {
  display: none !important;
}

.studio-agent-collapse-icon {
  display: none;
}

.studio-agent-form-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

textarea.studio-agent-input,
textarea.studio-agent-input:hover,
textarea.studio-agent-input:focus,
textarea.studio-agent-input:focus-visible,
textarea.studio-agent-input:active {
  flex: 1;
  width: auto !important;
  min-width: 0;
  min-height: 24px;
  max-height: 180px;
  height: 24px;
  padding: 0 4px !important;
  margin: 0;
  border: 0 !important;
  outline: 0 !important;
  resize: none;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  caret-color: #f5f5f7;
  color: #f5f5f7;
  font: 400 14.5px/24px var(--font-main, system-ui);
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-appearance: none;
  appearance: none;
}

textarea.studio-agent-input::placeholder {
  color: #6e6e73;
}

.studio-agent-mode-wrap {
  position: relative;
  flex-shrink: 0;
}

.studio-agent-mode-btn {
  height: 36px;
  padding: 0 6px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f5f7;
  font: 500 13px/1 var(--font-main, system-ui);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.studio-agent-mode-btn svg {
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

.studio-agent-mode-btn:hover {
  color: #fff;
}

.studio-agent-mode-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 128px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161618;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.studio-agent-mode-wrap.is-open .studio-agent-mode-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-agent-mode-menu button {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d2d2d7;
  font: 500 13px/1 var(--font-main, system-ui);
  text-align: start;
  cursor: pointer;
}

.studio-agent-mode-menu button:hover,
.studio-agent-mode-menu button.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #6e6e73;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.studio-agent-send svg {
  width: 16px;
  height: 16px;
}

.studio-agent-send:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.studio-agent-send.is-ready:not(:disabled) {
  background: #f5f5f7;
  border-color: #f5f5f7;
  color: #111;
}

.studio-agent-send:disabled {
  opacity: 0.35;
  cursor: default;
}

.studio-agent-form.is-multiline {
  padding: 10px 10px 8px;
}

.studio-agent-form.is-multiline .studio-agent-form-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "input input input"
    "plus . actions";
  align-items: center;
  column-gap: 4px;
  row-gap: 2px;
}

.studio-agent-form.is-multiline textarea.studio-agent-input {
  grid-area: input;
  width: 100% !important;
  height: auto;
  max-height: 180px;
  padding: 8px 40px 10px 8px !important;
  line-height: 1.45;
  overflow-y: auto;
}

.studio-agent-form.is-multiline .studio-agent-plus {
  grid-area: plus;
}

.studio-agent-form.is-multiline .studio-agent-form-actions {
  grid-area: actions;
}

.studio-agent-form.is-multiline .studio-agent-expand {
  display: grid;
}

.studio-agent-form.is-expanded .studio-agent-expand-icon {
  display: none;
}

.studio-agent-form.is-expanded .studio-agent-collapse-icon {
  display: block;
}

.studio-agent-form.is-expanded textarea.studio-agent-input {
  min-height: min(36vh, 280px);
  max-height: min(48vh, 360px);
}

.studio-agent-toggle {
  position: fixed;
  top: auto;
  bottom: 14%;
  right: 0;
  z-index: 50;
  height: auto;
  width: auto;
  margin: 0;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: #141416;
  color: #f2f2f5;
  font: 600 12px/1.15 var(--font-main, system-ui);
  letter-spacing: 0.02em;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  transform: translateX(calc(100% - 4.4em));
  transition: transform 0.22s cubic-bezier(0.22, 0.7, 0.25, 1);
}

.studio-agent-toggle-keep,
.studio-agent-toggle-rest {
  display: inline;
}

.studio-agent-toggle-swap {
  display: none;
}

.studio-agent-toggle:hover,
.studio-agent-toggle:focus-visible {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .studio-agent-toggle {
    transition: none;
    animation: none;
  }

  html:has(body.studio-agent-frame-animate),
  html:not(.app-phone) body.studio-early-agent.studio-agent-frame-animate .s5-settings-panel,
  html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-short,
  html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-full {
    transition: none;
    animation: none;
  }
}

body.studio-app.studio-agent-available:not(.studio-agent-open):not(.ai-generate-mode):not(.studio-agent-docked) .studio-agent-toggle {
  display: inline-flex;
}

body.studio-agent-docked .studio-agent-toggle {
  display: none !important;
}

body.studio-agent-docked .s5-agent-host .studio-agent-panel.is-docked,
.s5-agent-host .studio-agent-panel.is-docked {
  position: relative !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 1 !important;
}

.studio-agent-panel.is-docked .studio-agent-resize {
  display: none !important;
}

body.studio-app.studio-agent-entering .studio-agent-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  body.studio-app.studio-agent-entering:not(.ai-generate-mode) .studio-agent-panel,
  body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .studio-agent-panel {
    flex-basis: min(100vw, 380px);
    width: min(100vw, 380px);
  }
}

.studio-agent-form.is-generate {
  overflow: hidden;
}

.studio-agent-form.is-generate .studio-agent-mode-wrap {
  display: none !important;
}

.studio-agent-form.is-generate .studio-agent-plus {
  display: none;
}

.studio-agent-form.is-generate textarea.studio-agent-input,
.studio-agent-form.is-generate textarea.studio-agent-input:hover,
.studio-agent-form.is-generate textarea.studio-agent-input:focus,
.studio-agent-form.is-generate textarea.studio-agent-input:focus-visible {
  min-height: 44px;
  max-height: 120px;
  height: auto;
  line-height: 22px;
  overflow-y: auto;
}

.studio-agent-attach {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 8px;
}

.studio-agent-attach[hidden] {
  display: none !important;
}

.studio-agent-attach-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #16161c;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.studio-agent-attach-thumb img,
.studio-agent-attach-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-agent-attach-icon {
  display: grid;
  place-items: center;
  color: #f2f2f4;
  font-size: 18px;
}

.studio-agent-attach-thumb.is-pending {
  opacity: 0.62;
}

.studio-agent-attach-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  cursor: pointer;
}

#studioAgentPanel.is-gallery-drop .studio-agent-form,
#studioAgentPanel.is-file-drop .studio-agent-form {
  outline: 1px dashed rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.studio-agent-gen-refs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 8px;
}

.studio-agent-gen-refs[hidden] {
  display: none !important;
}

.studio-agent-gen-thumb,
.studio-agent-gen-add {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  color: #c7c7cc;
  cursor: pointer;
}

.studio-agent-gen-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-agent-gen-thumb-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 16px;
}

.studio-agent-gen-thumb-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

.studio-agent-gen-add {
  display: grid;
  place-items: center;
}

.studio-agent-gen-add svg {
  width: 16px;
  height: 16px;
}

.studio-agent-gen-add-wrap {
  position: relative;
}

.studio-agent-gen-add-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 132px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1c1e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.studio-agent-gen-add-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-agent-gen-add-menu button {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f5f5f7;
  text-align: left;
  font: 600 12px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-gen-add-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.studio-agent-surface-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 0 2px;
}

.studio-agent-surface-row[hidden] {
  display: none !important;
}

.studio-agent-surface-tabs {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.studio-agent-surface-tabs button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9a9aa0;
  font: 600 13px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-surface-tabs button:hover {
  color: #f5f5f7;
}

.studio-agent-surface-tabs button.is-active {
  background: #f5f5f7;
  color: #111;
}

.studio-agent-gen-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.studio-agent-gen-filters[hidden] {
  display: none !important;
}

.studio-agent-chip-wrap {
  position: relative;
  flex: 0 1 auto;
  max-width: 100%;
}

.studio-agent-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f5f5f7;
  font: 600 12px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-chip-btn > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-agent-chip-wrap svg,
.studio-agent-chip-btn svg {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
  opacity: 0.7;
}

.studio-agent-chip-btn .smp-trigger-icon,
.studio-agent-chip-btn img.ai-model-logo {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: contain;
  opacity: 1;
}

.studio-agent-chip-wrap.is-model .studio-agent-chip-btn {
  max-width: 220px;
}

.studio-agent-chip-wrap.is-open {
  z-index: 8;
}

.studio-agent-chip-menu {
  display: none !important;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: max(100%, 112px);
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1c1e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.studio-agent-chip-menu[hidden] {
  display: none !important;
}

.studio-agent-chip-wrap.is-open .studio-agent-chip-menu:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
}

.studio-agent-chip-menu button {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8d8dc;
  text-align: left;
  font: 600 12px/1 var(--font-main, system-ui);
  cursor: pointer;
}

.studio-agent-chip-menu button:hover,
.studio-agent-chip-menu button.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.studio-agent-gen-credits {
  margin-left: auto;
  padding: 0 4px;
  color: #8e8e93;
  font: 600 12px/28px var(--font-main, system-ui);
}

/* One left frame for desktop movie stages 1–5. Stage 5 only adds media tabs. */
html:not(.app-phone) body.studio-early-agent .s5-settings-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--studio-rail-width, 76px);
  width: var(--s5-agent-frame-width, 380px) !important;
  height: 100dvh !important;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
  z-index: 30;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

html:has(body.studio-agent-frame-animate) {
  transition: --s5-settings-width 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

html:has(body.studio-agent-frame-resizing),
html:has(body.s5-resizing-col) {
  transition: none !important;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-animate .s5-settings-panel {
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

html.studio-agent-frame-boot-collapsed:not(.app-phone) body.studio-early-agent .s5-settings-panel,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .s5-settings-panel {
  transform: translateX(calc(-100% - var(--studio-rail-width, 76px) - 12px)) !important;
  pointer-events: none !important;
}

.studio-agent-frame-resize {
  display: none;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-frame-collapsed) .studio-agent-frame-resize {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  cursor: ew-resize;
  z-index: 8;
  touch-action: none;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-frame-collapsed) .studio-agent-frame-resize::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.16s ease;
}

html:not(.app-phone) body.studio-early-agent .studio-agent-frame-resize:hover::after,
body.studio-agent-frame-resizing .studio-agent-frame-resize::after {
  background: rgba(255, 255, 255, 0.55);
}

body.studio-agent-frame-resizing,
body.studio-agent-frame-resizing * {
  cursor: ew-resize !important;
  user-select: none !important;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle {
  display: inline-flex !important;
  position: fixed;
  left: var(--studio-rail-width, 76px);
  right: auto;
  top: 46%;
  bottom: auto;
  z-index: 46;
  width: 72px;
  height: 40px;
  margin: 0;
  padding: 0 12px 0 14px;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: #16161a;
  box-shadow: 8px 10px 28px rgba(0, 0, 0, 0.32);
  transform: translateY(-50%);
  transition: width 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s ease;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-peek .studio-agent-toggle {
  animation: studio-agent-peek-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:hover,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:focus-visible {
  width: 142px;
  transform: translateY(-50%);
  box-shadow: 12px 14px 32px rgba(0, 0, 0, 0.4);
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-keep,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-rest {
  display: none;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-swap {
  display: grid;
  align-items: center;
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-short,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-full {
  grid-area: 1 / 1;
  white-space: nowrap;
  transition: opacity 0.22s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle-full {
  opacity: 0;
  transform: translateX(-8px);
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:hover .studio-agent-toggle-short,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:focus-visible .studio-agent-toggle-short {
  opacity: 0;
  transform: translateX(8px);
}

html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:hover .studio-agent-toggle-full,
html:not(.app-phone) body.studio-early-agent.studio-agent-frame-collapsed .studio-agent-toggle:focus-visible .studio-agent-toggle-full {
  opacity: 1;
  transform: none;
}

@keyframes studio-agent-peek-in {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

html:not(.app-phone) body.studio-early-agent #mainHeader {
  margin-left: var(--s5-settings-width, 380px);
  width: auto;
}

html:not(.app-phone) body.studio-early-agent .stages-container > .stage:not(#stage-5) {
  left: var(--s5-settings-width, 380px);
  width: calc(100% - var(--s5-settings-width, 380px)) !important;
}

html:not(.app-phone) body.studio-early-agent #stage-5.active .s5-workspace {
  padding-left: var(--s5-settings-width, 380px);
}

html:not(.app-phone) body.studio-early-agent #stage-5.active:not(.s5-gallery-mode) .s5-editor-container {
  margin-left: 16px;
}

html:not(.app-phone) body.studio-early-agent #ideas-container,
html:not(.app-phone) body.studio-early-agent .s1-make-idea,
html:not(.app-phone) body.studio-early-agent .chat-container {
  left: calc(var(--studio-rail-width, 76px) + var(--s5-settings-width, 380px));
}

html:not(.app-phone) body.studio-early-agent #chatBar,
html:not(.app-phone) body.studio-early-agent #s2-chatBar {
  display: none !important;
}

html:not(.app-phone) body.studio-early-agent #ideas-container,
html:not(.app-phone) body.studio-early-agent .s1-make-idea {
  bottom: 16px !important;
}

html:not(.app-phone) body.studio-early-agent #stage-2 #stage2-flow {
  padding-bottom: 16px !important;
}

html:not(.app-phone) body.studio-early-agent .idea-card.idea-card-focused {
  left: calc(var(--studio-rail-width, 76px) + var(--s5-settings-width, 380px) + (100vw - var(--studio-rail-width, 76px) - var(--s5-settings-width, 380px)) / 2);
  width: min(700px, calc((100vw - var(--studio-rail-width, 76px) - var(--s5-settings-width, 380px) - 48px) * 0.8)) !important;
  max-width: min(700px, calc(100vw - var(--studio-rail-width, 76px) - var(--s5-settings-width, 380px) - 48px)) !important;
}

html:not(.app-phone) body.studio-early-agent .s5-settings-panel .s5-panel-handle-slot,
html:not(.app-phone) body.studio-early-agent .s5-settings-panel .s5-panel-drag-handle {
  display: none !important;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-tab[data-tab="image"],
html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-tab[data-tab="video"],
html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-tab[data-tab="audio"] {
  display: none !important;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-settings-panel .s5-tabs {
  justify-content: flex-start;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-settings-panel .s5-tabs .s5-tab[data-tab="agent"] {
  flex: 0 0 25%;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-settings-panel > .s5-history-list,
html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-settings-panel .s5-composer {
  display: none !important;
}

html:not(.app-phone) body.studio-early-agent:not(.studio-agent-media-tabs) .s5-settings-panel > .s5-agent-host {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

html:not(.app-phone) body.studio-early-agent .studio-agent-panel.is-docked .studio-agent-collapse {
  display: inline-flex !important;
}

html:not(.app-phone) body.studio-early-agent .studio-agent-panel.is-docked .studio-agent-collapse svg {
  transform: scaleX(-1);
}

.studio-agent-enhance {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
  padding: 10px;
  border-radius: 16px;
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-agent-enhance[hidden] {
  display: none !important;
}

.studio-agent-panel.is-enhance .studio-agent-composer {
  overflow: auto;
  max-height: 68%;
}

.studio-agent-enhance-attach {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-self: stretch;
  margin: 0 0 8px;
  padding: 10px;
  border-radius: 16px;
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-agent-enhance-meta,
.studio-agent-enhance-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-agent-enhance-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: #1c1c20;
  color: #ececee;
  font-size: 11px;
  font-weight: 600;
}

.studio-agent-enhance-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1c20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-agent-enhance-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-agent-enhance-kind {
  color: #d8d8de;
  font-size: 14px;
}

.studio-agent-enhance-source {
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d8d8de;
  font-size: 12.5px;
  line-height: 1.45;
  background: transparent;
  border: 0;
  padding: 0;
}

.studio-agent-enhance-source.is-empty {
  color: #6e6e73;
}

.studio-agent-enhance-suggest {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 4px 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: 500 13px/1.4 var(--font-main, system-ui);
  text-align: start;
  cursor: pointer;
}

.studio-agent-enhance-suggest:hover {
  color: #f5f5f7;
}

.studio-agent-enhance-suggest:disabled {
  opacity: 0.4;
  cursor: default;
}

.studio-agent-enhance-suggest[hidden] {
  display: none !important;
}

.studio-agent-enhance-use {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: 500 12.5px/1.3 var(--font-main, system-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.studio-agent-msg[data-enhance="1"][data-dir="rtl"] .studio-agent-enhance-use {
  align-self: flex-end;
}

.studio-agent-enhance-use:hover {
  color: #fff;
}
