:root {
  --sidebar: 76px;
  --white: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(255, 255, 255, 0.46);
  --green: #53c66d;
  --green-dark: #2f9f57;
  --panel: rgba(105, 145, 165, 0.42);

  /* HOME_CONTROLS_TUNING: homepage bottom control sizes. */
  --home-control-gap: 8px;
  --home-control-height: 38px;
  --home-plus-size: 38px;
  --home-ratio-width: 85px;
  --home-model-width: 220px;
  --home-resolution-width: 82px;
  --home-duration-width: 82px;
  --home-skill-width: 90px;
  --home-skill-menu-min-width: 154px;
  --home-ratio-gap: 7px;
  --home-ratio-padding-left: 10px;
  --home-ratio-padding-right: 8px;
  --home-model-gap: 6px;
  --home-model-padding-left: 13px;
  --home-model-padding-right: 10px;
  --home-resolution-gap: 4px;
  --home-resolution-padding-left: 13px;
  --home-resolution-padding-right: 8px;
  --home-duration-padding-left: 14px;
  --home-duration-padding-right: 14px;
  --home-duration-label-shift: 0px;
  --home-duration-caret-right: 10px;
  --home-control-font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --home-control-font-size: 14px;
  --home-control-font-weight: 700;

  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1180px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background: #080909;
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  align-items: center;
  background: #101010;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.logo {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  margin: 16px 0 14px;
  place-items: center;
}

.xlike-logo-shell {
  --xlike-logo-size: 56px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: var(--xlike-logo-size);
  height: var(--xlike-logo-size);
  overflow: hidden;
  border: 1px solid rgba(126, 153, 255, 0.26);
  border-radius: 14px;
  background:
    radial-gradient(circle at 36% 18%, rgba(105, 240, 255, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(17, 23, 54, 0.78), rgba(6, 9, 28, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 22px rgba(25, 39, 92, 0.24),
    0 0 18px rgba(79, 109, 255, 0.18);
  transform-origin: 50% 60%;
  animation: xlike-logo-enter 800ms ease-out both;
}

.xlike-logo-shell::before {
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42%);
  content: "";
  pointer-events: none;
}

.xlike-logo-mark {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: block;
  width: min(56px, calc(var(--xlike-logo-size) - 2px));
  max-height: calc(var(--xlike-logo-size) - 10px);
  overflow: visible;
  aspect-ratio: 330 / 128;
  line-height: 0;
}

.xlike-logo-mark::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/brand/xlike-logo.webp") center / contain no-repeat;
  content: "";
  filter: brightness(0) saturate(100%) invert(24%) sepia(78%) saturate(926%) hue-rotate(166deg) brightness(82%) contrast(96%);
  opacity: 0.46;
  transform: translate(-3px, 3px) scale(1.018);
  transform-origin: center;
  pointer-events: none;
}

.xlike-logo-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.24));
  pointer-events: none;
  user-select: none;
}

.xlike-logo-edge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  mix-blend-mode: screen;
  pointer-events: none;
}

.xlike-logo-edge-trace {
  fill: none;
  stroke: rgba(99, 224, 255, 0.14);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.xlike-logo-edge-spark {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(235, 255, 255, 0.98) 0 18%, rgba(91, 235, 255, 0.96) 34%, rgba(35, 190, 255, 0.72) 56%, rgba(35, 190, 255, 0) 74%);
  box-shadow:
    0 0 6px rgba(118, 244, 255, 0.9),
    0 0 13px rgba(39, 190, 255, 0.6);
  opacity: 0;
  offset-anchor: 50% 50%;
  offset-path: path("M 3.3 12 L 9 4 L 14.6 4.1 L 11.9 7.7 L 16.9 13.1 L 11.1 13.3 L 8.4 9.6 L 3.3 13.5 L 0.9 12.2 L 6.1 8.1 L 2.5 4.2 L 7.7 4.2 L 10.1 6.8 L 12.7 4 L 19.7 4 L 19.7 12 L 24.9 12 L 25.3 4 L 30.4 4 L 29.7 7.7 L 34.3 4 L 40.4 4 L 36.3 7.4 L 42.4 7.4 L 41.7 9.5 L 35.3 9.6 L 34.3 11.9 L 42.6 12 L 41.7 14.1 L 31.3 14.1 L 31.7 9.9 L 26.8 14.1 L 22.1 14.1 L 23 4.1 L 21.9 14.1 L 16.1 14.1 L 11.9 8.9 L 6.2 14.1 L 1.4 14.1 Z");
  offset-distance: 0%;
  offset-rotate: auto;
  pointer-events: none;
  will-change: offset-distance, opacity;
  animation: xlike-logo-edge-run 8s linear 1.15s infinite;
}

