html[data-app-route="home"] .studio-layout {
  column-gap: 0 !important;
  background: var(--ds-bg) !important;
}

html[data-app-route="home"] .app-shell,
.app-shell.is-home-active {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100svh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  transform: none !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.09), transparent 32%),
    radial-gradient(circle at 63% 9%, rgba(244, 197, 94, 0.13), transparent 22%),
    radial-gradient(circle at 39% 11%, rgba(133, 181, 255, 0.12), transparent 24%),
    var(--ds-bg) !important;
}

.app-shell.is-home-active > .topbar,
.app-shell.is-home-active > .workspace {
  display: none !important;
}

html[data-app-route="home"] .app-shell > .home-page,
.app-shell.is-home-active > .home-page {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.home-page[hidden] {
  display: none !important;
}

.home-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.home-feature {
  --home-main-width: min(960px, calc(100% - 48px));
  --home-thread-width: min(920px, calc(100% - 48px));
  --home-composer-width: var(--home-thread-width);
  position: relative;
  height: 100%;
  min-height: 0;
  color: var(--ds-text);
}

.home-feature.is-welcome-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0 136px;
}

.home-feature.is-chat-mode {
  display: block;
}

.home-feature.is-chat-mode::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.62), transparent 34%),
    linear-gradient(180deg, rgba(246, 247, 249, 0.62), rgba(246, 247, 249, 0.82) 48%, rgba(246, 247, 249, 0.92));
}

.home-feature.is-chat-mode::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  height: 82px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246, 247, 249, 0), rgba(246, 247, 249, 0) 42%, rgba(246, 247, 249, 0.72) 84%, var(--ds-bg) 100%);
}

.home-history {
  position: absolute;
  top: 24px;
  left: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  isolation: isolate;
}

.home-history__trigger {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: var(--ds-radius-pill);
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ds-text-soft);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  font-weight: 760;
  cursor: pointer;
  transition:
    background var(--ds-duration) var(--ds-ease-standard),
    color var(--ds-duration) var(--ds-ease-standard),
    box-shadow var(--ds-duration) var(--ds-ease-standard);
}

.home-history__trigger:hover,
.home-history__trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-xs);
}

.home-history__trigger:active,
.home-history__clear:active,
.home-history__item-main:active,
.home-history__delete:active {
  transform: translateY(1px);
}

.home-history__trigger:focus-visible,
.home-history__clear:focus-visible,
.home-history__delete-selected:focus-visible,
.home-history__cancel-delete:focus-visible,
.home-history__item-main:focus-visible,
.home-history__delete:focus-visible,
.home-history__select-all:focus-within,
.home-history__pick:focus-within,
.home-history__search:focus-within {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.home-history__trigger svg {
  width: 15px;
  height: 15px;
}

.home-history__trigger--new {
  padding-right: 12px;
}

.home-history__popover {
  position: absolute;
  top: 46px;
  left: 0;
  width: 272px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.995);
  padding: 10px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(18px) saturate(1.04);
  animation: homePopoverIn 160ms var(--ds-ease-standard, ease) both;
}

.home-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0 4px;
}

.home-history__head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.home-history__head strong {
  color: var(--ds-text);
  font-size: 13px;
  line-height: 17px;
  font-weight: 820;
}

.home-history__head span {
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.home-history__clear {
  height: 28px;
  border: 0;
  border-radius: var(--ds-radius-pill);
  padding: 0 9px;
  background: transparent;
  color: var(--ds-text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.home-history__clear:hover:not(:disabled) {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.home-history__clear:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.home-history__delete-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
}

.home-history__delete-bar strong {
  justify-self: end;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 780;
}

.home-history__delete-bar > div {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
}

.home-history__select-all {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ds-text);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.home-history__select-all input,
.home-history__pick input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--ds-text);
}

.home-history__delete-selected,
.home-history__cancel-delete {
  height: 28px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0 10px;
  background: #fff;
  color: var(--ds-text);
  font: inherit;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
}

.home-history__delete-selected {
  border-color: rgba(220, 38, 38, 0.18);
  color: var(--ds-danger);
}

.home-history__delete-selected:hover:not(:disabled) {
  background: var(--ds-danger-soft);
}

.home-history__cancel-delete:hover,
.home-history__delete-selected:disabled {
  background: var(--ds-surface-soft);
}

.home-history__delete-selected:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.home-history__notice {
  margin: 0 0 10px;
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 18px;
}

.home-history__search {
  height: 34px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--ds-line);
  border-radius: 11px;
  padding: 0 10px;
  background: var(--ds-surface-soft);
  color: var(--ds-text-muted);
}

