:root {
  color-scheme: light;
  font-synthesis: none;
  --ink: #17191d;
  --ink-soft: #30343b;
  --muted: #71766f;
  --muted-strong: #545a63;
  --line: #e7e8e3;
  --line-strong: #d9dbd4;
  --page: #f4f5f1;
  --surface: #ffffff;
  --surface-soft: #fafbf7;
  --lime: #def68e;
  --lime-deep: #cdeb6d;
  --sky: #b8dcfb;
  --yellow: #ffe19b;
  --lilac: #d6ccf3;
  --coral: #fa9b89;
  --pink: #ffc4da;
  --mint: #a9e5d1;
  --success: #237a48;
  --success-soft: #e7f7ec;
  --danger: #ba3b37;
  --image-accent: #e6f5c9;
  --image-accent-strong: #cceb8c;
  --image-accent-border: #afd36f;
  --image-accent-ink: #25350d;
  --shadow: 0 12px 34px rgba(24, 26, 30, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #ffffff;
  scroll-behavior: smooth;
  transition: background-color 260ms ease;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: var(--ink);
  font-family:
    "Aptos Display",
    "Segoe UI Variable",
    "Aptos",
    "Microsoft YaHei UI",
    "PingFang SC",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 260ms ease,
    color 260ms ease;
}

html.is-gif-mode,
html.is-gif-mode body {
  background: #07080c;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.button:disabled,
.generate-button:disabled,
.segment:disabled,
.scene-tag:disabled,
.platform-pill:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(68, 136, 255, 0.35);
  outline-offset: 2px;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 8px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 34px;
  margin-right: auto;
}

.topnav a {
  position: relative;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.topnav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.topnav a:hover {
  color: var(--ink);
}

.topnav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 750;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-picker {
  position: relative;
  width: 132px;
}

.language-picker-trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-family: inherit;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.language-picker-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.language-picker-trigger:focus-visible {
  outline: 0;
  border-color: #9a9f96;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(23, 25, 29, 0.05);
}

.language-picker-trigger > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.language-picker-trigger > span {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.language-picker-trigger .language-picker-chevron {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  transition: transform 160ms ease;
}

.language-picker.is-open .language-picker-chevron {
  transform: rotate(180deg);
}

.language-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(23, 25, 29, 0.14);
  animation: language-menu-in 140ms ease both;
}

.language-picker-menu[hidden] {
  display: none;
}

.language-option {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  outline: 0;
  background: var(--surface-soft);
  color: var(--ink);
}

.language-option.is-selected {
  background: #f3f8df;
  color: var(--ink);
}

.language-option svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--success);
  opacity: 0;
}

.language-option.is-selected svg {
  opacity: 1;
}

@keyframes language-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-controls[hidden],
.auth-loading[hidden],
.button[hidden] {
  display: none !important;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 9px 0 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.user-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-balance {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 5px 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.account-balance.is-unavailable {
  border-color: #e5d6c9;
  background: #fffaf5;
}

.balance-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  white-space: nowrap;
}

.balance-label svg {
  width: 11px;
  height: 11px;
}

#user-balance {
  min-width: 44px;
  color: var(--ink);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.account-balance.is-loading #user-balance {
  color: var(--muted);
}

.balance-recharge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 3px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 9px;
  font-weight: 720;
  text-decoration: none;
}

.balance-recharge:hover {
  background: #d6f36e;
}

.balance-recharge svg {
  width: 11px;
  height: 11px;
}

.key-picker {
  position: relative;
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.key-picker > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
}

.key-select-trigger {
  display: flex;
  height: 34px;
  max-width: 160px;
  min-width: 100px;
  align-items: center;
  gap: 4px;
  padding: 0 2px 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.key-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-select-trigger > svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.key-picker.is-open .key-select-trigger > svg {
  transform: rotate(180deg);
}

.key-select-trigger:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.key-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 35;
  display: flex;
  width: min(280px, calc(100vw - 24px));
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(23, 25, 29, 0.16);
  animation: language-menu-in 140ms ease both;
}

.key-select-menu[hidden] {
  display: none;
}

.key-option {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.key-option:hover,
.key-option:focus-visible {
  outline: 0;
  background: var(--surface-soft);
}

.key-option.is-selected {
  background: #f3f8df;
}

.key-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.key-option > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.key-option strong,
.key-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-option strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 680;
}

.key-option small {
  color: var(--muted);
  font-size: 9px;
}

.key-option svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--success);
  opacity: 0;
}

.key-option.is-selected svg {
  opacity: 1;
}

.key-option-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.auth-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  background: #f3f7fd;
}

.auth-banner[hidden] {
  display: none;
}

.auth-banner-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--sky);
  color: var(--ink);
}

.auth-banner-icon svg {
  width: 17px;
  height: 17px;
}

.auth-banner-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.auth-banner-copy strong {
  font-size: 12px;
}

.auth-banner-copy span {
  color: var(--muted);
  font-size: 10px;
}

.cache-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.cache-status:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.cache-status strong {
  color: var(--ink);
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35b86b;
  box-shadow: 0 0 0 3px rgba(53, 184, 107, 0.13);
}

.cache-mobile-icon {
  display: none;
  width: 16px;
  height: 16px;
}

.status-divider {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.button,
.icon-button,
.scene-tag,
.segment,
.photo-action,
.mini-icon-button,
.text-button {
  border: 0;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:active,
.icon-button:active,
.scene-tag:active,
.segment:active,
.photo-action:active,
.mini-icon-button:active {
  transform: translateY(1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 690;
  white-space: nowrap;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.button-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.button-dark:hover {
  background: #2a2d32;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button-small {
  width: 34px;
  height: 34px;
}

.page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 32px 34px 36px;
}

.page-heading {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
  text-align: center;
}

.heading-copy {
  width: 100%;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.eyebrow-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 52px;
  line-height: 1.06;
  font-weight: 748;
  letter-spacing: 0;
}

.title-gradient {
  display: inline-block;
  background: linear-gradient(
    100deg,
    #17191d 0%,
    #6485df 38%,
    #f27f69 68%,
    #9caf2c 100%
  );
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[lang="en"] .title-gradient {
  margin-left: 0.18em;
}

.page-heading p {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.studio-layout {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.source-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-heading.compact {
  align-items: center;
  margin-bottom: 15px;
}

.section-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 790;
}

.panel-heading h2,
.results-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: 0;
}

.source-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #d8d8d2;
  transition:
    outline-color 160ms ease,
    transform 160ms ease;
}

.source-preview.is-dragging {
  outline: 3px solid var(--lime-deep);
  outline-offset: 3px;
  transform: scale(0.995);
}

.source-preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 44%;
}

.source-preview-shade {
  position: absolute;
  inset: 42% 0 0;
  background: rgba(10, 12, 16, 0.58);
}

.source-preview-top {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 680;
}

.mini-badge svg {
  width: 13px;
  height: 13px;
}

.mini-badge-light {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(18, 20, 24, 0.68);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.photo-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.photo-action:hover {
  background: var(--lime);
}

.photo-action svg {
  width: 13px;
  height: 13px;
}

.source-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #ffffff;
}

.source-caption-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.source-caption-icon svg {
  width: 17px;
  height: 17px;
}

.source-caption div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.source-caption strong {
  font-size: 13px;
  font-weight: 750;
}

.source-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.source-caption .confidence {
  color: var(--lime);
  font-size: 14px;
  font-weight: 800;
}

.analysis-block {
  padding-top: 18px;
}

.source-readiness {
  margin-top: 17px;
  padding: 13px;
  border: 1px solid #d8e8dc;
  border-radius: 8px;
  background: #f3faf5;
}

.readiness-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.readiness-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: #d9f1e1;
  color: var(--success);
}

.readiness-icon svg {
  width: 15px;
  height: 15px;
}

.readiness-title div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.readiness-title strong {
  font-size: 12px;
  font-weight: 720;
}

.readiness-title span {
  color: #557061;
  font-size: 10px;
}

.source-readiness > p {
  margin: 10px 0 0;
  color: #4d6757;
  font-size: 10px;
  line-height: 1.6;
}

.drop-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #dceadf;
  color: #557061;
  font-size: 10px;
}

.drop-hint svg {
  width: 12px;
  height: 12px;
}

.block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-success {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.inline-success svg {
  width: 14px;
  height: 14px;
}

.identity-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.identity-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
}