@keyframes xlike-logo-enter {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.88);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes xlike-logo-edge-run {
  0% {
    opacity: 0.82;
    offset-distance: 0%;
  }

  100% {
    opacity: 0.82;
    offset-distance: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xlike-logo-shell {
    animation: none;
  }

  .xlike-logo-edge,
  .xlike-logo-edge-spark {
    display: none;
  }
}

.nav-list {
  display: grid;
  width: 100%;
  gap: 2px;
}

.nav-list a,
.side-bottom button {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.nav-list a {
  position: relative;
  height: 62px;
}

.nav-list a.active {
  color: #fff;
}

.nav-list a.active::before {
  content: "";
  position: absolute;
  inset: 8px 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

.nav-list i,
.side-bottom i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-style: normal;
  line-height: 1;
}

.nav-list svg,
.side-bottom svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-list a > span {
  white-space: normal;
}

.nav-divider {
  display: block;
  height: 1px;
  margin: 8px 14px;
  background: rgba(112, 143, 177, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .nav-list a:not(.active):hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }
}

.side-bottom {
  display: grid;
  width: 100%;
  gap: 7px;
  margin-top: auto;
  padding-bottom: 12px;
  place-items: center;
}

.side-bottom button {
  height: auto;
  font-size: 12px;
}

.side-bottom strong {
  font-size: 11px;
  line-height: 1;
}

.vip {
  width: 64px !important;
  height: 24px !important;
  flex-direction: row !important;
  gap: 0 !important;
  border-radius: 999px;
  background: linear-gradient(90deg, #f6dba5, #8f6f34) !important;
  color: #392a0b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: linear-gradient(135deg, #f7ff8f, #88dfff);
  color: #202020;
  font-weight: 900;
}

.home {
  min-height: 100vh;
  padding-left: var(--sidebar);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 46px;
  background:
    linear-gradient(180deg, rgba(6, 18, 28, 0.08) 0%, rgba(6, 10, 12, 0.92) 79%, #0e0e0e 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 15%, transparent 72%, rgba(255, 255, 255, 0.12)),
    url("assets/hero-bg.png") center top / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 23%, rgba(30, 182, 255, 0.38), transparent 18%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74));
  pointer-events: none;
}

.top-language {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 40;
}

.language-menu-wrap {
  position: relative;
  width: 154px;
}

.language-menu-wrap.top-language {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 40;
}

.language-menu-wrap .icon-button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  border-radius: 8px;
  color: #f7f2ff;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(124, 58, 237, 0.28)),
    rgba(17, 17, 20, 0.92);
  box-shadow:
    0 0 22px rgba(56, 189, 248, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 19px;
  font-weight: 800;
}

.language-menu-wrap .icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.language-menu-wrap .icon-button span {
  min-width: 0;
  white-space: nowrap;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 70;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, 0.24);
  border-radius: 8px;
  background: rgba(9, 7, 13, 0.99);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(139, 92, 246, 0.18);
  backdrop-filter: blur(18px);
}

.language-dropdown[hidden] {
  display: none;
}

.language-dropdown button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #f7f2ff;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.language-dropdown button:last-child {
  border-bottom: 0;
}

.language-dropdown button:hover {
  color: #fff;
  background: rgba(139, 92, 246, 0.18);
}

.headline,
.script-card,
.promo-row,
.gallery-row,
.page-footer {
  position: relative;
  z-index: 2;
}

.headline {
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(14, 127, 255, 0.4);
}

.headline p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.script-card {
  box-sizing: border-box;
  display: block;
  flex: 0 0 auto;
  width: 800px !important;
  max-width: 800px !important;
  min-width: 800px !important;
  height: 228px !important;
  margin: 42px auto 0 !important;
  overflow: hidden;
  border: 1px solid rgba(229, 240, 244, 0.55);
  border-radius: 18px;
  background:
    radial-gradient(circle at 52% 57%, rgba(169, 189, 141, 0.34), transparent 28%),
    linear-gradient(115deg, rgba(67, 106, 96, 0.69), rgba(80, 73, 76, 0.5)),
    rgba(50, 80, 80, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px);
}

.script-card * {
  box-sizing: border-box;
}

.script-card::before,
.script-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.script-card::before {
  background:
    radial-gradient(circle at 53% 58%, rgba(177, 196, 148, 0.34), transparent 26%),
    linear-gradient(115deg, rgba(67, 112, 92, 0.68), rgba(67, 94, 92, 0.44));
  opacity: 1;
}

.script-card::after {
  background:
    radial-gradient(circle at 58% 55%, rgba(174, 190, 143, 0.3), transparent 28%),
    linear-gradient(115deg, rgba(98, 81, 72, 0.35), rgba(94, 127, 124, 0.5));
  opacity: 0;
}

.script-card.mode-prompt::before,
.script-card.mode-script::after {
  opacity: 1;
}

.script-card.mode-script::before {
  opacity: 0;
}

.script-card > .creator-tabs {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 4;
  display: grid;
  height: 52px;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.script-card > .creator-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 52px;
  border-radius: 0 17px 0 0;
  background: rgba(15, 22, 22, 0.18);
  box-shadow: inset 0 -1px 0 rgba(229, 240, 244, 0.4);
  pointer-events: none;
  transition: left 0.2s ease, right 0.2s ease;
}

.script-card.mode-script > .creator-tabs::before {
  left: 0;
  right: auto;
  border-radius: 17px 0 0 0;
}

.script-card > .creator-tabs::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 22px);
  z-index: 3;
  width: 44px;
  height: 52px;
  border-right: 1px solid rgba(229, 240, 244, 0.5);
  border-bottom: 1px solid rgba(229, 240, 244, 0.5);
  border-radius: 0 0 24px 0;
  pointer-events: none;
}

.script-card.mode-script > .creator-tabs::after {
  left: auto;
  right: calc(50% - 22px);
  border-right: 0;
  border-left: 1px solid rgba(229, 240, 244, 0.5);
  border-radius: 0 0 0 24px;
}

.script-card > .creator-tabs button {
  position: relative;
  z-index: 2;
  outline: none;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 17px;
  font-weight: 850;
  text-align: center;
}

.script-card > .creator-tabs button:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(229, 240, 244, 0.18);
}

.script-card > .creator-tabs button.active {
  color: #fff;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.18);
}

