/* Auto-split route-only subset from styles/studio-chat.css (zero external/cascade collisions). */
.studio-chat-switch-banner {
  position: fixed;
  left: max(14px, env(safe-area-inset-left, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  top: calc(var(--site-ops-banner-height, 0px) + var(--global-marketing-countdown-height, 0px) + var(--app-nav-height, 82px) + 10px);
  z-index: 48;
  min-height: 44px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--studio-chat-switch-border);
  border-radius: 18px;
  background: var(--studio-chat-switch-bg);
  color: var(--studio-chat-switch-text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  box-shadow: var(--studio-chat-switch-shadow);
  -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
  backdrop-filter: saturate(180%) blur(18px) !important;
}

.studio-chat-switch-banner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.studio-chat-switch-banner a,
.studio-chat-switch-banner button {
  height: 30px;
  border: 1px solid var(--studio-chat-switch-border);
  border-radius: 999px;
  background: var(--studio-chat-switch-action-bg);
  color: var(--studio-chat-switch-action-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.studio-chat-switch-banner a {
  padding: 0 12px;
}

.studio-chat-switch-banner button {
  width: 30px;
  padding: 0;
  cursor: pointer;
}

.message-files {
  --studio-chat-s1-0: rgba(17,17,17,0.08);
  --studio-chat-s1-1: rgba(17,17,17,0.04);
  --studio-chat-s1-2: #5F5F5A;
  --studio-chat-s1-3: #181818;
}

.message-files.dark {
  --studio-chat-s1-0: rgba(245,245,245,0.08);
  --studio-chat-s1-1: rgba(255,255,255,0.04);
  --studio-chat-s1-2: #C8CDD2;
  --studio-chat-s1-3: #F5F5F5;
}

.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.message-user-stack > .message-files {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.message-user-stack > .message-files .message-file-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message-file-card {
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--studio-chat-s1-0);
  background: var(--studio-chat-s1-1);
}

.message-file-card.natural {
  width: auto;
  height: auto;
  max-width: min(78vw, 420px);
  border-radius: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message-files.is-multi .message-file-card,
.message-file-card.square {
  width: 96px;
  height: 96px;
  aspect-ratio: 1 / 1;
}

.message-file-card img,
.message-file-card video {
  display: block;
  background: #111;
}

.message-file-card.natural img,
.message-file-card.natural video {
  width: 100%;
  height: auto;
  max-height: min(62vh, 480px);
  object-fit: contain;
  border-radius: 16px;
}

.message-file-card.square img,
.message-file-card.square video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-file-video-trigger {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 82px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111;
  color: white;
  cursor: pointer;
}

.message-file-video-trigger > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-file-video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #111;
  color: rgba(255, 255, 255, 0.68);
}

.message-file-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding-left: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
  transform: translate(-50%, -50%);
}

.message-file-generic {
  min-height: 82px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.message-file-generic strong {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--studio-chat-s1-2);
}

.message-file-generic span {
  font-size: 11px;
  line-height: 1.5;
  color: var(--studio-chat-s1-3);
  word-break: break-word;
}

@media (max-width: 720px) {
  .message-files:not(.is-multi) .message-file-card.natural {
    max-width: min(72vw, 300px);
  }

  .message-files:not(.is-multi) .message-file-card.natural img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(42dvh, 280px);
    object-fit: contain;
  }

  .message-files.is-multi .message-file-card,
  .message-file-card.square {
    width: 80px;
    height: 80px;
    border-radius: 13px;
  }

  .message-file-generic {
    min-height: 70px;
    padding: 8px;
  }

  .message-files.is-multi .message-file-generic,
  .message-file-card.square .message-file-generic {
    min-height: 80px;
  }
}

.generated-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.generated-media-actions button {
  min-height: 34px;
  border: 1px solid var(--studio-chat-s2-0);
  border-radius: 999px;
  background: var(--studio-chat-s2-1);
  color: var(--studio-chat-s2-2);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
}

.generated-media-actions button:hover {
  border-color: var(--studio-chat-s2-3);
  background: var(--studio-chat-s2-4);
}

.generated-export-menu {
  position: relative;
  display: inline-block;
}

.generated-export-menu-trigger {
  min-height: 34px;
  border: 1px solid var(--studio-chat-s2-0);
  border-radius: 999px;
  background: var(--studio-chat-s2-1);
  color: var(--studio-chat-s2-2);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  cursor: pointer;
  list-style: none;
}

.generated-media-frame {
  width: 100%;
}

.generated-media-frame.with-strip {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.generated-media-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: var(--generated-media-strip-max-height, min(72vh, 560px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
  scrollbar-width: none;
}

.generated-media-thumbs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.generated-media-thumbs.is-clipped {
  padding-bottom: 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent 100%);
}

.generated-media-thumb {
  width: 58px;
  height: 58px;
  aspect-ratio: 1 / 1;
  flex: 0 0 58px;
  border: 1px solid var(--studio-chat-s2-5);
  border-radius: 12px;
  background: var(--studio-chat-s2-6);
  padding: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.generated-media-thumb:hover {
  transform: translateY(-1px);
  border-color: var(--studio-chat-s2-7);
}

.generated-media-thumb:disabled {
  cursor: default;
}

.generated-media-thumb.pending {
  background: color-mix(in srgb, var(--studio-chat-s2-6) 92%, var(--studio-chat-s2-5));
  border-color: var(--studio-chat-s2-5);
}

.generated-media-thumb.pending:hover {
  transform: none;
  border-color: var(--studio-chat-s2-5);
}

.generated-media-thumb.active {
  border-color: var(--studio-chat-s2-2);
  box-shadow: 0 0 0 2px var(--studio-chat-s2-8);
}

.generated-media-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 9px;
}

.generated-media-preview,
.generated-media-placeholder {
  width: 100%;
  aspect-ratio: var(--generated-media-aspect, 1 / 1);
  min-height: 0;
  max-height: none;
  background:
    radial-gradient(ellipse 118% 106% at 30% 34%, #303d34 0%, #263129 28%, #1b241e 58%, #101511 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--studio-chat-s2-31);
  border-radius: 18px;
  padding: 0;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.generated-media-preview.video,
.generated-media-placeholder.video {
  max-height: none;
}

.generated-media-preview.image {
  max-height: none;
}

.generated-media-placeholder {
  isolation: isolate;
  transition:
    --generated-light-x 5200ms cubic-bezier(0.37, 0, 0.16, 1),
    --generated-light-y 5200ms cubic-bezier(0.37, 0, 0.16, 1),
    --generated-light-low-x 5600ms cubic-bezier(0.37, 0, 0.16, 1),
    --generated-light-low-y 5600ms cubic-bezier(0.37, 0, 0.16, 1),
    --generated-light-shift-x 5200ms cubic-bezier(0.37, 0, 0.16, 1),
    --generated-light-shift-y 5200ms cubic-bezier(0.37, 0, 0.16, 1);
}

.generated-media-placeholder.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 18px 58px rgba(8,10,9,0.18);
}

.generated-media-placeholder.active.image {
  aspect-ratio: var(--generated-media-aspect, 1 / 1);
  height: auto;
  min-height: 0;
  max-height: none;
  border-color: var(--studio-chat-s2-33);
}

.generated-media-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 122% 108% at 36% 40%, transparent 0%, transparent 42%, rgba(5,7,6,0.12) 72%, rgba(5,7,6,0.32) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 32%, rgba(0,0,0,0.09) 100%);
  opacity: 0.82;
  pointer-events: none;
}

.generated-media-placeholder::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 5;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05), transparent 22%, transparent 78%, rgba(0,0,0,0.08)),
    radial-gradient(ellipse 100% 86% at 36% 38%, transparent 0%, transparent 56%, rgba(0,0,0,0.22) 100%);
  pointer-events: none;
}

.generated-media-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 16px;
}

.generated-media-preview.image .generated-media-image {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 260ms ease, filter 260ms ease, transform 260ms ease;
}

.generated-media-preview.image.image-loading .generated-media-image {
  opacity: 0.08;
  filter: blur(18px) saturate(0.92);
  transform: scale(1.025);
}

.generated-media-preview.image.image-failed .generated-media-image {
  opacity: 0.22;
  filter: grayscale(1) blur(2px);
  transform: none;
}

.generated-media-load-haze {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px 12px;
  background: rgba(246, 246, 244, 0.18);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.generated-media-load-haze-copy {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(36, 38, 36, 0.72);
}

button.generated-media-preview {
  cursor: zoom-in;
}

button.generated-media-preview.video {
  cursor: pointer;
}

.generated-media-preview.video {
  background: #050505;
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 18px 54px rgba(8, 10, 9, 0.18);
}

.generated-media-preview.image.image-ready {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.generated-media-preview.image.image-ready .generated-media-image {
  border-radius: inherit;
}

.generated-media-video-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 30% 20%, var(--studio-chat-s2-13), transparent 34%),
    linear-gradient(135deg, var(--studio-chat-s2-14), var(--studio-chat-s2-15));
  color: var(--studio-chat-s2-2);
}

.generated-media-video-poster {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.generated-media-play {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  background: var(--studio-chat-s2-16);
  color: var(--studio-chat-s2-17);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 16px 40px var(--studio-chat-s2-18);
  z-index: 1;
}

.generated-media-video-thumb strong {
  z-index: 1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.generated-media-video-thumb em {
  z-index: 1;
  font-style: normal;
  color: var(--studio-chat-s2-19);
  font-size: 12px;
  font-weight: 700;
}

.generated-media-lightfield {
  position: absolute;
  inset: -28%;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 64% 64% at var(--generated-light-x, 50%) var(--generated-light-y, 34%), rgba(246,250,242,0.34) 0%, rgba(231,238,228,0.25) 24%, rgba(170,190,174,0.11) 52%, transparent 84%),
    radial-gradient(ellipse 42% 60% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 74%), rgba(238,244,236,0.16) 0%, rgba(162,181,166,0.07) 48%, transparent 86%),
    radial-gradient(ellipse 108% 96% at var(--generated-light-x, 50%) var(--generated-light-y, 46%), rgba(78,96,82,0.24) 0%, rgba(31,42,35,0.14) 48%, transparent 82%);
  filter: blur(34px);
  transform: scale(1.12);
  animation: generatedLightSearch 8.9s cubic-bezier(0.42, 0, 0.18, 1) infinite;
  pointer-events: none;
}

.generated-media-bridge-light,
.generated-media-halftone,
.generated-media-halftone::before,
.generated-media-halftone::after,
.generated-media-softgrain,
.generated-media-softgrain::before,
.generated-media-softgrain::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.generated-media-bridge-light {
  inset: -24%;
  z-index: 1;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 30% 38% at calc(var(--generated-light-x, 50%) + 7%) calc(var(--generated-light-y, 42%) + 5%), rgba(248,252,245,0.18) 0%, rgba(232,240,228,0.1) 38%, transparent 78%),
    radial-gradient(ellipse 22% 30% at calc(var(--generated-light-x, 50%) - 9%) calc(var(--generated-light-y, 42%) - 6%), rgba(248,252,245,0.12) 0%, transparent 72%);
  filter: blur(24px);
  opacity: 0.72;
  mix-blend-mode: screen;
  transform: translate3d(calc(0% - var(--generated-light-shift-x, 0%)), calc(0% - var(--generated-light-shift-y, 0%)), 0) scale(1.05);
  animation: generatedBridgeSearch 5.8s cubic-bezier(0.42, 0, 0.2, 1) infinite;
}

.generated-media-halftone {
  z-index: 1;
  background:
    radial-gradient(circle, rgba(229,236,228,0.2) 0 0.62px, transparent 1.02px),
    radial-gradient(circle, rgba(229,236,228,0.12) 0 0.42px, transparent 0.82px);
  background-size: 14px 14px, 14px 14px;
  background-position: 3px 4px, 10px 11px;
  opacity: 0.76;
  mix-blend-mode: screen;
  -webkit-mask-image:
    radial-gradient(ellipse 76% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 42%), #000 0%, rgba(0,0,0,0.94) 20%, rgba(0,0,0,0.58) 50%, rgba(0,0,0,0.18) 72%, transparent 90%),
    radial-gradient(ellipse 38% 52% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 78%), rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.22) 58%, transparent 84%);
  mask-image:
    radial-gradient(ellipse 76% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 42%), #000 0%, rgba(0,0,0,0.94) 20%, rgba(0,0,0,0.58) 50%, rgba(0,0,0,0.18) 72%, transparent 90%),
    radial-gradient(ellipse 38% 52% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 78%), rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.22) 58%, transparent 84%);
  -webkit-mask-composite: source-over;
  mask-composite: add;
  animation: generatedHalftoneSearch 7.4s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.generated-media-halftone::before {
  content: '';
  background:
    radial-gradient(circle, rgba(222,231,221,0.24) 0 1.95px, transparent 2.55px),
    radial-gradient(circle, rgba(222,231,221,0.14) 0 1.15px, transparent 1.7px);
  background-size: 22px 22px, 22px 22px;
  background-position: 8px 9px, 19px 20px;
  opacity: 0.72;
  -webkit-mask-image:
    radial-gradient(ellipse 42% 48% at var(--generated-light-x, 50%) var(--generated-light-y, 44%), #000 0%, rgba(0,0,0,0.9) 26%, rgba(0,0,0,0.22) 68%, transparent 88%),
    radial-gradient(ellipse 30% 38% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 78%), rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.18) 60%, transparent 84%);
  mask-image:
    radial-gradient(ellipse 42% 48% at var(--generated-light-x, 50%) var(--generated-light-y, 44%), #000 0%, rgba(0,0,0,0.9) 26%, rgba(0,0,0,0.22) 68%, transparent 88%),
    radial-gradient(ellipse 30% 38% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 78%), rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.18) 60%, transparent 84%);
}