.identity-icon svg {
  width: 19px;
  height: 19px;
}

.identity-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 750;
}

.identity-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.trait {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.identity-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #d8e8dc;
  border-radius: 7px;
  background: #f3faf5;
  color: #3b674d;
}

.identity-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
}

.identity-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.source-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 10px;
}

.source-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.source-footer svg {
  width: 12px;
  height: 12px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--ink);
}

.text-button svg {
  width: 13px;
  height: 13px;
}

.config-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px 24px 0;
}

.config-summary {
  display: flex;
  min-width: 126px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  text-align: center;
  white-space: nowrap;
}

.panel-heading-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.config-reset-button {
  min-height: 35px;
  padding: 0 10px;
  font-size: 11px;
}

.config-summary span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.config-summary strong {
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
}

.config-section {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.config-panel .scene-section {
  padding-top: 5px;
  border-top: 0;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.section-label > span:first-child {
  font-size: 12px;
  font-weight: 730;
}

.section-meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.scene-group {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 12px;
}

.scene-group + .scene-group {
  margin-top: 9px;
}

.scene-group-label {
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 630;
}

.scene-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scene-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 620;
}

.scene-tag:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.scene-tag > svg {
  width: 13px;
  height: 13px;
}

.scene-tag.is-selected {
  border-color: var(--image-accent-border);
  background: var(--image-accent);
  color: var(--image-accent-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.scene-tag.is-selected > svg {
  color: #4c6d17;
}

.scene-tag .scene-check {
  width: 11px;
  height: 11px;
  margin-left: 1px;
  color: #4c6d17;
}

.scene-tag-add {
  border-style: dashed;
  color: var(--muted);
}

.scene-tag-add:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.custom-scene-form {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 9px 0 0 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.custom-scene-form[hidden] {
  display: none;
}

.custom-scene-form .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.custom-scene-input-wrap {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.custom-scene-input-wrap:focus-within {
  border-color: #9a9f96;
  box-shadow: 0 0 0 3px rgba(23, 25, 29, 0.05);
}

.custom-scene-input-wrap svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--muted);
}

.custom-scene-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.custom-scene-clear {
  flex: 0 0 auto;
}

.prompt-section {
  padding-bottom: 15px;
}

.prompt-box {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
}

.prompt-box:focus-within {
  border-color: #9a9f96;
  box-shadow: 0 0 0 3px rgba(23, 25, 29, 0.05);
}

.prompt-box textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 11px 12px 8px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.62;
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 8px;
  border-top: 1px solid #eff0ed;
  color: var(--muted);
  font-size: 10px;
}

.prompt-model {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prompt-model svg {
  width: 12px;
  height: 12px;
}

.character-count {
  font-variant-numeric: tabular-nums;
}

.field-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.options-section {
  display: flex;
  gap: 22px;
  align-items: flex-end;
}

.option-block {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.option-block-small {
  flex: 0 0 230px;
}

.segmented-control {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.segment {
  min-width: 0;
  flex: 1;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 25, 29, 0.1);
}

.generate-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  margin: auto -22px 0;
  padding: 15px 22px 17px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 0 0 8px 8px;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.platform-pill:hover {
  border-color: var(--line-strong);
}

.platform-pill.is-active {
  border-color: var(--image-accent-border);
  background: var(--image-accent);
  color: var(--image-accent-ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.45);
}

.platform-pill-more {
  color: var(--muted);
}

.generate-button {
  display: inline-flex;
  min-height: 50px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--image-accent-border);
  border-radius: 7px;
  background:
    linear-gradient(118deg, #e1f5b6 0%, #cceb8c 100%);
  color: var(--image-accent-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.56);
}

.generate-button:hover {
  background:
    linear-gradient(118deg, #d8f0a6 0%, #bee478 100%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.58),
    0 7px 17px rgba(98, 134, 38, 0.13);
}

.generate-button:active {
  transform: translateY(1px);
}

.generate-button svg {
  width: 17px;
  height: 17px;
  color: #466610;
}

.generate-count {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-left: 5px;
  padding: 0 8px;
  border-radius: 5px;
  background: rgba(49, 72, 13, 0.09);
  color: #3f5d0d;
  font-size: 10px;
  font-weight: 750;
}

.generate-button-copy,
.gif-generate-copy {
  display: inline-flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  text-align: left;
}

.generate-button-copy strong,
.gif-generate-copy strong {
  font-size: inherit;
  font-weight: inherit;
}

.generate-button-copy small {
  color: rgba(49, 72, 13, 0.68);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0;
}

.results-panel {
  margin-top: 16px;
  padding: 24px;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 17px;
}

.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.export-preset {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.export-preset .platform-pills {
  justify-content: flex-end;
}

.results-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #cfe7d7;
  border-radius: 5px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.complete-badge[hidden] {
  display: none;
}

.complete-badge svg {
  width: 13px;
  height: 13px;
}

.results-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.results-note svg {
  width: 12px;
  height: 12px;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.all-text-toggle > span {
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
}

.all-text-toggle.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.all-text-toggle:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.sticker-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.sticker-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(23, 25, 29, 0.09);
}

.sticker-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  isolation: isolate;
  container-type: inline-size;
}

.sticker-lime .sticker-art {
  background: var(--lime);
}

.sticker-blue .sticker-art {
  background: var(--sky);
}

.sticker-yellow .sticker-art {
  background: var(--yellow);
}

.sticker-lilac .sticker-art {
  background: var(--lilac);
}

.sticker-paper .sticker-art {
  background: #f4f2e8;
}

.sticker-coral .sticker-art {
  background: var(--coral);
}

.sticker-pink .sticker-art {
  background: var(--pink);
}

.sticker-mint .sticker-art {
  background: var(--mint);
}

.sticker-cutout {
  position: absolute;
  top: 49%;
  left: 50%;
  overflow: hidden;
  width: 56%;
  aspect-ratio: 1 / 1;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background: #ddd;
  box-shadow: 0 8px 20px rgba(23, 25, 29, 0.16);
  transform: translate(-50%, -50%);
}

.sticker-cutout img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 42%;
}

.sticker-cutout-tilt-left {
  transform: translate(-50%, -50%) rotate(-4deg);
}

.sticker-cutout-tilt-right {
  transform: translate(-50%, -50%) rotate(4deg);
}

.sticker-blue .sticker-cutout img {
  filter: saturate(0.82) brightness(1.04);
}

.sticker-yellow .sticker-cutout img {
  filter: saturate(1.12) contrast(1.03);
}

.sticker-lilac .sticker-cutout img {
  filter: saturate(0.72) brightness(1.05);
}

.sticker-paper .sticker-cutout img {
  filter: saturate(0.2) contrast(1.1);
}

.sticker-coral .sticker-cutout img {
  filter: saturate(0.92) contrast(1.06);
}

.sticker-pink .sticker-cutout img {
  filter: saturate(0.88) brightness(1.06);
}

.sticker-mint .sticker-cutout img {
  filter: saturate(0.78) contrast(1.04);
}

.sticker-copy {
  position: absolute;
  bottom: 9%;
  left: 8%;
  z-index: 2;
  color: #ffffff;
  font-family:
    "Arial Rounded MT Bold",
    "Microsoft YaHei UI",
    sans-serif;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    -1.5px -1.5px 0 var(--ink),
    1.5px -1.5px 0 var(--ink),
    -1.5px 1.5px 0 var(--ink),
    1.5px 1.5px 0 var(--ink),
    0 5px 0 rgba(23, 25, 29, 0.12);
  transform: rotate(-4deg);
}

.sticker-text-overlay {
  position: absolute;
  z-index: 5;
  max-width: 88%;
  color: var(--text-color, #ffffff);
  font-family:
    "Arial Rounded MT Bold",
    "Microsoft YaHei UI",
    sans-serif;
  font-size: calc(var(--text-size, 14) * 1cqw);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  paint-order: stroke fill;
  -webkit-text-stroke: max(1px, calc(var(--text-size, 14) * 0.08cqw))
    var(--text-stroke, #17191d);
  text-shadow: 0 3px 8px rgba(23, 25, 29, 0.18);
  transform:
    translate(-50%, -50%)
    rotate(var(--text-rotation, 0deg));
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.sticker-text-overlay:active {
  cursor: grabbing;
}

.sticker-card.is-editing {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}

.sticker-copy-small {
  font-size: 26px;
}

.sticker-copy-dark {
  color: var(--ink);
  text-shadow:
    -1.5px -1.5px 0 rgba(255, 255, 255, 0.8),
    1.5px -1.5px 0 rgba(255, 255, 255, 0.8),
    -1.5px 1.5px 0 rgba(255, 255, 255, 0.8),
    1.5px 1.5px 0 rgba(255, 255, 255, 0.8);
}

.sticker-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid rgba(23, 25, 29, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.sticker-tag-dark {
  background: rgba(49, 67, 18, 0.82);
  color: #eff9db;
}

.sticker-meta {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.sticker-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.mini-icon-button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.mini-icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.mini-icon-button svg {
  width: 13px;
  height: 13px;
}

.mini-icon-button.to-gif-result {
  position: relative;
  display: grid;
  width: 25px;
  min-height: 25px;
  place-items: center;
  margin: 0;
  padding: 0;
  border-color: transparent;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff5f9e 0%, #875dff 52%, #38bdf8 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(124, 88, 255, 0.24);
  isolation: isolate;
}

.mini-icon-button.to-gif-result::before,
.mini-icon-button.to-gif-result::after {
  display: none;
  content: none;
  animation: none;
}

.mini-icon-button.to-gif-result:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #ff477e 0%, #7448ff 52%, #0ea5e9 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.mini-icon-button.to-gif-result svg {
  width: 13px;
  height: 13px;
}

.to-gif-result {
  position: relative;
  display: flex;
  overflow: hidden;
  width: calc(100% - 16px);
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 0 9px;
  border: 1px solid rgba(78, 113, 255, 0.4);
  border-radius: 6px;
  background-color: #0d111b;
  background-image:
    linear-gradient(90deg, rgba(91, 132, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(91, 132, 255, 0.045) 1px, transparent 1px),
    linear-gradient(112deg, rgba(39, 91, 231, 0.2), rgba(126, 64, 201, 0.12));
  background-size:
    14px 14px,
    14px 14px,
    auto;
  color: #eef2ff;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 5px 14px rgba(17, 29, 61, 0.08);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
  isolation: isolate;
}

.to-gif-result::before {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 42%;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(67, 128, 255, 0.18),
      rgba(255, 255, 255, 0.08),
      transparent
    );
  content: "";
  pointer-events: none;
  transform: skewX(-18deg);
  animation: to-gif-scan 4.2s ease-in-out infinite;
}

.to-gif-result::after {
  position: absolute;
  top: 0;
  left: 16%;
  width: 66%;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, #4b8cff, #9a6cff, transparent);
  content: "";
  opacity: 0;
  pointer-events: none;
  animation: to-gif-edge 4.2s ease-in-out infinite;
}

.to-gif-result > * {
  position: relative;
  z-index: 1;
}

.to-gif-result:hover {
  border-color: rgba(63, 125, 255, 0.8);
  background-color: #11182b;
  transform: translateY(-1px);
}

.to-gif-result-icon {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(73, 126, 255, 0.16);
  color: #80b0ff;
}

.to-gif-result-icon::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(91, 139, 255, 0.4);
  border-radius: 50%;
  content: "";
  animation: to-gif-icon-pulse 2.4s ease-out infinite;
}

.to-gif-result-icon svg,
.to-gif-result-arrow {
  width: 12px;
  height: 12px;
}

.to-gif-result-copy {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex: 1;
  flex-direction: column;
  text-align: left;
}

.to-gif-result-copy strong {
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.to-gif-result-copy small {
  margin-top: 2px;
  color: #8792b1;
  font-size: 8px;
}

.to-gif-result-arrow {
  color: #736cff;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.to-gif-result:hover .to-gif-result-arrow {
  color: #9b91ff;
  transform: translate(2px, -2px);
}

.spark {
  position: absolute;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1;
}

.spark-one {
  top: 19%;
  right: 11%;
}

.spark-two {
  right: 16%;
  bottom: 23%;
  font-size: 12px;
}

.shape-dot {
  position: absolute;
  z-index: 1;
  width: 23px;
  height: 23px;
  border: 2px solid rgba(23, 25, 29, 0.2);
  border-radius: 50%;
}

.shape-dot-one {
  top: 17%;
  left: 10%;
}

.shape-dot-two {
  right: 9%;
  bottom: 22%;
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.6);
}

.shape-ring {
  position: absolute;
  top: 13%;
  left: 8%;
  width: 42px;
  height: 42px;
  border: 5px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.moon-mark {
  position: absolute;
  top: 15%;
  right: 12%;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Arial Rounded MT Bold", sans-serif;
  font-size: 28px;
  font-weight: 900;
  transform: rotate(12deg);
}

.moon-mark-two {
  top: 10%;
  right: 21%;
  font-size: 16px;
  transform: rotate(-8deg);
}

.bullseye {
  position: absolute;
  top: 15%;
  right: 10%;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid rgba(23, 25, 29, 0.2);
  border-radius: 50%;
}

.bullseye span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(23, 25, 29, 0.2);
}

.heart-mark {
  position: absolute;
  top: 16%;
  right: 10%;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  transform: rotate(10deg);
}

.heart-mark-two {
  top: 25%;
  right: 19%;
  font-size: 11px;
  transform: rotate(-10deg);
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.page-footer p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.page-footer svg {
  width: 12px;
  height: 12px;
}

.page-footer a {
  color: var(--ink-soft);
  font-weight: 650;
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-panel {
  margin-top: 16px;
  padding: 24px;
}

.info-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.info-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 760;
}

.info-note {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.sticker-guide-panel {
  margin-top: 16px;
}

.sticker-guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.sticker-guide-heading h2 {
  margin: 1px 0 0;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 760;
}

.sticker-guide-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 15px 0 18px;
  border-top: 1px solid var(--line);
}

.sticker-guide-intro p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.sticker-guide-all {
  flex: 0 0 auto;
}

.sticker-guide-all svg {
  width: 13px;
  height: 13px;
}

.sticker-guide-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.sticker-guide-link {
  display: flex;
  min-width: 0;
  min-height: 104px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.sticker-guide-link:nth-child(2) {
  background: #f5f9ef;
}

.sticker-guide-link:nth-child(3) {
  background: #f7f9fb;
}

.sticker-guide-link:hover {
  border-color: var(--line-strong);
  background: #f0f5e2;
  transform: translateY(-2px);
}

.sticker-guide-link span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.sticker-guide-link strong {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 730;
}

.sticker-guide-link small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.sticker-guide-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #718148;
}

.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.showcase-tab {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.showcase-tab svg {
  width: 13px;
  height: 13px;
}

.showcase-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.showcase-tab.is-active {
  border-color: var(--image-accent-border);
  background: var(--image-accent);
  color: var(--image-accent-ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.46);
}

.showcase-tab.is-active svg {
  color: #486b12;
}

.showcase-category-carousel {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -7px 0 18px;
}

.showcase-category-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.showcase-category-button:hover,
.showcase-category-button:focus-visible {
  border-color: var(--image-accent-border);
  background: var(--image-accent);
  color: var(--image-accent-ink);
}

.showcase-category-button:active {
  transform: scale(0.96);
}

.showcase-category-button svg {
  width: 14px;
  height: 14px;
}

.showcase-category-center {
  display: flex;
  min-width: 130px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.showcase-category-counter {
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: 0.08em;
}

.showcase-category-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.showcase-category-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d7dbce;
  cursor: pointer;
  transition:
    width 180ms ease,
    background 180ms ease;
}

.showcase-category-dot.is-active {
  width: 18px;
  background: #91b94d;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-category-dot {
    transition: none;
  }
}

#image-workspace .button-dark {
  border-color: var(--image-accent-border);
  background: var(--image-accent);
  color: var(--image-accent-ink);
}

#image-workspace .button-dark:hover {
  border-color: #9bc55b;
  background: var(--image-accent-strong);
}

.showcase-view {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
}

.showcase-view[hidden] {
  display: none;
}

.showcase-heading {
  margin-bottom: 22px;
}

.showcase-heading h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 760;
}

.showcase-original {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.showcase-original-media {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 7px 7px 0 0;
  background: #f4f5f1;
}

.showcase-original-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  object-position: center;
}

.showcase-original-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  background: #f0f3ea;
  color: var(--muted);
}

.showcase-original-media.is-placeholder svg {
  width: 30px;
  height: 30px;
}

.showcase-original-media.is-placeholder span {
  font-size: 10px;
  font-weight: 650;
}

.showcase-image-label {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  background: rgba(23, 25, 29, 0.72);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(5px);
}

.showcase-original figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
}

.showcase-original figcaption strong {
  font-size: 12px;
  font-weight: 730;
}

.showcase-original figcaption span {
  color: var(--muted);
  font-size: 10px;
}

.showcase-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.showcase-result-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

.showcase-custom-prompt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #dde6c6;
  border-radius: 7px;
  background: #f5f8e9;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.showcase-custom-prompt svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: #6d7e27;
}

.showcase-custom-prompt span {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.showcase-custom-prompt strong {
  color: var(--ink);
  font-weight: 750;
}

.showcase-result {
  position: relative;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  background-color: #fafbf7;
  background-image:
    linear-gradient(45deg, #eff1ea 25%, transparent 25%),
    linear-gradient(-45deg, #eff1ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eff1ea 75%),
    linear-gradient(-45deg, transparent 75%, #eff1ea 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

.showcase-result img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 5%;
  object-fit: contain;
  object-position: center;
}

.showcase-result figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
}

.showcase-result figcaption span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(23, 25, 29, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.showcase-result-lime {
  background: #def68e;
}

.showcase-result-blue {
  background: #c7e5ff;
}

.showcase-result-yellow {
  background: #ffe7a8;
}

.showcase-result-pink {
  background: #ffd0e1;
}

.showcase-result-placeholder {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8f9f5;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.site-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.extension-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.extension-item {
  display: flex;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.extension-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.extension-item:nth-child(1) .extension-icon {
  background: #f1f8df;
  border-color: #e3edcc;
}

.extension-item:nth-child(2) .extension-icon {
  background: #eef6fc;
  border-color: #dceaf4;
}

.extension-item:nth-child(3) .extension-icon {
  background: #fff4e8;
  border-color: #f0e4d4;
}

.extension-item:nth-child(4) .extension-icon {
  background: #f5effa;
  border-color: #e9dff1;
}

.extension-icon svg {
  width: 16px;
  height: 16px;
}

.extension-item > div {
  min-width: 0;
}

.extension-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 730;
}

.extension-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.faq-list {
  counter-reset: faq;
  border-top: 1px solid var(--line);
}

.faq-item {
  counter-increment: faq;
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  padding: 13px 30px 13px 34px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.55;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::before {
  position: absolute;
  top: 13px;
  left: 2px;
  color: var(--muted);
  content: counter(faq, decimal-leading-zero);
  font-size: 9px;
  font-weight: 650;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 9px;
  right: 2px;
  color: var(--muted);
  content: "+";
  font-size: 18px;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 30px 14px 34px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

#showcase,
#extension,
#faq {
  scroll-margin-top: 92px;
}

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 25, 29, 0.2);
  font-size: 12px;
  line-height: 1.5;
  animation: toast-in 180ms ease both;
}

.toast svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
}

.toast-message {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.toast-success svg {
  color: var(--lime);
}

.toast-error {
  background: #7b2927;
}

.toast-info svg {
  color: var(--sky);
}

.toast-out {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prompt-checking {
  color: #87630b;
}

.prompt-checking svg {
  animation: spin 0.9s linear infinite;
}

.prompt-invalid,
.prompt-error {
  color: var(--danger);
}

.prompt-box.is-invalid {
  border-color: #d98682;
  box-shadow: 0 0 0 3px rgba(186, 59, 55, 0.08);
}

.source-caption.is-loading::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(217, 255, 105, 0.95),
      transparent
    );
  content: "";
  animation: loading-sweep 1.1s linear infinite;
}

@keyframes loading-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes to-gif-scan {
  0%,
  18% {
    opacity: 0;
    transform: translateX(0) skewX(-18deg);
  }
  28% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translateX(340%) skewX(-18deg);
  }
  100% {
    opacity: 0;
    transform: translateX(340%) skewX(-18deg);
  }
}

@keyframes to-gif-edge {
  0%,
  20% {
    opacity: 0;
    transform: translateX(-35%);
  }
  35% {
    opacity: 1;
  }
  72% {
    opacity: 0.72;
    transform: translateX(34%);
  }
  100% {
    opacity: 0;
    transform: translateX(34%);
  }
}

@keyframes to-gif-icon-pulse {
  0% {
    opacity: 0.65;
    transform: scale(0.78);
  }
  72%,
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

.results-empty {
  display: flex;
  min-height: 260px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
}

.empty-icon svg {
  width: 22px;
  height: 22px;
}

.results-empty h3 {
  margin: 13px 0 4px;
  font-size: 15px;
  font-weight: 740;
}

.results-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.generated-sticker {
  position: absolute;
  inset: 8% 8% 8%;
  display: grid;
  place-items: center;
}

.generated-sticker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 13px rgba(23, 25, 29, 0.14));
}

.sticker-skeleton .sticker-art {
  background: #eceee9;
}

.skeleton-ring {
  position: absolute;
  top: 49%;
  left: 50%;
  width: 56%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    linear-gradient(
      110deg,
      #e2e4df 20%,
      #f5f6f3 38%,
      #e2e4df 56%
    );
  background-size: 220% 100%;
  transform: translate(-50%, -50%);
  animation: skeleton-wave 1.4s linear infinite;
}

.skeleton-line {
  position: absolute;
  bottom: 13%;
  left: 9%;
  width: 33%;
  height: 20px;
  border-radius: 4px;
  background: #d8dbd5;
}

.mini-loader {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.failed-art {
  position: absolute;
  inset: 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(23, 25, 29, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
  text-align: center;
}

.failed-art svg {
  width: 24px;
  height: 24px;
}

.failed-art span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.results-status-pending svg,
.spin {
  animation: spin 0.9s linear infinite;
}

.results-status-error {
  border-color: #eccdca;
  background: #fdf0ef;
  color: var(--danger);
}

.results-status-demo {
  border-color: #d8dcce;
  background: #f5f7f0;
  color: var(--muted-strong);
}

@keyframes skeleton-wave {
  to {
    background-position-x: -120%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 22, 25, 0.52);
  cursor: pointer;
  backdrop-filter: blur(3px);
}

.cache-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  overflow: hidden;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(18, 20, 24, 0.28);
}

.cache-preview {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 15, 18, 0.88);
  cursor: zoom-out;
  backdrop-filter: blur(8px);
}

.cache-preview[hidden] {
  display: none;
}

.cache-preview-frame {
  position: relative;
  display: flex;
  overflow: hidden;
  max-width: min(1200px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #171a1f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.cache-preview-frame img {
  display: block;
  width: auto;
  max-width: min(1200px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100vh - 48px);
  object-fit: contain;
}

.cache-preview-frame figcaption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.cache-preview-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(18, 20, 24, 0.72);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.cache-preview-close svg {
  width: 17px;
  height: 17px;
}

.cache-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: start;
  padding: 19px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.cache-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 760;
}

.cache-dialog-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.cache-dialog-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.cache-dialog-total strong {
  color: var(--ink);
  font-size: 16px;
}

.cache-clear-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #edcfcc;
  border-radius: 6px;
  background: #fffafa;
  color: var(--danger);
  font-family: inherit;
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
}

.cache-clear-button:hover {
  border-color: #dfb2ae;
  background: #fff2f1;
}

.cache-clear-button svg {
  width: 13px;
  height: 13px;
}

.cache-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.select-all-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 650;
}

.select-all-row input,
.cache-item input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}