.home-history__search svg {
  width: 15px;
  height: 15px;
}

.home-history__search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ds-text);
  font: inherit;
  font-size: 12px;
}

.home-history__search input::placeholder {
  color: var(--ds-text-subtle);
}

.home-history__list {
  max-height: min(360px, calc(100vh - 190px));
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.home-history__group {
  display: grid;
  gap: 3px;
}

.home-history__group > p {
  margin: 0;
  padding: 0 4px 2px;
  color: var(--ds-text-subtle);
  font-size: 10px;
  line-height: 14px;
  font-weight: 820;
}

.home-history__item {
  position: relative;
  width: 100%;
  border-radius: 10px;
}

.home-history__pick {
  position: absolute;
  top: 50%;
  left: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  cursor: pointer;
}

.home-history__item-main {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ds-text);
  font: inherit;
  cursor: pointer;
  padding: 6px 36px 6px 8px;
  text-align: left;
}

.home-history__item.is-selecting .home-history__item-main {
  padding-left: 34px;
}

.home-history__item.is-delete-selected .home-history__item-main {
  background: rgba(241, 245, 249, 0.92);
}

.home-history__thumb {
  width: 34px;
  height: 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--ds-line);
  border-radius: 8px;
  background: var(--ds-surface-soft);
  color: var(--ds-text-muted);
}

.home-history__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-history__thumb svg {
  width: 15px;
  height: 15px;
}

.home-history__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.home-history__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
}

.home-history__copy small,
.home-history__item-main time {
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.home-history__item-main time {
  align-self: start;
  padding-top: 2px;
}

.home-history__delete {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--ds-radius-pill);
  background: transparent;
  color: var(--ds-text-subtle);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.96);
  transition:
    opacity var(--ds-duration) var(--ds-ease-standard),
    background var(--ds-duration) var(--ds-ease-standard),
    color var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration) var(--ds-ease-standard);
}

.home-history__trigger[aria-disabled="true"],
.home-history__item-main[aria-disabled="true"] {
  opacity: 0.68;
  cursor: not-allowed;
}

.home-history__delete:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.home-history__item.is-locked .home-history__item-main,
.home-history__item.is-locked .home-history__delete {
  pointer-events: none;
}

.home-history__delete svg {
  width: 14px;
  height: 14px;
}

.home-history__item:hover .home-history__item-main,
.home-history__item.is-active .home-history__item-main,
.home-history__item:focus-within .home-history__item-main {
  background: var(--ds-feedback-hover);
}