.script-card > .creator-tabs button.active .tab-icon {
  opacity: 1;
}

.script-card > .creator-tabs .prompt-tab {
  border-radius: 18px 0 0 0;
}

.script-card > .creator-tabs .script-tab {
  border-radius: 0 16px 0 0;
  background: transparent;
}

.script-card.mode-script .prompt-tab,
.script-card.mode-prompt .script-tab {
  background: transparent;
}

.script-card .tab-icon {
  margin-right: 8px;
  font-size: 16px;
  opacity: 0.82;
}

.script-card > .prompt-pane,
.script-card > .upload-pane {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  max-width: 100%;
  padding-top: 52px;
}

.script-card > .prompt-pane {
  display: block;
}

.script-card > .upload-pane {
  display: none;
  padding: 70px 20px 18px;
}

.script-card.mode-script .prompt-pane {
  display: none;
}

.script-card.mode-script .upload-pane {
  display: block;
}

.script-card textarea {
  display: block;
  width: 100%;
  height: 100%;
  padding: 17px 20px 58px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}

.script-card textarea::placeholder {
  color: rgba(255, 255, 255, 0.48);
  font-weight: 700;
}

.script-card .prompt-actions {
  position: absolute;
  right: 20px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
}

.prompt-actions span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 800;
}

.asset-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  font-size: 22px;
}

.credit-rate {
  display: inline-flex;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: rgba(226, 243, 241, 0.82);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.credit-rate-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  overflow: visible;
}

.credit-rate-icon circle {
  fill: rgba(125, 226, 144, 0.16);
  stroke: rgba(190, 248, 204, 0.82);
  stroke-width: 1.6;
}

.credit-rate-icon path {
  fill: #b8f4c2;
  filter: drop-shadow(0 0 5px rgba(101, 222, 126, 0.45));
}

.create-btn {
  position: static;
  z-index: 2;
  min-width: 114px;
  height: 38px;
  border-radius: 999px;
  color: #15412a;
  background: #5fc66b;
  font-size: 16px;
  font-weight: 850;
}

.create-btn:hover {
  background: #6fdb85;
}

.upload-drop {
  display: grid;
  height: 100%;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.012);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-drop.is-dragging {
  border-color: rgba(98, 226, 123, 0.58);
  background: rgba(98, 226, 123, 0.055);
}

.upload-drop p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.upload-drop div {
  display: flex;
  gap: 12px;
  transform: translateY(-15px);
}

.upload-drop button {
  min-width: 140px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
  font-weight: 850;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.upload-drop button:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
}

.upload-drop button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.upload-drop .upload-green {
  border-color: rgba(94, 215, 116, 0.36);
  color: #62e27b;
}

.nami-dialog {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: block;
  width: 800px;
  height: 228px;
  margin: 42px auto 0;
  overflow: hidden;
  border: 1px solid rgba(224, 238, 240, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 52% 55%, rgba(170, 188, 142, 0.34), transparent 27%),
    linear-gradient(116deg, rgba(67, 105, 96, 0.72), rgba(73, 78, 80, 0.56)),
    rgba(52, 78, 78, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
}

.nami-dialog.mode-script {
  background:
    radial-gradient(circle at 55% 55%, rgba(176, 190, 145, 0.3), transparent 27%),
    linear-gradient(116deg, rgba(88, 76, 70, 0.5), rgba(88, 124, 122, 0.58)),
    rgba(58, 80, 78, 0.52);
}

.nami-dialog-tabs {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: 52px;
  grid-template-columns: 1fr 1fr;
}

.nami-dialog-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 52px;
  border-bottom: 1px solid rgba(224, 238, 240, 0.42);
  background: rgba(13, 24, 25, 0.14);
}

.nami-dialog.mode-script .nami-dialog-tabs::before {
  right: auto;
  left: 0;
}

.nami-dialog-tabs::after {
  content: "";
  position: absolute;
  top: -1px;
  left: calc(50% - 21px);
  width: 42px;
  height: 53px;
  border-right: 1px solid rgba(224, 238, 240, 0.54);
  border-bottom: 1px solid rgba(224, 238, 240, 0.54);
  border-radius: 0 0 24px 0;
}

.nami-dialog.mode-script .nami-dialog-tabs::after {
  right: calc(50% - 21px);
  left: auto;
  border-right: 0;
  border-left: 1px solid rgba(224, 238, 240, 0.54);
  border-radius: 0 0 0 24px;
}

.nami-dialog-tabs button {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 17px;
  font-weight: 850;
  outline: 0;
}

.nami-dialog-tabs button.active {
  color: #fff;
}

.nami-prompt-pane,
.nami-upload-pane {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: 52px;
}

.nami-dialog textarea {
  display: block;
  width: 100%;
  height: 100%;
  padding: 18px 20px 60px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.6;
}

.nami-dialog textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.nami-upload-pane {
  display: none;
  padding: 70px 20px 18px;
}

.nami-dialog.mode-script .nami-prompt-pane {
  display: none;
}

.nami-dialog.mode-script .nami-upload-pane {
  display: block;
}