.cache-selected-count {
  color: var(--muted);
  font-size: 10px;
}

.cache-toolbar-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.cache-toolbar-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.cache-list {
  display: grid;
  overflow: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 14px 20px;
}

.cache-empty {
  display: flex;
  min-height: 210px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.cache-empty svg {
  width: 24px;
  height: 24px;
}

.cache-item {
  display: grid;
  grid-template-columns: 20px 72px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.cache-item:hover {
  border-color: var(--line-strong);
}

.cache-item:has(input:checked) {
  border-color: var(--ink);
  background: #f8faef;
}

.cache-item.is-gif {
  border-color: rgba(72, 111, 235, 0.24);
  background:
    linear-gradient(120deg, rgba(46, 112, 255, 0.045), rgba(128, 70, 206, 0.035)),
    #ffffff;
}

.cache-item.is-gif:has(input:checked) {
  border-color: #5278dd;
  background:
    linear-gradient(120deg, rgba(46, 112, 255, 0.1), rgba(128, 70, 206, 0.06)),
    #f8f9ff;
}

.cache-item-thumb {
  display: grid;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  background: #eff0ed;
  cursor: zoom-in;
}

.cache-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.cache-item-thumb img:hover,
.cache-item-thumb img:focus-visible {
  transform: scale(1.04);
}

.cache-item-thumb img:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.cache-item-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.cache-item-info strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cache-item-info span {
  color: var(--muted);
  font-size: 9px;
}

.cache-item-actions {
  display: flex;
  margin-top: 5px;
}

.cache-to-gif-button {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(70, 112, 230, 0.3);
  border-radius: 999px;
  background: rgba(57, 104, 220, 0.06);
  color: #4564ad;
  font-family: inherit;
  font-size: 8px;
  font-weight: 680;
  cursor: pointer;
}

.cache-to-gif-button:hover {
  border-color: rgba(67, 103, 207, 0.62);
  background: rgba(57, 104, 220, 0.12);
  color: #274785;
}

.cache-to-gif-button svg {
  width: 11px;
  height: 11px;
}

.cache-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.cache-dialog-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.cache-dialog-footer svg {
  width: 12px;
  height: 12px;
}

.danger-text {
  color: var(--danger);
}

.danger-button {
  border-color: #edcfcc;
  color: var(--danger);
}

.text-popover {
  position: fixed;
  z-index: 75;
  width: min(340px, calc(100vw - 24px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(18, 20, 24, 0.2);
}

.text-popover[hidden] {
  display: none;
}

.text-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.text-popover-header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.text-popover-header strong {
  font-size: 13px;
  font-weight: 750;
}

.text-popover-header span:not(.section-kicker) {
  color: var(--muted);
  font-size: 10px;
}

.text-popover-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.visibility-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.visibility-toggle > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.visibility-toggle strong {
  font-size: 11px;
  font-weight: 720;
}

.visibility-toggle small {
  color: var(--muted);
  font-size: 9px;
}

.visibility-toggle input {
  width: 32px;
  height: 18px;
  accent-color: var(--ink);
  cursor: pointer;
}

.popover-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 650;
}

.popover-field > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.popover-field input[type="text"] {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  color: var(--ink);
  font-size: 12px;
}

.popover-field input[type="text"]:focus {
  border-color: #9a9f96;
  box-shadow: 0 0 0 3px rgba(23, 25, 29, 0.05);
}

.popover-field input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
}

.popover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 12px;
}

.popover-color-field input {
  width: 100%;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.popover-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.text-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

body.modal-open {
  overflow: hidden;
}

.studio-workspace[hidden],
.gif-workspace[hidden] {
  display: none !important;
}

.studio-mode-switch {
  --mode-indicator-left: 4px;
  position: relative;
  display: grid;
  width: min(240px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(29, 32, 41, 0.98), rgba(13, 15, 21, 0.98));
  box-shadow:
    0 10px 24px rgba(18, 20, 29, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.06);
  isolation: isolate;
}

.studio-mode-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: var(--mode-indicator-left);
  width: calc(50% - 5px);
  border-radius: inherit;
  background:
    linear-gradient(135deg, #3974ff 0%, #5669f4 54%, #7662e8 100%);
  box-shadow:
    0 8px 22px rgba(61, 112, 255, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.28);
  transition:
    transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1),
    background 240ms ease,
    box-shadow 240ms ease;
}

.studio-mode-switch[data-mode="image"] .studio-mode-indicator {
  background: #ffffff;
  box-shadow:
    0 6px 18px rgba(10, 12, 17, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.9);
}

.studio-mode-switch[data-mode="gif"] .studio-mode-indicator {
  background: linear-gradient(135deg, #2e7cff 0%, #3f70ff 100%);
  box-shadow:
    0 8px 24px rgba(44, 113, 255, 0.36),
    inset 0 1px rgba(255, 255, 255, 0.28);
  transform: translateX(calc(100% + 2px));
}

.studio-mode-button {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font-family: inherit;
  cursor: pointer;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.studio-mode-button:hover {
  color: rgba(255, 255, 255, 0.78);
}

.studio-mode-button.is-active {
  color: #ffffff;
}

.studio-mode-switch[data-mode="image"] .studio-mode-button.is-active {
  color: #17191d;
}

.studio-mode-button:active {
  transform: scale(0.985);
}

.studio-mode-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.studio-mode-copy strong {
  font-size: 14px;
  font-weight: 720;
}

body.is-gif-mode .title-gradient {
  background:
    linear-gradient(102deg, #236fff 0%, #675bff 48%, #f14e7a 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

body.is-gif-mode .page-heading h1 {
  color: #f7f8ff;
}

body.is-gif-mode .page-heading p {
  color: #8b93a9;
}

body.is-gif-mode .eyebrow {
  color: #828ba3;
}

body.is-gif-mode .eyebrow-dot {
  background: #ff4f7b;
  box-shadow: 0 0 0 4px rgba(255, 79, 123, 0.1);
}

body.is-gif-mode .image-only {
  display: none !important;
}

.gif-workspace {
  --gif-ink: #f5f7ff;
  --gif-muted: #8d95ad;
  --gif-line: rgba(145, 158, 205, 0.17);
  --gif-line-strong: rgba(139, 151, 204, 0.32);
  --gif-surface: #10131c;
  --gif-surface-raised: #151925;
  --gif-blue: #337dff;
  --gif-violet: #735fff;
  --gif-rose: #ff507c;
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(92, 105, 171, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(50, 83, 203, 0.14), transparent 27%),
    linear-gradient(310deg, rgba(255, 80, 124, 0.09), transparent 30%),
    linear-gradient(180deg, #0b0e16 0%, #0d1019 100%);
  box-shadow:
    0 20px 48px rgba(18, 23, 44, 0.17),
    inset 0 1px rgba(255, 255, 255, 0.04);
  color: var(--gif-ink);
}

.gif-workspace::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(52, 125, 255, 0.8), rgba(255, 80, 124, 0.65), transparent);
  content: "";
}

.gif-workspace::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(128, 147, 218, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 147, 218, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.52), transparent 44%);
  pointer-events: none;
}

.gif-workspace > * {
  position: relative;
  z-index: 1;
}

.gif-workspace-heading {
  z-index: 10;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 2px 2px 17px;
  border-bottom: 1px solid var(--gif-line);
}

.gif-heading-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(112, 120, 255, 0.35);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(49, 126, 255, 0.2), rgba(117, 92, 255, 0.08));
  color: #81b3ff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.gif-heading-mark svg {
  width: 20px;
  height: 20px;
}