.generated-media-halftone::after {
  content: '';
  background:
    radial-gradient(circle at 18% 26%, rgba(238,244,237,0.2) 0 1px, transparent 1.4px),
    radial-gradient(circle at 31% 17%, rgba(238,244,237,0.16) 0 1.5px, transparent 2px),
    radial-gradient(circle at 47% 34%, rgba(238,244,237,0.13) 0 1px, transparent 1.4px),
    radial-gradient(circle at 26% 57%, rgba(238,244,237,0.12) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 43% 72%, rgba(238,244,237,0.12) 0 1.35px, transparent 1.9px),
    radial-gradient(circle at 56% 23%, rgba(238,244,237,0.08) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 12% 68%, rgba(238,244,237,0.1) 0 0.8px, transparent 1.2px);
  opacity: 0.78;
  filter: blur(0.2px);
  -webkit-mask-image: radial-gradient(ellipse 70% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 46%), #000 0%, rgba(0,0,0,0.5) 50%, transparent 82%);
  mask-image: radial-gradient(ellipse 70% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 46%), #000 0%, rgba(0,0,0,0.5) 50%, transparent 82%);
}

.generated-media-softgrain {
  z-index: 2;
  background:
    radial-gradient(ellipse 92% 68% at var(--generated-light-x, 50%) var(--generated-light-y, 36%), rgba(246,250,244,0.12) 0%, rgba(246,250,244,0.052) 38%, transparent 78%),
    radial-gradient(ellipse 48% 56% at var(--generated-light-low-x, 50%) var(--generated-light-low-y, 78%), rgba(246,250,244,0.055) 0%, transparent 72%);
  filter: blur(16px);
  opacity: 0.9;
  transform: scale(1.02);
  animation: generatedSoftSearch 9.7s cubic-bezier(0.42, 0, 0.24, 1) infinite;
}

.generated-media-softgrain::before {
  content: '';
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.05) 0 1px, transparent 1.2px),
    radial-gradient(circle at 36% 44%, rgba(255,255,255,0.035) 0 1px, transparent 1.3px),
    radial-gradient(circle at 58% 66%, rgba(255,255,255,0.025) 0 0.8px, transparent 1.1px);
  background-size: 31px 29px, 43px 37px, 53px 47px;
  opacity: 0.42;
  -webkit-mask-image: radial-gradient(ellipse 88% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 46%), #000 0%, rgba(0,0,0,0.44) 50%, transparent 86%);
  mask-image: radial-gradient(ellipse 88% 76% at var(--generated-light-x, 50%) var(--generated-light-y, 46%), #000 0%, rgba(0,0,0,0.44) 50%, transparent 86%);
}

.generated-media-softgrain::after {
  content: '';
  inset: -18%;
  background:
    radial-gradient(ellipse 34% 42% at calc(var(--generated-light-x, 50%) + 12%) calc(var(--generated-light-y, 42%) + 4%), rgba(242,248,241,0.06) 0%, rgba(242,248,241,0.024) 36%, transparent 78%),
    radial-gradient(ellipse 24% 34% at calc(var(--generated-light-low-x, 50%) - 8%) calc(var(--generated-light-low-y, 78%) - 10%), rgba(242,248,241,0.044) 0%, rgba(242,248,241,0.016) 38%, transparent 76%);
  filter: blur(30px);
  opacity: 0.58;
  transform: translate3d(calc(0% - var(--generated-light-shift-x, 0%)), var(--generated-light-shift-y, 0%), 0) scale(1.08);
  animation: generatedSoftSweep 6.4s cubic-bezier(0.45, 0, 0.22, 1) infinite;
}

.generated-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.generated-media-head strong {
  font-size: 14px;
  color: var(--studio-chat-s2-2);
}

.generated-media-head span {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--studio-chat-s2-27);
  color: var(--studio-chat-s2-19);
  font-size: 12px;
}

.generated-media-placeholder-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 12px 13px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: rgba(247,250,247,0.92);
  isolation: isolate;
}

.generated-media-placeholder-copy::before {
  content: '';
  position: absolute;
  inset: -12px -8px -10px -8px;
  z-index: -1;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 78% 88% at 26% 28%, rgba(18,24,20,0.82) 0%, rgba(18,24,20,0.72) 38%, rgba(18,24,20,0.32) 72%, transparent 100%),
    radial-gradient(ellipse 50% 82% at 74% 66%, rgba(8,12,10,0.62) 0%, rgba(8,12,10,0.28) 56%, transparent 100%);
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.07),
    inset 0 20px 48px rgba(255,255,255,0.025),
    0 18px 52px rgba(0,0,0,0.2);
  -webkit-mask-image: radial-gradient(ellipse 112% 112% at 38% 50%, #000 0%, rgba(0,0,0,0.96) 54%, rgba(0,0,0,0.42) 83%, transparent 100%);
  mask-image: radial-gradient(ellipse 112% 112% at 38% 50%, #000 0%, rgba(0,0,0,0.96) 54%, rgba(0,0,0,0.42) 83%, transparent 100%);
}

.generated-media-placeholder-copy::after {
  content: '';
  position: absolute;
  inset: -6px -2px -4px -2px;
  z-index: -1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 32%, rgba(240,247,239,0.12) 0 1px, transparent 1.4px),
    radial-gradient(circle at 44% 72%, rgba(240,247,239,0.08) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 68% 28%, rgba(240,247,239,0.07) 0 1px, transparent 1.4px);
  background-size: 23px 21px, 31px 27px, 37px 33px;
  opacity: 0.38;
  -webkit-mask-image: radial-gradient(ellipse 110% 94% at 34% 48%, #000 0%, rgba(0,0,0,0.48) 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 110% 94% at 34% 48%, #000 0%, rgba(0,0,0,0.48) 60%, transparent 100%);
}

.generated-media-placeholder-copy .generated-media-head {
  margin-bottom: 7px;
}

.generated-media-placeholder-copy .generated-media-head strong {
  color: #F7FAF7;
}

.generated-media-placeholder-copy .generated-media-head span {
  background: rgba(247,250,247,0.12);
  color: rgba(247,250,247,0.76);
}

.generated-media-placeholder-copy p {
  margin: 0;
  color: rgba(247,250,247,0.74);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.generated-media-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.generated-media-meta-line span {
  max-width: 100%;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(247,250,247,0.1);
  color: rgba(247,250,247,0.68);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .generated-media-lightfield,
  .generated-media-bridge-light,
  .generated-media-halftone,
  .generated-media-softgrain,
  .generated-media-softgrain::after {
    animation: none;
  }
  .generated-media-placeholder {
    transition: none;
  }
  .generated-media-softgrain::after {
    opacity: 0;
  }
}

.studio-chat-recovery-status {
  position: fixed;
  top: calc(var(--site-ops-banner-height, 0px) + var(--global-marketing-countdown-height, 0px) + var(--app-nav-height, 82px) + 14px);
  left: 50%;
  z-index: 96;
  min-height: 40px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px 14px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.10);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  pointer-events: none;
  transform: translateX(-50%);
}

.studio-chat-recovery-status.dark {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 21, 25, 0.94);
  color: #f5f5f5;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.studio-chat-recovery-status.is-deferred {
  opacity: 0;
  width: 1px;
  min-height: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  box-shadow: none;
}

.studio-chat-recovery-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.72;
  animation: studioChatRecoverySpin 720ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .studio-chat-recovery-spinner {
    animation-duration: 1.8s;
  }
}

.chat-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1110;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: var(--studio-chat-s3-2);
  backdrop-filter: blur(8px);
  animation: chatDropOverlayIn 180ms ease-out both;
}

.chat-drop-overlay::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px dashed var(--studio-chat-s3-3);
  opacity: 0.82;
  animation: chatDropBorderPulse 1.15s ease-in-out infinite;
}

.chat-drop-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, var(--studio-chat-s3-4), transparent 30%),
    radial-gradient(circle at 50% 64%, var(--studio-chat-s3-5), transparent 38%);
  opacity: 0.86;
}

.chat-drop-overlay.confirmed {
  animation: chatDropOverlayConfirm 820ms ease both;
}

.chat-drop-overlay.confirmed::before {
  animation: chatDropBorderConfirm 820ms ease both;
}

.chat-drop-overlay.uploading .chat-drop-card,
.chat-drop-overlay.uploaded .chat-drop-card {
  border-style: solid;
}

.chat-drop-overlay.uploaded {
  animation: chatDropOverlayConfirm 900ms ease both;
}

.chat-drop-overlay.uploaded::before {
  animation: chatDropBorderConfirm 900ms ease both;
}

.chat-drop-card {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 48px));
  min-height: 176px;
  padding: 22px;
  box-sizing: border-box;
  border: 1px dashed var(--studio-chat-s3-6);
  border-radius: 22px;
  background: var(--studio-chat-s3-7);
  color: var(--studio-chat-s3-1);
  box-shadow: var(--studio-chat-s3-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  overflow: hidden;
  transform-origin: 50% 60%;
  animation: chatDropCardIn 260ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.chat-drop-card::before {
  content: '';
  position: absolute;
  inset: -70% -30%;
  background: linear-gradient(115deg, transparent 35%, var(--studio-chat-s3-9) 50%, transparent 65%);
  transform: translateX(-55%) rotate(8deg);
  animation: chatDropSheen 1.35s ease-in-out infinite;
}

.chat-drop-overlay.confirmed .chat-drop-card {
  border-style: solid;
  animation: chatDropCardConfirm 820ms ease both;
}

.chat-drop-icon-stack {
  position: relative;
  width: 64px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.chat-drop-icon {
  position: relative;
  width: 38px;
  height: 44px;
  border-radius: 12px;
  background: var(--studio-chat-s3-10);
  box-shadow: var(--studio-chat-s3-11);
  transform: rotate(-6deg);
  animation: chatDropIconFloat 1.05s ease-in-out infinite;
}

.chat-drop-icon::before {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  top: 10px;
  height: 5px;
  border-radius: 999px;
  background: var(--studio-chat-s3-12);
}

.chat-drop-icon::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 13px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, transparent 48%, var(--studio-chat-s3-13) 50%),
    var(--studio-chat-s3-14);
}

.chat-drop-plus {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--studio-chat-s3-10);
  color: var(--studio-chat-s3-15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  box-shadow: var(--studio-chat-s3-16);
  animation: chatDropPlusPulse 1.05s ease-in-out infinite;
}

.chat-drop-overlay.confirmed .chat-drop-icon {
  animation: chatDropIconLand 820ms ease both;
}

.chat-drop-overlay.confirmed .chat-drop-plus {
  animation: chatDropPlusConfirm 820ms ease both;
}

.chat-drop-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--studio-chat-s3-17);
  opacity: 0;
}

.chat-drop-spark.one {
  left: 4px;
  top: 8px;
}

.chat-drop-spark.two {
  right: 2px;
  top: 2px;
}

.chat-drop-spark.three {
  left: 12px;
  bottom: 8px;
}

.chat-drop-overlay.confirmed .chat-drop-spark {
  animation: chatDropSpark 620ms ease-out both;
}

.chat-drop-overlay.confirmed .chat-drop-spark.two {
  animation-delay: 60ms;
}

.chat-drop-overlay.confirmed .chat-drop-spark.three {
  animation-delay: 110ms;
}

.chat-drop-card > strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

.chat-drop-card > span {
  position: relative;
  z-index: 1;
  color: var(--studio-chat-s3-18);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 750;
}

.chat-drop-upload-meter {
  position: relative;
  z-index: 1;
  display: block;
  width: min(224px, 100%);
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--studio-chat-s3-33);
}