.ScriptInputPanel {
  position: relative;
  z-index: 2;
  width: 920px;
  height: 344px;
  margin: 42px auto 0;
  overflow: hidden;
  border: 0;
  border-radius: 21px;
  background:
    radial-gradient(circle at 52% 55%, rgba(180, 194, 150, 0.2), transparent 29%),
    linear-gradient(116deg, rgba(70, 102, 95, 0.42), rgba(84, 78, 80, 0.3)),
    rgba(44, 70, 72, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(1.18);
  --prompt-tab-fill: rgba(62, 101, 148, 0.46);
  --script-tab-fill: rgba(42, 137, 105, 0.43);
  --image-tab-fill: rgba(111, 82, 151, 0.45);
}

.ScriptInputPanel.mode-script {
  background:
    radial-gradient(circle at 54% 55%, rgba(180, 194, 150, 0.18), transparent 29%),
    linear-gradient(116deg, rgba(105, 78, 67, 0.26), rgba(88, 125, 122, 0.34)),
    rgba(48, 72, 72, 0.2);
}

.script-panel-fill,
.script-panel-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.script-panel-fill {
  z-index: 1;
}

.script-panel-fill .prompt-fill { fill: var(--prompt-tab-fill); }
.script-panel-fill .script-fill { fill: var(--script-tab-fill); }
.script-panel-fill .image-fill { fill: var(--image-tab-fill); }

.script-panel-border {
  z-index: 4;
  fill: none;
  stroke: rgba(232, 244, 244, 0.58);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.ScriptInputPanel .script-border {
  opacity: 0;
}

.ScriptInputPanel.mode-script .prompt-border {
  opacity: 0;
}

.ScriptInputPanel.mode-script .script-border {
  opacity: 1;
}

.script-panel-tabs {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: grid;
  width: 100%;
  height: 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.script-panel-tabs::before {
  display: none;
}

.ScriptInputPanel.mode-script .script-panel-tabs::before {
  display: none;
}

.script-panel-tabs button {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  outline: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 17px;
  font-weight: 850;
}

.script-panel-tabs button.active {
  color: #fff;
}

.script-panel-tabs .script-tab {
  color: rgba(190, 255, 224, 0.78);
}

.script-panel-tabs .script-tab.active {
  color: #d6ffe7;
  text-shadow: 0 0 14px rgba(95, 198, 107, 0.28);
}

.script-panel-tabs .image-tab {
  color: rgba(190, 232, 255, 0.72);
}

.script-panel-tabs .image-tab:hover,
.script-panel-tabs .image-tab:focus-visible {
  color: #d9f3ff;
}

.ScriptInputPanel .tab-icon {
  font-size: 16px;
  opacity: 0.86;
}

.ScriptInputPanel .video-tab-icon,
.ScriptInputPanel .image-tab-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
}

.ScriptInputPanel .video-tab-icon svg,
.ScriptInputPanel .image-tab-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.script-panel-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding-top: 52px;
  padding-bottom: 0;
}

.script-panel-content.prompt-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 64px;
}

.ScriptInputPanel textarea {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 18px 20px 12px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.6;
  overflow-y: auto;
}

.ScriptInputPanel textarea.idea-suggestion {
  color: rgba(255, 255, 255, 0.58);
}

.ScriptInputPanel textarea.mention-trigger-only {
  color: transparent;
  caret-color: #fff;
}