.gif-heading-copy {
  min-width: 0;
}

.gif-overline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8d9aca;
  font-size: 8px;
  font-weight: 780;
}

.gif-signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ed7a2;
  box-shadow: 0 0 0 3px rgba(78, 215, 162, 0.1);
}

.gif-heading-copy h2 {
  margin: 4px 0 2px;
  color: var(--gif-ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 730;
}

.gif-heading-copy p {
  margin: 0;
  color: var(--gif-muted);
  font-size: 11px;
}

.gif-specs {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(154px, 1.45fr) repeat(3, minmax(62px, 1fr));
  align-items: stretch;
  gap: 1px;
  overflow: visible;
  border: 1px solid var(--gif-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.gif-spec-control,
.gif-spec-static {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
  color: #6f7896;
  font-size: 7px;
  font-weight: 760;
  line-height: 1.2;
}

.gif-spec-static {
  display: flex;
  min-width: 76px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 8px 10px;
  color: #6f7896;
  font-size: 7px;
  font-weight: 760;
  line-height: 1.2;
}

.gif-spec-trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px 6px;
  border: 0;
  background: transparent;
  color: #dfe6ff;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.gif-spec-trigger:hover,
.gif-spec-control.is-open .gif-spec-trigger {
  background: rgba(73, 112, 255, 0.09);
}

.gif-spec-trigger:focus-visible {
  outline: 2px solid rgba(85, 136, 255, 0.55);
  outline-offset: -2px;
}

.gif-spec-trigger svg {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  color: #707b9e;
  transition: transform 180ms ease;
}

.gif-spec-control.is-open .gif-spec-trigger svg {
  transform: rotate(180deg);
}

.gif-spec-value {
  overflow: hidden;
  color: #dfe6ff;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gif-spec-model .gif-spec-value {
  max-width: 122px;
  font-size: 9px;
}

.gif-spec-label,
.gif-spec-static > span {
  color: #6f7896;
  font-size: 7px;
  font-weight: 760;
}

.gif-spec-label {
  margin: 0 auto 8px;
}

.gif-spec-control:not(:first-child),
.gif-spec-static {
  border-left: 1px solid var(--gif-line);
}

.gif-spec-static strong {
  margin-bottom: 3px;
  color: #dfe6ff;
  font-size: 15px;
  font-weight: 720;
}

.gif-spec-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 40;
  display: flex;
  width: max-content;
  min-width: 100%;
  max-width: 230px;
  max-height: 246px;
  overflow: auto;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(104, 122, 191, 0.35);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(51, 85, 184, 0.08), transparent 35%),
    #0e121d;
  box-shadow:
    0 16px 36px rgba(3, 6, 14, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.05);
  animation: gif-spec-menu-in 140ms ease both;
}

.gif-spec-menu[hidden] {
  display: none;
}

.gif-spec-model .gif-spec-menu {
  width: 218px;
}

.gif-spec-option {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #aab4d2;
  font-family: inherit;
  font-size: 9px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.gif-spec-option:hover,
.gif-spec-option:focus-visible {
  outline: 0;
  background: rgba(75, 111, 228, 0.14);
  color: #f1f4ff;
}

.gif-spec-option.is-selected {
  background:
    linear-gradient(90deg, rgba(50, 117, 255, 0.2), rgba(111, 83, 230, 0.1));
  color: #f4f6ff;
}

.gif-spec-option svg {
  width: 11px;
  height: 11px;
  color: #6f9cff;
  opacity: 0;
}

.gif-spec-option.is-selected svg {
  opacity: 1;
}

@keyframes gif-spec-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gif-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.83fr) minmax(300px, 1.03fr) minmax(340px, 1.26fr);
  gap: 12px;
  align-items: stretch;
}