.chat-drop-upload-meter::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: var(--studio-chat-s3-15);
  animation: chatDropUploadMeter 1.05s ease-in-out infinite;
}

.chat-drop-spark.one { --spark-x: -18px; --spark-y: -22px; }

.chat-drop-spark.two { --spark-x: 20px; --spark-y: -20px; }

.chat-drop-spark.three { --spark-x: -16px; --spark-y: 16px; }

.chat-stage {
  background: var(--studio-chat-s3-22);
}

.new-chat-button,
.suggestion-actions button,
.composer-attach,
.composer-send {
  border: 1px solid var(--studio-chat-s3-23);
  background: transparent;
  color: var(--studio-chat-s3-1);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.new-chat-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 2px 12px 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: transparent;
  color: var(--studio-chat-s3-1);
  border-color: transparent;
  font-weight: 700;
  box-shadow: none;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.new-chat-button:hover,
.new-chat-button:focus-visible {
  background: var(--studio-chat-s3-30);
  border-color: var(--studio-chat-s3-33);
  box-shadow: 0 8px 24px var(--studio-chat-s3-56);
}

.new-chat-button-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-41);
  color: var(--studio-chat-s3-69);
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.new-chat-button:hover .new-chat-button-icon,
.new-chat-button:focus-visible .new-chat-button-icon {
  background: var(--studio-chat-s3-27);
  border-color: var(--studio-chat-s3-23);
  color: var(--studio-chat-s3-1);
  transform: translateY(-0.5px);
}

.studio-chat-project-entry {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  max-width: none;
  overflow: visible;
}

.studio-chat-project-cloud-status {
  max-width: 220px;
  padding-left: 48px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 13px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.studio-chat-project-cloud-status.saved {
  color: var(--app-status-success-text);
}

.studio-chat-project-cloud-status.pending,
.studio-chat-project-cloud-status.saving {
  color: var(--app-status-warning-text);
}

.studio-chat-project-cloud-status.auth,
.studio-chat-project-cloud-status.error {
  color: var(--app-status-danger-text);
}

.suggestion-copy span,
.message-meta .message-time {
  color: var(--studio-chat-s3-18);
}

.message-meta strong,
.suggestion-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--studio-chat-s3-1);
}

.chat-stage {
  min-height: 0;
  height: 100%;
  background: var(--studio-chat-s3-26);
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.studio-chat-header-actions {
  align-self: flex-start;
  margin-top: 1px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: calc(100% - 320px);
}

.studio-chat-marketing-action--earn .anticon {
  color: #ffa940;
}

.chat-marketing-poster-trigger {
  position: absolute;
  bottom: calc(
    var(--studio-chat-composer-height, 220px)
    + var(--studio-chat-composer-bottom, 0px)
    + 18px
  );
  right: 22px;
  z-index: 7;
  width: 38px;
  height: 38px;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 999px;
  background: var(--studio-chat-s3-38);
  color: var(--studio-chat-s3-25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px var(--studio-chat-s3-39);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.chat-marketing-poster-trigger:hover,
.chat-marketing-poster-trigger.active {
  transform: translateY(-2px);
  border-color: var(--studio-chat-s3-34);
  background: var(--studio-chat-s3-24);
}

.messages-viewport {
  min-height: 0;
  overflow: auto;
  scroll-padding-bottom: 176px;
}

.messages-inner {
  width: min(100%, 820px);
  min-height: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(72px, 9vh, 112px) 24px clamp(28px, 5vh, 52px);
}

.messages-inner.is-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding-top: clamp(40px, 7vh, 80px);
  padding-bottom: clamp(72px, 12vh, 140px);
}

.message-content {
  position: relative;
  min-width: 0;
  max-width: min(100%, 720px);
}

.message-user-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.generated-media-message {
  width: fit-content;
  max-width: 100%;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.message-meta-timestamp {
  position: absolute;
  left: 0;
  top: -24px;
  z-index: 3;
  margin-bottom: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0s linear 0.16s;
}

.message-content:hover > .message-meta-timestamp,
.message-content:focus-within > .message-meta-timestamp {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.message-meta .message-time {
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.message-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.message-actions button {
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--studio-chat-s3-29);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--studio-chat-s3-30);
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.message-actions button:hover:not(:disabled) {
  color: var(--studio-chat-s3-1);
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-31);
}

.message-actions button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.agent-thinking-row {
  margin-bottom: 26px;
}

.agent-thinking-placeholder {
  width: fit-content;
  max-width: min(100%, 520px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.agent-thinking-orb {
  flex: 0 0 auto;
  --pixel-mood-size: 60px;
  --pixel-mood-dot-size: 3.64px;
  --pixel-mood-gap: 2.48px;
  --pixel-mood-padding: 14px;
}

.agent-thinking-bubble {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--studio-chat-s3-25) 16%, transparent);
  border-radius: 999px;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  box-shadow: 0 10px 30px var(--studio-chat-s3-39);
}

.agent-thinking-bubble.dark {
  background: color-mix(in srgb, var(--studio-chat-s3-24) 88%, rgba(0,0,0,0.12));
  border-color: color-mix(in srgb, var(--studio-chat-s3-25) 14%, transparent);
}

.agent-thinking-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    color-mix(in srgb, currentColor 14%, transparent) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-55%);
  animation: studioChatThinkingShimmer 2s ease-in-out infinite;
}

.agent-thinking-label,
.agent-thinking-time,
.agent-thinking-dots {
  position: relative;
  z-index: 1;
}

.agent-thinking-label {
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.agent-thinking-time {
  min-width: 22px;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.agent-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.agent-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.4;
  animation: studioChatThinkingDot 1.1s infinite ease-in-out;
}

.agent-thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.agent-thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.agent-steps {
  width: min(100%, 520px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 0;
  margin: 0 0 8px;
  color: var(--app-text-muted, var(--app-text-subtle, var(--studio-chat-s2-19)));
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.agent-step {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--app-text-muted, var(--app-text-subtle, var(--studio-chat-s2-19)));
}

.agent-step.is-done {
  color: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 72%, transparent);
}

.agent-step.is-running {
  color: var(--app-text, var(--studio-chat-s2-2));
}

.agent-step-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.agent-step.is-running .agent-step-icon {
  background: transparent;
}

.agent-step-running-dot {
  animation: agent-step-pulse 1.2s ease-in-out infinite;
}

.agent-step-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-step-separator {
  color: var(--app-text-muted, var(--app-text-subtle, var(--studio-chat-s2-19)));
  opacity: 0.48;
  margin: 0 6px 0 1px;
}

.agent-review-note {
  --agent-review-accent: var(--app-text-muted, var(--studio-chat-s2-19));
  width: min(100%, var(--generated-media-card-width, 420px));
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--agent-review-accent) 24%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--agent-review-accent) 7%, transparent);
  color: var(--app-text, var(--studio-chat-s2-2));
  font-size: 12px;
  line-height: 1.55;
}

.agent-review-note.is-pass {
  --agent-review-accent: color-mix(in srgb, var(--app-text-muted, var(--studio-chat-s2-19)) 74%, transparent);
  display: inline-flex;
  width: fit-content;
  max-width: min(100%, var(--generated-media-card-width, 420px));
  align-items: center;
  color: var(--app-text-muted, var(--studio-chat-s2-19));
}

.agent-review-note strong {
  color: var(--agent-review-accent);
  font-size: 12px;
  font-weight: 800;
}

.agent-review-note ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  color: var(--app-text, var(--studio-chat-s2-2));
}

.agent-review-note p {
  margin: 0;
  color: var(--app-text-muted, var(--studio-chat-s2-19));
}

.agent-review-note button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--agent-review-accent) 32%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--agent-review-accent) 10%, transparent);
  color: var(--agent-review-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 11px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.agent-review-note button:hover,
.agent-review-note button:focus-visible {
  background: color-mix(in srgb, var(--agent-review-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--agent-review-accent) 46%, transparent);
  transform: translateY(-1px);
}

.agent-review-note button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.agent-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agent-suggestion-chip {
  max-width: min(100%, 260px);
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 10%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 5%, transparent);
  color: var(--app-text, var(--studio-chat-s2-2));
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  padding: 7px 11px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.agent-suggestion-chip:hover,
.agent-suggestion-chip:focus-visible {
  background: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 9%, transparent);
  border-color: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 18%, transparent);
  transform: translateY(-1px);
}

.agent-aspect-ratio-choices {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
  width: min(100%, 430px);
}

.agent-aspect-ratio-choices-label {
  color: var(--app-text-muted, var(--studio-chat-s3-1));
  font-size: 12px;
  font-weight: 700;
}

.agent-aspect-ratio-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .agent-aspect-ratio-choices {
    width: 100%;
    min-width: 0;
  }

  .agent-aspect-ratio-choice-list {
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
  }

  .agent-aspect-ratio-choice-list::-webkit-scrollbar {
    display: none;
  }

  .agent-aspect-ratio-choice {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

.agent-aspect-ratio-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 12%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 4%, transparent);
  color: var(--app-text, var(--studio-chat-s2-2));
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.agent-aspect-ratio-choice:hover,
.agent-aspect-ratio-choice:focus-visible {
  background: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 8%, transparent);
  border-color: color-mix(in srgb, var(--app-text, var(--studio-chat-s2-2)) 20%, transparent);
  transform: translateY(-1px);
}

.agent-aspect-ratio-choice:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.agent-aspect-ratio-choice strong {
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.empty-chat-spacer {
  width: min(100%, 760px);
  min-height: 100%;
  margin: 0 auto;
}

.empty-chat-state {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  color: var(--studio-chat-s3-1);
}

.studio-chat-empty-mood-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-chat-mood {
  --empty-chat-mood-border: rgba(17, 24, 39, 0.1);
  --empty-chat-mood-bg: radial-gradient(circle at 50% 62%, rgba(25, 43, 62, 0.11), rgba(255, 255, 255, 0.96) 58%, rgba(238, 241, 244, 0.92) 100%);
  --empty-chat-mood-shadow: inset 0 -10px 20px rgba(17, 24, 39, 0.05), 0 8px 18px rgba(17, 24, 39, 0.12);
  --empty-chat-mood-dot-bg: rgba(23, 37, 54, 0.4);
  --empty-chat-mood-dot-shadow: 0 0 4px rgba(23, 37, 54, 0.12);
  --empty-chat-mood-lit-bg: rgba(8, 18, 30, 0.98);
  --empty-chat-mood-lit-shadow: 0 0 7px rgba(8, 18, 30, 0.28);
  --empty-chat-mood-blush-bg: rgba(240, 105, 148, 0.72);
  --empty-chat-mood-blush-shadow: 0 0 7px rgba(240, 105, 148, 0.22);
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid var(--empty-chat-mood-border);
  background: var(--empty-chat-mood-bg);
  display: grid;
  grid-template-columns: repeat(8, 3.7px);
  grid-auto-rows: 3.7px;
  place-content: center;
  gap: 2.5px;
  padding: 13px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: var(--empty-chat-mood-shadow);
}

.empty-chat-mood span {
  width: 3.7px;
  height: 3.7px;
  border-radius: 999px;
  background: var(--empty-chat-mood-dot-bg);
  box-shadow: var(--empty-chat-mood-dot-shadow);
  opacity: var(--dot-low, 0.32);
  transform: scale(1);
  animation: studioChatMoodDotIdle var(--dot-duration, 2.1s) steps(1, end) infinite;
  animation-delay: var(--dot-delay, 0s);
}

.empty-chat-mood span.is-lit {
  background: var(--empty-chat-mood-lit-bg);
  box-shadow: var(--empty-chat-mood-lit-shadow);
  --dot-low: 0.68;
  --dot-mid: 0.88;
  --dot-high: 1;
  animation: studioChatMoodDotPop 0.58s cubic-bezier(0.2, 0.8, 0.18, 1) var(--dot-pop-delay, 0s) both,
    studioChatMoodDotCutePulse 1.7s ease-in-out var(--dot-pop-delay, 0s) infinite;
}

.empty-chat-mood span.is-blush {
  background: var(--empty-chat-mood-blush-bg);
  box-shadow: var(--empty-chat-mood-blush-shadow);
  --dot-low: 0.54;
  --dot-mid: 0.78;
  --dot-high: 1;
  animation: studioChatMoodDotPop 0.54s cubic-bezier(0.2, 0.8, 0.18, 1) var(--dot-pop-delay, 0s) both,
    studioChatMoodDotBlush 1.8s ease-in-out var(--dot-pop-delay, 0s) infinite;
}

.empty-chat-mood--wink span.is-lit {
  animation: studioChatMoodDotPop 0.52s cubic-bezier(0.2, 0.8, 0.18, 1) var(--dot-pop-delay, 0s) both,
    studioChatMoodDotWink 1.4s steps(1, end) var(--dot-pop-delay, 0s) infinite;
}

.empty-chat-mood--spark span.is-lit {
  animation: studioChatMoodDotPop 0.5s cubic-bezier(0.2, 0.8, 0.18, 1) var(--dot-pop-delay, 0s) both,
    studioChatMoodDotSparkle 1.15s ease-in-out var(--dot-pop-delay, 0s) infinite;
}

.empty-chat-mood--curious span.is-lit {
  animation: studioChatMoodDotPop 0.62s cubic-bezier(0.2, 0.8, 0.18, 1) var(--dot-pop-delay, 0s) both,
    studioChatMoodDotThink 1.9s ease-in-out var(--dot-pop-delay, 0s) infinite;
}

.empty-chat-state > span {
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 850;
}

.empty-chat-state > strong {
  font-size: clamp(28px, 3.1vw, 38px);
  line-height: 1.1;
  font-weight: 950;
}

.empty-chat-state > p {
  max-width: 520px;
  margin: -2px 0 6px;
  color: var(--studio-chat-s3-18);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 650;
}

.empty-chat-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.empty-chat-actions button {
  --empty-chat-task-image: none;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3.82 / 1;
  min-height: 86px;
  max-height: 112px;
  padding: 0 24px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #111214;
  color: #ffffff;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 44px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.empty-chat-task-card.accent-cyan {
  --empty-task-accent: #0891b2;
  --empty-task-accent-soft: rgba(8, 145, 178, 0.15);
  --empty-task-accent-line: rgba(8, 145, 178, 0.13);
}

.empty-chat-task-card.accent-amber {
  --empty-task-accent: #b45309;
  --empty-task-accent-soft: rgba(180, 83, 9, 0.14);
  --empty-task-accent-line: rgba(180, 83, 9, 0.11);
}

.empty-chat-task-card.accent-violet {
  --empty-task-accent: #7c3aed;
  --empty-task-accent-soft: rgba(124, 58, 237, 0.14);
  --empty-task-accent-line: rgba(124, 58, 237, 0.11);
}

.empty-chat-task-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--empty-chat-task-image);
  background-size: cover;
  background-position: center right;
  opacity: 0.92;
  transform: scale(1.01);
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.empty-chat-task-card.accent-cyan .empty-chat-task-bg {
  background-position: 62% center;
}