.ScriptInputPanel textarea::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.home-inline-asset-preview-list {
  position: absolute;
  top: 80px;
  left: 20px;
  z-index: 16;
  display: flex;
  max-width: calc(100% - 40px);
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.home-inline-asset-preview-list[hidden] {
  display: none;
}

.ScriptInputPanel.has-home-inline-assets textarea {
  padding-top: 104px;
}

.home-inline-asset-chip {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(218, 236, 236, 0.72);
  border-radius: 10px;
  background: rgba(238, 246, 246, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.home-inline-asset-chip.is-reference-active {
  border-color: rgba(117, 230, 146, 0.95);
  box-shadow: 0 0 0 2px rgba(117, 230, 146, 0.22), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.home-inline-asset-chip img,
.home-inline-asset-chip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-inline-asset-chip .asset-kind {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(13, 18, 28, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.home-inline-asset-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 18, 28, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.home-inline-asset-fallback {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  font-weight: 800;
}

.home-asset-mention-chip-list {
  position: absolute;
  inset: 0;
  z-index: 22;
  min-height: 0;
  pointer-events: none;
}

.home-asset-mention-chip-list[hidden] {
  display: none;
}

.home-asset-mention-chip {
  position: absolute;
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(218, 236, 236, 0.78);
  border-radius: 7px;
  background: rgba(238, 246, 246, 0.16);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  pointer-events: auto;
}

.home-asset-mention-chip img,
.home-asset-mention-chip video {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  object-fit: cover;
}

.home-asset-mention-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.78);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.home-asset-mention-chip:hover .home-asset-mention-remove,
.home-asset-mention-chip:focus-visible .home-asset-mention-remove {
  opacity: 1;
}

.home-asset-mention-panel {
  position: absolute;
  top: 92px;
  left: 20px;
  z-index: 30;
  width: min(280px, calc(100% - 48px));
  max-height: 240px;
  overflow: hidden auto;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(33, 38, 50, 0.18);
  color: #111827;
}

.home-asset-mention-panel[hidden] {
  display: none;
}

.home-asset-mention-title {
  padding: 4px 6px 8px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 13px;
  font-weight: 500;
}

.home-asset-mention-row {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 10px;
  color: #111827;
  background: transparent;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.home-asset-mention-row.library {
  min-height: 48px;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 6px 8px;
}

.home-asset-mention-row.library .home-asset-mention-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f6;
  font-size: 16px;
  line-height: 35px;
  opacity: 0.78;
}

.home-asset-mention-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}

.home-asset-mention-icon svg rect,
.home-asset-mention-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-asset-mention-row.library .home-asset-mention-name {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: normal;
}

.home-asset-mention-row.library .home-asset-mention-suffix {
  line-height: normal;
}

.home-asset-mention-row:hover,
.home-asset-mention-row.active,
.home-asset-mention-row:focus-visible {
  background: #eef2f6;
  outline: 0;
}

.home-asset-mention-row img,
.home-asset-mention-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f6;
  color: #0f172a;
  font-size: 14px;
}

.home-asset-mention-row img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.home-asset-mention-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-asset-mention-suffix {
  color: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  font-weight: 500;
}

.home-asset-mention-empty {
  padding: 8px 6px;
  color: rgba(15, 23, 42, 0.54);
  font-size: 13px;
  font-weight: 500;
}

body.home-asset-picker-open {
  overflow: hidden;
}

.credit-details-popover[hidden] {
  display: none;
}

.credit-details-popover {
  position: fixed;
  z-index: 1150;
  inset: 0;
  pointer-events: none;
}

.credit-details-popover::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.credit-details-card {
  position: absolute;
  top: 126px;
  left: calc(var(--sidebar) + 12px);
  width: min(386px, calc(100vw - var(--sidebar) - 28px));
  max-height: min(690px, calc(100vh - 150px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 14px;
  border: 1px solid rgba(210, 230, 230, 0.52);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 12%, rgba(85, 182, 187, 0.22), transparent 42%),
    rgba(20, 31, 37, 0.92);
  color: rgba(246, 255, 253, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.credit-details-card::-webkit-scrollbar {
  width: 6px;
}

.credit-details-card::-webkit-scrollbar-track {
  margin-block: 12px;
  background: transparent;
}

.credit-details-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(225, 244, 242, 0.22);
}

.credit-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.credit-details-head strong {
  font-size: 15px;
  font-weight: 850;
}

.credit-details-section-title {
  margin: 0 2px 8px;
  color: rgba(231, 243, 242, 0.66);
  font-size: 12px;
  font-weight: 760;
}

.credit-details-head button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(210, 230, 230, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 255, 253, 0.86);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.credit-details-list {
  display: grid;
  gap: 7px;
}

.credit-details-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 650;
}

.credit-details-row span {
  color: rgba(231, 243, 242, 0.78);
}

.credit-details-row b {
  color: #b8f4c2;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.credit-details-card p {
  margin: 10px 2px 0;
  color: rgba(231, 243, 242, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.credit-ledger-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(210, 230, 230, 0.16);
}

.credit-ledger-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 9px;
}

.credit-ledger-head strong {
  font-size: 13px;
  font-weight: 850;
}

.credit-ledger-head span {
  color: rgba(231, 243, 242, 0.54);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.credit-ledger-list {
  display: grid;
  gap: 8px;
}

.credit-ledger-item {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(210, 230, 230, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.credit-ledger-top,
.credit-ledger-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.credit-ledger-id {
  color: rgba(246, 255, 253, 0.92);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.credit-ledger-copy {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(184, 244, 194, 0.24);
  border-radius: 999px;
  background: rgba(184, 244, 194, 0.1);
  color: #b8f4c2;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.credit-ledger-title {
  overflow: hidden;
  color: rgba(231, 243, 242, 0.74);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-ledger-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.credit-ledger-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(231, 243, 242, 0.68);
  font-size: 11px;
  font-weight: 650;
}

.credit-ledger-foot b {
  color: #b8f4c2;
  font-size: 13px;
  font-weight: 850;
}

.credit-ledger-foot span {
  color: rgba(231, 243, 242, 0.54);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.credit-ledger-empty {
  margin: 0;
  padding: 10px;
  border: 1px dashed rgba(210, 230, 230, 0.2);
  border-radius: 10px;
  color: rgba(231, 243, 242, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.home-asset-picker-modal[hidden] {
  display: none;
}

.home-asset-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.home-asset-picker-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(35, 46, 49, 0.54);
  cursor: default;
}

.home-asset-picker-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(960px, calc(100vw - 28px));
  height: min(760px, calc(100vh - 28px));
  overflow: hidden;
  border: 1px solid #e2e5e9;
  border-radius: 18px;
  background: #fff;
  color: #20262d;
  box-shadow: 0 26px 70px rgba(20, 28, 34, 0.24);
}

.home-asset-picker-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f5f6;
  color: #20262d;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.home-asset-picker-tabs {
  display: flex;
  min-height: 60px;
  align-items: flex-end;
  gap: 28px;
  padding: 0 30px 0;
}

.home-asset-picker-tabs button {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-asset-picker-tabs button.active {
  color: #111827;
}

.home-asset-picker-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #111827;
}

.home-asset-picker-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
}

.home-asset-picker-filters {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #f5f6f7;
}

.home-asset-picker-filters button,
.home-asset-picker-sort,
.home-asset-picker-upload,
.home-asset-picker-cancel,
.home-asset-picker-confirm {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #252b32;
  font: inherit;
  cursor: pointer;
}

.home-asset-picker-filters button {
  padding: 0 14px;
}

.home-asset-picker-filters button.active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 42, 55, 0.1);
  font-weight: 700;
}

.home-asset-picker-sort {
  padding: 0 10px;
  border-color: #dde2e7;
  background: #fff;
}

.home-asset-picker-upload {
  padding: 0 15px;
  border-color: #dde2e7;
  background: #fff;
  white-space: nowrap;
}

.home-asset-picker-search {
  display: flex;
  justify-self: end;
  width: min(300px, 100%);
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #dde2e7;
  border-radius: 18px;
  background: #fff;
  color: #8b939d;
}

.home-asset-picker-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #20262d;
  font: inherit;
}

.home-asset-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 18px 14px;
  min-height: 0;
  overflow: auto;
  padding: 4px 26px 20px;
}

.home-asset-picker-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: 112px auto;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #20262d;
  text-align: left;
  cursor: pointer;
}

.home-asset-picker-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f4f5f6;
}

.home-asset-picker-card.selected .home-asset-picker-preview {
  border-color: #e33f76;
}

.home-asset-picker-preview img,
.home-asset-picker-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-asset-picker-empty-preview {
  color: #8b939d;
  font-size: 22px;
  font-weight: 700;
}

.home-asset-picker-check {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #d8dde2;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: #fff;
  font-size: 12px;
}

.home-asset-picker-card.selected .home-asset-picker-check {
  border-color: #e33f76;
  background: #e33f76;
}

.home-asset-picker-name {
  overflow: hidden;
  color: #20262d;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-asset-picker-type-badge {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(24, 29, 35, 0.72);
  color: #fff;
  font-size: 11px;
}

.home-asset-picker-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #8b939d;
}