.home-history__item:hover .home-history__delete,
.home-history__item:focus-within .home-history__delete,
.home-history__item.is-selecting .home-history__delete {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.home-history__delete:hover {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.home-history__item.is-locked:hover .home-history__delete,
.home-history__item.is-locked:focus-within .home-history__delete,
.home-history__delete:disabled:hover {
  opacity: 0.22;
  background: transparent;
  color: var(--ds-text-subtle);
  transform: translateY(-50%) scale(0.96);
}

.home-history__empty {
  margin: 0;
  padding: 18px 8px;
  color: var(--ds-text-muted);
  text-align: center;
  font-size: 12px;
}

.home-welcome {
  width: var(--home-main-width);
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.home-eyebrow {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-welcome h1 {
  margin: 12px 0 0;
  color: #101828;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 48px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-mode-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-mode-tabs button {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ds-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--ds-shadow-xs);
  cursor: pointer;
  transition:
    transform var(--ds-duration) var(--ds-ease-standard),
    border-color var(--ds-duration) var(--ds-ease-standard),
    background var(--ds-duration) var(--ds-ease-standard),
    box-shadow var(--ds-duration) var(--ds-ease-standard);
}

.home-mode-tabs button:hover {
  transform: translateY(-1px);
  border-color: var(--ds-line-strong);
  background: #fff;
  box-shadow: var(--ds-shadow-sm);
}

.home-mode-tabs svg {
  width: 15px;
  height: 15px;
}

.home-thread {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 190px;
  padding: 48px 0 272px;
  scrollbar-width: thin;
  scrollbar-color: rgba(152, 162, 179, 0.55) transparent;
}

.home-thread::-webkit-scrollbar {
  width: 8px;
}

.home-thread::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(152, 162, 179, 0.5);
}

.home-thread__inner {
  width: var(--home-thread-width);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  min-height: 100%;
  align-content: start;
}

.home-thread__bottom {
  height: 128px;
}

.home-turn {
  display: flex;
  width: 100%;
  align-self: start;
  animation: homeTurnIn 220ms var(--ds-ease-standard, ease) both;
}

.home-turn--user {
  justify-content: flex-end;
}

.home-turn--assistant {
  justify-content: flex-start;
}

.home-turn__bubble {
  max-width: 760px;
  color: var(--ds-text);
}

.home-turn--user .home-turn__bubble {
  width: fit-content;
  max-width: min(620px, 76%);
  border: 1px solid rgba(16, 24, 40, 0.055);
  border-radius: 18px 18px 6px 18px;
  background: rgba(244, 247, 251, 0.92);
  padding: 10px 14px;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

.home-turn--assistant .home-turn__bubble {
  width: min(760px, 100%);
}

.home-turn__bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 25px;
}

.home-turn__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.home-turn__attachments span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0 9px;
  background: var(--ds-surface-soft);
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 650;
}

.home-message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--ds-text-muted);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition:
    opacity var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration) var(--ds-ease-standard);
}

.home-turn:hover .home-message-actions,
.home-turn:focus-within .home-message-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.home-turn__bubble:has(.home-result-strip) > .home-message-actions,
.home-turn__bubble:has(.home-result-gallery) > .home-message-actions {
  display: none;
}

.home-message-actions button,
.home-check-action {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: var(--ds-radius-pill);
  padding: 0 8px;
  background: transparent;
  color: var(--ds-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.home-message-actions button:hover,
.home-check-action:hover {
  background: var(--ds-feedback-hover);
  color: var(--ds-text);
}

.home-check-action input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--ds-text);
}

.home-task-card {
  width: min(282px, 100%);
}

.home-task-card.is-multi {
  width: min(380px, 100%);
}

.home-task-card.is-multi.is-dense-multi {
  width: min(352px, 100%);
}

.home-task-card.is-restored {
  width: min(460px, 100%);
}

.home-task-card__head {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.home-task-card__head strong {
  display: block;
  color: var(--ds-text);
  font-size: 14px;
  line-height: 18px;
  font-weight: 800;
}

.home-task-card__head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-elapsed {
  color: var(--ds-text);
  font-weight: 780;
}

.home-pulse {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--ds-accent);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.36);
  animation: homePulse 1.45s ease-in-out infinite;
}

.home-task-card.is-restored .home-pulse {
  background: var(--ds-text-muted);
  box-shadow: none;
  animation: none;
}

.home-task-text-status {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.84);
  color: var(--ds-text-muted);
}

.home-task-text-status strong {
  display: block;
  margin: 0 0 3px;
  color: var(--ds-text);
  font-size: 12px;
  font-weight: 780;
  line-height: 17px;
}

.home-task-text-status p {
  margin: 0;
  font-size: 12px;
  font-weight: 560;
  line-height: 18px;
}

