﻿:root {
  --blue: #1e22ff;
  --text: #1d1d24;
  --muted: #8f8f99;
  --line: #e9e9ef;
  --panel: #ffffff;
  --canvas: #f7f8fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  background: #000;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas);
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--blue);
  gap: 8px;
}

.brand::before {
  width: 29px;
  height: 23px;
  flex: 0 0 29px;
  content: "";
  background: url("./svg/logo-mark.svg") center / contain no-repeat;
}

.brand-mark {
  display: none;
}

.brand-name {
  width: 111px;
  height: 20px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background: url("./svg/logo-wordmark.svg") center / contain no-repeat;
}

.version {
  align-self: flex-start;
  margin: 1px 0 0 -2px;
  color: #575b65;
  font-size: 10px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-actions a {
  cursor: pointer;
  text-decoration: none;
}

.recharge,
.credits {
  display: inline-flex;
  height: 32px;
  align-items: center;
  border-radius: 18px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.recharge {
  position: relative;
  overflow: hidden;
  gap: 5px;
  padding: 0 14px 0 12px;
  color: #2b1708;
  background: linear-gradient(105deg, #f5c184 0%, #ffe0ad 30%, #fff3ca 47%, #efb56f 68%, #f8d8ad 100%);
  background-size: 220% 100%;
  box-shadow:
    0 8px 18px rgba(212, 142, 55, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  animation: rechargeGradient 4.8s ease-in-out infinite;
}

.recharge::after {
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -35%;
  width: 34px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
  transform: rotate(18deg);
  animation: rechargeShine 3.6s ease-in-out infinite;
}

.recharge:hover,
.credits:hover,
.avatar:hover,
.logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.recharge:active,
.credits:active,
.avatar:active,
.logout:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.crown {
  position: relative;
  z-index: 1;
  font-size: 16px;
  line-height: 1;
}

.recharge .crown,
.recharge {
  z-index: 1;
}

.credits {
  gap: 8px;
  padding: 0 16px 0 10px;
  color: #fff;
  background: #2222c7;
  box-shadow: 0 7px 15px rgba(34, 34, 199, 0.18);
}

.coin {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  background: url("./svg/icon-coin.png") center / contain no-repeat;
  box-shadow: none;
}

.coin.small {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  font-size: 9px;
}

.avatar {
  display: block;
  flex: 0 0 32px;
  overflow: hidden;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 33%, #0b0b0b 0 8px, transparent 9px),
    radial-gradient(circle at 38% 63%, #050505 0 10px, transparent 11px),
    radial-gradient(circle at 64% 64%, #050505 0 11px, transparent 12px),
    linear-gradient(135deg, #c95c14, #ff8a14 44%, #101010 45%);
}

.logout {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #a7a7ae;
}

.logout svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@keyframes rechargeGradient {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes rechargeShine {
  0%,
  35% {
    left: -45%;
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  75%,
  100% {
    left: 120%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recharge,
  .recharge::after {
    animation: none;
  }
}

.rail {
  position: absolute;
  top: 50px;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  width: 68px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: #fff;
}

.rail-nav {
  width: 100%;
}

.rail-item {
  display: flex;
  width: 100%;
  height: 76px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: #1f2028;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.rail-item.active {
  background: transparent;
  color: #14151c;
  text-shadow: 0.35px 0 0 currentColor;
}

.rail-icon {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 25px 25px;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.rail-item.active .rail-icon {
  background-color: #eef0ff;
}

.rail-icon.shirt {
  background-image: url("./svg/menu-outfit-line.svg");
}

.rail-item.active .rail-icon.shirt {
  background-image: url("./svg/menu-outfit-fill.svg");
}

.rail-icon.wand {
  background-image: url("./svg/menu-magic-line.svg");
}

.rail-item.active .rail-icon.wand {
  background-image: url("./svg/menu-magic-fill.svg");
}

.rail-icon.layers {
  background-image: url("./svg/menu-assets-line-copy.svg");
}

.rail-item.active .rail-icon.layers {
  background-image: url("./svg/menu-assets-fill-copy.svg");
}

.rail-icon.history {
  background-image: url("./svg/menu-history-line-copy.svg");
}

.rail-item.active .rail-icon.history {
  background-image: url("./svg/menu-history-fill-copy.svg");
}

.disclaimer {
  margin-bottom: 17px;
  color: #85858c;
  font-size: 12px;
  text-decoration: none;
}

.settings {
  position: absolute;
  top: 50px;
  bottom: 0;
  left: 68px;
  z-index: 2;
  width: 381px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  border-right: 1px solid #d9dbe4;
  background: #fff;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 17px 20px 14px;
  padding: 4px;
  border-radius: 4px;
  background: #f6f6f8;
}

.tabs::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 3px;
  content: "";
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 21, 35, 0.08);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tabs[data-active-tab="suit"]::before {
  transform: translateX(calc(100% + 4px));
}

.tab {
  position: relative;
  z-index: 1;
  height: 30px;
  border-radius: 3px;
  color: #666870;
  font-size: 13px;
  background: transparent;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.tab.active {
  color: #1c1d24;
  font-weight: 700;
  background: transparent;
}

.upload-panel {
  animation: panelFade 0.18s ease;
}

.upload-panel[hidden] {
  display: none;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
}

.upload-grid.single {
  grid-template-columns: 1fr;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 112px;
  height: 112px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1px dashed #d9d9df;
  border-radius: 4px;
  color: #191a22;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: #d5d8ff;
  background: #fbfbff;
  box-shadow: inset 0 0 0 1px rgba(30, 34, 255, 0.08);
}

.dropzone.drag-over {
  transform: scale(0.995);
}

.dropzone.small {
  height: 112px;
}

.dropzone.large {
  height: 112px;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.dropzone strong,
.reference-trigger {
  margin-top: 10px;
  font-size: 13px;
}

.reference-trigger {
  position: relative;
  z-index: 2;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.reference-trigger:hover,
.reference-trigger:focus-visible {
  color: #201ab7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone small {
  margin-top: 5px;
  color: #999aa2;
  font-size: 12px;
}

.upload-preview {
  position: absolute;
  top: 4px;
  right: 8px;
  bottom: 4px;
  left: 8px;
  display: none;
  width: calc(100% - 16px);
  height: calc(100% - 8px);
  max-width: none;
  object-fit: contain;
  padding: 0;
}

.upload-meta {
  position: absolute;
  right: 30px;
  bottom: 0;
  left: 0;
  display: none;
  height: 28px;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 5px;
  padding: 0 0 0 9px;
  color: #4c4f58;
  background: transparent;
  pointer-events: none;
}

.upload-state {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
}

.upload-name {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  color: #858895;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-change {
  display: none;
  color: var(--blue);
  font-size: 11px;
}

.upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: none;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  background: #201ab7;
  cursor: pointer;
}

.dropzone.has-file {
  height: 112px;
  min-height: 112px;
  overflow: hidden;
  border-style: solid;
  border-color: #4d4cff;
  background: #fff;
}

.dropzone.has-file:hover {
  border-color: #bfc4ff;
}

.dropzone.has-file .garment-icon,
.dropzone.has-file .match-icon,
.dropzone.has-file .custom-icon,
.dropzone.has-file .outline-icon,
.dropzone.has-file strong,
.dropzone.has-file small,
.dropzone.has-file .reference-trigger {
  display: none;
}

.dropzone.has-file .upload-preview,
.dropzone.has-file .upload-remove {
  display: flex;
}

.dropzone.has-file .upload-preview {
  display: block;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.garment-icon,
.outline-icon {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  color: #a5a5aa;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.garment-icon.top {
  background-image: url("./svg/icon-clothes.svg");
}

.garment-icon.bottom {
  background-image: url("./svg/icon-pants.svg");
}

.garment-icon.suit {
  background-image: url("./svg/icon-clothes.svg");
}

.fold-row {
  display: flex;
  width: calc(100% - 40px);
  height: 36px;
  align-items: center;
  margin: 6px 20px 2px;
  color: #22242c;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.fold-row em {
  color: #999aa1;
  font-style: normal;
}

.fold-row svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 0.18s ease;
}

.feature-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.feature-drawer {
  width: calc(100% - 40px);
  margin: 0 20px 8px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #f6f6f6;
  animation: drawerFade 0.18s ease;
}

.feature-drawer[hidden] {
  display: none;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feature-row + .feature-row {
  margin-top: 6px;
}

.feature-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #64666e;
  font-size: 13px;
  font-weight: 700;
}

.feature-field select {
  width: 100%;
  height: 28px;
  min-width: 0;
  padding: 0 28px 0 4px;
  border: 1px solid #6d6dff;
  border-radius: 3px;
  color: #4a4cff;
  font: inherit;
  font-weight: 500;
  background:
    linear-gradient(45deg, transparent 50%, #4a4cff 50%) calc(100% - 14px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, #4a4cff 50%, transparent 50%) calc(100% - 9px) 50% / 7px 7px no-repeat,
    #fbfbff;
  appearance: none;
  cursor: pointer;
}

.feature-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(30, 34, 255, 0.12);
}

@keyframes drawerFade {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fold-row.spacing {
  margin-top: 7px;
}

.match-toggle {
  height: 32px;
  margin: 6px 20px 2px;
  padding: 0;
  color: #191a22;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.match-toggle .fold-title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.match-toggle em {
  font-size: 12px;
  font-weight: 500;
}

.match-drawer {
  width: calc(100% - 40px);
  margin: 0 20px 10px;
  animation: drawerFade 0.18s ease;
}

.match-drawer[hidden] {
  display: none;
}

.match-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.match-zone {
  height: 100px;
  min-height: 100px;
  gap: 0;
}

.match-zone.has-file {
  height: 100px;
  min-height: 100px;
}

.match-icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  order: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  opacity: 0.58;
}

.match-icon.hat {
  background-image: url("./svg/icon-hat.svg");
}

.match-icon.match-bag {
  background-image: url("./svg/icon-bag-2.svg");
}

.match-icon.shoes {
  background-image: url("./svg/icon-shoes.svg");
}

.match-zone strong {
  order: 1;
  margin-top: 8px;
  font-size: 13px;
}

.match-zone small {
  order: 2;
  margin-top: 4px;
  color: #b3b4bb;
}

.fold-row.inner {
  width: 100%;
  margin: 9px 0 0;
}

.field-group {
  padding-top: 6px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0 20px 10px;
  font-size: 14px;
  line-height: 1;
}

.help {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background: url("./svg/icon-help.svg") center / contain no-repeat;
}

.outline-icon.person {
  background-image: url("./svg/icon-pose-line.svg");
}

.outline-icon.image {
  background-image: url("./svg/icon-scene.svg");
}

.outline-icon.person::before,
.outline-icon.person::after,
.outline-icon.image::before,
.outline-icon.image::after {
  content: none;
}

.dropzone .outline-icon + strong,
.dropzone .outline-icon + .reference-trigger {
  color: var(--blue);
}

.model-card {
  margin: 0 16px;
  padding: 0 4px 8px;
  background: #f8f8f8;
}

.model-card h2 {
  margin: 0 -4px;
  padding: 0 4px 9px;
  background: #fff;
}

.radio-line {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  white-space: nowrap;
  color: #42444b;
  font-size: 12px;
}

.radio-line label {
  display: flex;
  align-items: center;
  gap: 5px;
}

input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #201ab7;
}

.model-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px;
}

.model-option {
  position: relative;
  height: 104px;
  overflow: hidden;
  border: 1px solid #cfd1d8;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.model-option.selected {
  border-color: #201ab7;
  box-shadow: 0 0 0 1px #201ab7 inset;
}

.portrait {
  position: absolute;
  inset: 0 0 20px;
  background:
    radial-gradient(circle at 50% 28%, #f5d8bd 0 16px, transparent 17px),
    radial-gradient(ellipse at 50% 26%, #d4a377 0 22px, transparent 23px),
    linear-gradient(90deg, transparent 15%, #ecebe7 15% 85%, transparent 85%),
    linear-gradient(#f4f4f4, #e7e2d9);
}

.portrait.real {
  background:
    radial-gradient(circle at 50% 29%, #f3cfb8 0 15px, transparent 16px),
    radial-gradient(ellipse at 50% 25%, #7d3d27 0 24px, transparent 25px),
    linear-gradient(90deg, transparent 20%, #ead8d1 20% 80%, transparent 80%),
    linear-gradient(#f7f2ef, #e4d0c6);
}

.portrait.ai {
  background:
    url("./svg/model-ai@2x.png") center / cover no-repeat,
    radial-gradient(circle at 50% 28%, #f5d8bd 0 16px, transparent 17px),
    radial-gradient(ellipse at 50% 26%, #d4a377 0 22px, transparent 23px),
    linear-gradient(90deg, transparent 15%, #ecebe7 15% 85%, transparent 85%),
    linear-gradient(#f4f4f4, #e7e2d9);
}

.portrait.real {
  background:
    url("./svg/model-real@2x.png") center / cover no-repeat,
    radial-gradient(circle at 50% 29%, #f3cfb8 0 15px, transparent 16px),
    radial-gradient(ellipse at 50% 25%, #7d3d27 0 24px, transparent 25px),
    linear-gradient(90deg, transparent 20%, #ead8d1 20% 80%, transparent 80%),
    linear-gradient(#f7f2ef, #e4d0c6);
}

.model-option strong {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: 24px;
  place-items: center;
  color: #15161c;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.5);
}

.model-option.custom,
.history-model-option {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  padding-bottom: 11px;
  gap: 4px;
}

.model-option.custom strong,
.history-model-option strong {
  position: static;
  height: auto;
  background: transparent;
}

.model-option.custom small,
.history-model-option small {
  color: #484a52;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.selected-model-preview {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin: 10px 10px 0;
  padding: 6px 8px;
  border: 1px solid #cfd1ff;
  border-radius: 4px;
  background: #fff;
}

.selected-model-preview[hidden] {
  display: none;
}

.selected-model-thumb {
  width: 52px;
  height: 46px;
  overflow: hidden;
  border-radius: 3px;
  background: #f0f0f4;
}

.selected-model-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.selected-model-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.selected-model-info strong {
  overflow: hidden;
  color: #171923;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-model-info span {
  overflow: hidden;
  color: #666978;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-model-remove {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  background: #201ab7;
  cursor: pointer;
}

.selected-model-remove:hover {
  background: #1113c7;
}

.custom-icon {
  width: 32px;
  height: 26px;
  margin-bottom: 9px;
  background: url("./svg/icon-model-custom.svg") center / contain no-repeat;
  opacity: 0.72;
}

.history-model-icon {
  width: 32px;
  height: 26px;
  margin-bottom: 9px;
  background: url("./svg/menu-history-line-copy.svg") center / contain no-repeat;
  opacity: 0.72;
}

.model-choice-preview,
.history-model-preview {
  position: absolute;
  inset: 4px 4px 24px;
  display: none;
  width: calc(100% - 8px);
  height: calc(100% - 28px);
  object-fit: cover;
  object-position: center top;
}

.model-option.has-choice-image {
  padding-bottom: 0;
}

.model-option.has-choice-image .model-choice-preview,
.model-option.has-choice-image .history-model-preview {
  display: block;
}

.model-option.has-choice-image .portrait,
.model-option.has-choice-image .history-model-icon,
.model-option.has-choice-image small {
  display: none;
}

.model-option.has-choice-image strong {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: 24px;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
}

.model-expression-drawer {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
}

.model-expression-field {
  grid-template-columns: auto 1fr;
}

.model-expression-field select {
  width: 150px;
}

.generation {
  padding: 19px 20px 0;
}

.generation h2 {
  padding: 0 0 10px;
}

.quality-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.quality {
  display: flex;
  height: 31px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #c9c9cf;
  border-radius: 4px;
  color: #4a4c54;
  font-size: 12px;
  text-align: left;
  background: #fff;
}

.quality span {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.quality:first-child span {
  background-image: url("./svg/icon-quality-standard.svg");
}

.quality:first-child.active span {
  filter: brightness(0) saturate(100%) invert(12%) sepia(97%) saturate(4746%) hue-rotate(246deg) brightness(86%) contrast(105%);
}

.quality .hd {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background-image: url("./svg/icon-quality-hd.svg");
}

.quality.active .hd {
  filter: brightness(0) saturate(100%) invert(12%) sepia(97%) saturate(4746%) hue-rotate(246deg) brightness(86%) contrast(105%);
}

.quality.active,
.ratio.active {
  border-color: var(--blue);
  color: var(--blue);
}

.setting-label {
  margin: 10px 0 7px;
  color: #777982;
  font-size: 12px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 6px;
}

.ratio {
  height: 34px;
  border: 1px solid #666870;
  border-radius: 4px;
  color: #4b4d55;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}

.select {
  width: 99px;
  height: 31px;
  margin-top: 9px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  font: inherit;
  background:
    linear-gradient(45deg, transparent 50%, var(--blue) 50%) calc(100% - 15px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--blue) 50%, transparent 50%) calc(100% - 10px) 50% / 7px 7px no-repeat,
    #fff;
  appearance: none;
  cursor: pointer;
}

.generate-bar {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  height: 64px;
  align-items: center;
  margin-top: 14px;
  padding: 0 20px;
  border-top: 1px solid #efeff2;
  background: #fff;
  box-shadow: 0 -10px 24px rgba(21, 24, 44, 0.06);
}

.generate {
  display: flex;
  width: 100%;
  height: 41px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: #cfcfcf;
  cursor: not-allowed;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.custom-model-zone.has-file {
  height: 104px;
  min-height: 104px;
  border-color: #201ab7;
}

.custom-model-zone.has-file .custom-icon,
.custom-model-zone.has-file strong,
.custom-model-zone.has-file small {
  display: none;
}

.custom-model-zone .upload-preview {
  top: 4px;
  right: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
}

.custom-model-zone.has-file .upload-preview {
  display: block;
}

.model-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  background: #201ab7;
  cursor: pointer;
}

.model-option.selected .model-remove,
.custom-model-zone.has-file .model-remove {
  display: flex;
}

.generate:not(:disabled) {
  background: #2022d6;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(32, 34, 214, 0.2);
}

.generate:not(:disabled):hover {
  transform: translateY(-1px);
}

.workspace {
  position: absolute;
  top: 50px;
  right: 0;
  bottom: 0;
  left: 449px;
  background: var(--canvas);
}

.pose-drawer {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(92%, 1680px);
  min-height: 0;
  padding: 18px 24px 0;
  border-right: 1px solid #e2e4ec;
  background: #fff;
  box-shadow: 18px 0 46px rgba(18, 22, 45, 0.12);
  animation: poseDrawerIn 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1200px) {
  .pose-drawer {
    width: calc(100% - 48px);
  }
}

@media (min-width: 1800px) {
  .pose-drawer {
    width: min(88%, 1680px);
  }
}

.pose-drawer[hidden] {
  display: none;
}

.pose-drawer.closing {
  animation: poseDrawerOut 0.36s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}

.pose-drawer-head {
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pose-tabs {
  display: flex;
  gap: 22px;
}

.pose-tab {
  position: relative;
  color: #4c4f5c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.pose-tab.active {
  color: #201ab7;
}

.pose-tab.active::after {
  position: absolute;
  right: 2px;
  bottom: -8px;
  left: 2px;
  height: 2px;
  border-radius: 999px;
  background: #201ab7;
  content: "";
}

.pose-tab:hover {
  color: #201ab7;
}

.pose-close {
  width: 28px;
  height: 28px;
  color: #2d3038;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.pose-grid {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  grid-auto-rows: clamp(184px, 19vw, 236px);
  gap: 16px;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 22px 0;
  scrollbar-gutter: stable;
}

@media (min-width: 1500px) {
  .pose-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 224px;
  }
}

@media (min-width: 2200px) {
  .pose-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 238px;
  }
}

@media (min-width: 3000px) {
  .pose-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    grid-auto-rows: 250px;
  }
}

@media (max-width: 980px) {
  .pose-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    grid-auto-rows: 172px;
    gap: 10px;
  }
}

.pose-card {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f5f6f8;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pose-card.selected {
  border-color: #201ab7;
  box-shadow: 0 0 0 1px #201ab7 inset, 0 10px 24px rgba(32, 26, 183, 0.12);
}

.pose-card:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 26, 183, 0.34);
  box-shadow: 0 14px 28px rgba(18, 22, 45, 0.14);
}

.pose-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.pose-card:hover img {
  filter: saturate(1.06);
  transform: scale(1.035);
}

.pose-check,
.pose-favorite {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: #201ab7;
}

.pose-check {
  top: 8px;
  left: 8px;
  background: #201ab7 url("./svg/state-check.svg") center / 14px 14px no-repeat;
  box-shadow: 0 6px 14px rgba(32, 26, 183, 0.28);
}

.pose-favorite {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  opacity: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82) url("./svg/state-favorite-outline.svg") center / 13px 12px no-repeat;
  box-shadow: 0 8px 18px rgba(18, 22, 45, 0.12);
  backdrop-filter: blur(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.pose-card:hover .pose-favorite,
.pose-card.favorited .pose-favorite {
  opacity: 1;
}

.pose-card:hover .pose-favorite {
  transform: translateY(-1px) scale(1.04);
}

.pose-card.favorited .pose-favorite {
  background-image: url("./svg/state-favorite-filled.svg");
  background-color: rgba(255, 255, 255, 0.9);
}

.pose-empty {
  display: grid;
  flex: 1;
  place-items: center;
  color: #9b9da8;
  font-size: 14px;
}

.pose-empty[hidden] {
  display: none;
}

.pose-drawer-foot {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-height: 74px;
  margin: 0 -24px;
  padding: 16px 24px 18px;
  border-top: 1px solid #eceef5;
  color: #9a9ca6;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 24px rgba(18, 22, 45, 0.05);
}

.pose-confirm {
  width: 152px;
  height: 40px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
  background: #201ab7;
  cursor: pointer;
}

.pose-confirm:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  z-index: 20;
  top: 72px;
  left: 50%;
  max-width: 320px;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: rgba(25, 26, 34, 0.88);
  box-shadow: 0 12px 28px rgba(18, 22, 45, 0.18);
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.image-preview-open {
  overflow: hidden;
}

.image-preview-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 38px 48px 34px;
  overflow: hidden;
  background: rgba(18, 20, 30, 0.82);
}

.image-preview-modal[hidden] {
  display: none;
}

.image-preview-close {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.image-preview-stage {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview-img {
  display: block;
  max-width: min(calc(100vw - 96px), 1120px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.image-preview-actions {
  display: flex;
  justify-content: center;
}

.image-preview-download {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  background: #2022d6;
}

.image-preview-download:hover {
  background: #1618b8;
}

.results-shell {
  background: #f0f1f5;
}

.results-settings {
  overflow-y: auto;
}

.results-scene-zone {
  height: 148px;
}

.result-reference-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 136px;
  margin: 0 20px;
  padding: 10px;
  border: 1px dashed #d8d8ff;
  border-radius: 4px;
  background: #fff;
}

.result-reference-card img {
  width: 96px;
  height: 116px;
  object-fit: cover;
}

.result-reference-card strong {
  color: #2b25d6;
  font-size: 14px;
}

.result-reference-card small {
  display: block;
  margin-top: 8px;
  color: #9a9ca6;
}

.results-workspace {
  position: absolute;
  top: 50px;
  right: 0;
  bottom: 0;
  left: 449px;
  overflow: auto;
  padding: 70px 18px 44px;
  background: #f0f1f5;
}

.result-list {
  display: grid;
  gap: 34px;
}

.result-record {
  min-height: 300px;
  padding: 20px 20px 16px;
  background: #fff;
}

.result-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #1f2129;
  font-size: 14px;
}

.result-record-head strong {
  font-weight: 700;
}

.result-record-head span {
  flex: 0 0 auto;
  color: #4d4f58;
  font-weight: 700;
}

.result-image-row {
  display: grid;
  grid-template-columns: repeat(var(--result-output-count, 1), minmax(0, 220px));
  gap: 16px;
  margin-top: 18px;
}

.result-image-row[hidden] {
  display: none;
}

.result-image {
  position: relative;
  width: 220px;
  height: 292px;
  overflow: hidden;
  margin: 0;
  background: #f5f5f6;
}

.result-image.watermarked {
  cursor: zoom-in;
}

.result-image.watermarked:focus-visible {
  outline: 3px solid rgba(32, 26, 183, 0.36);
  outline-offset: 3px;
}

.result-download {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(32, 34, 214, 0.92);
  box-shadow: 0 8px 18px rgba(18, 22, 45, 0.18);
  cursor: pointer;
}

.result-download:hover {
  background: #1618b8;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-image figcaption {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #201ab7;
  font-size: 14px;
  font-weight: 800;
}

.result-image figcaption::before {
  display: inline-block;
  width: 20px;
  height: 15px;
  margin-right: 4px;
  vertical-align: -2px;
  background: url("./svg/logo-mark.svg") center / contain no-repeat;
  content: "";
}

.loading-preview img {
  opacity: 0.18;
}

.result-image.loading-preview {
  background:
    linear-gradient(110deg, rgba(169, 210, 255, 0.52), rgba(238, 232, 255, 0.66), rgba(210, 246, 255, 0.62)),
    #dff3ff;
}

.result-image.failed-preview {
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 63, 79, 0.16);
  color: #c83f4f;
  font-weight: 800;
  background: #fff3f4;
}

.loading-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.72), rgba(199, 229, 255, 0.26), rgba(255, 255, 255, 0.72));
  animation: resultImagePulse 1.8s ease-in-out infinite;
  content: "";
}

.loading-preview > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  color: #4b4d55;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.result-record footer {
  margin-top: 18px;
  color: #9a9ca6;
  font-size: 12px;
  text-align: right;
}

.generation-loading-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--result-output-count, 1), minmax(0, 220px));
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  height: 292px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 2px;
  background: transparent;
}

.generation-loading-strip[hidden] {
  display: none;
}

.generation-loading-strip::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 18%, rgba(255, 255, 255, 0.55) 36%, transparent 54% 100%);
  animation: resultGradientSweep 2.2s linear infinite;
  content: "";
}

.loading-slice {
  border-radius: 2px;
  background:
    linear-gradient(110deg, rgba(169, 210, 255, 0.52), rgba(238, 232, 255, 0.66), rgba(210, 246, 255, 0.62)),
    #dff3ff;
}

.progress-pill {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  color: #1d2730;
  font-weight: 800;
  background: rgba(146, 194, 232, 0.45);
}

.accelerate-tip {
  margin: 12px 0 0;
  color: #8a96a3;
  font-size: 14px;
}

.accelerate-tip::before {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  margin-right: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #8a96a3;
  font-size: 12px;
  content: "✓";
}

.result-record.complete .generation-loading-strip::before {
  animation-duration: 3.5s;
}

/* History page */
.history-shell {
  --history-accent: #2222c7;
  background: #f5f5f6;
}

.history-shell .rail {
  overflow: hidden;
}

.history-workspace {
  position: absolute;
  top: 50px;
  right: 0;
  bottom: 0;
  left: 68px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f5f6;
}

.history-tabs {
  display: flex;
  height: 58px;
  flex: 0 0 58px;
  align-items: center;
  gap: 0;
  overflow: hidden;
  padding: 0 22px;
  border-bottom: 1px solid #e7e7eb;
  color: #20222a;
  background: #fff;
  white-space: nowrap;
}

.history-tabs button {
  position: relative;
  height: 58px;
  padding: 0;
  color: #20222a;
  cursor: pointer;
}

.history-tabs button.active {
  color: var(--history-accent);
  font-weight: 700;
}

.history-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--history-accent);
  content: "";
}

.history-filter {
  display: flex;
  min-height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 72px 12px 18px;
  color: #2d3038;
  background: #fff;
}

.history-filter-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.history-check,
.history-favorite-filter,
.history-date {
  display: inline-flex;
  align-items: center;
}

.history-check,
.history-favorite-filter {
  gap: 6px;
  color: #52555f;
  font-size: 13px;
}

.history-check input,
.history-favorite-filter input {
  position: absolute;
  opacity: 0;
}

.history-favorite-filter {
  margin-left: 18px;
  cursor: pointer;
}

.history-favorite-filter span {
  width: 14px;
  height: 14px;
  border: 1px solid #d5d6de;
  border-radius: 3px;
  background: #fff;
}

.history-favorite-filter input:checked + span {
  border-color: var(--history-accent);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.2 6.6 11.2 12.8 4.8'/%3E%3C/svg%3E") center / 12px 12px no-repeat,
    var(--history-accent);
}

.history-filter select,
.history-filter input {
  height: 32px;
  min-width: 86px;
  padding: 0 11px;
  border: 1px solid #dedfe5;
  border-radius: 4px;
  color: #4e515b;
  font: inherit;
  font-size: 12px;
  background: #fff;
  accent-color: var(--history-accent);
}

.history-filter select:focus,
.history-filter input:focus {
  outline: none;
  border-color: var(--history-accent);
  box-shadow: 0 0 0 2px rgba(34, 34, 199, 0.1);
}

.history-filter select {
  min-width: 144px;
  padding-right: 28px;
}

.history-filter input::placeholder {
  color: #b7bac4;
}

.filter-label {
  margin-left: 4px;
  color: #2f3139;
  font-size: 12px;
  font-weight: 700;
}

.history-date {
  height: 32px;
  min-width: 254px;
  overflow: hidden;
  border: 1px solid #dedfe5;
  border-radius: 4px;
  background: #fff;
}

.history-date:focus-within {
  border-color: var(--history-accent);
  box-shadow: 0 0 0 2px rgba(34, 34, 199, 0.1);
}

.history-date input {
  width: 118px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  color: #4e515b;
  accent-color: var(--history-accent);
}

.history-date input::selection {
  color: #fff;
  background: var(--history-accent);
}

.history-date input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: brightness(0) saturate(100%) invert(16%) sepia(95%) saturate(3259%) hue-rotate(239deg) brightness(80%) contrast(115%);
}

.history-date span {
  flex: 0 0 auto;
  color: #a7a9b2;
  font-size: 12px;
}

.batch-select,
.history-download,
.batch-action {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid #d5d6de;
  border-radius: 4px;
  color: #2b2d35;
  font-size: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(18, 22, 45, 0.05);
  cursor: pointer;
}

.batch-select {
  margin-left: 10px;
  color: #23252d;
  font-weight: 700;
}

.batch-select svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.batch-select:hover,
.batch-select.active {
  border-color: var(--history-accent);
  color: var(--history-accent);
  background: rgba(34, 34, 199, 0.04);
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.batch-actions[hidden] {
  display: none;
}

.batch-action {
  min-width: auto;
  height: 32px;
  gap: 8px;
  border-color: #cfd1da;
  border-radius: 4px;
  color: #11131a;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.batch-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.batch-action.danger {
  color: #ff4d5e;
}

.batch-action:hover {
  border-color: var(--history-accent);
  color: var(--history-accent);
}

.batch-action.danger:hover {
  border-color: #ff4d5e;
  color: #ff4d5e;
  background: rgba(255, 77, 94, 0.05);
}

.batch-divider {
  width: 1px;
  height: 16px;
  background: #d8d9e0;
}

.history-workspace.selecting .history-filter-fields,
.history-workspace.selecting .history-favorite-filter,
.history-workspace.selecting .batch-select {
  display: none;
}

.history-workspace.selecting .history-content,
.history-workspace.selecting .history-card,
.history-workspace.selecting .history-meta {
  user-select: none;
}

.history-download.muted {
  color: #9b9ea8;
  background: #f7f7f8;
}

.history-content {
  position: relative;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 24px 86px;
  background: #f5f5f6;
}

.history-day + .history-day {
  margin-top: 30px;
}

.history-day h2 {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  color: #62656f;
  font-size: 14px;
  font-weight: 800;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 210px));
  gap: 18px 24px;
  align-content: start;
}

.history-card {
  position: relative;
  width: 100%;
  color: #12131a;
  font-size: 13px;
}

.history-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 280px;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ececf0;
  cursor: zoom-in;
  box-shadow: 0 1px 0 rgba(18, 22, 45, 0.04);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.history-card.selected .history-thumb {
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(18, 22, 45, 0.04);
}

.history-workspace.selecting .history-card.selected .history-thumb {
  border-color: var(--history-accent);
  box-shadow: 0 0 0 1px rgba(34, 34, 199, 0.24), 0 12px 26px rgba(18, 22, 45, 0.1);
}

.history-thumb:hover {
  border-color: rgba(34, 34, 199, 0.3);
  box-shadow: 0 16px 34px rgba(18, 22, 45, 0.14);
  transform: translateY(-2px);
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.history-thumb:hover img {
  filter: saturate(1.04) brightness(0.86);
  transform: scale(1.025);
}

.count-badge {
  position: absolute;
  right: 0;
  display: inline-flex;
  height: 27px;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px 0 0 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(39, 40, 46, 0.78);
  pointer-events: none;
}

.count-badge {
  right: 0;
  bottom: 8px;
}

.history-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(39, 40, 46, 0.78);
  pointer-events: none;
}

.history-status-badge.status-success {
  background: rgba(34, 34, 199, 0.86);
}

.history-status-badge.status-pending {
  background: rgba(240, 147, 44, 0.92);
}

.history-status-badge.status-failed {
  background: rgba(205, 63, 79, 0.92);
}

.history-watermark {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
}

.history-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.58) 0%, rgba(8, 10, 18, 0.16) 27%, rgba(8, 10, 18, 0.08) 62%, rgba(8, 10, 18, 0.46) 100%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.history-thumb:hover .history-overlay {
  opacity: 1;
}

.history-tool-group {
  display: flex;
  gap: 7px;
}

.history-tool {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  background-color: rgba(28, 30, 39, 0.78);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.history-tool:hover {
  background-color: rgba(17, 18, 25, 0.92);
  transform: translateY(-1px);
}

.history-tool.delete {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v5M14 11v5'/%3E%3C/svg%3E");
}

.history-tool.favorite {
  background-image: none;
  filter: none;
}

.history-tool.favorite svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.history-tool.favorite.filled {
  background-color: var(--history-accent);
  border-color: rgba(255, 255, 255, 0.34);
  filter: none;
}

.history-tool.favorite.filled svg {
  fill: #fff;
  stroke: #fff;
}

.history-thumb:hover .history-watermark {
  opacity: 0;
}

.history-select {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: none;
  width: 22px;
  height: 22px;
  place-items: center;
  cursor: pointer;
}

.history-workspace.selecting .history-select {
  display: grid;
}

.history-workspace.selecting .history-thumb {
  cursor: pointer;
}

.history-select input {
  position: absolute;
  opacity: 0;
}

.history-select span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  background: rgba(20, 22, 32, 0.42);
  box-shadow: 0 4px 10px rgba(18, 22, 45, 0.16);
}

.history-select input:checked + span {
  border-color: var(--history-accent);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.2 6.6 11.2 12.8 4.8'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    var(--history-accent);
}

.selection-marquee {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--history-accent);
  border-radius: 4px;
  background: rgba(34, 34, 199, 0.08);
  pointer-events: none;
}

.history-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  margin-top: 9px;
}

.history-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #15161c;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta span {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #5f626c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta time {
  color: #8f929c;
  font-size: 12px;
}

.history-meta .history-credit {
  justify-self: end;
  color: var(--history-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.history-meta .history-task-id {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #8f929c;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-pagination {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 1px solid #dedfe5;
  color: #2f3139;
  background: #fff;
  box-shadow: 0 -3px 12px rgba(18, 22, 45, 0.04);
}

.history-pagination button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #8b8e98;
  cursor: pointer;
}

.history-pagination button.active {
  border-color: var(--history-accent);
  color: var(--history-accent);
  background: rgba(34, 34, 199, 0.05);
}

.history-pagination button:focus-visible,
.history-pagination select:focus {
  outline: none;
  border-color: var(--history-accent);
  box-shadow: 0 0 0 2px rgba(34, 34, 199, 0.1);
}

.history-pagination select {
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid #dedfe5;
  border-radius: 4px;
  color: #2f3139;
  font: inherit;
  background: #fff;
}

.history-detail-open {
  overflow: hidden;
}

.history-detail-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 382px;
  gap: 0;
  padding: 58px 0 42px 16px;
  overflow: hidden;
  background: #fff;
}

.history-detail-modal[hidden] {
  display: none;
}

.history-detail-close {
  position: absolute;
  z-index: 3;
  top: 28px;
  right: 392px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #555862;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.history-detail-close:hover {
  color: #11131a;
  background: #f4f4f6;
}

.history-detail-close svg,
.history-detail-nav svg,
.history-detail-download svg,
.history-detail-head svg,
.history-detail-tools svg,
.history-detail-section-title svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-detail-close svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.history-detail-viewer {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  overflow: hidden;
  padding: 4px 52px 0 0;
}

.history-detail-stage {
  position: relative;
  display: flex;
  width: 100%;
  height: min(78vh, 860px);
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  border-radius: 6px;
  background: #f1f2f5;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.history-detail-stage.panning {
  cursor: grabbing;
}

.history-detail-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #f2f3f6;
  transition: none;
}

.history-detail-stage img.fit {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.history-detail-stage figcaption {
  position: absolute;
  top: 30px;
  left: 28px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 22px;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.history-detail-nav {
  position: absolute;
  z-index: 2;
  top: calc(50% - 18px);
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(24, 26, 34, 0.28);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.history-detail-nav:hover {
  background: rgba(24, 26, 34, 0.48);
  transform: translateY(-1px);
}

.history-detail-nav.prev {
  left: 18px;
}

.history-detail-nav.next {
  right: 70px;
}

.history-detail-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.history-detail-thumbs {
  display: flex;
  min-height: 54px;
  max-width: 100%;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 14px;
  scrollbar-width: thin;
}

.history-detail-thumbs button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #f0f1f5;
  cursor: pointer;
}

.history-detail-thumbs button.active {
  border-color: var(--history-accent);
}

.history-detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.history-detail-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto auto auto 1fr;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 32px 32px 28px;
  border-left: 1px solid #eeeeef;
  color: #252730;
  background: #fff;
}

.history-detail-head {
  position: relative;
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-end;
}

.history-detail-download,
.history-detail-actions button {
  display: inline-grid;
  height: 32px;
  align-items: center;
  border-radius: 6px;
  color: #11131a;
  background: #f7f7f8;
  cursor: pointer;
}

.history-detail-download {
  grid-template-columns: auto auto;
  justify-self: center;
  gap: 7px;
  min-width: 118px;
  height: 38px;
  margin-top: 14px;
  padding: 0 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: #2022d6;
  box-shadow: 0 10px 22px rgba(32, 34, 214, 0.2);
}

.history-detail-actions {
  display: flex;
  gap: 10px;
}

.history-detail-actions button {
  width: 28px;
  place-items: center;
  background: transparent;
}

.history-detail-actions button:hover,
.history-detail-tools button:hover {
  background: #f1f1f4;
}

.history-detail-download:hover {
  background: #1618b8;
}

.history-detail-download svg,
.history-detail-head svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.history-detail-menu {
  position: absolute;
  z-index: 4;
  top: 38px;
  right: 0;
  min-width: 132px;
  padding: 6px;
  border: 1px solid #ececf0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 22, 45, 0.14);
}

.history-detail-menu[hidden] {
  display: none;
}

.history-detail-menu button {
  display: inline-flex;
  width: 100%;
  height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-radius: 4px;
  color: #e44b5d;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.history-detail-menu button:hover {
  background: rgba(228, 75, 93, 0.06);
}

.history-detail-menu svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.history-detail-meta {
  display: flex;
  min-height: 54px;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  border-bottom: 1px solid #ececf0;
  color: #9a9ca5;
  font-size: 12px;
  line-height: 1.5;
}

.history-detail-meta i {
  width: 1px;
  height: 12px;
  background: #d8d9df;
}

.history-detail-meta b {
  color: #777a84;
  font-weight: 500;
}

.history-detail-meta span:last-child {
  margin-left: 0;
}

.history-detail-section {
  padding: 17px 0 14px;
  border-bottom: 1px solid #ececf0;
}

.history-detail-section-title {
  display: flex;
  width: 100%;
  height: 22px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  color: #161820;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.history-detail-section-title svg {
  width: 15px;
  height: 15px;
  color: #8a8d97;
  stroke-width: 1.8;
  transition: transform 0.18s ease;
}

.history-detail-section-title[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}

.history-detail-section-body[hidden] {
  display: none;
}

.history-detail-section h3,
.history-detail-reference h3,
.history-detail-tools span {
  margin: 14px 0 8px;
  color: #90939d;
  font-size: 12px;
  font-weight: 500;
}

.history-detail-section p {
  margin: 0;
  color: #555862;
  font-size: 13px;
  line-height: 1.8;
}

.history-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-detail-chips span {
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 9px;
  border-radius: 5px;
  color: #6e717b;
  font-size: 12px;
  background: #f4f4f6;
}

.history-detail-chips span:first-child::before {
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.4 6 .9-4.3 4.2 1 6-5.4-2.9-5.4 2.9 1-6-4.3-4.2 6-.9L12 3Z'/%3E%3C/svg%3E") center / 13px 13px no-repeat,
    #777a82;
  content: "";
}

.history-detail-chips img {
  width: 28px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
}

.history-detail-reference {
  padding: 4px 0 16px;
}

.history-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-reference-grid button {
  position: relative;
  height: 86px;
  overflow: hidden;
  padding: 0;
  border-radius: 6px;
  background: #f3f3f5;
  cursor: pointer;
}

.history-reference-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.history-reference-grid span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(19, 21, 31, 0.48);
}

.history-detail-tools {
  align-self: end;
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.history-detail-tools div {
  display: flex;
  min-height: 88px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 16px;
  border-radius: 6px;
  background: #f7f7f8;
}

.history-detail-tools span {
  width: 100%;
  margin: 0;
}

.history-detail-tools button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
  border-radius: 4px;
  color: #282b34;
  font-size: 12px;
  cursor: pointer;
}

.history-detail-tools button.primary {
  color: var(--history-accent);
}

.history-detail-tools svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

@media (max-width: 1360px) {
  .history-detail-modal {
    grid-template-columns: minmax(620px, 1fr) 340px;
  }

  .history-detail-close {
    right: 350px;
  }

  .history-detail-panel {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@keyframes resultGradientSweep {
  from {
    transform: translateX(-70%);
  }

  to {
    transform: translateX(70%);
  }
}

@keyframes resultImagePulse {
  0%,
  100% {
    opacity: 0.74;
  }

  50% {
    opacity: 0.95;
  }
}

@keyframes poseDrawerIn {
  from {
    opacity: 0;
    transform: translateX(-64px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes poseDrawerOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-64px);
  }
}

/* Login page */
.login-page {
  min-width: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(248, 249, 255, 0.92), rgba(255, 255, 255, 0.76)),
    radial-gradient(circle at 8% 18%, rgba(32, 26, 183, 0.13), transparent 31%),
    radial-gradient(circle at 92% 88%, rgba(83, 219, 196, 0.14), transparent 30%),
    #f7f8fc;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1.05fr) minmax(420px, 0.95fr);
  min-height: 100vh;
  color: var(--text);
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 720px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 34px 54px 52px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0 36%, rgba(239, 241, 255, 0.95) 36% 100%),
    #fff;
}

.login-visual::before {
  position: absolute;
  top: 112px;
  right: -140px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(32, 26, 183, 0.08);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(32, 26, 183, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(32, 26, 183, 0.04);
  content: "";
}

.login-visual::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 205px;
  background:
    linear-gradient(90deg, rgba(32, 26, 183, 0.08), transparent 42%),
    repeating-linear-gradient(90deg, rgba(32, 26, 183, 0.06) 0 1px, transparent 1px 72px);
  content: "";
  opacity: 0.48;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-brand-mark {
  width: 32px;
  height: 26px;
  flex: 0 0 32px;
  background: url("./svg/logo-mark.svg") center / contain no-repeat;
}

.login-brand-word {
  width: 111px;
  height: 20px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background: url("./svg/logo-wordmark.svg") center / contain no-repeat;
}

.login-version {
  align-self: flex-start;
  margin-top: 1px;
  color: #575b65;
  font-size: 10px;
}

.login-showcase {
  position: relative;
  z-index: 1;
  width: min(620px, 94%);
  margin: 34px auto 36px;
}

.showcase-main {
  position: relative;
  min-height: 500px;
  padding: 30px 34px 34px;
  border: 1px solid rgba(214, 217, 231, 0.78);
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(245, 246, 255, 0.74)),
    #fff;
  box-shadow:
    0 34px 90px rgba(31, 35, 75, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.showcase-main::before {
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(32, 26, 183, 0.07) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(rgba(32, 26, 183, 0.06) 1px, transparent 1px) 0 0 / 58px 58px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 78%);
}

.showcase-photo {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
  background: #f4f5fb;
  box-shadow: 0 22px 54px rgba(24, 28, 58, 0.18);
}

.showcase-photo.primary {
  top: 34px;
  right: 136px;
  bottom: 34px;
  left: 44px;
}

.showcase-photo.secondary {
  right: 32px;
  bottom: 68px;
  width: 178px;
  height: 260px;
  border: 5px solid rgba(255, 255, 255, 0.92);
}

.showcase-photo::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 58%, rgba(16, 18, 34, 0.34)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 28%);
  content: "";
}

.showcase-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.showcase-status {
  position: absolute;
  top: 48px;
  left: 28px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 3px 8px;
  min-width: 164px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  color: #171923;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(24, 28, 58, 0.12);
  backdrop-filter: blur(16px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25c68a;
  box-shadow: 0 0 0 5px rgba(37, 198, 138, 0.12);
}

.showcase-status strong {
  font-size: 13px;
}

.showcase-status small {
  grid-column: 2;
  color: #777b87;
  font-size: 11px;
}

.showcase-panel {
  position: absolute;
  right: 22px;
  bottom: 26px;
  width: 224px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(19, 21, 34, 0.72);
  box-shadow: 0 18px 44px rgba(13, 16, 34, 0.22);
  backdrop-filter: blur(18px);
}

.showcase-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.showcase-panel strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
}

.showcase-bars {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.showcase-bars i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.showcase-bars i::before {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff, #9da1ff);
  content: "";
}

.showcase-bars i:nth-child(2)::before {
  width: 54%;
}

.showcase-bars i:nth-child(3)::before {
  width: 86%;
}

.showcase-strip {
  position: relative;
  z-index: 2;
  display: flex;
  width: calc(100% - 76px);
  min-height: 88px;
  align-items: center;
  gap: 10px;
  margin: -38px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(219, 221, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(31, 35, 75, 0.12);
  backdrop-filter: blur(16px);
}

.strip-item {
  display: grid;
  width: 60px;
  height: 66px;
  flex: 0 0 60px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e5ed;
  border-radius: 6px;
  background: #fff;
}

.strip-item.active {
  border-color: #201ab7;
  box-shadow: 0 0 0 1px rgba(32, 26, 183, 0.18);
}

.strip-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.strip-item.icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 28px 28px;
}

.strip-item.icon.top {
  background-image: url("./svg/icon-clothes.svg");
}

.strip-item.icon.scene {
  background-image: url("./svg/icon-scene.svg");
}

.strip-label {
  margin-left: auto;
  color: #201ab7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.login-copy h1 {
  margin: 0;
  color: #161720;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 480px;
  margin: 18px 0 0;
  color: #6d707a;
  font-size: 16px;
  line-height: 1.75;
}

.login-panel {
  display: grid;
  min-height: 720px;
  place-items: center;
  padding: 42px;
}

.login-card {
  width: min(100%, 430px);
  padding: 42px 40px 36px;
  border: 1px solid #e6e7ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(36, 39, 69, 0.1);
}

.login-card-head span {
  display: block;
  color: #201ab7;
  font-size: 13px;
  font-weight: 800;
}

.login-card-head h2 {
  display: block;
  margin: 9px 0 0;
  padding: 0;
  color: #15161c;
  font-size: 28px;
  line-height: 1.25;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field span {
  color: #383a43;
  font-size: 13px;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dfe1ea;
  border-radius: 4px;
  color: #15161c;
  font: inherit;
  background: #fff;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.login-field input::placeholder {
  color: #b0b2bc;
}

.login-field input:focus {
  outline: none;
  border-color: #201ab7;
  background: #fbfbff;
  box-shadow: 0 0 0 3px rgba(32, 26, 183, 0.1);
}

.login-options,
.remember-me {
  display: flex;
  align-items: center;
}

.login-options {
  justify-content: space-between;
  margin-top: -2px;
  color: #6d707a;
  font-size: 13px;
}

.remember-me {
  gap: 7px;
}

.remember-me input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #201ab7;
}

.login-options a,
.login-register a {
  color: #201ab7;
  font-weight: 800;
  text-decoration: none;
}

.login-options a:hover,
.login-register a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-submit {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: #2022d6;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(32, 34, 214, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 15px 30px rgba(32, 34, 214, 0.27);
}

.login-submit:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.login-register {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  color: #6f727c;
  font-size: 14px;
}

.login-icp {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: #fff;
  color: #b0b0b8;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid #f0f0f5;
  z-index: 10;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    padding: 24px 24px 34px;
  }

  .login-showcase {
    width: 100%;
    max-width: 520px;
    margin: 32px auto;
  }

  .showcase-main {
    min-height: 460px;
  }

  .login-copy h1 {
    font-size: 30px;
  }

  .login-panel {
    min-height: auto;
    padding: 32px 20px 44px;
  }
}

@media (max-width: 560px) {
  .login-visual {
    padding: 20px;
  }

  .showcase-main {
    min-height: 390px;
    padding: 18px;
  }

  .showcase-photo.primary {
    top: 22px;
    right: 72px;
    bottom: 30px;
    left: 22px;
  }

  .showcase-photo.secondary {
    right: 16px;
    bottom: 74px;
    width: 118px;
    height: 180px;
  }

  .showcase-panel {
    right: 14px;
    bottom: 16px;
    width: 190px;
  }

  .showcase-status {
    top: 32px;
    left: 14px;
  }

  .showcase-strip {
    width: calc(100% - 28px);
    overflow: hidden;
  }

  .strip-label {
    display: none;
  }

  .login-card {
    padding: 32px 24px 28px;
  }
}

.guide {
  position: absolute;
  top: 237px;
  left: 50%;
  width: 527px;
  transform: translateX(-50%);
  text-align: center;
}

.guide h1 {
  margin: 0 0 8px;
  color: #9698a0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step p {
  margin: 9px 0 0;
  color: #5d5f67;
  font-size: 14px;
}

.sample {
  position: relative;
  width: 164px;
  height: 220px;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
}

.sample::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

.sample.outfit::after {
  background-image: url("./svg/demo-outfit@2x.png");
}

.sample.model-a::after {
  background-image: url("./svg/model-real@2x.png");
}

.sample.model-b::after {
  background-image: url("./svg/model-ai@2x.png");
}

.model-a,
.model-b {
  background:
    radial-gradient(ellipse at 50% 92%, rgba(0, 0, 0, 0.06), transparent 43%),
    linear-gradient(#fbfbfb, #f2f2f2);
}

.sunglasses {
  position: absolute;
  top: 20px;
  left: 40px;
  width: 50px;
  height: 18px;
  background:
    radial-gradient(ellipse at 25% 55%, #a77b58 0 10px, transparent 11px),
    radial-gradient(ellipse at 75% 55%, #a77b58 0 10px, transparent 11px),
    linear-gradient(#c79f7b, #c79f7b) 45% 50% / 10px 2px no-repeat;
}

.perfume {
  position: absolute;
  top: 47px;
  left: 42px;
  width: 25px;
  height: 39px;
  border-radius: 7px;
  border: 2px solid #e7c4aa;
  background: linear-gradient(#fff2e8, #f2bda7);
}

.earring {
  position: absolute;
  top: 49px;
  left: 83px;
  width: 25px;
  height: 33px;
  border: 5px solid #d1a266;
  border-radius: 50%;
  background: #fff;
}

.bag {
  position: absolute;
  top: 96px;
  left: 36px;
  width: 57px;
  height: 52px;
  border-radius: 18px 18px 12px 12px;
  background: linear-gradient(#e8c197, #d7a56e);
}

.bag::before {
  position: absolute;
  top: -25px;
  left: 12px;
  width: 31px;
  height: 32px;
  content: "";
  border: 4px solid #c89458;
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
}

.bag::after {
  position: absolute;
  top: 17px;
  left: 19px;
  width: 18px;
  height: 18px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.shoe {
  position: absolute;
  bottom: 28px;
  left: 33px;
  width: 54px;
  height: 12px;
  border-radius: 50% 0 0 50%;
  background: #e1b394;
  transform: rotate(-9deg);
}

.top-piece {
  position: absolute;
  top: 20px;
  right: 31px;
  width: 40px;
  height: 74px;
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(135deg, #e4b5c6, #f7c5d6 50%, #d996ae);
  clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%);
}

.skirt {
  position: absolute;
  right: 28px;
  bottom: 9px;
  width: 53px;
  height: 127px;
  border-radius: 2px 2px 8px 8px;
  background: linear-gradient(90deg, #eee9db, #d9d0b9 60%, #efe9db);
  clip-path: polygon(13% 0, 84% 0, 100% 100%, 0 100%);
}

.model-head {
  position: absolute;
  top: 19px;
  left: 68px;
  width: 30px;
  height: 36px;
  border-radius: 46% 46% 48% 48%;
  background: #f2c9ad;
  box-shadow: 0 -8px 0 4px #8a4e31;
}

.model-body {
  position: absolute;
  left: 59px;
  top: 56px;
}

.model-body.suit {
  width: 47px;
  height: 139px;
  background:
    linear-gradient(#93b4d3, #93b4d3) 0 0 / 17px 100% no-repeat,
    linear-gradient(#cfe0ef, #cfe0ef) 50% 0 / 13px 100% no-repeat,
    linear-gradient(#93b4d3, #93b4d3) 100% 0 / 17px 100% no-repeat;
}

.model-body.suit::before,
.model-body.suit::after {
  position: absolute;
  top: 5px;
  width: 21px;
  height: 87px;
  content: "";
  background: repeating-linear-gradient(90deg, #91b0cc 0 4px, #d9e7f3 4px 6px);
}

.model-body.suit::before {
  left: -28px;
  transform: rotate(12deg);
}

.model-body.suit::after {
  right: -28px;
  transform: rotate(-12deg);
}

.model-bag {
  position: absolute;
  left: 45px;
  bottom: 31px;
  width: 32px;
  height: 55px;
  border-radius: 0 0 7px 7px;
  background: #164d76;
  transform: rotate(-12deg);
}

.model-body.dress {
  width: 50px;
  height: 144px;
  background:
    linear-gradient(#e6a4ba, #f2c0cf) 8px 0 / 33px 54px no-repeat,
    linear-gradient(90deg, #eee5d8, #d1c4ad 56%, #f0e7dc) 0 49px / 50px 95px no-repeat;
  clip-path: polygon(20% 0, 80% 0, 88% 36%, 100% 100%, 0 100%, 12% 36%);
}

.model-body.dress::before,
.model-body.dress::after {
  position: absolute;
  top: 17px;
  width: 13px;
  height: 82px;
  content: "";
  border-radius: 8px;
  background: #f1c7ad;
}

.model-body.dress::before {
  left: -13px;
}

.model-body.dress::after {
  right: -13px;
}

.model-handbag {
  position: absolute;
  left: 40px;
  bottom: 60px;
  width: 24px;
  height: 28px;
  border-radius: 10px 10px 5px 5px;
  background: #d6b07a;
}

.model-handbag::before {
  position: absolute;
  top: -16px;
  left: 5px;
  width: 14px;
  height: 18px;
  content: "";
  border: 2px solid #c99b60;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}