.gif-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--gif-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 26%),
    var(--gif-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.gif-panel-heading {
  display: flex;
  min-height: 36px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.gif-step {
  display: block;
  margin-bottom: 3px;
  color: #657092;
  font-size: 7px;
  font-weight: 780;
}

.gif-panel-heading h3 {
  margin: 0;
  color: #f2f4ff;
  font-size: 15px;
  font-weight: 700;
}

.gif-mini-status,
.gif-code,
.gif-result-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--gif-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #7f88a5;
  font-size: 7px;
  font-weight: 760;
  white-space: nowrap;
}

.gif-code {
  color: #697390;
}

.gif-dropzone {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 1px dashed rgba(127, 142, 202, 0.32);
  border-radius: 7px;
  background:
    linear-gradient(rgba(117, 132, 194, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 132, 194, 0.045) 1px, transparent 1px),
    #0c0f17;
  background-size: 20px 20px;
  color: var(--gif-muted);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.gif-dropzone:hover,
.gif-dropzone:focus-visible {
  border-color: rgba(75, 136, 255, 0.66);
  outline: 0;
  background-color: #0e1220;
}

.gif-dropzone.is-dragging {
  border-color: #ff5b7e;
  background-color: #15111c;
  transform: scale(0.99);
}

.gif-dropzone.is-ready {
  border-style: solid;
  border-color: rgba(103, 115, 255, 0.42);
  background: #0a0d14;
}

.gif-dropzone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gif-dropzone img[hidden],
.gif-drop-placeholder[hidden] {
  display: none;
}

.gif-drop-placeholder {
  display: flex;
  max-width: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  text-align: center;
}

.gif-drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid rgba(111, 127, 255, 0.34);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(49, 126, 255, 0.2), rgba(255, 80, 124, 0.08));
  color: #88b6ff;
}