.empty-chat-task-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 11, 13, 0.98) 0%, rgba(10, 11, 13, 0.8) 32%, rgba(10, 11, 13, 0.16) 70%, rgba(10, 11, 13, 0.54) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.18));
}

.empty-chat-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 54px rgba(15, 23, 42, 0.16);
}

.empty-chat-actions button:hover .empty-chat-task-bg {
  opacity: 1;
  transform: scale(1.045);
}

.empty-chat-task-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.empty-chat-task-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-chat-task-icon svg {
  stroke-width: 1.1;
}

.empty-chat-task-label {
  min-width: 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 980px) {
  .empty-chat-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .empty-chat-actions button {
    aspect-ratio: auto;
    height: 96px;
    min-height: 0;
    max-height: none;
    padding: 0 18px;
    border-radius: 13px;
  }

  .empty-chat-task-content {
    gap: 12px;
  }

  .empty-chat-task-label {
    font-size: 14px;
  }

  .empty-chat-task-icon {
    width: 28px;
    height: 28px;
  }

  .empty-chat-task-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.05;
  }
}

@media (max-width: 640px) {
  .empty-chat-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  html.studio-chat-keyboard-open .empty-chat-actions,
  html.studio-chat-composer-focused .empty-chat-actions {
    gap: 8px;
  }

  html.studio-chat-keyboard-open .empty-chat-actions button,
  html.studio-chat-composer-focused .empty-chat-actions button {
    height: 78px;
  }
}

@media (max-width: 1280px) {
  .chat-marketing-poster-trigger {
    display: none;
  }
}

.new-message-fab {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: calc(
    var(--studio-chat-composer-height, 220px)
    + var(--studio-chat-composer-bottom, 0px)
    + 14px
  );
  transform: translateX(-50%);
  height: 34px;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--studio-chat-s3-38);
  color: var(--studio-chat-s3-25);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 28px var(--studio-chat-s3-39);
  cursor: pointer;
}

.new-message-fab:hover {
  transform: translateX(-50%) translateY(-1px);
}

.composer-marketing-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-marketing-icon svg,
.composer-marketing-icon img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.composer-marketing-icon-sparkle svg {
  filter: drop-shadow(0 1px 2px rgba(17, 17, 17, 0.08));
}

.composer-marketing-icon-sparkle svg path:nth-child(1) {
  fill: #C8E650;
}

.composer-marketing-icon-sparkle svg path:nth-child(2) {
  fill: #111111;
}

.composer-marketing-title-link {
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease, opacity 120ms ease;
}

.composer-marketing-title-link:hover {
  color: var(--studio-chat-s3-17);
  opacity: 0.92;
}

.composer-marketing-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.composer-marketing-action {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: color-mix(in srgb, var(--studio-chat-s3-17) 82%, transparent);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: color 120ms ease, background 120ms ease;
}

.composer-marketing-action.is-ghost:hover {
  color: var(--studio-chat-s3-17);
}

.composer-marketing-action.is-primary {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--studio-chat-s3-1) 5%, var(--studio-chat-s3-64));
  color: color-mix(in srgb, var(--studio-chat-s3-17) 88%, transparent);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--studio-chat-s3-23);
}

.composer-marketing-action.is-primary:hover {
  background: color-mix(in srgb, var(--studio-chat-s3-1) 8%, var(--studio-chat-s3-64));
  color: var(--studio-chat-s3-17);
}

.suggestion-card {
  margin-bottom: 12px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 22px;
  padding: 16px;
  background: var(--studio-chat-s3-41);
}

.suggestion-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.suggestion-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--studio-chat-s3-28);
}

.suggestion-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggestion-actions button,
.composer-attach,
.composer-attachment-card {
  min-height: 38px;
  padding: 0 14px;
}

.suggestion-actions button.primary,
.suggestion-actions button.copied,
.composer-send {
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  border-color: transparent;
}

.composer-send-dock {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.composer-send-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.composer-send-cost .composer-send-cost-spark {
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.75;
  flex: 0 0 auto;
}

.composer-send-cost strong {
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.composer-send {
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background 200ms ease, color 200ms ease, transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease, opacity 200ms ease;
  box-shadow: 0 1px 0 var(--studio-chat-s3-42) inset, 0 4px 14px var(--studio-chat-s3-43);
}

.composer-send::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, var(--studio-chat-s3-44) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}

.composer-send:hover:not(:disabled)::before {
  transform: translateX(120%);
}

.composer-send:hover:not(:disabled) {
  background: var(--studio-chat-s3-45);
  transform: translateY(-1.5px);
  box-shadow: 0 1px 0 var(--studio-chat-s3-46) inset, 0 9px 24px var(--studio-chat-s3-47);
}

.composer-send:not(:disabled):active {
  transform: translateY(0) scale(0.97);
  transition: transform 90ms ease;
  box-shadow: 0 1px 0 var(--studio-chat-s3-48) inset, 0 2px 6px var(--studio-chat-s3-49);
}

.composer-send:disabled {
  cursor: not-allowed;
  background: var(--studio-chat-s3-50);
  color: var(--studio-chat-s3-51);
  box-shadow: none;
  transform: none;
}

.composer-send.is-sending {
  cursor: progress;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  box-shadow: 0 1px 0 var(--studio-chat-s3-42) inset, 0 4px 14px var(--studio-chat-s3-43);
}

.composer-send.is-sending::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--studio-chat-s3-52) 50%, transparent 100%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  background-position: -120% 0;
  animation: composer-send-shimmer 1.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.composer-send-icon-wrap,
.composer-send-label,
.composer-credit-badge {
  position: relative;
  z-index: 2;
}

.composer-send-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.composer-send-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  transform-origin: 50% 50%;
}

.composer-send:not(:disabled):not(.is-sending) .composer-send-icon {
  animation: none;
}

.composer-send-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 15px;
  height: 15px;
}

.composer-send-spinner-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: composer-send-spinner-bounce 1.05s ease-in-out infinite;
}

.composer-send-spinner-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.composer-send-spinner-dot:nth-child(3) {
  animation-delay: 0.28s;
}

.composer-send-label {
  font-weight: 950;
  letter-spacing: 0.01em;
}

.composer-credit-badge {
  height: 20px;
  min-width: 30px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--studio-chat-s3-53);
  color: currentColor;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  opacity: 0.9;
  transition: background 200ms ease, opacity 200ms ease;
}

.composer-send:disabled .composer-credit-badge {
  background: var(--studio-chat-s3-54);
}

.composer-send.is-sending .composer-credit-badge {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .composer-send,
  .composer-send::before,
  .composer-send.is-sending::after,
  .composer-send-icon,
  .composer-send-spinner-dot {
    animation: none !important;
    transition: none !important;
  }
}

.composer-credit-badge svg {
  width: 9px;
  height: 9px;
  fill: currentColor;
  flex: 0 0 auto;
  opacity: 0.72;
}

.composer-credit-badge strong {
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
}

.composer-files {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.composer-files::-webkit-scrollbar {
  display: none;
}

.composer-file-chip {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  border-radius: 14px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-34);
  padding: 7px 30px 7px 7px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.composer-file-chip.sortable {
  padding-left: 22px;
  cursor: grab;
}

.composer-file-chip.sortable:active {
  cursor: grabbing;
}

.composer-file-chip.is-drop-target {
  border-color: var(--studio-chat-s3-55);
  background: var(--studio-chat-s3-27);
}

.composer-file-chip.uploading {
  width: auto;
  max-width: none;
  grid-template-columns: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer-file-chip.error {
  width: auto;
  max-width: none;
  grid-template-columns: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer-file-error-preview {
  position: relative;
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.24)),
    rgba(254, 226, 226, 0.72);
  color: #dc2626;
  overflow: hidden;
}

.composer-file-error-preview span {
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.composer-file-drag-handle {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--studio-chat-s3-28);
  pointer-events: none;
}

.composer-file-preview {
  position: relative;
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  border-radius: 10px;
  display: block;
  overflow: hidden;
  background: var(--studio-chat-s3-58);
  isolation: isolate;
}

.composer-file-preview.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent, var(--studio-chat-s3-59), transparent),
    var(--studio-chat-s3-60);
  background-size: 220% 100%, 100% 100%;
  animation: uploadShimmer 1.1s ease-in-out infinite;
  opacity: 0.78;
}

.composer-file-preview.uploading .composer-file-thumb {
  opacity: 0.72;
}

.composer-file-preview.uploading {
  background: transparent;
}

.composer-file-preview.uploading.loading::before {
  display: none;
}

.composer-file-preview-spinner {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.66);
  border-top-color: var(--studio-chat-s3-15);
  background: rgba(17,17,17,0.24);
  box-shadow: 0 0 0 1px rgba(17,17,17,0.12);
  animation: studioSpin 760ms linear infinite;
  box-sizing: border-box;
}

.composer-file-loading {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  border-radius: 10px;
  display: block;
  background:
    linear-gradient(90deg, transparent, var(--studio-chat-s3-59), transparent),
    var(--studio-chat-s3-60);
  background-size: 220% 100%, 100% 100%;
  animation: uploadShimmer 1.1s ease-in-out infinite;
}

.composer-file-fallback {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-chat-s3-61);
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  .composer-file-loading,
  .composer-file-preview.loading::before,
  .composer-file-preview-spinner {
    animation: none !important;
  }
}

.composer-file-copy {
  min-width: 0;
}

.composer-file-copy strong,
.composer-file-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-file-copy strong {
  /* 不展示文件名(图片名称文字),只保留缩略图 + 类型/状态描述,界面更干净 */
  display: none;
}

.composer-file-copy span {
  margin-top: 3px;
  font-size: 11px;
  color: var(--studio-chat-s3-28);
}