.home-task-text-status__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.home-task-resend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-xs);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--ds-duration) var(--ds-ease-standard),
    border-color var(--ds-duration) var(--ds-ease-standard),
    box-shadow var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-standard);
}

.home-task-resend svg {
  width: 13px;
  height: 13px;
}

.home-task-resend:hover {
  border-color: var(--ds-line-strong);
  background: #fff;
  box-shadow: var(--ds-shadow-sm);
}

.home-task-resend:active {
  transform: translateY(1px);
}

.home-task-resend:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.home-task-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-task-card.is-multi .home-task-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-task-preview {
  position: relative;
  justify-self: start;
  width: min(100%, var(--home-task-fit-width, 400px));
  aspect-ratio: var(--home-task-aspect, 1 / 1);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(170, 196, 255, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(246, 248, 252, 0.94), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(150deg, rgba(37, 99, 235, 0.055) 0 1px, transparent 1px 15px);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.08);
}

.home-task-card.is-multi .home-task-preview {
  justify-self: stretch;
  width: 100%;
  min-height: 0;
}

.home-task-preview::before,
.home-task-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-task-preview::before {
  background:
    radial-gradient(circle at 28% 18%, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at 80% 72%, rgba(244, 197, 94, 0.14), transparent 34%);
  animation: homePreviewBreath 2.4s ease-in-out infinite;
}

.home-task-preview::after {
  width: 42%;
  transform: translateX(-140%) skewX(-14deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: homePreviewSweep 1.55s ease-in-out infinite;
}

.home-task-card.is-restored .home-task-preview {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.72);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.76)),
    repeating-linear-gradient(150deg, rgba(100, 116, 139, 0.05) 0 1px, transparent 1px 15px);
}

.home-task-card.is-restored .home-task-preview::before,
.home-task-card.is-restored .home-task-preview::after {
  animation: none;
  opacity: 0.72;
}

.home-task-preview span {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 255, 255, 0.76));
}

.home-task-preview em {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: var(--ds-text-muted);
  font-style: normal;
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
}

.home-result-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 218px));
  gap: 12px;
  justify-content: start;
  width: min(468px, 100%);
  margin-top: 12px;
}

.home-result-gallery {
  width: min(304px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 256px) 62px;
  align-items: start;
  gap: 10px;
  margin-top: 12px;
}

.home-result-gallery .home-output-card {
  width: fit-content;
  max-width: 100%;
}

.home-result-thumbs {
  display: grid;
  gap: 8px;
  max-height: min(372px, calc(100svh - 260px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
  scrollbar-width: thin;
}

.home-result-thumb {
  width: min(58px, var(--home-thumb-fit-width, 86px));
  aspect-ratio: var(--home-thumb-aspect, 1 / 1);
  display: block;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0;
  background: var(--ds-surface-soft);
  box-shadow: none;
  cursor: pointer;
  transition:
    border-color var(--ds-duration) var(--ds-ease-standard),
    box-shadow var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-standard);
}

.home-result-thumb:hover,
.home-result-thumb:focus-visible {
  border-color: rgba(100, 116, 139, 0.45);
  outline: none;
}

.home-result-thumb.is-active {
  border-color: var(--ds-text);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.home-result-thumb:active {
  transform: translateY(1px);
}

.home-result-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-output-card {
  position: relative;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.home-output-card.is-selected {
  border-color: var(--ds-line-strong);
  box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.06);
}

.home-result-select {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-pill);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ds-shadow-xs);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration) var(--ds-ease-standard);
}

.home-result-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-result-select span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ds-line-strong);
  border-radius: 3px;
  background: #fff;
}