.gif-drop-icon svg {
  width: 21px;
  height: 21px;
}

.gif-drop-placeholder strong {
  margin-bottom: 5px;
  color: #dfe5fb;
  font-size: 12px;
  font-weight: 680;
}

.gif-drop-placeholder > span:last-child {
  color: #6f7896;
  font-size: 9px;
  line-height: 1.55;
}

.gif-drop-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(96, 145, 255, 0.58);
  border-style: solid;
  pointer-events: none;
}

.gif-drop-corner-tl {
  top: 8px;
  left: 8px;
  border-width: 1px 0 0 1px;
}

.gif-drop-corner-tr {
  top: 8px;
  right: 8px;
  border-width: 1px 1px 0 0;
}

.gif-drop-corner-bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 1px 1px;
}

.gif-drop-corner-br {
  right: 8px;
  bottom: 8px;
  border-width: 0 1px 1px 0;
}

.gif-source-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}

.gif-source-state {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #7f89a8;
  font-size: 9px;
}

.gif-source-state svg {
  width: 12px;
  height: 12px;
}

.gif-source-state.is-ready {
  color: #78ddb3;
}

.gif-source-state.is-loading {
  color: #9ab9ff;
}

.gif-text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ba6cc;
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.gif-text-button:hover {
  color: #ffffff;
}

.gif-text-button svg {
  width: 12px;
  height: 12px;
}

.gif-source-note {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--gif-line);
  color: #69738f;
  font-size: 9px;
  line-height: 1.55;
}

.gif-source-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 1px;
  color: #6577b7;
}

.gif-prompt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #9aa3bf;
  font-size: 9px;
}

.gif-prompt-label span:last-child {
  color: #5f6986;
}

.gif-prompt-field {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gif-line-strong);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(69, 91, 170, 0.08), transparent 40%),
    #0b0e16;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.gif-prompt-field:focus-within {
  border-color: rgba(82, 127, 255, 0.76);
  box-shadow:
    0 0 0 3px rgba(56, 103, 235, 0.09),
    inset 0 1px rgba(255, 255, 255, 0.03);
}

.gif-prompt-field textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 14px 14px 35px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e9edff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
}

.gif-prompt-field textarea::placeholder {
  color: #59627c;
}

.gif-prompt-scan {
  position: absolute;
  top: 0;
  bottom: 30px;
  left: -30%;
  width: 18%;
  background:
    linear-gradient(90deg, transparent, rgba(82, 130, 255, 0.07), transparent);
  pointer-events: none;
  animation: gif-field-scan 5s ease-in-out infinite;
}

.gif-prompt-count {
  position: absolute;
  right: 11px;
  bottom: 9px;
  left: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #59627c;
  font-size: 7px;
  font-weight: 740;
  pointer-events: none;
}

.gif-template-block {
  margin-top: 12px;
}

.gif-template-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #6d7796;
  font-size: 8px;
  font-weight: 740;
}

.gif-template-heading svg {
  width: 12px;
  height: 12px;
  color: #746cff;
}

.gif-template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gif-template {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--gif-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #8e98b8;
  font-family: inherit;
  font-size: 9px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.gif-template:hover {
  border-color: rgba(101, 126, 255, 0.58);
  background: rgba(80, 102, 224, 0.11);
  color: #dfe5ff;
}

.gif-generate-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
}

.gif-model-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #7d87a5;
}

.gif-model-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #5d7cff;
  box-shadow: 0 0 0 3px rgba(93, 124, 255, 0.1);
}

.gif-model-meta > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.gif-model-meta strong {
  color: #afb9d9;
  font-size: 9px;
  font-weight: 680;
}

.gif-model-meta small {
  color: #606a87;
  font-size: 7px;
}

.gif-generate-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 13px 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background:
    linear-gradient(110deg, #2b7dff 0%, #6860ff 52%, #ff4d79 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 710;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(85, 86, 255, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.25);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.gif-generate-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.gif-generate-button:active {
  transform: translateY(0);
}

.gif-generate-button:disabled {
  cursor: wait;
  filter: saturate(0.5);
  opacity: 0.72;
  transform: none;
}

.gif-generate-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.gif-generate-icon svg,
.gif-generate-arrow {
  width: 15px;
  height: 15px;
}

.gif-generate-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0;
}

.gif-generate-arrow {
  opacity: 0.72;
}

.gif-result-panel {
  background:
    linear-gradient(180deg, rgba(57, 120, 255, 0.05), transparent 20%),
    #0d1018;
}

.gif-result-status {
  border-color: rgba(105, 120, 173, 0.24);
  color: #737e9e;
}

.gif-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #65708d;
}

.gif-result-status.is-pending {
  border-color: rgba(83, 126, 255, 0.4);
  color: #9ab9ff;
}