.composer-file-chip:not(.uploading):not(.error) {
  width: auto;
  grid-template-columns: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer-file-chip.is-drop-target:not(.uploading):not(.error) {
  border: 1px solid var(--studio-chat-s3-55);
  background: var(--studio-chat-s3-27);
}

.composer-file-chip:not(.uploading):not(.error) .composer-file-copy {
  display: none;
}

.composer-file-chip:not(.uploading):not(.error) .composer-file-remove {
  top: 1px;
  right: 1px;
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.composer-file-chip.uploading .composer-file-remove {
  top: 1px;
  right: 1px;
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.composer-file-chip.error .composer-file-remove {
  top: 1px;
  right: 1px;
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.composer-file-chip.sortable:not(.uploading):not(.error) {
  padding-left: 17px;
}

.composer-file-chip:not(.uploading):not(.error) .composer-file-order-controls {
  display: none;
}

.composer-file-order-controls {
  position: absolute;
  right: 6px;
  bottom: 5px;
  display: flex;
  gap: 3px;
}

.composer-file-order-controls button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-62);
  color: var(--studio-chat-s3-18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-file-order-controls button:hover:not(:disabled) {
  color: var(--studio-chat-s3-1);
  border-color: var(--studio-chat-s3-23);
}

.composer-file-order-controls button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.composer-file-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--studio-chat-s3-63);
  color: var(--studio-chat-s3-18);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-reference-tools {
  width: min(92px, 100%);
  display: grid;
  gap: 6px;
}

.composer-reference-tools button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 12px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.composer-reference-tools button:hover {
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
}

.composer-reference-tools button.active {
  border-color: transparent;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
}

.composer-reference-tools button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-collapsed-mode {
  display: none;
}

.composer-control-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  grid-column: 1 / -1;
}

.composer-mode-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-65);
  box-shadow: inset 0 1px 0 var(--studio-chat-s3-46);
}

.composer-mode-chip {
  min-height: 34px;
  min-width: 72px;
  padding: 0 11px;
  border: 0 !important;
  border-radius: 11px;
  background: transparent;
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.composer-mode-chip svg {
  flex: 0 0 auto;
  opacity: 0.88;
}

.composer-mode-chip.active svg {
  opacity: 1;
}

.composer-mode-chip span {
  line-height: 1;
}

.composer-mode-chip.compact {
  min-height: 32px;
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 850;
  border-radius: 9px;
  gap: 4px;
}

.composer-mode-chip.active {
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  box-shadow: 0 1px 2px var(--studio-chat-s3-49);
}

.composer-mode-chip:not(.active):hover {
  color: var(--studio-chat-s3-1);
  background: var(--studio-chat-s3-27);
}

.composer-model-toolbar {
  min-width: 0;
  display: flex;
}

.composer-model-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.composer-model-health-dot.success {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.composer-model-health-dot.error {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.composer-model-health-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.composer-model-trigger {
  flex: 1;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 38px;
  padding: 0 !important;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-model-trigger-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-model-trigger:disabled {
  cursor: not-allowed;
  color: var(--studio-chat-s3-28);
}

.composer-model-speed-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 auto;
  min-width: 0;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--studio-chat-s3-23);
}

.composer-model-speed-tab {
  box-sizing: border-box;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--studio-chat-s3-23) !important;
  border-radius: 12px;
  background: var(--studio-chat-s3-72) !important;
  color: var(--studio-chat-s3-18) !important;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.composer-model-speed-tab.active {
  border-color: var(--studio-chat-s3-33) !important;
  background: var(--studio-chat-s3-27) !important;
  color: var(--studio-chat-s3-1) !important;
}

.composer-model-speed-tab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.composer-model-speed-tab em {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--studio-chat-s3-66);
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-model-fast-icon {
  width: 16px;
  height: 16px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
  color: currentColor;
  opacity: 0.72;
}

.composer-model-fast-icon svg {
  width: 16px;
  height: 16px;
}

.composer-model-side {
  flex: 0 0 auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.composer-model-estimate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 56px;
  padding: 0 10px;
  border: 1px solid var(--studio-chat-s3-33) !important;
  border-radius: 999px;
  background: var(--studio-chat-s3-72) !important;
  color: var(--studio-chat-s3-18) !important;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.composer-model-empty {
  padding: 10px 8px;
  color: var(--studio-chat-s3-28);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.composer-advanced-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-advanced-head strong {
  color: var(--studio-chat-s3-1);
  font-size: 13px;
  line-height: 1.3;
}

.composer-advanced-head span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.composer-advanced-stack,
.advanced-camera-stack {
  display: grid;
  gap: 9px;
}

.advanced-control-row {
  display: grid;
  gap: 6px;
}

.advanced-control-row.compact {
  gap: 7px;
}

.advanced-control-label {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.advanced-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: start;
}

.advanced-pill-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.advanced-pill-group.compact {
  gap: 8px;
}

.advanced-pill {
  min-height: 32px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 0 11px;
  cursor: pointer;
}

.advanced-pill:hover {
  border-color: var(--studio-chat-s3-23);
  color: var(--studio-chat-s3-1);
  background: var(--studio-chat-s3-27);
}

.advanced-pill.active {
  border-color: transparent;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
}

.advanced-pill.aspect-option {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 7px;
  text-align: left;
}

.advanced-pill-copy,
.advanced-select-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.advanced-pill-copy strong,
.advanced-select-copy strong {
  color: currentColor;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.advanced-pill-copy small,
.advanced-select-copy small {
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.62;
  white-space: nowrap;
}

.resolution-icon {
  gap: 3px;
}

.resolution-icon i,
.quality-icon i {
  width: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.3;
}

.resolution-icon i:nth-child(1),
.quality-icon i:nth-child(1) {
  height: 10px;
  opacity: 0.95;
}

.resolution-icon i:nth-child(2),
.quality-icon i:nth-child(2) {
  height: 14px;
}

.resolution-icon i:nth-child(3),
.quality-icon i:nth-child(3) {
  height: 18px;
}

.resolution-icon.resolution-2k i:nth-child(-n + 2),
.resolution-icon.resolution-4k i {
  opacity: 0.95;
}

.quality-icon {
  gap: 3px;
}

.quality-icon.quality-auto i:nth-child(-n + 2),
.quality-icon.quality-medium i:nth-child(-n + 2),
.quality-icon.quality-high i,
.quality-icon.quality-low i:nth-child(1) {
  opacity: 0.95;
}

.output-amount-icon.image {
  overflow: hidden;
}

.output-amount-icon.image i {
  position: absolute;
  left: 5px;
  top: 10px;
  width: 13px;
  height: 15px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
  background: var(--studio-chat-s3-74);
  box-shadow: 0 0 0 1px var(--studio-chat-s3-76);
}

.advanced-mobile-select {
  display: block;
  min-width: 0;
}

.advanced-desktop-options {
  display: none;
}

.advanced-select-shell {
  min-width: 0;
  min-height: 42px;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 14px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  padding: 6px 10px 6px 7px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.advanced-select-shell:hover,
.advanced-select-shell:focus-within {
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-27);
  box-shadow: var(--studio-chat-s3-77);
}

.advanced-select-shell > svg {
  color: var(--studio-chat-s3-18);
  pointer-events: none;
}

.advanced-select-shell select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.advanced-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.advanced-segment,
.advanced-select-field select {
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.advanced-segment:hover,
.advanced-select-field select:hover {
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
}

.advanced-segment.active {
  border-color: var(--studio-chat-s3-78);
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
}

.advanced-segment {
  min-height: 46px;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
}

.advanced-segment strong {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}

.advanced-segment small {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  opacity: 0.74;
}

.advanced-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.advanced-form-grid.camera-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.advanced-select-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.advanced-select-field.wide {
  grid-column: span 2;
}

.advanced-select-field span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.advanced-select-field select {
  width: 100%;
  height: 36px;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 0 10px;
  outline: none;
  box-shadow: none;
  min-width: 0;
}

.advanced-select-field select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.advanced-select-field select:focus-visible {
  outline: 2px solid var(--studio-chat-s3-23);
  outline-offset: 2px;
  box-shadow: var(--studio-chat-s3-77);
}

.composer-advanced-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.composer-advanced-actions.compact {
  display: grid;
  grid-template-columns: minmax(0, 360px);
}

.advanced-camera-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.advanced-camera-summary button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 12px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  font: inherit;
  padding: 7px 9px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
}

.advanced-camera-summary button:hover {
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-27);
}

.advanced-camera-summary span {
  min-width: 0;
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.advanced-camera-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--studio-chat-s3-1);
  font-size: 12px;
  line-height: 1.2;
}

.composer-advanced-actions button {
  min-height: 30px;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  cursor: pointer;
}

.composer-advanced-actions button:hover:not(:disabled) {
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
}

.composer-advanced-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.composer-ratio-compact {
  min-width: 58px;
  height: 44px;
  grid-column: 4 / 5;
  grid-row: 1 / 2;
  align-self: center;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 14px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.composer-ratio-name {
  display: none;
}

.composer-ratio-compact:hover,
.composer-ratio-compact:focus-within {
  border-color: var(--studio-chat-s3-23);
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
}

.composer-ratio-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.composer-ratio-compact span {
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-send-label-compact {
  display: none;
}

.composer-inline-assets {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  height: auto;
  min-height: 0;
}

.composer-attachment-card {
  width: min(92px, 100%);
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--studio-chat-s3-23);
  border-radius: 14px;
  background: var(--studio-chat-s3-80);
  color: var(--studio-chat-s3-1);
  font: inherit;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 2px;
  place-items: center;
  padding: 9px 8px 8px;
  text-align: center;
  cursor: pointer;
}

.composer-inline-assets.has-files {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.composer-inline-assets.has-files::-webkit-scrollbar {
  display: none;
}

.composer-inline-assets.has-files .composer-files {
  flex: 0 1 auto;
  width: auto;
  overflow: visible;
}

.composer-inline-assets.has-files .composer-attachment-card.compact {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.composer-files-stack-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  z-index: 6;
}

.composer-inline-assets .composer-files {
  position: relative;
}

.composer-inline-assets.has-files .composer-attachment-card.compact strong,
.composer-inline-assets.has-files .composer-attachment-card.compact small,
.composer-inline-assets.has-files .composer-attachment-card.compact .composer-attachment-icon,
.composer-inline-assets.has-files .composer-attachment-card.compact > span {
  display: none;
}

.composer-attachment-card.compact {
  min-height: 74px;
  height: auto;
  aspect-ratio: auto;
  padding: 9px 8px;
  grid-template-rows: auto auto;
}

.composer-attachment-card.compact small {
  display: none;
}

.composer-attachment-card:hover:not(:disabled) {
  border-style: solid;
  background: var(--studio-chat-s3-27);
}

.composer-attachment-card:disabled {
  cursor: wait;
  opacity: 0.72;
}

.composer-attachment-card > span,
.composer-attachment-card .composer-attachment-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  font-size: 19px;
  line-height: 1;
  flex-shrink: 0;
}

.composer-attachment-card .composer-attachment-icon svg {
  flex: 0 0 auto;
}

.composer-attachment-card strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}

.composer-attachment-card small {
  min-width: 0;
  color: var(--studio-chat-s3-18);
  font-size: 10px;
  line-height: 1.3;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.composer-attachment-menu {
  min-width: 148px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: var(--studio-chat-s3-1);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 4px;
}

.composer-attachment-menu button,
.composer-attachment-menu-item {
  position: relative;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.composer-attachment-menu button:hover,
.composer-attachment-menu-item:hover,
.composer-attachment-menu-item:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}

.composer-local-upload-menu-item {
  overflow: hidden;
}

.composer-local-upload-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 100px;
}

.composer-local-upload-input:disabled {
  cursor: not-allowed;
}

.composer-attachment-menu.composer-attachment-menu--dark .composer-local-upload-input {
  color-scheme: dark;
}

.gallery-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.gallery-picker-panel {
  width: min(920px, calc(100vw - 48px));
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 28px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  box-shadow: var(--studio-chat-s3-87);
  padding: 18px;
}

.gallery-picker-head,
.gallery-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-picker-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--studio-chat-s3-33);
}

.gallery-picker-title {
  display: grid;
  gap: 5px;
}

.gallery-picker-title strong {
  font-size: 18px;
  font-weight: 900;
}

.gallery-picker-title span {
  color: var(--studio-chat-s3-18);
  font-size: 13px;
}

.gallery-picker-close,
.gallery-picker-search button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--studio-chat-s3-24);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 0 12px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-25);
}

.gallery-picker-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  outline: none;
}

.gallery-picker-body {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.gallery-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.gallery-picker-item {
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 16px;
  background: var(--studio-chat-s3-25);
  color: inherit;
  padding: 8px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.gallery-picker-item.selected {
  border-color: var(--studio-chat-s3-12);
  box-shadow: inset 0 0 0 1px var(--studio-chat-s3-12);
}

.gallery-picker-item-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--studio-chat-s3-24);
}

.gallery-picker-item-media img,
.gallery-picker-item-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-picker-item-type,
.gallery-picker-item-check {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
}

.gallery-picker-item-type {
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
}