.home-result-select input:checked + span {
  border-color: var(--ds-text);
  background:
    linear-gradient(45deg, transparent 44%, #fff 45% 56%, transparent 57%),
    linear-gradient(-45deg, transparent 51%, #fff 52% 62%, transparent 63%),
    var(--ds-text);
}

.home-output-card:hover .home-result-select,
.home-output-card:focus-within .home-result-select,
.home-output-card.is-selected .home-result-select {
  opacity: 1;
  transform: translateY(0);
}

.home-result-toolbar {
  width: min(760px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
}

.home-result-toolbar > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-result-toolbar button {
  height: 24px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0 8px;
  background: #fff;
  color: var(--ds-text-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.home-result-toolbar button:hover:not(:disabled) {
  border-color: var(--ds-line-strong);
  background: var(--ds-surface-soft);
  color: var(--ds-text);
}

.home-result-toolbar button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.home-output-card__media {
  position: relative;
  display: block;
  width: min(100%, var(--home-result-fit-width, 430px));
  height: auto;
  aspect-ratio: var(--home-result-aspect, 1 / 1);
  overflow: hidden;
  border-radius: 14px;
  background: #f4f6f8;
}

.home-output-card__preview {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.home-output-card__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-output-card__overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 6px;
  padding: 40px 9px 9px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  background: linear-gradient(180deg, rgba(16, 24, 40, 0), rgba(16, 24, 40, 0.56));
  transition:
    opacity var(--ds-duration) var(--ds-ease-standard),
    transform var(--ds-duration) var(--ds-ease-standard);
}

.home-output-card:hover .home-output-card__overlay,
.home-output-card:focus-within .home-output-card__overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.home-output-card__preview:focus-visible,
.home-output-card__actions button:focus-visible,
.home-result-select:focus-within {
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: -2px;
}

.home-output-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  color: #fff;
  pointer-events: none;
}

.home-output-card__body strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.home-output-card__body span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 700;
}

.home-output-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0;
  pointer-events: auto;
}

.home-output-card__actions button {
  min-width: 32px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--ds-radius-pill);
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--ds-duration) var(--ds-ease-standard),
    border-color var(--ds-duration) var(--ds-ease-standard),
    color var(--ds-duration) var(--ds-ease-standard);
}

.home-output-card__actions button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.home-output-card__actions button[data-result-action="save-template"] {
  min-width: 32px;
}

.home-output-card__actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.home-composer-shell {
  width: var(--home-composer-width);
  z-index: 20;
}

.home-feature.is-welcome-mode .home-composer-shell {
  margin-top: 18px;
}

.home-feature.is-chat-mode .home-composer-shell {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
}

.home-composer {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 112px;
  align-items: end;
  gap: 7px;
  min-height: 54px;
  border: 1px solid var(--ds-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px;
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.10);
  backdrop-filter: blur(16px);
}

.home-composer.is-generating {
  border-color: var(--ds-line-accent);
  box-shadow:
    0 22px 60px rgba(16, 24, 40, 0.10),
    0 0 0 4px rgba(37, 99, 235, 0.06);
}

.home-composer.is-generating .home-icon-button,
.home-composer.is-generating .home-config-button {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.home-file-input {
  display: none;
}

.home-input-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.home-input-wrap textarea {
  width: 100%;
  min-height: 30px;
  max-height: 128px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ds-text);
  font: inherit;
  font-size: 14px;
  line-height: 22px;
  padding: 4px 0;
}

.home-input-wrap textarea::placeholder {
  color: var(--ds-text-subtle);
}

.home-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.home-attachment {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ds-line);
  background: var(--ds-surface-soft);
}

.home-attachment img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.home-attachment button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
}

.home-icon-button,
.home-config-button,
.home-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform var(--ds-duration) var(--ds-ease-standard),
    background var(--ds-duration) var(--ds-ease-standard),
    border-color var(--ds-duration) var(--ds-ease-standard),
    color var(--ds-duration) var(--ds-ease-standard),
    opacity var(--ds-duration) var(--ds-ease-standard);
}

.home-icon-button {
  width: 34px;
  height: 34px;
  border-radius: var(--ds-radius-pill);
  background: transparent;
  color: var(--ds-text);
}

.home-icon-button:hover,
.home-icon-button[aria-expanded="true"] {
  background: var(--ds-feedback-hover);
}

.home-icon-button[aria-disabled="true"],
.home-config-button[aria-disabled="true"] {
  opacity: 0.56;
  cursor: not-allowed;
}