.gif-result-status.is-pending .gif-status-dot {
  background: #4c88ff;
  box-shadow: 0 0 0 3px rgba(76, 136, 255, 0.12);
  animation: gif-status-pulse 1.2s ease-in-out infinite;
}

.gif-result-status.is-done {
  border-color: rgba(75, 202, 153, 0.34);
  color: #81dbb5;
}

.gif-result-status.is-done .gif-status-dot {
  background: #4ed7a2;
  box-shadow: 0 0 0 3px rgba(78, 215, 162, 0.1);
}

.gif-result-status.is-error {
  border-color: rgba(255, 86, 119, 0.36);
  color: #ff8aa1;
}

.gif-result-status.is-error .gif-status-dot {
  background: #ff5677;
}

.gif-result-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 390px;
  flex: 1;
  place-items: center;
  border: 1px solid rgba(118, 132, 190, 0.19);
  border-radius: 7px;
  background:
    linear-gradient(rgba(106, 120, 179, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 120, 179, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(57, 93, 206, 0.08), transparent 47%),
    #090c13;
  background-size:
    24px 24px,
    24px 24px,
    auto,
    auto;
}

.gif-result-stage::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(95, 109, 170, 0.09);
  border-radius: 4px;
  content: "";
  pointer-events: none;
}

.gif-empty-state {
  display: flex;
  max-width: 270px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}

.gif-empty-visual {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(103, 119, 181, 0.25);
  border-radius: 50%;
  color: #7386c7;
}

.gif-empty-visual::before,
.gif-empty-visual::after {
  position: absolute;
  border: 1px solid rgba(101, 117, 177, 0.14);
  border-radius: 50%;
  content: "";
}

.gif-empty-visual::before {
  inset: -9px;
}

.gif-empty-visual::after {
  inset: 12px;
  border-color: rgba(100, 132, 255, 0.18);
}

.gif-empty-visual > span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4b77ff;
}

.gif-empty-visual > span:first-child {
  top: 6px;
  right: 19px;
}

.gif-empty-visual > span:nth-child(2) {
  bottom: 5px;
  left: 25px;
  background: #ff5677;
}

.gif-empty-visual svg {
  width: 26px;
  height: 26px;
}

.gif-empty-state strong {
  margin-bottom: 6px;
  color: #cdd4ea;
  font-size: 13px;
  font-weight: 680;
}

.gif-empty-state p {
  margin: 0;
  color: #68738f;
  font-size: 10px;
  line-height: 1.65;
}

.gif-waiting-state {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 25px;
  text-align: center;
}

.gif-wait-visual {
  position: relative;
  display: grid;
  width: 220px;
  height: 220px;
  overflow: hidden;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(92, 126, 255, 0.3);
  border-radius: 50%;
  background:
    linear-gradient(rgba(109, 136, 235, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 136, 235, 0.075) 1px, transparent 1px),
    radial-gradient(circle, rgba(72, 100, 227, 0.12), transparent 65%),
    #0a0d17;
  background-size:
    18px 18px,
    18px 18px,
    auto,
    auto;
  box-shadow:
    0 0 40px rgba(56, 92, 255, 0.08),
    inset 0 0 40px rgba(66, 96, 221, 0.06);
}

.gif-wait-visual::before {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(91, 120, 255, 0.22);
  border-top-color: #4f8bff;
  border-right-color: rgba(255, 80, 124, 0.55);
  border-radius: 50%;
  content: "";
  animation: gif-orbit 3.2s linear infinite;
}

.gif-wait-visual::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 34%;
  background:
    linear-gradient(to bottom, transparent, rgba(84, 132, 255, 0.13), transparent);
  content: "";
  animation: gif-scan 2.2s ease-in-out infinite;
}

.gif-frame-track {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
}

.gif-frame-track span {
  width: 6px;
  height: 42px;
  border-radius: 3px;
  background:
    linear-gradient(to bottom, #3c82ff, #7b5fff 58%, #ff4f79);
  opacity: 0.22;
  transform: scaleY(0.45);
  animation: gif-frame-pulse 1.35s ease-in-out infinite;
}

.gif-frame-track span:nth-child(2) {
  animation-delay: 0.08s;
}

.gif-frame-track span:nth-child(3) {
  animation-delay: 0.16s;
}

.gif-frame-track span:nth-child(4) {
  animation-delay: 0.24s;
}

.gif-frame-track span:nth-child(5) {
  animation-delay: 0.32s;
}

.gif-frame-track span:nth-child(6) {
  animation-delay: 0.4s;
}

.gif-frame-track span:nth-child(7) {
  animation-delay: 0.48s;
}

.gif-frame-track span:nth-child(8) {
  animation-delay: 0.56s;
}

.gif-frame-track span:nth-child(9) {
  animation-delay: 0.64s;
}

.gif-waiting-state > strong {
  color: #e1e7ff;
  font-size: 14px;
  font-weight: 700;
}

.gif-waiting-state > p {
  min-height: 32px;
  max-width: 310px;
  margin: 7px 0 16px;
  color: #7e89a7;
  font-size: 10px;
  line-height: 1.6;
}

.gif-wait-progress {
  position: relative;
  overflow: hidden;
  width: min(250px, 80%);
  height: 3px;
  border-radius: 3px;
  background: rgba(111, 127, 183, 0.13);
}

.gif-wait-progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -38%;
  width: 38%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, #4b87ff, #8265ff, #ff507c, transparent);
  animation: gif-progress 1.7s ease-in-out infinite;
}

.gif-done-state {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px;
}

.gif-result-frame {
  position: relative;
  overflow: hidden;
  width: min(100%, 430px);
  border: 1px solid rgba(103, 132, 255, 0.38);
  border-radius: 7px;
  background: #05070b;
  box-shadow:
    0 18px 42px rgba(5, 8, 16, 0.44),
    0 0 0 1px rgba(255, 82, 123, 0.06);
}

.gif-result-frame::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background:
    linear-gradient(90deg, #347dff, #7160ff, #ff507c);
  content: "";
  z-index: 1;
}

.gif-result-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #080b11;
}

.gif-result-meta {
  display: flex;
  width: min(100%, 430px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  color: #697592;
  font-size: 8px;
}

.gif-result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gif-result-meta svg {
  width: 12px;
  height: 12px;
}

.gif-error-state {
  display: flex;
  max-width: 380px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}

.gif-error-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid rgba(255, 86, 119, 0.34);
  border-radius: 50%;
  background: rgba(255, 86, 119, 0.07);
  color: #ff7d97;
}

.gif-error-icon svg {
  width: 22px;
  height: 22px;
}

.gif-error-state strong {
  color: #f2d9df;
  font-size: 13px;
}

.gif-error-state p {
  margin: 7px 0 0;
  color: #9a7c85;
  font-size: 10px;
  line-height: 1.6;
  max-height: 190px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.gif-result-footer {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--gif-line);
}

.gif-result-security {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #65708d;
  font-size: 8px;
}

.gif-result-security svg {
  width: 12px;
  height: 12px;
}

.gif-result-actions {
  display: flex;
  gap: 7px;
}

.gif-action-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--gif-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #8993b1;
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.gif-action-button[hidden] {
  display: none;
}

.gif-action-button:hover {
  border-color: var(--gif-line-strong);
  color: #ffffff;
}

.gif-action-button svg {
  width: 12px;
  height: 12px;
}

.gif-action-button-primary {
  border-color: rgba(99, 117, 255, 0.35);
  background: rgba(91, 106, 255, 0.1);
  color: #b9c0ff;
}

@keyframes gif-field-scan {
  0%,
  28% {
    left: -30%;
  }
  62%,
  100% {
    left: 112%;
  }
}

@keyframes gif-status-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes gif-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gif-scan {
  0% {
    top: -35%;
  }
  100% {
    top: 105%;
  }
}