.gallery-picker-item-check {
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--studio-chat-s3-12);
}

.gallery-picker-item-title {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-picker-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 12px;
  justify-items: center;
  text-align: center;
  color: var(--studio-chat-s3-18);
  font-size: 14px;
}

.gallery-picker-action,
.gallery-picker-cancel,
.gallery-picker-confirm {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-25);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.gallery-picker-confirm {
  background: var(--studio-chat-s3-12);
  border-color: transparent;
  color: #fff;
}

.gallery-picker-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gallery-picker-foot {
  padding-top: 14px;
  border-top: 1px solid var(--studio-chat-s3-33);
}

.gallery-picker-selected {
  color: var(--studio-chat-s3-18);
  font-size: 13px;
}

.gallery-picker-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.composer-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  container-type: inline-size;
  container-name: composer-toolbar;
}

.composer-toolbar-left::-webkit-scrollbar {
  display: none;
}

.composer-tool-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.composer-tool-chip {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.composer-param-summary-chip {
  justify-content: flex-start;
  align-items: center;
  color: var(--studio-chat-s3-1);
  font-weight: 900;
  gap: 10px;
  padding: 0 12px 0 8px;
  min-width: 0;
  max-width: min(100%, 420px);
}

.composer-param-chip-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding-right: 8px;
  border-right: 1px solid var(--studio-chat-s3-33);
}

.composer-param-chip-title {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: var(--studio-chat-s3-1);
  white-space: nowrap;
}

.composer-param-chevron {
  flex: 0 0 auto;
  color: var(--studio-chat-s3-18);
  opacity: 0.72;
  transition: transform 160ms ease, opacity 160ms ease;
}

.composer-param-chevron.open,
.composer-tool-chip.active .composer-param-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.composer-tools-chip {
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 9px;
  color: var(--studio-chat-s3-1);
  gap: 0;
}

.composer-tools-chip-label {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.composer-param-summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.composer-param-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.composer-param-badge + .composer-param-badge {
  padding-left: 9px;
}

.composer-param-badge + .composer-param-badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--studio-chat-s3-33);
}

.composer-param-badge em {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: var(--studio-chat-s3-1);
  white-space: nowrap;
}

.composer-param-badge-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.composer-param-badge-label {
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  color: var(--studio-chat-s3-18);
  opacity: 0.72;
  white-space: nowrap;
}

.composer-param-chip {
  color: var(--studio-chat-s3-1);
  font-weight: 900;
}

.composer-tool-chip.active {
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
  box-shadow: 0 0 0 1px var(--studio-chat-s3-23) inset;
}

.composer-tool-chip:hover:not(:disabled),
.composer-tool-chip:focus-within {
  color: var(--studio-chat-s3-1);
  background: var(--studio-chat-s3-22);
}

.composer-tool-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.composer-mode-trigger-chip {
  color: #18181b;
  font-weight: 700;
  gap: 5px;
  padding: 0 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.composer-mode-trigger-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #18181b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-mode-trigger-chip svg {
  color: #18181b;
  opacity: 1;
  flex: 0 0 auto;
}

.composer-mode-trigger-chip .composer-param-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.45;
  color: #18181b;
  flex: 0 0 auto;
}

.composer-video-reference-chip {
  max-width: 118px;
  min-width: 0;
  padding: 0 9px;
}

.composer-video-reference-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-video-reference-option {
  min-height: 42px;
  padding: 6px 8px;
}

.composer-ratio-res-chip {
  gap: 4px;
  padding: 0 8px;
  color: #18181b;
  font-weight: 700;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.composer-ratio-res-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.composer-ratio-res-chip .composer-param-chevron {
  display: none;
}

.composer-ratio-res-value,
.composer-ratio-res-quality {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #18181b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-ratio-res-divider {
  width: 1px;
  height: 16px;
  flex: 0 0 1px;
  background: rgba(15, 23, 42, 0.12);
  margin: 0 1px;
}

.composer-icon-chip {
  width: 30px;
  min-width: 30px;
  padding: 0;
  justify-content: center;
  position: relative;
  color: var(--studio-chat-s3-1);
}

.composer-text-chip-glyph {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  line-height: 1;
}

.composer-text-chip-quotes {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.72;
  transform: translateY(-1px);
}

.composer-more-chip {
  opacity: 0.88;
}

.composer-icon-chip svg {
  opacity: 0.92;
  flex: 0 0 auto;
}

.composer-mention-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #06b6d4;
  box-shadow: 0 0 0 2px var(--studio-chat-s3-64);
}

.composer-mention-chip.active {
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  box-shadow: none;
}

.composer-ratio-option-label {
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  color: currentColor;
}

.composer-resolution-option-copy {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  text-align: center;
}

.composer-resolution-option-copy strong {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.composer-resolution-option-copy small {
  font-size: 10px;
  line-height: 1.1;
  color: var(--studio-chat-s3-18);
}

.composer-mode-menu .composer-toolbar-action-option {
  min-height: 38px;
  padding: 6px 8px;
  gap: 8px;
}

.composer-toolbar-menu-section {
  display: grid;
  gap: 10px;
  padding: 0 2px;
}

.composer-toolbar-menu-section + .composer-toolbar-menu-section {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--studio-chat-s3-33);
}

.composer-toolbar-menu-label {
  min-height: 22px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.composer-toolbar-menu-label strong {
  min-width: 0;
  color: var(--studio-chat-s3-1);
  font-size: 11px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-toolbar-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.composer-toolbar-option-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.composer-toolbar-menu.compact {
  min-width: 86px;
}

.composer-toolbar-menu-option-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1.15;
}

.composer-toolbar-menu-option-copy strong {
  min-width: 0;
  color: currentColor;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-toolbar-menu-option-copy small {
  min-width: 0;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.62;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-toolbar-action-option.composer-tools-mobile-only {
  display: none;
}

.composer-toolbar-action-option {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--studio-chat-s3-1);
  font: inherit;
  padding: 8px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.composer-toolbar-action-option:hover:not(:disabled),
.composer-toolbar-action-option.active {
  background: var(--studio-chat-s3-27);
}

.composer-toolbar-action-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.composer-toolbar-action-option > svg {
  color: var(--studio-chat-s3-18);
}

.composer-tools-menu-section {
  display: grid;
  gap: 5px;
}

.composer-tools-menu-section + .composer-tools-menu-section {
  padding-top: 9px;
  border-top: 1px solid var(--studio-chat-s3-33);
}

.composer-tools-menu-heading {
  min-height: 15px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  color: var(--studio-chat-s3-18);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.composer-toolbar-action-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-18);
}

.composer-toolbar-action-icon svg {
  width: 15px;
  height: 15px;
}

.composer-toolbar-action-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.composer-toolbar-action-option strong {
  min-width: 0;
  color: var(--studio-chat-s3-1);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-toolbar-action-option small {
  min-width: 0;
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-toolbar-action-option-settings {
  min-height: 46px;
  background: var(--studio-chat-s3-56);
}

.composer-toolbar-action-option-settings .composer-toolbar-action-icon {
  background: var(--studio-chat-s3-22);
}

.composer-toolbar-action-state {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
}

.composer-toolbar-action-state svg {
  width: 13px;
  height: 13px;
}

.composer-paid-tool {
  padding-right: 5px;
}

.composer-tool-credit {
  min-width: 30px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
  border: 1px solid var(--studio-chat-s3-33);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.composer-tool-credit svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
  flex: 0 0 auto;
}

.composer-tool-credit strong {
  font-size: 12px;
  line-height: 1;
}

.composer-ratio-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-left: 7px;
  position: relative;
}

.composer-ratio-chip:focus-within {
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
}

.composer-ratio-chip span {
  white-space: nowrap;
}

.composer-quality-chip {
  position: relative;
  padding-left: 7px;
}

.composer-quality-chip .quality-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 8px;
}

.composer-quality-chip span {
  white-space: nowrap;
}

.media-lightbox-panel {
  max-width: min(92vw, 1180px);
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.media-lightbox-stage {
  max-width: min(92vw, 1180px);
  max-height: min(82vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-lightbox-stage img {
  width: auto;
  max-width: min(92vw, 1180px);
  max-height: min(82vh, 860px);
  border-radius: 18px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.media-lightbox-stage video {
  width: min(92vw, 1180px);
  max-height: min(82vh, 860px);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.media-lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.media-lightbox-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.media-lightbox-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top, 0px));
  right: max(18px, env(safe-area-inset-right, 0px));
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.image-text-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 1170;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.image-text-editor-panel {
  width: min(860px, calc(100vw - 44px));
  max-height: min(88vh, 780px);
  overflow: auto;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 22px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  box-shadow: var(--studio-chat-s3-82);
  padding: 18px;
}

.image-text-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.image-text-editor-head div {
  display: grid;
  gap: 4px;
}

.image-text-editor-head strong {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

.image-text-editor-head span {
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.image-text-editor-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-text-editor-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.image-text-editor-preview {
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 16px;
  overflow: hidden;
  background: var(--studio-chat-s3-83);
  aspect-ratio: 1 / 1;
}

.image-text-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-text-editor-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.image-text-editor-loading,
.image-text-editor-empty {
  min-height: 150px;
  border: 1px dashed var(--studio-chat-s3-33);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  text-align: center;
  color: var(--studio-chat-s3-18);
}

.image-text-editor-loading span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid var(--studio-chat-s3-33);
  border-top-color: var(--studio-chat-s3-1);
  animation: studioSpin 0.8s linear infinite;
}

.image-text-editor-loading strong,
.image-text-editor-empty strong {
  color: var(--studio-chat-s3-1);
  font-size: 14px;
  line-height: 1.3;
}

.image-text-editor-loading small,
.image-text-editor-empty span {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.image-text-editor-item {
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 16px;
  background: var(--studio-chat-s3-72);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-text-editor-item-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.image-text-editor-item-head span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 900;
}

.image-text-editor-item-head button {
  border: 0;
  background: transparent;
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.image-text-editor-item label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.image-text-editor-item label span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
}

.image-text-editor-item input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 12px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  outline: none;
  padding: 0 10px;
}

.image-text-editor-item input:focus {
  border-color: var(--studio-chat-s3-23);
  box-shadow: var(--studio-chat-s3-77);
}

.image-text-editor-item input:focus-visible {
  outline: 2px solid var(--studio-chat-s3-23);
  outline-offset: 2px;
}

.image-text-editor-item input[readonly] {
  background: var(--studio-chat-s3-21);
  color: var(--studio-chat-s3-2);
  cursor: default;
}

.image-text-editor-add {
  min-height: 38px;
  border: 1px dashed var(--studio-chat-s3-33);
  border-radius: 13px;
  background: transparent;
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.image-text-editor-error {
  margin-top: 12px;
  border: 1px solid var(--studio-chat-s3-84);
  border-radius: 14px;
  background: var(--studio-chat-s3-85);
  color: var(--studio-chat-s3-86);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.image-text-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.image-text-editor-actions button {
  min-height: 40px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 0 16px;
  cursor: pointer;
}

.image-text-editor-actions button.primary {
  border-color: transparent;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
}

.image-text-editor-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.template-library-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.template-library-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 750;
}

.template-library-steps em {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.template-library-search {
  min-height: 42px;
  margin: 10px 0 12px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 14px;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-18);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.template-library-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 13px;
}

.template-library-search input::placeholder {
  color: var(--studio-chat-s3-18);
}

.template-library-search button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.template-library-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.template-library-card-wrap {
  position: relative;
  min-width: 0;
}

.template-library-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.template-library-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.template-library-card-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.template-library-card-copy em {
  color: var(--studio-chat-s3-28);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.template-library-card-copy small {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-library-card-cta {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  font-size: 11px;
  font-weight: 900;
  line-height: 26px;
}

.template-library-card-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 10px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.template-library-card-wrap .template-library-card-cta {
  right: 40px;
}

.template-library-mine-actions,
.template-library-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-library-mine-actions button,
.template-library-editor-actions button {
  min-height: 36px;
  border: 1px solid var(--studio-chat-s3-23);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 0 14px;
  cursor: pointer;
}

.template-library-mine-actions button.primary,
.template-library-editor-actions button.primary {
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  border-color: transparent;
}

.template-library-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--studio-chat-s3-33);
  background: var(--studio-chat-s3-22);
}

.template-library-editor-head {
  display: grid;
  gap: 4px;
}

.template-library-editor-head strong {
  font-size: 14px;
}

.template-library-editor-head span {
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  line-height: 1.5;
}

.template-library-field {
  display: grid;
  gap: 6px;
}

.template-library-field > span {
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 800;
}

.template-library-field input,
.template-library-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 12px;
  background: var(--studio-chat-s3-27);
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
}

.template-library-field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}

.template-library-preview-box {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--studio-chat-s3-27);
  border: 1px solid var(--studio-chat-s3-33);
}

.template-library-preview-box > span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 800;
}

.template-library-preview-box p {
  margin: 0;
  color: var(--studio-chat-s3-28);
  font-size: 12px;
  line-height: 1.55;
}

.camera-control-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.camera-control-options button {
  min-height: 32px;
  border: 1px solid var(--studio-chat-s3-33);
  border-radius: 999px;
  background: var(--studio-chat-s3-22);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0 11px;
  cursor: pointer;
}

.camera-control-options button.active {
  background: var(--studio-chat-s3-24);
  color: var(--studio-chat-s3-25);
  border-color: transparent;
}

.composer-agent-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: min(560px, 58vw);
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.62);
  color: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.composer-agent-note span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-toolbar-left.composer-agent-toolbar {
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.composer-toolbar-left.composer-agent-toolbar::-webkit-scrollbar {
  display: none;
}

.composer-agent-toolbar .composer-tool-chip {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 23, 42, 0.86);
  box-shadow: none;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.composer-agent-toolbar .composer-tool-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-agent-logo-glyph {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.composer-agent-logo-glyph .composer-agent-logo-mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.composer-agent-toolbar .composer-mode-trigger-chip {
  min-width: 112px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.16) !important;
  background:
    linear-gradient(135deg, #030305 0%, #09090b 48%, #050507 100%) !important;
  color: rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -12px 24px rgba(0, 0, 0, 0.22) inset,
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.composer-agent-toolbar .composer-mode-trigger-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.01) 42%,
      rgba(0, 0, 0, 0.16)
    );
  background-size: 100% 100%;
  opacity: 0.88;
  pointer-events: none;
  animation: agent-mode-fill-flow 8.6s cubic-bezier(0.45, 0, 0.2, 1) infinite alternate;
  transition:
    opacity 0.22s ease,
    filter 0.22s ease;
}

.composer-agent-toolbar .composer-mode-trigger-chip::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      112deg,
      transparent 0%,
      transparent 38%,
      rgba(255, 255, 255, 0.22) 47%,
      rgba(66, 252, 255, 0.18) 54%,
      transparent 68%,
      transparent 100%
    );
  opacity: 0.42;
  transform: translateX(-128%);
  pointer-events: none;
  animation: agent-mode-sheen 5.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.composer-agent-magic-rings {
  position: absolute;
  inset: -25px -61px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
  filter: blur(0.15px) saturate(1.22);
  animation: agent-magic-rings-burst 2.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.composer-agent-magic-rings-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.composer-agent-toolbar .composer-mode-trigger-chip > svg,
.composer-agent-toolbar .composer-mode-trigger-chip > .composer-agent-logo-glyph,
.composer-agent-toolbar .composer-mode-trigger-chip > .composer-mode-trigger-label,
.composer-agent-toolbar .composer-mode-trigger-chip > .composer-param-chevron {
  position: relative;
  z-index: 1;
}

.composer-agent-toolbar .composer-mode-trigger-chip .composer-mode-trigger-label,
.composer-agent-toolbar .composer-mode-trigger-chip .composer-param-chevron {
  color: rgba(255, 255, 255, 0.96) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
}

.composer-agent-toolbar .composer-mode-trigger-chip .composer-agent-logo-glyph {
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.28))
    drop-shadow(0 0 10px rgba(66, 252, 255, 0.28));
  animation: agent-logo-pulse 4.8s ease-in-out infinite;
}