.home-icon-button svg,
.home-config-button svg,
.home-send svg {
  width: 17px;
  height: 17px;
}

.home-config-button {
  min-width: 224px;
  max-width: min(322px, 34vw);
  height: 34px;
  gap: 5px;
  border-radius: var(--ds-radius-pill);
  padding: 0 9px 0 12px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(241, 245, 249, 0.84);
  color: var(--ds-text-soft);
  font-size: 12px;
  font-weight: 760;
}

.home-config-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-config-button__model {
  flex: 1 1 auto;
  color: var(--ds-text-soft);
  font-weight: 720;
}

.home-config-button__metric {
  flex: 0 0 auto;
  color: var(--ds-text);
  font-weight: 860;
  letter-spacing: 0;
}

.home-config-button:hover,
.home-config-button[aria-expanded="true"] {
  background: rgba(226, 232, 240, 0.92);
  color: var(--ds-text);
}

.home-config-button[aria-disabled="true"]:hover,
.home-config-button[aria-disabled="true"][aria-expanded="true"],
.home-icon-button[aria-disabled="true"]:hover,
.home-icon-button[aria-disabled="true"][aria-expanded="true"] {
  background: transparent;
  color: var(--ds-text-soft);
}

.home-config-button svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.home-send {
  width: 112px;
  height: 38px;
  gap: 7px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-text);
  color: var(--ds-text-inverse);
  font-size: 13px;
  font-weight: 800;
}

.home-send:hover:not([aria-disabled="true"]) {
  transform: translateY(-1px);
  background: #111827;
}

.home-send[aria-disabled="true"] {
  opacity: 0.62;
  cursor: not-allowed;
}

.home-composer.is-generating .home-send {
  opacity: 1;
  cursor: pointer;
}

.home-send__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-top-color: #fff;
  border-radius: 999px;
  animation: homeSpin 0.8s linear infinite;
}

.home-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  top: auto;
  z-index: 30;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 56px rgba(16, 24, 40, 0.16);
  backdrop-filter: blur(18px);
  animation: homePopoverIn 160ms var(--ds-ease-standard, ease) both;
}

.home-feature.is-welcome-mode .home-popover {
  top: calc(100% + 10px);
  bottom: auto;
}

.home-feature.is-chat-mode .home-popover {
  top: auto;
  bottom: calc(100% + 10px);
}

.home-popover::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-right: 1px solid rgba(16, 24, 40, 0.10);
  border-bottom: 1px solid rgba(16, 24, 40, 0.10);
  background: rgba(255, 255, 255, 0.98);
}

.home-feature.is-chat-mode .home-popover::after {
  top: auto;
  bottom: -6px;
  border: 0;
  border-right: 1px solid rgba(16, 24, 40, 0.10);
  border-bottom: 1px solid rgba(16, 24, 40, 0.10);
}

.home-feature.is-welcome-mode .home-popover::after {
  top: -6px;
  bottom: auto;
  border: 0;
  border-top: 1px solid rgba(16, 24, 40, 0.10);
  border-left: 1px solid rgba(16, 24, 40, 0.10);
}

.home-popover--add {
  left: 4px;
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
}

.home-popover--add::after {
  left: 18px;
}

.home-popover--add button {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: var(--ds-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.home-popover--add button:hover {
  background: var(--ds-feedback-hover);
}

.home-popover--add svg {
  width: 17px;
  height: 17px;
  color: var(--ds-text-muted);
}

.home-popover--settings {
  right: 106px;
  width: min(456px, calc(100vw - 300px));
  padding: 14px;
  border-radius: 16px;
}

.home-popover--settings::after {
  right: 28px;
}

.home-setting-field {
  display: grid;
  gap: 7px;
}

.home-setting-field + .home-setting-field {
  margin-top: 11px;
}

.home-setting-field > span {
  color: var(--ds-text-soft);
  font-size: 12px;
  line-height: 16px;
  font-weight: 860;
}

.home-setting-field select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ds-text);
  font: inherit;
  font-size: 13px;
  padding: 0 12px;
  outline: 0;
}