.home-asset-picker-footer {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-top: 1px solid #eceef1;
  color: #7b838c;
}

.home-asset-picker-footer > div {
  display: flex;
  gap: 10px;
}

.home-asset-picker-cancel,
.home-asset-picker-confirm {
  min-width: 76px;
  padding: 0 18px;
}

.home-asset-picker-cancel {
  border-color: #dde2e7;
  background: #fff;
}

.home-asset-picker-confirm {
  background: #e33f76;
  color: #fff;
  font-weight: 700;
}

.home-asset-picker-confirm:disabled {
  background: #f2f3f4;
  color: #bdc2c8;
  cursor: not-allowed;
}

.ScriptInputPanel .script-panel-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 0 20px 14px;
}

.ScriptInputPanel .script-import-actions {
  position: absolute;
  top: 58%;
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.ScriptInputPanel.mode-script .script-import-actions {
  opacity: 1;
  pointer-events: auto;
}

.ScriptInputPanel.mode-image .script-import-actions,
.ScriptInputPanel.mode-image .asset-btn,
.ScriptInputPanel.mode-image .home-skill-control {
  display: none;
}

.ScriptInputPanel.mode-image .credit-rate {
  display: inline-flex;
}

.ScriptInputPanel.mode-image {
  --home-resolution-width: 120px;
}

.ScriptInputPanel.mode-script.has-script-text .script-import-actions,
.ScriptInputPanel.mode-script.has-script-attachment .script-import-actions {
  opacity: 0;
  pointer-events: none;
}

.ScriptInputPanel .script-import-actions > button {
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(190, 255, 224, 0.26);
  border-radius: 8px;
  color: rgba(218, 255, 236, 0.84);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
  font-weight: 850;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.ScriptInputPanel .script-import-actions > button:hover {
  border-color: rgba(98, 226, 123, 0.52);
  color: #d8ffe5;
  background: rgba(98, 226, 123, 0.08);
}

.ScriptInputPanel .script-import-actions > button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.ScriptInputPanel.mode-script.is-dragging {
  box-shadow:
    inset 0 0 0 1px rgba(98, 226, 123, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.2);
}

.script-file-card {
  position: absolute;
  top: 100px;
  left: 50%;
  display: flex;
  min-width: 180px;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
  text-align: center;
}

.script-file-card[hidden] {
  display: none;
}

.script-file-card[data-state="loading"] {
  color: rgba(255, 255, 255, 0.6);
}

.script-file-card[data-state="error"] {
  color: rgba(255, 196, 196, 0.86);
}

.script-file-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 58px;
  place-items: end center;
  padding-bottom: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background:
    linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, 0.2) 16px 17px, rgba(255, 255, 255, 0.075) 17px),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.script-file-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0 4px 0 5px;
  background: rgba(255, 255, 255, 0.16);
}

.script-file-icon span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 800;
}

#scriptFileStatusText {
  max-width: 260px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#scriptFileStatusHint {
  min-height: 16px;
  color: rgba(190, 255, 224, 0.52);
  font-size: 12px;
  font-weight: 800;
}

.script-file-remove {
  position: absolute;
  top: -10px;
  right: 48px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1;
}

.script-file-remove:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.ScriptInputPanel.mode-script.has-script-attachment textarea {
  opacity: 0;
  pointer-events: none;
}

.ScriptInputPanel .prompt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.home-creator-controls {
  position: relative;
  z-index: 20;
  display: flex;
  width: auto;
  max-width: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: var(--home-control-gap);
  margin: 0;
}

.home-tool-plus {
  display: grid;
  width: var(--home-plus-size);
  height: var(--home-plus-size);
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #10131d;
  background: #f1f6fb;
  box-shadow: none;
  font-size: 0;
  font-family: Arial, "Microsoft YaHei UI", sans-serif;
  font-weight: 600;
  line-height: 1;
}

.home-tool-plus::before {
  content: "+";
  display: block;
  color: #10131d;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(2px);
}

.home-tool-plus:hover {
  background: #e9f1f8;
}

.home-control-pill {
  position: relative;
  display: inline-flex;
  height: var(--home-control-height);
  flex: 0 0 auto;
  align-items: center;
  overflow: visible;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  background: #f7faff;
  box-shadow: none;
}