@keyframes gif-frame-pulse {
  0%,
  100% {
    opacity: 0.18;
    transform: scaleY(0.36);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes gif-progress {
  0% {
    left: -38%;
  }
  100% {
    left: 105%;
  }
}

@media (max-width: 1120px) {
  .page {
    padding-right: 20px;
    padding-left: 20px;
  }

  .topnav {
    display: none;
  }

  .studio-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .source-panel {
    padding: 16px;
  }

  .options-section {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .option-block-small {
    flex-basis: auto;
  }

  .sticker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-name {
    display: none;
  }

  .key-picker > span {
    display: none;
  }

  .key-select-trigger {
    max-width: 130px;
    min-width: 100px;
  }

}

@media (max-width: 860px) {
  .topbar {
    padding: 0 18px;
  }

  .cache-status {
    width: 38px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
  }

  .cache-status > span:not(.status-dot),
  .cache-status strong {
    display: none;
  }

  .cache-status .status-dot {
    display: none;
  }

  .cache-mobile-icon {
    display: block;
  }

  .page-heading {
    align-items: center;
    flex-direction: column;
    gap: 16px;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .source-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
  }

  .source-panel .panel-heading,
  .source-footer {
    grid-column: 1 / -1;
  }

  .source-preview {
    align-self: start;
  }

  .source-readiness {
    align-self: start;
    margin-top: 0;
  }

  .sticker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-view {
    grid-template-columns: 1fr;
  }

  .site-info-grid {
    grid-template-columns: 1fr;
  }

  .sticker-guide-links {
    grid-template-columns: 1fr;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .results-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .cache-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 62px;
    padding: 0 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-name {
    font-size: 18px;
  }

  .preview-badge {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .page {
    padding: 20px 14px 24px;
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .page-heading p {
    max-width: 32em;
    font-size: 13px;
  }

  .source-panel {
    display: flex;
    padding: 16px;
  }

  .source-preview {
    max-height: 440px;
  }

  .source-footer {
    flex-wrap: wrap;
  }

  .config-panel {
    padding: 17px 16px 0;
  }

  .panel-heading {
    margin-bottom: 16px;
  }

  .scene-group {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .scene-group-label {
    padding-top: 0;
  }

  .custom-scene-form {
    align-items: stretch;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .custom-scene-input-wrap {
    flex-basis: 100%;
  }

  .scene-tag {
    min-height: 34px;
    flex: 1 1 calc(33.333% - 7px);
    justify-content: center;
    padding: 0 7px;
  }

  .section-label-row {
    align-items: flex-start;
  }

  .options-section {
    gap: 14px;
  }

  .segment {
    padding: 0 5px;
  }

  .generate-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-right: -16px;
    margin-left: -16px;
    padding: 15px 16px 17px;
  }

  .generate-button {
    width: 100%;
    justify-content: center;
  }

  .results-panel {
    padding: 16px;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .results-title-group {
    flex-wrap: wrap;
  }

  .results-note {
    width: 100%;
  }

  .results-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .export-preset {
    width: 100%;
  }

  .export-preset .platform-pills {
    justify-content: flex-start;
  }

  .results-actions .button {
    flex: 1;
  }

  .info-panel {
    padding: 16px;
  }

  .info-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .info-heading h2 {
    font-size: 18px;
  }

  .sticker-guide-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .sticker-guide-heading h2 {
    font-size: 18px;
  }

  .sticker-guide-intro {
    flex-direction: column;
    gap: 10px;
  }

  .sticker-guide-link {
    min-height: 88px;
  }

  .showcase-heading h2 {
    font-size: 30px;
  }

  .showcase-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .showcase-tab {
    flex: 0 0 auto;
  }

  .showcase-original-media {
    min-height: 0;
  }

  .showcase-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-result-placeholder {
    min-height: 145px;
  }

  .extension-list {
    grid-template-columns: 1fr;
  }

  .auth-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .auth-banner-copy {
    flex-basis: calc(100% - 48px);
  }

  .auth-banner .button {
    width: 100%;
  }

  .user-chip {
    display: none;
  }

  .account-balance {
    gap: 4px;
    padding: 0 4px 0 6px;
  }

  .balance-label {
    font-size: 0;
  }

  .balance-recharge {
    width: 24px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .key-picker {
    min-width: 0;
    padding: 0 6px;
  }

  .key-select-trigger {
    max-width: 84px;
    min-width: 72px;
  }

  .text-popover {
    overflow: auto;
    max-height: calc(100vh - 24px);
  }

  .modal {
    padding: 10px;
  }

  .cache-dialog {
    max-height: calc(100vh - 20px);
  }

  .cache-dialog-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 16px;
  }

  .cache-dialog-total {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .cache-clear-button {
    grid-column: 2;
    grid-row: 1;
  }

  .cache-dialog-header > .icon-button {
    grid-column: 3;
    grid-row: 1;
  }

  .cache-toolbar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .cache-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .cache-toolbar-actions .button {
    flex: 1;
  }

  .cache-list {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .cache-dialog-footer {
    padding: 10px 14px;
  }

  .sticker-grid {
    gap: 9px;
  }

  .sticker-copy {
    font-size: 24px;
  }

  .sticker-copy-small {
    font-size: 21px;
  }

  .sticker-cutout {
    width: 59%;
    border-width: 4px;
  }

  .sticker-meta {
    padding: 0 7px;
  }

  .sticker-tag {
    top: 7px;
    left: 7px;
    min-height: 20px;
    padding: 0 6px;
    font-size: 8px;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 390px) {
  .topbar {
    gap: 6px;
    padding: 0 10px;
  }

  .topbar-actions .button {
    width: 36px;
    padding: 0;
    font-size: 0;
  }

  .topbar-actions .button svg {
    width: 16px;
    height: 16px;
  }

  .language-picker {
    width: 98px;
  }

  .language-picker-trigger {
    min-height: 38px;
    padding: 0 9px;
  }

  .language-picker-trigger > svg:first-child {
    display: none;
  }

  .user-controls {
    min-width: 0;
    gap: 0;
  }

  .account-balance {
    padding: 0 3px;
  }

  .account-balance .balance-label {
    display: none;
  }

  .key-picker {
    padding: 0 5px;
  }

  .key-select-trigger {
    width: 72px;
    max-width: 72px;
    min-width: 0;
  }

  #cache-status-button,
  #logout-button {
    display: none;
  }

  .toast-root {
    right: 12px;
  }

  .scene-tag {
    flex-basis: calc(50% - 7px);
  }

  .sticker-copy {
    font-size: 21px;
  }

  .sticker-copy-small {
    font-size: 18px;
  }
}

@media (max-width: 1120px) {
  .gif-layout {
    grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.15fr);
  }

  .gif-result-panel {
    min-height: 520px;
    grid-column: 1 / -1;
  }

  .gif-result-stage {
    min-height: 460px;
  }
}

@media (max-width: 860px) {
  .gif-workspace {
    padding: 16px;
  }

  .gif-workspace-heading {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .gif-specs {
    width: 100%;
    grid-column: 1 / -1;
  }

  .gif-spec-control,
  .gif-spec-static {
    min-width: 0;
  }

  .gif-layout {
    grid-template-columns: 1fr;
  }

  .gif-result-panel {
    min-height: 0;
    grid-column: auto;
  }

  .gif-result-stage {
    min-height: 430px;
  }

  .gif-source-note {
    margin-top: 13px;
  }
}

@media (max-width: 620px) {
  .studio-mode-switch {
    width: min(220px, 100%);
  }

  .studio-mode-button {
    min-height: 38px;
    gap: 0;
    padding: 0 8px;
  }

  .studio-mode-copy strong {
    font-size: 13px;
  }

  .gif-workspace {
    padding: 12px;
  }

  .gif-workspace-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gif-heading-mark {
    display: none;
  }

  .gif-heading-copy h2 {
    font-size: 18px;
  }

  .gif-specs {
    grid-column: auto;
  }

  .gif-spec-control,
  .gif-spec-static {
    min-width: 0;
  }

  .gif-specs {
    grid-template-columns:
      minmax(112px, 1.45fr)
      repeat(3, minmax(0, 1fr));
  }

  .gif-spec-control {
    padding: 0;
  }

  .gif-spec-static {
    padding: 8px 6px;
  }

  .gif-spec-trigger {
    padding: 7px 4px 6px;
  }

  .gif-spec-model .gif-spec-value {
    max-width: 76px;
    font-size: 8px;
  }

  .gif-panel {
    padding: 13px;
  }

  .gif-dropzone {
    max-height: 360px;
  }

  .gif-prompt-field textarea {
    min-height: 155px;
  }

  .gif-generate-row {
    align-items: stretch;
    flex-direction: column;
  }

  .gif-generate-button {
    width: 100%;
    justify-content: flex-start;
  }

  .gif-generate-arrow {
    margin-left: auto;
  }

  .gif-result-stage {
    min-height: 370px;
  }

  .gif-wait-visual {
    width: 190px;
    height: 190px;
  }

  .gif-result-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .gif-result-actions {
    width: 100%;
  }

  .gif-action-button {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