.home-setting-field select:focus-visible {
  box-shadow: var(--ds-shadow-focus);
}

.home-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.home-segmented button {
  min-width: 42px;
  height: 32px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0 11px;
  background: #fff;
  color: var(--ds-text);
  font: inherit;
  font-size: 12px;
  font-weight: 840;
  cursor: pointer;
}

.home-segmented button:hover {
  border-color: var(--ds-line-strong);
  background: var(--ds-surface-soft);
}

.home-segmented button.is-selected {
  border-color: var(--ds-line-strong);
  background: rgba(226, 232, 240, 0.88);
  color: var(--ds-text);
}

.home-status-line {
  min-height: 20px;
  padding: 8px 12px 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 18px;
}

.home-feature.is-welcome-mode .home-status-line {
  padding-left: 4px;
}

.home-feature.is-chat-mode .home-status-line {
  display: none !important;
}

@keyframes homeWelcomeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes homeTurnIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes homePopoverIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes homePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.38);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes homeSweep {
  from {
    left: -80px;
  }
  to {
    left: 100%;
  }
}

@keyframes homeSkeletonSweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes homePreviewBreath {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes homePreviewSweep {
  from {
    transform: translateX(-140%) skewX(-14deg);
  }
  to {
    transform: translateX(260%) skewX(-14deg);
  }
}

@keyframes homeSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .home-feature {
    --home-main-width: min(900px, calc(100% - 40px));
    --home-thread-width: min(860px, calc(100% - 40px));
    --home-composer-width: var(--home-thread-width);
  }

  .home-popover--settings {
    right: 88px;
    width: min(444px, calc(100vw - 284px));
  }
}

@media (max-width: 900px) {
  .home-feature {
    --home-main-width: calc(100% - 32px);
    --home-thread-width: calc(100% - 32px);
    --home-composer-width: calc(100% - 32px);
  }

  .home-feature.is-welcome-mode {
    padding: 0 0 84px;
  }

  .home-history {
    top: 14px;
    left: 16px;
  }

  .home-history__popover {
    width: min(272px, calc(100vw - 54px));
  }

  .home-welcome h1 {
    font-size: 30px;
    line-height: 38px;
  }

  .home-popover--settings {
    right: 0;
    width: min(456px, calc(100vw - 48px));
  }
}

@media (max-width: 680px) {
  .home-feature {
    --home-main-width: calc(100% - 28px);
    --home-thread-width: calc(100% - 28px);
    --home-composer-width: calc(100% - 28px);
  }

  .home-feature.is-welcome-mode {
    justify-content: flex-start;
    padding: 92px 0 84px;
  }

  .home-thread {
    padding-top: 28px;
    padding-bottom: 304px;
  }

  .home-thread__bottom {
    height: 154px;
  }

  .home-feature.is-chat-mode .home-composer-shell {
    bottom: 6px;
  }

  .home-composer,
  .home-feature.is-welcome-mode .home-composer {
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    border-radius: 22px;
  }

  .home-config-button {
    min-width: 42px;
    width: 42px;
    max-width: 42px;
    padding: 0;
  }

  .home-config-button span {
    display: none;
  }

  .home-send {
    grid-column: 1 / -1;
    width: 100%;
  }

  .home-popover--settings {
    width: calc(100vw - 28px);
    max-height: min(360px, calc(100svh - 176px));
    overflow-y: auto;
  }

  .home-task-card__head {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .home-task-card.is-multi .home-task-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-task-preview,
  .home-task-card.is-multi .home-task-preview {
    min-height: 0;
  }

  .home-result-strip {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  }

  .home-result-gallery {
    width: min(280px, 100%);
    grid-template-columns: minmax(0, 1fr);
  }

  .home-result-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    max-height: none;
    overflow-y: visible;
  }

  .home-result-thumb {
    width: 100%;
    height: 58px;
    aspect-ratio: auto;
  }
}