.home-control-pill select.home-native-select {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.home-select-button {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 13px 0 14px;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
  font-family: var(--home-control-font-family);
  font-size: var(--home-control-font-size);
  font-weight: var(--home-control-font-weight);
  line-height: 1;
  white-space: nowrap;
}

.home-select-button [data-home-select-label] {
  min-width: 0;
  overflow: hidden;
  font-family: var(--home-control-font-family);
  font-size: var(--home-control-font-size);
  font-weight: var(--home-control-font-weight);
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-select-button:focus-visible {
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.32);
}

.home-select-caret {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 0;
  transition: transform 0.16s ease;
}

.home-select-caret::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-right: 1.7px solid rgba(15, 23, 42, 0.72);
  border-bottom: 1.7px solid rgba(15, 23, 42, 0.72);
  transform: rotate(45deg);
}

.home-custom-select.open .home-select-caret {
  transform: rotate(180deg);
}

.home-select-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 80;
  min-width: 100%;
  max-height: 252px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
  scrollbar-color: rgba(100, 116, 139, 0.58) transparent;
  scrollbar-width: thin;
}

.home-select-menu::-webkit-scrollbar {
  width: 7px;
}

.home-select-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.58);
}

.home-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.home-select-menu:not(.ratio-menu) {
  width: max-content;
}

.home-select-menu[hidden] {
  display: none;
}

.home-select-option {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #0f172a;
  background: transparent;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
}

.home-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-select-option:hover,
.home-select-option:focus-visible {
  background: #eef2f6;
  outline: 0;
}

.home-select-option.active {
  color: #0b1324;
}

.home-select-check {
  color: #0b1324;
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  text-align: right;
}

.home-select-option.active .home-select-check {
  opacity: 1;
}

.home-select-menu.ratio-menu {
  width: 175px;
}

.home-select-menu.ratio-menu .home-select-option {
  grid-template-columns: 16px minmax(0, 1fr) 20px;
}

.home-ratio-icon {
  display: block;
  border: 1.4px solid #0f172a;
  border-radius: 1px;
}

.home-ratio-icon.wide {
  width: 14px;
  height: 8px;
}

.home-ratio-icon.tall {
  width: 8px;
  height: 14px;
  margin-left: 3px;
}

.home-ratio-icon.classic {
  width: 13px;
  height: 10px;
}

.home-ratio-icon.portrait {
  width: 10px;
  height: 14px;
  margin-left: 2px;
}

.home-ratio-icon.square {
  width: 12px;
  height: 12px;
  margin-left: 1px;
}

.home-ratio-icon.selected {
  flex: 0 0 auto;
  border-color: #0f172a;
}

.home-control-pill.ratio {
  width: var(--home-ratio-width);
}

.home-control-pill.ratio .home-select-button {
  gap: var(--home-ratio-gap);
  justify-content: flex-start;
  padding-left: var(--home-ratio-padding-left);
  padding-right: var(--home-ratio-padding-right);
}

.home-control-pill.ratio .home-select-caret {
  display: none;
}

.home-control-pill.model {
  width: var(--home-model-width);
  min-width: 140px;
  flex: 1 1 var(--home-model-width);
}

.home-control-pill.model .home-select-button {
  gap: var(--home-model-gap);
  padding-left: var(--home-model-padding-left);
  padding-right: var(--home-model-padding-right);
}

.home-control-pill.resolution {
  width: var(--home-resolution-width);
}

.home-control-pill.resolution .home-select-button {
  gap: var(--home-resolution-gap);
  padding-left: var(--home-resolution-padding-left);
  padding-right: var(--home-resolution-padding-right);
}

.home-control-pill.duration {
  width: var(--home-duration-width);
}

.home-control-pill.duration .home-select-button {
  justify-content: flex-start;
  padding-left: var(--home-duration-padding-left);
  padding-right: var(--home-duration-padding-right);
}

.home-control-pill.duration .home-select-button [data-home-select-label] {
  transform: translateX(var(--home-duration-label-shift));
}

.home-control-pill.duration .home-select-caret {
  position: absolute;
  right: var(--home-duration-caret-right);
}

.home-control-pill.skill {
  width: var(--home-skill-width);
}

.home-control-pill.skill .home-select-button {
  gap: 2px;
  padding-right: 5px;
  padding-left: 8px;
}

.home-control-pill.skill .home-select-button [data-home-select-label] {
  color: #0f172a;
}