.composer-agent-toolbar .composer-mode-trigger-chip:hover:not(:disabled),
.composer-agent-toolbar .composer-mode-trigger-chip.active {
  transform: translate3d(0, -1px, 0) scale(1.01);
  filter: saturate(1.04) brightness(1.02);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -12px 24px rgba(0, 0, 0, 0.18) inset,
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(252, 66, 255, 0.18),
    0 0 16px rgba(66, 252, 255, 0.14) !important;
}

.composer-agent-toolbar .composer-mode-trigger-chip:hover:not(:disabled)::before,
.composer-agent-toolbar .composer-mode-trigger-chip.active::before {
  opacity: 0.96;
}

.composer-agent-toolbar .composer-agent-auto-chip {
  min-width: 74px;
}

.composer-agent-toolbar .composer-agent-confirmation-chip {
  min-width: 112px;
  padding-right: 8px;
  gap: 7px;
}

.composer-agent-toolbar .composer-agent-confirmation-chip.auto {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(236, 253, 245, 0.78);
  color: rgba(20, 83, 45, 0.94);
}

.composer-agent-confirmation-switch {
  position: relative;
  width: 28px;
  height: 16px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
  transition: background-color 0.18s ease;
}

.composer-agent-confirmation-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-agent-confirmation-chip.auto .composer-agent-confirmation-switch {
  background: rgba(34, 197, 94, 0.82);
}

.composer-agent-confirmation-chip.auto .composer-agent-confirmation-switch::after {
  transform: translateX(12px);
}

.composer-agent-toolbar .composer-agent-skill-chip {
  min-width: 102px;
  max-width: min(220px, 38vw);
  border-radius: 9px;
}

.composer-agent-skill-count {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 5px;
  background: rgba(14, 142, 211, 0.1);
  color: rgb(3, 105, 161);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.composer-agent-toolbar .composer-agent-skill-chip:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.composer-agent-context-chips {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.composer-agent-context-chips::-webkit-scrollbar {
  display: none;
}

.composer-agent-context-chip {
  flex: 0 0 auto;
  max-width: min(260px, 44vw);
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.composer-agent-context-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.composer-agent-context-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-agent-context-chip em {
  font-style: normal;
  color: rgba(15, 23, 42, 0.45);
}

.composer-agent-context-chip.skill {
  background: rgba(255, 247, 237, 0.86);
  border-color: rgba(249, 115, 22, 0.18);
}

.composer-agent-skills-menu {
  width: min(340px, calc(100vw - 32px)) !important;
}

.composer-agent-skill-list {
  display: grid;
  gap: 7px;
}

.composer-agent-skill-option {
  min-height: 56px;
}

.composer-agent-skill-option > .lucide-check {
  flex: 0 0 auto;
  color: rgba(15, 23, 42, 0.74);
}

.composer-agent-skill-option.selected {
  background: rgba(15, 23, 42, 0.07);
}

.composer-agent-skill-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.56);
  font-size: 12px;
  font-weight: 800;
}

.composer-agent-preferences-menu .composer-toolbar-menu-section {
  gap: 7px;
  padding: 0;
}

.composer-agent-preferences-menu .composer-toolbar-menu-section + .composer-toolbar-menu-section {
  padding-top: 8px;
  margin-top: 0;
}

.composer-agent-preferences-menu .composer-toolbar-menu-label {
  min-height: 18px;
  padding: 0 1px;
  font-size: 10px;
}

.composer-agent-preferences-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.composer-agent-preferences-header > strong {
  color: var(--studio-chat-s3-1);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.composer-agent-auto-toggle {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 4px 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.composer-agent-auto-toggle i {
  width: 22px;
  height: 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  position: relative;
}

.composer-agent-auto-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.composer-agent-auto-toggle.active {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.composer-agent-auto-toggle.active i {
  background: #2563eb;
}

.composer-agent-auto-toggle.active i::after {
  transform: translateX(9px);
}

.composer-agent-preference-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 3px;
  border: 0;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.045);
}

.composer-agent-preference-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--studio-chat-s3-18);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.composer-agent-preference-tabs button.active {
  background: #ffffff;
  color: var(--studio-chat-s3-1);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

.composer-agent-ratio-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.045);
  scrollbar-width: none;
}

.composer-agent-ratio-strip::-webkit-scrollbar {
  display: none;
}