.home-control-pill.skill .home-select-caret {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.home-control-pill.skill .home-select-caret::before {
  left: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
}

.home-select-menu.skill-menu {
  right: 0;
  left: auto;
  min-width: var(--home-skill-menu-min-width);
}

.home-select-menu.skill-menu .home-select-option span {
  color: #0f172a;
}

.home-asset-status {
  max-width: 240px;
  overflow: hidden;
  color: rgba(232, 244, 244, 0.7);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: calc(100vw - var(--sidebar) - 170px);
  margin: 32px auto 0;
}

.promo-card {
  position: relative;
  display: flex;
  width: 250px;
  height: 168px;
  flex: 0 0 auto;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 8px;
  background: #223;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.promo-card:nth-child(2) {
  transform: translateY(-16px) rotate(-2.5deg);
}

.promo-card:nth-child(4) {
  transform: translateY(-16px) rotate(2.5deg);
}

.promo-card:nth-child(3) {
  width: 400px;
  height: 224px;
  transform: translateY(-8px);
}

.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.promo-card div {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.promo-card strong {
  display: block;
  color: #e6eef9;
  font-size: 22px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.56);
}

.promo-card span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.promo-one {
  background:
    linear-gradient(145deg, rgba(255, 190, 125, 0.56), transparent 46%),
    radial-gradient(circle at 48% 28%, #e3bb74 0 46px, transparent 47px),
    linear-gradient(135deg, #96bbc1, #464947);
}

.promo-two {
  background:
    radial-gradient(circle at 54% 38%, #111 0 42px, transparent 44px),
    linear-gradient(135deg, #99856e, #3a2c23);
}

.promo-three {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.52)),
    url("assets/hero-card-blue.png") center / cover no-repeat;
}

.promo-four {
  background:
    url("assets/card-blue.png") center / cover no-repeat,
    linear-gradient(135deg, #dfe7e9, #a0a6ad);
}

.promo-five {
  background:
    linear-gradient(145deg, rgba(6, 19, 44, 0.35), rgba(0, 0, 0, 0.36)),
    url("assets/poster-small.jpg") center / cover no-repeat;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  grid-auto-rows: 142px;
  align-items: stretch;
  gap: 16px;
  width: calc(100vw - var(--sidebar) - 48px);
  margin: 36px auto 0;
}

.video-tile {
  position: relative;
  height: 142px;
  min-height: 142px;
  max-height: 142px;
  overflow: hidden;
  border-radius: 10px;
  background: #222;
}

.video-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.72));
}

.video-tile button {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #111;
  font-size: 14px;
}

.tile-one {
  background:
    radial-gradient(circle at 62% 32%, #b28d4a 0 38px, transparent 39px),
    linear-gradient(135deg, #160f0c, #66412a);
}

.tile-two {
  background:
    radial-gradient(circle at 48% 48%, #dd883f 0 32px, transparent 33px),
    linear-gradient(135deg, #d2d5cf, #36566d);
}

.tile-three {
  background:
    linear-gradient(95deg, transparent, rgba(255, 255, 255, 0.68), transparent),
    linear-gradient(135deg, #2d333c, #a35b28);
}

.tile-four {
  background:
    radial-gradient(circle at 55% 36%, #d7d7d7 0 36px, transparent 37px),
    linear-gradient(135deg, #111, #555);
}

.tile-five {
  background:
    radial-gradient(circle at 42% 40%, #c99b72 0 38px, transparent 39px),
    linear-gradient(135deg, #41352b, #9d8467);
}

.tile-six {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(135deg, #e8e8e8, #364156);
}

.page-footer {
  position: fixed;
  left: var(--sidebar);
  right: 0;
  bottom: 8px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1380px) {
  .promo-card {
    width: 220px;
    height: 150px;
  }

  .promo-card:nth-child(3) {
    width: 340px;
    height: 196px;
  }

  .gallery-row {
    margin-top: 26px;
  }
}
/* Homepage case library: isolated from the three-tab editor styles. */
.promo-author-card { position: relative; overflow: hidden; cursor: pointer; }
.promo-author-card:focus-visible { outline: 2px solid #72d9ff; outline-offset: 3px; }
.promo-case-video,.gallery-case-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.case-card-credit,.gallery-case-credit { position: absolute; z-index: 2; top: 12px; left: 14px; color: #fff; font: 600 12px/1.2 Arial,sans-serif; text-shadow: 0 1px 4px rgba(0,0,0,.85); pointer-events: none; }
.gallery-case-credit { top: 10px; left: 12px; font-size: 11px; }
.case-library-modal[hidden] { display: none; }
.case-library-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 18px; }
.case-library-backdrop { position: absolute; inset: 0; border: 0; background: rgba(7,10,15,.72); }
.case-library-dialog { position: relative; width: min(1180px,calc(100vw - 36px)); height: min(760px,calc(100vh - 36px)); background: #f7f8fa; color: #151a22; border-radius: 22px; overflow: hidden; box-shadow: 0 22px 70px rgba(0,0,0,.4); }
.case-library-header { height: 72px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dfe3e8; background: #fff; }
.case-library-header div { display: grid; gap: 5px; }
.case-library-header strong { font-size: 21px; }
.case-library-header span { color: #77808f; font-size: 13px; }
.case-library-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1f3f5; color: #4b5563; font-size: 25px; line-height: 1; cursor: pointer; }
.case-library-layout { height: calc(100% - 72px); display: grid; grid-template-columns: minmax(0,1fr) 320px; }
.case-library-player { min-width: 0; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.case-library-player-frame { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #050608; }
.case-library-player video { width: 100%; height: 100%; object-fit: contain; }
.case-library-player > strong { font-size: 16px; }
.case-library-player > span { color: #87909e; font-size: 13px; }
.case-library-list { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid #dfe3e8; background: #fff; }
.case-library-list-heading { height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e7e9ed; }
.case-library-list-heading span { color: #87909e; font-size: 13px; }
.case-library-grid { overflow: auto; padding: 12px; display: grid; gap: 9px; }
.case-library-item { width: 100%; min-height: 66px; padding: 7px; display: grid; grid-template-columns: 30px 82px minmax(0,1fr); gap: 9px; align-items: center; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; color: #18202b; text-align: left; cursor: pointer; }
.case-library-item.is-active { border-color: #82b5de; background: #eff7fd; }
.case-library-item img { width: 82px; height: 50px; object-fit: cover; border-radius: 6px; background: #111; }
.case-library-item-index { color: #7e8a99; font-size: 12px; text-align: center; }
.case-library-item-copy { min-width: 0; display: grid; gap: 4px; }
.case-library-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.case-library-item-copy span { color: #87909e; font-size: 11px; }
body.case-library-open { overflow: hidden; }
@media (max-width: 760px) { .case-library-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) 230px; } .case-library-list { border-left: 0; border-top: 1px solid #dfe3e8; } }