.composer-agent-ratio-item {
  flex: 1 0 42px;
  min-width: 40px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--studio-chat-s3-1);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.composer-agent-ratio-item.active {
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

.composer-agent-preference-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.composer-agent-preference-fields-image {
  grid-template-columns: minmax(0, 1.18fr) minmax(88px, 0.76fr) minmax(88px, 0.76fr);
  gap: 8px;
}

.composer-agent-select-wrap {
  min-width: 0;
  position: relative;
}

.composer-agent-select-pill {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: var(--app-menu-item-bg-hover, rgba(15, 23, 42, 0.055));
  color: var(--studio-chat-s3-1);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
}

.composer-agent-select-pill:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.composer-agent-managed-model-wrap {
  display: grid;
  gap: 5px;
}

.composer-agent-managed-model-pill:disabled {
  cursor: default;
  opacity: 1;
  background: rgba(20, 184, 166, 0.09);
  color: rgba(15, 23, 42, 0.88);
}

.composer-agent-managed-model-pill .composer-agent-select-icon {
  color: rgba(13, 148, 136, 0.95);
}

.composer-agent-managed-model-badge {
  flex: 0 0 auto;
  min-width: 30px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  background: rgba(15, 23, 42, 0.88);
  color: rgba(255, 255, 255, 0.95);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.composer-agent-managed-model-hint {
  min-width: 0;
  color: rgba(100, 116, 139, 0.82);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.composer-agent-model-pool-pill {
  background: color-mix(in srgb, var(--app-text-muted, var(--studio-chat-s3-18)) 10%, transparent);
}

.composer-agent-model-pool-count-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  /* Use real color tokens only — never shadow strings like --studio-chat-s3-21. */
  background: color-mix(in srgb, var(--app-text, var(--studio-chat-s3-1)) 88%, transparent);
  color: var(--app-surface-bg, var(--studio-chat-s3-22));
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.composer-agent-model-pool-header {
  display: grid;
  gap: 6px;
  padding: 2px;
}

.composer-agent-model-pool-managed {
  min-height: 42px;
  border: 0;
  border-radius: var(--app-menu-item-radius, 9px);
  background: transparent;
  color: var(--app-popover-text, var(--studio-chat-s3-1));
  font: inherit;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.composer-agent-model-pool-managed:hover,
.composer-agent-model-pool-managed.active {
  background: var(--app-menu-item-bg-active, color-mix(in srgb, var(--app-popover-text, var(--studio-chat-s3-1)) 8%, transparent));
}

.composer-agent-model-pool-check {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 6px;
  color: var(--app-popover-text, var(--studio-chat-s3-1));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.82;
}

.composer-agent-model-pool-managed-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.composer-agent-model-pool-managed-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--app-popover-text, var(--studio-chat-s3-1));
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.composer-agent-model-pool-managed-copy em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: color-mix(in srgb, var(--app-popover-text, var(--studio-chat-s3-1)) 86%, transparent);
  color: var(--app-popover-bg, var(--studio-chat-s3-21));
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.composer-agent-model-pool-option {
  min-height: 48px;
}

.composer-agent-model-pool-main {
  min-width: 0;
  flex: 1 1 auto;
}

.composer-agent-model-pool-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.composer-agent-model-pool-speed {
  min-width: 0;
  color: var(--app-popover-muted, var(--studio-chat-s3-18));
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.composer-agent-select-icon {
  min-width: 16px;
  width: auto;
  height: 16px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-agent-select-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
}

.composer-agent-resolution-badge,
.composer-agent-quality-badge {
  min-width: 24px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: currentColor;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.composer-agent-quality-badge {
  min-width: 26px;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
  font-size: 8.5px;
}

.composer-agent-select-pill.active,
.composer-agent-select-pill:hover:not(:disabled) {
  background: var(--app-menu-item-bg-active, rgba(15, 23, 42, 0.085));
}

.composer-agent-pill-section {
  display: grid;
  gap: 5px;
}

.composer-agent-pill-section + .composer-agent-pill-section {
  padding-top: 7px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.composer-agent-pill-heading {
  padding: 0 5px;
  color: var(--studio-chat-s3-18);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.composer-agent-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.composer-agent-pill-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.composer-agent-pill-option-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.composer-agent-pill-option-title-line {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.composer-agent-pill-option-title-line .composer-agent-pill-option-label {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-agent-pill-empty {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--studio-chat-s3-18);
  font-size: 12px;
  font-weight: 760;
}

.composer-agent-preference-field > span {
  color: var(--studio-chat-s3-18);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.agent-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agent-suggestion-preview {
  flex-basis: 100%;
  max-height: 150px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  padding: 9px 10px;
}

.agent-suggestion-apply {
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
}

.agent-suggestion-apply:hover,
.agent-suggestion-apply:focus-visible {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.42);
}

.agent-generation-draft-card {
  width: 100%;
  max-width: 640px;
  margin-top: 12px;
  box-sizing: border-box;
  font-family: inherit;
  letter-spacing: normal;
}

.agent-generation-draft-confirm-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  width: 100%;
  padding: 20px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f5;
  box-shadow: none;
  color: inherit;
}

.agent-generation-draft-confirm-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.agent-generation-draft-confirm-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.agent-generation-draft-confirm-text strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.agent-generation-draft-summary {
  color: #666666;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.agent-generation-draft-model {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
}

.agent-generation-draft-model > span:last-child {
  overflow-wrap: anywhere;
}

.agent-generation-draft-estimate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.agent-generation-draft-estimate svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.agent-generation-draft-actions {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.agent-generation-confirm,
.agent-generation-regenerate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: #171717;
  color: #ffffff;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: normal;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.agent-generation-confirm:active:not(:disabled),
.agent-generation-regenerate:active:not(:disabled) {
  transform: scale(0.95);
}

.agent-generation-submit-spinner {
  flex: 0 0 auto;
  animation: agentGenerationSubmitSpin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .agent-generation-submit-spinner { animation: none; }
}

.agent-generation-confirm:hover:not(:disabled),
.agent-generation-regenerate:hover:not(:disabled) {
  background: #333333;
}

.agent-generation-confirm:focus-visible,
.agent-generation-regenerate:focus-visible,
.agent-generation-draft-choice-list input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.agent-generation-confirm:disabled,
.agent-generation-regenerate:disabled {
  background: #ededed;
  color: #737373;
  cursor: not-allowed;
}

.agent-generation-draft-choice-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.agent-generation-draft-choice-panel > span {
  font-size: 13px;
  line-height: 1.5;
}

.agent-generation-draft-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}

.agent-generation-draft-choice-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.agent-generation-draft-choice-list input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: #171717;
}

.agent-generation-credit-warning,
.agent-generation-draft-failure {
  color: #b42318;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.agent-generation-credit-warning {
  grid-column: 1 / -1;
}

.agent-generation-draft-failure {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .agent-generation-draft-confirm-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-generation-draft-confirm-copy,
  .agent-generation-draft-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .agent-generation-draft-actions {
    justify-content: flex-end;
  }

  .agent-generation-draft-choice-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.message-feedback-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.generated-media-message > .message-feedback-controls {
  margin-left: 2px;
}

.message-feedback-controls button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.message-feedback-controls button:hover,
.message-feedback-controls button:focus-visible {
  background: transparent;
  color: #0f172a;
  transform: translateY(-1px);
}

.message-feedback-controls button.active {
  background: transparent;
  color: #0f172a;
}

.message-feedback-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.message-feedback-controls span {
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
}

.composer-pricing-notice {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: inherit;
}

.composer-pricing-notice-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: inherit;
  opacity: 0.72;
}

.composer-pricing-notice > p {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
  color: inherit;
}

.composer-agent-tier-chip {
  gap: 5px;
  font-weight: 700;
}

.composer-agent-tier-chip.pro.active {
  border-color: color-mix(in srgb, var(--studio-chat-s2-2, #111827) 34%, transparent);
  background: color-mix(in srgb, var(--studio-chat-s2-2, #111827) 8%, transparent);
}

.agent-plan-above-media {
  margin-bottom: 10px;
}

.agent-plan-summary-details {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--studio-chat-s2-5, rgba(15, 23, 42, 0.12)) 90%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--studio-chat-s2-6, #f8fafc) 88%, transparent);
  padding: 8px 12px;
  font-size: 12.5px;
}

.agent-plan-summary-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--app-text, var(--studio-chat-s2-2, #111827));
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-plan-summary-details > summary::before {
  content: '\25B8';
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.16s ease;
}

.agent-plan-summary-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.agent-plan-visual-system {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--studio-chat-s2-2, #111827) 5%, transparent);
}

.agent-plan-visual-system strong {
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.8;
}

.agent-plan-visual-system p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.agent-plan-screen-list {
  display: grid;
  gap: 8px;
}

.agent-plan-screen-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--studio-chat-s2-5, rgba(15, 23, 42, 0.1)) 85%, transparent);
  background: var(--app-surface, #ffffff);
}

.agent-plan-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-plan-screen-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.agent-plan-screen-head strong > span {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--studio-chat-s2-2, #111827) 9%, transparent);
}

.agent-plan-ref-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.agent-plan-ref-badge {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--studio-chat-s2-7, rgba(15, 23, 42, 0.18)) 80%, transparent);
  opacity: 0.9;
}

.agent-plan-screen-copy,
.agent-plan-screen-prompt {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.agent-plan-screen-prompt {
  color: var(--app-text-muted, var(--studio-chat-s2-19, #64748b));
  white-space: pre-wrap;
}

.agent-media-stage-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
}

.agent-media-stop-later-btn {
  border: 1px solid color-mix(in srgb, #dc2626 36%, transparent);
  background: color-mix(in srgb, #dc2626 10%, transparent);
  color: #dc2626;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.agent-media-stop-later-btn:hover {
  background: color-mix(in srgb, #dc2626 16%, transparent);
}

.generated-media-thumb {
  position: relative;
}

.generated-media-thumb.canceled {
  opacity: 0.48;
  border-style: dashed;
}

.generated-media-thumb.has-review-issue {
  border-color: #d97706;
}

.generated-media-thumb-issue-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.composer-attachment-menu {
  border: 0 !important;
  border-radius: 14px !important;
  padding: 6px !important;
  min-width: 164px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22) !important;
}

.composer-attachment-menu button,
.composer-attachment-menu-item {
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

.agent-plan-prompt-toggle {
  margin-top: 4px;
}

.agent-plan-prompt-toggle > summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--app-text-muted, var(--studio-chat-s2-19, #64748b));
}

.agent-plan-prompt-toggle > summary:hover {
  color: var(--app-text, var(--studio-chat-s2-2, #111827));
}

.agent-review-inline-pass {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 6px;
  background: transparent !important;
  border: 0 !important;
  color: var(--app-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.agent-review-inline-pass svg {
  color: #10b981;
  flex: 0 0 auto;
}

.generated-media-suite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.generated-media-suite-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--app-text, var(--studio-chat-s2-2, #111827));
  opacity: 0.9;
}

.generated-media-suite-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.generated-media-suite-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.generated-media-suite-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  opacity: 0.72;
  cursor: pointer;
}

.generated-media-suite-tabs button.active {
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  opacity: 1;
}

.generated-media-suite-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.generated-media-suite-download:hover {
  background: rgba(255, 255, 255, 0.15);
}

.generated-media-suite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.generated-media-suite-grid-item {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.generated-media-suite-grid-item.active {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: -2px;
}

.generated-media-suite-grid-media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--generated-media-aspect, 3 / 4);
  background: rgba(0, 0, 0, 0.18);
  display: block;
  overflow: hidden;
}

.generated-media-suite-grid-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.generated-media-suite-grid-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  font-size: 11.5px;
  font-weight: 600;
  min-width: 0;
}

.generated-media-suite-grid-caption strong {
  opacity: 0.6;
  flex: 0 0 auto;
}

.generated-media-suite-grid-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-media-suite-longscroll {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 680px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
}

.generated-media-suite-longscroll-item {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  width: 100%;
  display: block;
  cursor: pointer;
}

@media (min-width: 960px) {
  .empty-chat-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .empty-chat-actions button {
    aspect-ratio: 2.9 / 1;
    min-height: 78px;
    max-height: 94px;
    padding: 0 16px;
  }
  .empty-chat-task-content {
    gap: 10px;
  }
  .empty-chat-task-icon {
    width: 24px;
    height: 24px;
  }
  .empty-chat-task-label {
    font-size: 14px;
  }
}

.empty-chat-actions button {
  border: 0 !important;
}

.empty-chat-task-card.accent-emerald {
  --empty-task-accent: #10b981;
  --empty-task-accent-soft: rgba(16, 185, 129, 0.15);
  --empty-task-accent-line: rgba(16, 185, 129, 0.12);
}

.composer-placeholder-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 19px;
  margin: 0 3px;
  padding: 0 5px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 1px;
  background: rgba(17, 17, 17, 0.065);
  color: rgba(17, 17, 17, 0.68);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.composer-mode-menu-heading {
  padding: 6px 10px 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(17, 17, 17, 0.45);
}

.composer-agent-ump-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  color: #14171c;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.composer-agent-ump-shell .composer-agent-deep-section.has-divider {
  margin-top: 0;
  padding: 8px 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.composer-agent-brain-list {
  display: grid;
  gap: 2px;
}

.composer-agent-brain-option {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111214;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.composer-agent-brain-option:hover,
.composer-agent-brain-option.active {
  background: rgba(17, 17, 17, 0.055);
}

.composer-agent-brain-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-agent-brain-check {
  flex: 0 0 auto;
  opacity: 0.9;
}

.composer-agent-deep-section.has-divider {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.composer-agent-deep-row {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.composer-agent-deep-row:hover {
  background: rgba(17, 17, 17, 0.05);
}

.composer-agent-deep-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.composer-agent-deep-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #111214;
}

.composer-agent-deep-copy small {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(17, 17, 17, 0.5);
  white-space: nowrap;
}

.composer-agent-deep-switch {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.2);
  transition: background 180ms ease;
}

.composer-agent-deep-switch > i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 180ms ease;
}

.composer-agent-deep-switch.active {
  background: #111214;
}

.composer-agent-deep-switch.active > i {
  transform: translateX(14px);
}

.composer-agent-confirmation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-chat-s3-1);
}

.composer-agent-preferences-menu .composer-agent-confirmation-chip {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: rgba(128, 128, 128, 0.06);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-decision-dock {
  pointer-events: auto;
  box-sizing: border-box;
  border-radius: 20px;
  padding: 14px 16px 12px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.09);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  color: #18181b;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.chat-decision-dock.is-collapsed {
  padding-bottom: 12px;
}

.chat-decision-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.chat-decision-dock-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-decision-dock-qicon {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: #18181b;
}

.chat-decision-dock-qdot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #18181b;
}

.chat-decision-dock-title {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  word-break: break-word;
}

.chat-decision-dock-head-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chat-decision-dock-pager {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
}

.chat-decision-dock-page-text {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  padding: 0 3px;
  font-variant-numeric: tabular-nums;
}

.chat-decision-dock-icon-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.chat-decision-dock-icon-btn:hover:not(:disabled) {
  background: rgba(17, 17, 17, 0.06);
  color: #18181b;
}

.chat-decision-dock-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.chat-decision-dock-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-decision-option-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.chat-decision-option-row:hover:not(:disabled) {
  background: #f4f4f5;
}

.chat-decision-option-row.is-selected {
  background: #f4f4f5;
  border-color: rgba(17, 17, 17, 0.09);
}

.chat-decision-keycap {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid rgba(17, 17, 17, 0.08);
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chat-decision-option-row.is-selected .chat-decision-keycap,
.chat-decision-other-row.is-selected .chat-decision-keycap {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}

.chat-decision-option-copy {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.48;
  color: #27272a;
}

.chat-decision-rec-tag {
  font-style: normal;
  font-weight: 600;
  color: #111111;
}

.chat-decision-selected-mark {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #18181b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-decision-other-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: text;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.chat-decision-other-row:hover,
.chat-decision-other-row.is-selected {
  background: #f4f4f5;
  border-color: rgba(17, 17, 17, 0.08);
}

.chat-decision-other-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  padding: 2px 0;
}

.chat-decision-other-input::placeholder {
  color: #71717a;
}

.chat-decision-dock-footer-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-decision-skip-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 5px 8px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease;
}

.chat-decision-skip-btn:hover:not(:disabled) {
  color: #18181b;
  background: rgba(17, 17, 17, 0.05);
}

.chat-decision-continue-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, opacity 0.14s ease;
}

.chat-decision-continue-btn:hover:not(:disabled) {
  background: #27272a;
}

.chat-decision-continue-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.chat-decision-dock.is-compact .chat-decision-dock-title {
  font-size: 12.5px;
}

.chat-decision-dock.is-compact .chat-decision-option-row {
  padding: 6px 8px;
  gap: 8px;
  border-radius: 10px;
}

.chat-decision-dock.is-compact .chat-decision-option-copy,
.chat-decision-dock.is-compact .chat-decision-other-input {
  font-size: 12px;
}

.chat-decision-dock.is-compact .chat-decision-keycap {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.chat-decision-dock.is-compact .chat-decision-continue-btn {
  min-height: 26px;
  padding: 0 11px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .chat-decision-dock {
    padding: 11px 12px 10px;
    border-radius: 16px;
  }

  .chat-decision-dock-body {
    max-height: 38vh;
    overflow-y: auto;
  }

  .chat-decision-other-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .chat-decision-dock-footer-actions {
    margin-left: auto;
  }
}
