:root {
  --brand: #7a6af8;
  --brand-2: #fb5ac8;
  --brand-3: #5f7df4;
  --ink: #101321;
  --muted: #7b8192;
  --line: #edf0f6;
  --soft: #f3f6ff;
  --soft-2: #eef3fb;
  --panel: #ffffff;
  --danger: #f45b69;
  --success: #16b978;
  --shadow: 0 18px 50px rgba(44, 55, 89, 0.12);
  --radius: 18px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f6f8fc;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(229, 233, 244, 0.95);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(111, 91, 235, 0.22);
}

.brand-mark::before {
  position: absolute;
  display: none;
  inset: 0;
  content: "";
}

.brand-mark::after {
  position: absolute;
  display: none;
  inset: 0;
  content: "";
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-sub {
  color: #9096a6;
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(232, 236, 247, 0.92);
  border-radius: 16px;
  background: #f7f8fc;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item::after {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
  content: "";
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #242838;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.nav-link.active,
.nav-link:hover {
  border-color: rgba(119, 102, 244, 0.16);
  background: #fff;
  color: #6857ed;
  box-shadow: 0 10px 24px rgba(82, 92, 132, 0.1);
}

.chevron {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 90;
  display: grid;
  gap: 5px;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 10px;
  border: 1px solid rgba(230, 233, 243, 0.96);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(38, 47, 78, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  visibility: hidden;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
}

.dropdown-imageEdit {
  width: 500px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dropdown-matting {
  width: 318px;
}

.dropdown-draw {
  width: 286px;
}

.nav-item.open .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.nav-item.open .chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-item.open .nav-trigger {
  border-color: rgba(119, 102, 244, 0.16);
  background: #fff;
  color: #6857ed;
  box-shadow: 0 10px 24px rgba(82, 92, 132, 0.1);
}

.nav-item.open .dropdown {
  display: grid;
}

.drop-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.drop-link:hover {
  border-color: #ecefff;
  background: #f7f8ff;
  transform: translateY(-1px);
}

.drop-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.drop-text {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 260px;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 30%, #fff 0 8%, transparent 9%),
    linear-gradient(135deg, #181b37 0%, #f24f8b 48%, #f8d152 100%);
  box-shadow: 0 8px 22px rgba(28, 38, 78, 0.12);
  cursor: pointer;
}

.login-btn {
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #6b7df5, #9e6cff);
  cursor: pointer;
}

.user-menu {
  position: absolute;
  top: 58px;
  right: 0;
  display: none;
  width: 202px;
  padding: 14px;
  border: 1px solid #eef1f7;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.user-menu.open {
  display: block;
}

.user-head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f8;
}

.user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b2140, #ff5fa5 52%, #ffd45c);
}

.user-name {
  font-size: 13px;
  font-weight: 800;
}

.user-id {
  margin-top: 2px;
  color: #9aa0af;
  font-size: 11px;
}

.user-points {
  margin-top: 2px;
  color: #6f63f5;
  font-size: 11px;
  font-weight: 800;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 36px;
  padding: 0 4px;
  color: #626a7c;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.menu-row:hover {
  color: #665af4;
}

.menu-row-accent {
  margin: 6px 0 2px;
  padding: 0 10px;
  border-radius: 8px;
  color: #5b50e6;
  background: #f4f1ff;
  font-weight: 950;
}

.menu-row-accent:hover {
  color: #4a3fd4;
  background: #ede8ff;
}

.home {
  background: linear-gradient(180deg, #eef8ff 0%, #ffffff 58%, #ffffff 100%);
}

.hero {
  position: relative;
  display: block;
  min-height: auto;
  overflow: hidden;
  padding: 54px 0 66px;
  background: linear-gradient(180deg, #dff2ff 0%, #f7fbff 68%, #ffffff 100%);
  text-align: center;
}

.hero-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.03);
}

.hero::before,
.hero::after {
  position: absolute;
  display: block;
  pointer-events: none;
  content: "";
}

.hero::before {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(233, 248, 255, 0.64) 0%, rgba(255, 255, 255, 0.76) 72%, #ffffff 100%),
    linear-gradient(112deg, rgba(255, 255, 255, 0.68) 0 25%, rgba(255, 255, 255, 0) 26% 100%);
}

.hero::after {
  z-index: 1;
  top: 0;
  right: 0;
  width: min(820px, 62vw);
  height: 100%;
  background: linear-gradient(116deg, rgba(255, 255, 255, 0) 0 32%, rgba(255, 255, 255, 0.56) 33% 49%, rgba(255, 255, 255, 0) 50% 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 40px));
  padding-top: 0;
  margin: 0 auto;
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.86);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(214, 227, 248, 0.92);
  border-radius: 999px;
  color: #6857ed;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-logo {
  display: inline-flex;
  width: clamp(48px, 6vw, 70px);
  height: clamp(48px, 6vw, 70px);
  filter: drop-shadow(0 16px 28px rgba(111, 91, 235, 0.22));
}

.hero-logo img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 900;
  letter-spacing: 0;
  color: #171629;
}

.hero-subtitle {
  width: min(880px, 100%);
  margin: 0 auto;
  color: #48556d;
  font-size: 21px;
  line-height: 1.6;
}

.hero-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: min(1180px, 100%);
  margin: 42px auto 0;
}

.quick-tool {
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(234, 238, 248, 0.86);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(80, 92, 126, 0.11);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(80, 92, 126, 0.14);
}

.quick-visual {
  position: absolute;
  inset: 0;
  display: block;
}

.quick-visual img,
.gallery-visual img,
.home-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  padding: 42px 14px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.76) 36%, rgba(255, 255, 255, 0.96));
}

.quick-title {
  display: block;
  color: #0f1324;
  font-size: 16px;
  font-weight: 900;
}

.quick-text {
  display: block;
  margin-top: 5px;
  color: #7b8495;
  font-size: 12px;
  line-height: 1.4;
}

.home-placeholder {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.8), transparent 27%),
    linear-gradient(135deg, #eaf5ff 0%, #f7eefe 56%, #eaf7ff 100%);
}

.home-placeholder::before,
.home-placeholder::after,
.home-placeholder i,
.home-placeholder b {
  position: absolute;
  content: "";
}

.home-placeholder::before {
  inset: 14%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.home-placeholder::after {
  right: 18%;
  bottom: 22%;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: linear-gradient(135deg, #7d66f5, #ff65c5);
  box-shadow: 0 12px 24px rgba(118, 101, 245, 0.22);
}

.home-placeholder i {
  left: 18%;
  bottom: 20%;
  width: 44%;
  height: 48%;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(135deg, #fff, #d8e5ff);
}

.home-placeholder b {
  left: 26%;
  top: 24%;
  width: 38%;
  height: 16%;
  border-radius: 999px;
  background: rgba(111, 99, 245, 0.22);
}

.home-placeholder-id-photo i {
  left: 30%;
  bottom: 17%;
  width: 38%;
  height: 55%;
  border-radius: 999px 999px 16px 16px;
  background: linear-gradient(180deg, #ffe4c7, #6a7eb7 60%, #fff 61%);
}

.home-placeholder-amplify::before {
  inset: 18%;
  border-radius: 50%;
}

.home-placeholder-amplify i {
  left: 23%;
  top: 26%;
  width: 34%;
  height: 34%;
  border: 10px solid rgba(111, 99, 245, 0.72);
  border-radius: 50%;
  background: transparent;
}

.home-placeholder-amplify b {
  right: 22%;
  bottom: 22%;
  left: auto;
  top: auto;
  width: 28%;
  height: 10%;
  transform: rotate(44deg);
}

.home-placeholder-photo-universal-1 {
  background: linear-gradient(90deg, #a9a090 0 48%, #bfe7ff 49% 100%);
}

.home-placeholder-text-to-img,
.home-placeholder-img-to-img {
  background:
    radial-gradient(circle at 66% 34%, rgba(255, 212, 108, 0.8), transparent 18%),
    linear-gradient(135deg, #cbe7ff, #f2d8ff 56%, #d8f7ff);
}

.home-placeholder-photo-universal,
.home-placeholder-photo-universal-2,
.home-placeholder-photo-universal-4 {
  background: linear-gradient(90deg, #d6d0c4 0 50%, #bde4ff 51% 100%);
}

.home-placeholder-eliminate-pens,
.home-placeholder-eliminate-pens-1 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56) 0 22%, transparent 22% 100%),
    linear-gradient(135deg, #e9f7ff, #f7e3f4);
}

.home-placeholder-matting-1,
.home-placeholder-matting-2 {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.72) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.72) 50% 75%, transparent 75%) 0 0/24px 24px,
    #eef3fb;
}

.home-placeholder-montage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 24px;
}

.home-placeholder-montage::before,
.home-placeholder-montage::after,
.home-placeholder-montage i,
.home-placeholder-montage b {
  position: static;
  display: block;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbe7ff, #ffe0f2);
  box-shadow: none;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(460px, calc(100vw - 48px));
  height: 58px;
  padding: 0 28px;
  border: 1px solid #dfdfe6;
  border-radius: 999px;
  color: #30333d;
  background: #fff;
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: none;
}

.home-gallery {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 86px;
  text-align: left;
}

.home-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-gallery h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.home-gallery-more .more-btn:hover {
  border-color: #cfd2dc;
  color: #171a24;
  box-shadow: 0 16px 34px rgba(47, 55, 82, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 118px;
  gap: 16px;
  margin-top: 20px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(80, 92, 126, 0.1);
  cursor: pointer;
}

.gallery-card:nth-child(1),
.gallery-card:nth-child(3),
.gallery-card:nth-child(4),
.gallery-card:nth-child(5),
.gallery-card:nth-child(7) {
  grid-row: span 2;
}

.gallery-card:nth-child(2),
.gallery-card:nth-child(8) {
  grid-row: span 3;
}

.gallery-card:nth-child(6),
.gallery-card:nth-child(9),
.gallery-card:nth-child(10) {
  grid-row: span 2;
}

.gallery-visual {
  position: absolute;
  inset: 0;
  display: block;
}

.gallery-caption {
  display: none;
}

.footer {
  padding: 78px 24px 58px;
  border-radius: 76px 76px 0 0;
  background: #fff2ff;
}

.footer-card {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 44px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.footer-brand {
  display: flex;
  justify-content: center;
}

.footer-brand-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #242632;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.footer-logo img {
  width: 100%;
  height: 100%;
}

.footer-brand-name {
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.footer-copy {
  color: #30333d;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #a9a4ac;
  font-size: 16px;
  font-weight: 750;
}

.footer-links span,
.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

.footer-links button {
  cursor: pointer;
}

.footer-divider {
  color: #b9b3bc;
}

.footer-links .footer-icp {
  color: #a9a4ac;
}

.footer-links a:hover,
.footer-links button:hover {
  color: #815eed;
}

.legal-page {
  min-height: calc(100vh - 76px);
  padding: 48px 24px 80px;
  background: linear-gradient(180deg, #fbf7ff 0%, #f7f8fb 34%, #ffffff 100%);
}

.legal-hero,
.legal-content {
  width: min(980px, 100%);
  margin: 0 auto;
}

.legal-hero {
  padding: 34px 0 28px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 22px;
  color: #7257d7;
  font-size: 14px;
  font-weight: 850;
}

.legal-hero h1 {
  margin: 0;
  color: #22242d;
  font-size: 44px;
  font-weight: 950;
  line-height: 1.15;
}

.legal-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: #6a6675;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  color: #8a8593;
  font-size: 13px;
  font-weight: 750;
}

.legal-content {
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid #eee9f8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(50, 42, 86, 0.08);
}

.legal-section {
  padding: 0 0 14px;
  border-bottom: 1px solid #f0edf5;
}

.legal-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 10px;
  color: #2e303a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
}

.legal-section p {
  margin: 0;
  color: #56535f;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.9;
}

.tools-page {
  min-height: calc(100vh - 76px);
  background: #f5f7fb;
}

.tools-banner {
  display: grid;
  grid-template-columns: 1fr 430px;
  align-items: center;
  gap: 30px;
  width: min(1200px, calc(100% - 48px));
  min-height: 270px;
  margin: 34px auto 28px;
  padding: 36px 48px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 40%, rgba(255, 106, 191, 0.2), transparent 28%),
    linear-gradient(135deg, #f4eeff 0%, #eef5ff 100%);
  overflow: hidden;
}

.tools-banner h1 {
  margin: 0;
  font-size: 42px;
  letter-spacing: 0;
}

.tools-banner p {
  margin: 16px 0 0;
  color: #6f7689;
  font-size: 18px;
}

.prompt-visual {
  position: relative;
  height: 182px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px rgba(91, 103, 143, 0.14);
}

.prompt-visual.generated-banner {
  overflow: hidden;
  background: #fff;
}

.prompt-visual.generated-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prompt-visual.generated-banner::before,
.prompt-visual.generated-banner::after {
  content: none;
}

.prompt-visual::before {
  position: absolute;
  top: 26px;
  left: 28px;
  width: 72%;
  height: 46px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf0f8;
  content: "花；女孩";
  color: #8c92a3;
  line-height: 46px;
  padding-left: 22px;
}

.prompt-visual::after {
  position: absolute;
  right: 26px;
  bottom: 22px;
  width: 150px;
  height: 110px;
  border-radius: 28px 28px 18px 18px;
  background:
    radial-gradient(circle at 50% 20%, #ffd3e6 0 12%, transparent 13%),
    linear-gradient(135deg, #825ff8, #ff73c9 60%, #ffd46c);
  content: "";
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto 70px;
}

.tool-card {
  overflow: hidden;
  border: 1px solid rgba(229, 234, 246, 0.92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(70, 78, 112, 0.08);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(175, 187, 224, 0.86);
  box-shadow: 0 22px 48px rgba(70, 78, 112, 0.14);
}

.tool-cover {
  height: 184px;
  padding: 0;
  background: #eef4ff;
}

.cover-art {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(135deg, #f8fbff, #e8f0ff);
}

.cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #edf4ff;
}

.cover-art.compare::before,
.cover-art.compare::after {
  position: absolute;
  inset: 0;
  content: "";
}

.cover-art.compare::before {
  right: 50%;
  background: var(--cover-a, linear-gradient(135deg, #e5dac7, #8998ad));
}

.cover-art.compare::after {
  left: 50%;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.68) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.68) 50% 75%, transparent 75%) 0 0/18px 18px,
    var(--cover-b, #dfe5f2);
}

.cover-art.draw {
  background:
    radial-gradient(circle at 55% 22%, #ffe0ef 0 9%, transparent 10%),
    radial-gradient(circle at 47% 42%, #ffd2b8 0 16%, transparent 17%),
    linear-gradient(135deg, #6e63f6 0%, #ff70c5 64%, #ffd36a 100%);
}

.cover-art.fix {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0 48%, transparent 49%),
    radial-gradient(circle at 58% 38%, #f1c08e 0 17%, transparent 18%),
    linear-gradient(135deg, #4b556a, #eef3ff);
}

.cover-art.montage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.cover-art.montage span {
  border-radius: 10px;
  background: linear-gradient(135deg, #e1e8ff, #f9dff0);
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 19, 33, 0.58);
  transform: translate(-50%, -50%);
}

.split-handle::before {
  position: absolute;
  inset: 10px;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
}

.tool-info {
  min-height: 104px;
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}

.tool-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.tool-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #7b8495;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.api-page {
  padding-bottom: 70px;
}

.api-banner {
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  min-height: 292px;
  padding: 32px 40px;
  border: 1px solid rgba(229, 234, 246, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 255, 0.92)),
    linear-gradient(135deg, #f3fbff 0%, #f6f0ff 100%);
  box-shadow: 0 18px 46px rgba(72, 86, 126, 0.1);
}

.api-banner-copy {
  max-width: 620px;
}

.api-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(92, 118, 166, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4f617b;
  font-size: 13px;
  font-weight: 850;
}

.api-access-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(220, 227, 241, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 38px rgba(66, 78, 110, 0.1);
}

.api-key-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
}

.api-key-card span,
.api-key-card small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 750;
}

.api-key-card strong {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.api-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.api-flow span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(225, 231, 243, 0.95);
  border-radius: 12px;
  background: #fff;
  color: #424a5d;
  font-size: 13px;
  font-weight: 800;
}

.api-flow b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef6f2;
  color: #15885d;
  font-size: 12px;
}

.api-console,
.api-category-strip,
.api-product-grid {
  width: min(1200px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.api-console {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(229, 234, 246, 0.96);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(70, 78, 112, 0.07);
}

.api-console-main {
  padding: 4px 8px;
}

.api-console-main span {
  color: #15885d;
  font-size: 13px;
  font-weight: 900;
}

.api-console-main h2 {
  margin: 8px 0 8px;
  color: #202535;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.api-console-main p {
  max-width: 680px;
  margin: 0;
  color: #687386;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.api-console-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.api-console-stats div {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(225, 231, 243, 0.96);
  border-radius: 14px;
  background: #f9fbff;
}

.api-console-stats span {
  color: #7a8498;
  font-size: 12px;
  font-weight: 800;
}

.api-console-stats strong {
  color: #222838;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.api-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.api-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(222, 228, 241, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #4d5668;
  font-size: 13px;
  font-weight: 850;
}

.api-category.active {
  border-color: rgba(21, 136, 93, 0.22);
  background: #eef8f4;
  color: #157957;
}

.api-category b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  font-size: 12px;
}

.api-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 70px;
}

.api-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 16px 34px rgba(70, 78, 112, 0.07);
}

.api-card-head,
.api-card-actions {
  display: flex;
  align-items: center;
}

.api-card-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.api-card-badge,
.api-status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.api-card-badge {
  background: #f2f5fa;
  color: #5f6d83;
}

.api-status-ready {
  background: #eaf8f2;
  color: #12825b;
}

.api-status-beta {
  background: #fff5dd;
  color: #9a6414;
}

.api-status-planned {
  background: #edf3ff;
  color: #315fba;
}

.api-card h3 {
  margin: 0 0 9px;
  color: #202535;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.api-card p {
  margin: 0 0 18px;
  color: #697487;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.api-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.api-card-meta div {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(225, 231, 243, 0.96);
  border-radius: 12px;
  background: #fff;
}

.api-card-meta span,
.api-endpoint span {
  color: #8a94a6;
  font-size: 12px;
  font-weight: 800;
}

.api-card-meta strong {
  color: #273044;
  font-size: 13px;
  line-height: 1.35;
}

.api-endpoint {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 13px;
  background: #111827;
}

.api-endpoint code {
  overflow: hidden;
  color: #e7ecf8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-card-actions {
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
}

.api-card-link,
.api-card-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.api-card-link {
  border: 1px solid rgba(222, 228, 241, 0.96);
  background: #fff;
  color: #3f485b;
}

.api-card-primary {
  border: 1px solid #1f9a6a;
  background: #1f9a6a;
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 154, 106, 0.16);
}

.api-card-link:hover {
  border-color: rgba(31, 154, 106, 0.28);
  color: #157957;
}

.api-card-primary:hover {
  background: #16855c;
}

.api-toolbox-banner {
  background:
    radial-gradient(circle at 84% 36%, rgba(31, 154, 106, 0.13), transparent 26%),
    linear-gradient(135deg, #f7fbff 0%, #f6f3ff 100%);
}

.api-toolbox-banner h1 {
  max-width: 620px;
}

.api-toolbox-banner p {
  max-width: 560px;
}

.api-banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.api-banner-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 244, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #566176;
  font-size: 13px;
  font-weight: 850;
}

.api-banner-tags b {
  color: #1d2738;
  font-size: 15px;
}

.api-banner-visual {
  height: 210px;
}

.api-tools-grid {
  margin-top: 0;
}

.api-tool-card {
  cursor: default;
}

.api-tool-cover {
  position: relative;
  background: #f1f5fb;
}

.api-tool-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(10, 18, 32, 0.12));
  content: "";
  pointer-events: none;
}

.api-tool-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(31, 42, 68, 0.12);
}

.api-tool-info {
  min-height: 138px;
}

.api-tool-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.api-tool-title-row h3 {
  margin: 0;
}

.api-tool-title-row span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f5fa;
  color: #697487;
  font-size: 11px;
  font-weight: 900;
}

.api-tool-footer {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 244, 0.95);
}

.api-tool-footer span {
  color: #5f6b7e;
  font-size: 13px;
  font-weight: 850;
}

.api-tool-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #1f9a6a;
  border-radius: 10px;
  background: #1f9a6a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 154, 106, 0.16);
}

.api-tool-footer button:hover {
  background: #16855c;
}

.api-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.api-tool-actions button {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.api-tool-actions button:last-child {
  grid-column: 1 / -1;
}

.api-tool-actions button.secondary,
.api-doc-inline-actions button.secondary,
.api-debug-actions button.secondary {
  border-color: rgba(222, 228, 241, 0.96);
  background: #fff;
  color: #3f485b;
  box-shadow: none;
}

.api-tool-actions button.secondary:hover,
.api-doc-inline-actions button.secondary:hover,
.api-debug-actions button.secondary:hover {
  border-color: rgba(31, 154, 106, 0.28);
  background: #fff;
  color: #157957;
}

.api-doc-page,
.api-debug-page {
  padding-bottom: 70px;
}

.api-doc-hero,
.api-debug-hero {
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 250px;
  padding: 30px 36px;
}

.api-doc-back {
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #536176;
  font-size: 13px;
  font-weight: 850;
}

.api-doc-cover {
  position: relative;
  height: 236px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 22px;
  background: #f1f5fb;
  box-shadow: 0 18px 38px rgba(66, 78, 110, 0.1);
}

.api-doc-cover .cover-img,
.api-doc-cover .cover-art {
  width: 100%;
  height: 100%;
}

.api-doc-layout,
.api-debug-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 18px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto 70px;
}

.api-debug-layout {
  grid-template-columns: minmax(0, 1fr) 294px;
}

.api-doc-sidebar,
.api-debug-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.api-doc-side-card,
.api-debug-note,
.api-doc-card,
.api-debug-panel {
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(70, 78, 112, 0.07);
}

.api-doc-side-card {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.api-doc-side-card span,
.api-debug-note b {
  color: #15885d;
  font-size: 13px;
  font-weight: 900;
}

.api-doc-side-card strong {
  color: #202535;
  font-size: 20px;
  line-height: 1.2;
}

.api-doc-side-card code {
  overflow: hidden;
  padding: 10px;
  border-radius: 12px;
  background: #111827;
  color: #e7ecf8;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-doc-nav-list {
  display: grid;
  gap: 8px;
}

.api-doc-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 13px;
  background: #fff;
  color: #334055;
  font-size: 13px;
  font-weight: 850;
}

.api-doc-nav-list a.active {
  border-color: rgba(31, 154, 106, 0.26);
  background: #eef8f4;
  color: #157957;
}

.api-doc-nav-list b {
  flex: 0 0 auto;
  color: #8190a5;
  font-size: 12px;
}

.api-doc-main {
  display: grid;
  gap: 16px;
}

.api-doc-card,
.api-debug-panel {
  padding: 20px;
}

.api-doc-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.api-doc-card-head span {
  color: #15885d;
  font-size: 13px;
  font-weight: 900;
}

.api-doc-card-head h2 {
  margin: 0;
  color: #202535;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.api-doc-endpoint-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #111827;
}

.api-doc-endpoint-line b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #1f9a6a;
  color: #fff;
  font-size: 13px;
}

.api-doc-endpoint-line code {
  overflow: hidden;
  color: #e7ecf8;
  font-size: 13px;
  font-weight: 850;
  line-height: 34px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-doc-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.api-doc-auth-grid div,
.api-doc-table div {
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 12px;
  background: #fbfcff;
}

.api-doc-auth-grid div {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.api-doc-auth-grid span {
  color: #8490a3;
  font-size: 12px;
  font-weight: 800;
}

.api-doc-auth-grid strong {
  color: #283247;
  font-size: 13px;
  line-height: 1.35;
}

.api-doc-inline-actions,
.api-debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.api-doc-inline-actions button,
.api-debug-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #1f9a6a;
  border-radius: 11px;
  background: #1f9a6a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 154, 106, 0.16);
}

.api-doc-table {
  display: grid;
  gap: 8px;
}

.api-doc-table div {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) 72px minmax(0, 2fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.api-doc-table code {
  color: #222b3d;
  font-size: 13px;
  font-weight: 900;
}

.api-doc-table b {
  display: inline-flex;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef8f4;
  color: #157957;
  font-size: 12px;
}

.api-doc-table span {
  color: #607085;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.api-doc-card-copy {
  margin: 0 0 14px;
  color: #607085;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.api-doc-card-copy code {
  padding: 2px 6px;
  border-radius: 7px;
  background: #eef8f4;
  color: #157957;
  font-size: 13px;
  font-weight: 900;
}

.api-doc-error-table div {
  grid-template-columns: 70px minmax(150px, 0.9fr) minmax(0, 2fr);
}

.api-doc-error-table b {
  justify-content: flex-start;
  background: #f2f5fa;
  color: #405069;
}

.api-doc-code {
  margin: 0;
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  background: #111827;
  color: #e7ecf8;
  font-size: 13px;
  line-height: 1.7;
}

.api-doc-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.api-doc-steps div {
  display: grid;
  gap: 10px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 14px;
  background: #fbfcff;
}

.api-doc-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef8f4;
  color: #157957;
}

.api-doc-steps span {
  color: #314056;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.api-doc-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.api-doc-support h2 {
  margin: 6px 0;
}

.api-doc-support p,
.api-debug-note p {
  margin: 0;
  color: #66768c;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.api-doc-support button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 18px;
  border: 1px solid #1f9a6a;
  border-radius: 12px;
  background: #1f9a6a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.api-debug-terminal {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 178px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 22px;
  background: #111827;
  box-shadow: 0 18px 38px rgba(66, 78, 110, 0.1);
}

.api-debug-terminal span,
.api-debug-terminal small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 850;
}

.api-debug-terminal code {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  word-break: break-all;
}

.api-debug-panel {
  display: grid;
  gap: 14px;
}

.api-debug-field {
  display: grid;
  gap: 8px;
}

.api-debug-field span {
  color: #5c697d;
  font-size: 13px;
  font-weight: 900;
}

.api-debug-field input,
.api-debug-field textarea {
  width: 100%;
  border: 1px solid rgba(222, 228, 241, 0.96);
  border-radius: 13px;
  background: #fbfcff;
  color: #202535;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.api-debug-field input {
  height: 44px;
  padding: 0 13px;
}

.api-debug-field textarea {
  min-height: 210px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.6;
  resize: vertical;
}

.api-debug-result {
  min-height: 84px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border-radius: 13px;
  background: #111827;
  color: #e7ecf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.api-debug-note {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.tool-page {
  min-height: calc(100vh - 76px);
  background: #edf2fb;
}

.tool-landing {
  padding: 56px 0 70px;
}

.tool-title-block {
  text-align: center;
}

.tool-title-block h1 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0;
}

.spark {
  width: 46px;
  height: 38px;
  border-radius: 20px 8px 20px 8px;
  background: linear-gradient(135deg, #7865f8, #27d7d0 45%, #ff68c9 70%, #ffcf58);
  transform: rotate(-16deg);
}

.tool-title-block p {
  margin: 14px auto 0;
  color: #7b8192;
  font-size: 16px;
}

.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(340px, 1fr);
  gap: 22px;
  width: min(980px, calc(100% - 40px));
  margin: 28px auto 0;
}

.before-after {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.before-after::before,
.before-after::after {
  position: absolute;
  inset: 0;
  content: "";
}

.before-after::before {
  right: 50%;
  background: var(--before-bg, linear-gradient(135deg, #d9c4a5, #657184));
}

.before-after::after {
  left: 50%;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.72) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.72) 50% 75%, transparent 75%) 0 0/22px 22px,
    var(--after-bg, #dfe5f2);
}

.before-after.generated-before-after {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.before-after.generated-before-after::before,
.before-after.generated-before-after::after {
  display: none;
}

.scene-object {
  position: absolute;
  z-index: 1;
  left: 18%;
  bottom: 16%;
  width: 62%;
  height: 35%;
  border-radius: 60px 60px 20px 20px;
  background: var(--object-bg, linear-gradient(135deg, #b4bdc9, #777f91));
  box-shadow: 0 22px 30px rgba(45, 54, 82, 0.16);
}

.before-label,
.after-label {
  position: absolute;
  z-index: 3;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.before-label {
  left: 14px;
  background: rgba(45, 49, 59, 0.66);
}

.after-label {
  right: 14px;
  background: #6878ff;
}

.divider {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.86);
}

.upload-card {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 32px 30px 28px;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.upload-card:hover {
  transform: translateY(-1px);
  background: #fbfcff;
  box-shadow: 0 18px 44px rgba(44, 55, 89, 0.1);
}

.upload-card.drag-over,
.mini-upload.drag-over {
  border: 1px dashed #7566f5;
  background: #f6f5ff;
}

.upload-inner {
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.upload-icon {
  position: relative;
  width: 90px;
  height: 70px;
  margin: 0 auto 24px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 31% 28%, rgba(255, 255, 255, 0.92) 0 5px, transparent 5.5px),
    linear-gradient(180deg, #ff75d5 0%, #8f63ff 100%);
  box-shadow: 0 16px 28px rgba(151, 91, 229, 0.24);
}

.upload-icon::before {
  position: absolute;
  left: 19px;
  bottom: 15px;
  width: 52px;
  height: 32px;
  clip-path: polygon(0 100%, 30% 42%, 48% 68%, 67% 38%, 100% 100%);
  background: rgba(255, 255, 255, 0.94);
  content: "";
}

.upload-icon::after {
  position: absolute;
  right: -20px;
  top: -14px;
  width: 48px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background:
    rgba(255, 255, 255, 0.36)
      url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='19'%20height='19'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2019V5'/%3E%3Cpath%20d='M5%2012l7-7%207%207'/%3E%3C/svg%3E")
      center / 19px 19px no-repeat;
  box-shadow:
    0 12px 24px rgba(120, 92, 210, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  content: "";
}

.upload-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  color: #2d3242;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
}

.upload-title button {
  color: #252b3a;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 720;
}

.upload-title button:hover {
  color: #7466f6;
}

.upload-title span {
  color: #353b4c;
  font-weight: 620;
}

.upload-hint {
  margin-top: 12px;
  color: #8c92a3;
  font-size: 13px;
}

.upload-inner .upload-hint {
  max-width: min(460px, 100%);
  margin-right: auto;
  margin-left: auto;
  color: #8d94a6;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}

.upload-nowrap {
  white-space: nowrap;
}

.try-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 54px;
  color: #8c92a3;
  font-size: 13px;
}

.try-row::before,
.try-row::after {
  width: 90px;
  height: 1px;
  background: #d4d9e5;
  content: "";
}

.samples {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.sample {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 3px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f6d9bd, #7b8da4);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: 0 8px 18px rgba(39, 48, 78, 0.12);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.sample img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: contain;
  pointer-events: none;
}

.sample:hover,
.sample:focus-visible {
  transform: translateY(-1px);
  border-color: #7666f6;
  box-shadow: 0 12px 24px rgba(39, 48, 78, 0.18);
  outline: none;
}

.steps-section,
.feature-section,
.faq-section {
  width: min(1050px, calc(100% - 40px));
  margin: 54px auto 0;
}

.steps-section h2,
.faq-section h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 26px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  min-height: 128px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
}

.step-num {
  color: #6f61f5;
  font-weight: 900;
}

.step-title {
  margin-top: 8px;
  font-weight: 800;
}

.step-text {
  margin-top: 6px;
  color: #7d8494;
  font-size: 13px;
}

.feature-section {
  display: grid;
  gap: 0;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 46px;
  align-items: center;
  min-height: 430px;
  padding: 36px 0;
}

.feature-panel.is-even {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
}

.feature-panel.is-even .feature-media {
  order: 2;
}

.feature-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(30, 36, 55, 0.3) 0 49%, transparent 50%),
    linear-gradient(135deg, #ece3d3, #cdd7eb);
  box-shadow: 0 18px 44px rgba(44, 55, 89, 0.13);
}

.feature-preview-image {
  background-position: center;
  background-size: cover;
}

.feature-media .before-label,
.feature-media .after-label {
  top: 16px;
  font-size: 12px;
}

.feature-media .divider {
  opacity: 0.88;
}

.feature-copy h3 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 28px;
  line-height: 1.32;
}

.feature-copy p {
  margin: 0;
  color: #687184;
  font-size: 16px;
  line-height: 1.9;
}

.faq-section {
  padding-bottom: 64px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: 8px;
  color: #273044;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(44, 55, 89, 0.06);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover,
.faq-question:focus-visible {
  color: #6b5df5;
  outline: none;
}

.faq-answer {
  padding: 0 22px 20px;
  color: #687184;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.85;
}

.faq-item.open {
  box-shadow: 0 16px 34px rgba(44, 55, 89, 0.1);
}

.faq-chevron {
  width: 11px;
  height: 11px;
  border-right: 2px solid #8992a5;
  border-bottom: 2px solid #8992a5;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease, border-color 0.18s ease;
  flex: 0 0 auto;
}

.faq-item.open .faq-chevron {
  border-color: #6b5df5;
  transform: rotate(225deg) translateY(-2px);
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 76px);
  background: #eef3fb;
}

.workspace.with-style-drawer {
  grid-template-columns: 360px 360px 1fr;
}

.side-panel {
  height: calc(100vh - 76px);
  min-height: calc(100vh - 76px);
  padding: 24px;
  border-right: 1px solid #e7ebf3;
  background: #fff;
  overflow-y: auto;
}

.panel-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
}

.form-block {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 9px;
  color: #353b4e;
  font-size: 14px;
  font-weight: 800;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #e3e7f0;
  border-radius: 12px;
  color: #222638;
  background: #fbfcff;
  outline: none;
}

textarea {
  min-height: 126px;
  padding: 14px;
  resize: vertical;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

.mini-upload {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 118px;
  padding: 18px 14px;
  border: 1px dashed #cbd3e6;
  border-radius: 14px;
  color: #8b93a5;
  background: #fbfcff;
  cursor: pointer;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.mini-upload::before {
  display: block;
  width: 38px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 31% 30%, rgba(255, 255, 255, 0.92) 0 3px, transparent 3.5px),
    linear-gradient(180deg, #ff75d5 0%, #8f63ff 100%);
  box-shadow: 0 8px 18px rgba(151, 91, 229, 0.18);
  content: "";
}

.mini-upload:hover {
  border-color: #9b91fb;
  color: #6761d9;
  background: #fbfaff;
}

.mini-upload.has-upload {
  border-color: #7566f5;
  color: #4f46d8;
  background: #f7f6ff;
  font-weight: 800;
}

.mini-upload.has-upload::before {
  display: none;
}

.mini-upload small {
  display: block;
  margin-top: 6px;
  color: #8b93a5;
  font-weight: 600;
}

.style-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.style-label-row .form-label {
  margin-bottom: 0;
}

.more-style-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #e2e6f0;
  border-radius: 999px;
  color: #6d63e9;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.more-style-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7468f4, #ee66c7);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.draw-style-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  color: #25283b;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(54, 63, 93, 0.06);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.draw-style-card:hover {
  transform: translateY(-1px);
  border-color: #c8c4ff;
}

.draw-style-card.active {
  border-color: #7566f5;
  box-shadow:
    0 0 0 2px rgba(117, 102, 245, 0.12),
    0 16px 30px rgba(83, 75, 194, 0.18);
}

.draw-style-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef3fb, #f7e9ff);
}

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

.draw-style-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e7edff, #ffe8f8);
}

.draw-style-name {
  display: block;
  padding: 8px 6px 9px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-drawer {
  min-height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
  padding: 20px 16px 24px;
  border-right: 1px solid #e7ebf3;
  background: #fff;
  overflow-y: auto;
}

.style-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.style-drawer-head strong {
  display: block;
  color: #202538;
  font-size: 18px;
  font-weight: 900;
}

.style-drawer-head span {
  color: #8a92a5;
  font-size: 12px;
  font-weight: 700;
}

.style-drawer-close {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e6f0;
  border-radius: 50%;
  color: #747d91;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.style-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.style-category-tab {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #e7ebf3;
  border-radius: 999px;
  color: #5c6477;
  background: #fbfcff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.style-category-tab.active {
  color: #fff;
  border-color: transparent;
  background: #7166f2;
}

.style-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #6f63f5, #836ff8);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ghost-btn {
  border: 1px solid #e2e6f0;
  color: #42495d;
  background: #fff;
}

.ai-advice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 4px 0 14px;
  border: 1px solid #d9e2ff;
  border-radius: 12px;
  color: #3155c9;
  background: #f5f8ff;
  cursor: pointer;
  font-weight: 900;
}

.ai-advice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.result-area {
  position: relative;
  display: grid;
  align-self: start;
  place-items: center;
  height: calc(100vh - 76px);
  min-height: calc(100vh - 76px);
  padding: 34px;
  overflow-y: auto;
}

.result-empty {
  text-align: center;
}

.draw-result-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(260px, 100%);
}

.draw-result-empty .empty-visual {
  margin: 0;
}

.result-empty.with-generated-result {
  width: min(680px, 92%);
}

.draw-empty-art {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0 auto 18px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.empty-visual {
  position: relative;
  width: 112px;
  height: 86px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7268f5, #ff70c5 70%, #ffd46c);
  box-shadow: 0 16px 34px rgba(109, 104, 245, 0.2);
}

.empty-visual::before {
  position: absolute;
  left: 25px;
  bottom: 20px;
  width: 60px;
  height: 36px;
  clip-path: polygon(0 100%, 34% 40%, 52% 70%, 70% 36%, 100% 100%);
  background: #fff;
  content: "";
}

.empty-text {
  color: #8277fb;
  font-size: 16px;
  font-weight: 800;
}

.history-float {
  position: absolute;
  top: 28px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #7868f7;
  background: #fff;
  box-shadow: 0 10px 24px rgba(73, 83, 124, 0.11);
  cursor: pointer;
}

.point-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  color: #596174;
  background: #fbfcff;
  font-size: 12px;
  font-weight: 800;
}

.result-card {
  width: min(760px, 92%);
}

.result-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.result-placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid #edf1fb;
  background:
    linear-gradient(45deg, rgba(232, 236, 246, 0.72) 25%, transparent 25% 50%, rgba(232, 236, 246, 0.72) 50% 75%, transparent 75%) 0 0/24px 24px,
    #f8faff;
}

.result-preview.is-pending::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(17, 22, 38, 0.34);
  content: "生成中";
  font-weight: 900;
}

.task-status-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e7ebf4;
  border-radius: 8px;
  background: #fbfcff;
}

.task-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.task-status-head span {
  color: #7468f4;
  font-weight: 900;
}

.task-progress {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f8;
}

.task-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7366f4, #f65dc7);
}

.task-status-card p {
  margin: 10px 0 0;
  color: #7b8495;
  font-size: 13px;
  line-height: 1.5;
}

.task-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: #111626;
  font-size: 13px;
  font-weight: 800;
}

.history-panel {
  position: absolute;
  top: 84px;
  right: 28px;
  z-index: 5;
  width: 280px;
  padding: 14px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.history-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 900;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 0;
  border-top: 1px solid #f1f3f8;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  color: #596174;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.history-item.active,
.history-item:hover {
  color: #34394c;
  background: #fbfcff;
}

.history-item strong {
  color: #7468f4;
  white-space: nowrap;
}

.history-empty {
  padding: 18px 0;
  color: #9aa0af;
  font-size: 13px;
  text-align: center;
}

.tool-generation-records {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e7ebf4;
  border-radius: 8px;
  background: #fff;
}

.side-panel .tool-generation-records {
  margin-top: 16px;
  padding: 12px;
  background: #fbfcff;
}

.tool-generation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #22283a;
  font-size: 14px;
  font-weight: 900;
}

.tool-generation-head span {
  color: #8a93a5;
  font-size: 12px;
  font-weight: 800;
}

.tool-generation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-generation-records.compact .tool-generation-list {
  grid-template-columns: 1fr;
}

.tool-generation-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 68px;
  padding: 8px;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  color: #596174;
  background: #fbfcff;
  cursor: pointer;
  text-align: left;
}

.tool-generation-records.compact .tool-generation-item {
  grid-template-columns: 42px 1fr auto;
  min-height: 58px;
  padding: 8px;
  background: #fff;
}

.tool-generation-item.active {
  border-color: #7566f5;
  background: #fff;
  box-shadow: 0 10px 24px rgba(111, 96, 245, 0.1);
}

.tool-generation-thumb {
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(232, 236, 246, 0.72) 25%, transparent 25% 50%, rgba(232, 236, 246, 0.72) 50% 75%, transparent 75%) 0 0/16px 16px,
    #f8faff;
  background-size: cover;
  background-position: center;
}

.tool-generation-records.compact .tool-generation-thumb {
  width: 42px;
  height: 42px;
}

.tool-generation-copy {
  min-width: 0;
}

.tool-generation-copy strong,
.tool-generation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-generation-copy strong {
  color: #252b3e;
  font-size: 13px;
  font-weight: 900;
}

.tool-generation-records.compact .tool-generation-copy strong {
  font-size: 12px;
}

.tool-generation-copy small {
  margin-top: 4px;
  color: #7d8799;
  font-size: 12px;
  font-weight: 760;
}

.tool-generation-item em {
  padding: 5px 7px;
  border-radius: 999px;
  color: #6f60f5;
  background: #f2f0ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tool-generation-empty {
  padding: 14px;
  border: 1px dashed #dce3ee;
  border-radius: 8px;
  color: #8a93a5;
  background: #f8faff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.image-task-board {
  width: min(860px, 94%);
}

.image-task-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.image-task-pane {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: var(--shadow);
}

.image-task-pane.after {
  background-color: #f8faff;
}

.image-task-pane.is-empty {
  display: grid;
  place-items: center;
  border: 1px solid #edf1fb;
  background:
    linear-gradient(45deg, rgba(232, 236, 246, 0.72) 25%, transparent 25% 50%, rgba(232, 236, 246, 0.72) 50% 75%, transparent 75%) 0 0/24px 24px,
    #f8faff;
}

.image-task-pane.is-missing-source,
.inpaint-mask-stage.is-missing-source {
  display: grid;
  place-items: center;
  border: 1px solid #edf1fb;
  background:
    linear-gradient(45deg, rgba(232, 236, 246, 0.72) 25%, transparent 25% 50%, rgba(232, 236, 246, 0.72) 50% 75%, transparent 75%) 0 0/24px 24px,
    #f8faff;
}

.image-task-pane span {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 22, 38, 0.58);
  font-size: 13px;
  font-weight: 900;
}

.image-task-pane.after span {
  background: #6878ff;
}

.after-placeholder {
  display: grid;
  gap: 8px;
  max-width: 260px;
  padding: 18px 20px;
  color: #6f7689;
  text-align: center;
}

.after-placeholder strong {
  color: #34394c;
  font-size: 18px;
}

.after-placeholder small {
  color: #7b8495;
  font-size: 13px;
  line-height: 1.55;
}

.image-task-hint {
  margin: 14px 0 0;
  color: #7b8495;
  font-size: 13px;
  text-align: center;
}

.inpaint-task-board {
  width: min(960px, 96%);
}

.inpaint-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inpaint-mask-stage {
  position: relative;
  aspect-ratio: var(--inpaint-ratio, 900 / 620);
  min-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: var(--shadow);
}

.mask-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.mask-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 22, 38, 0.58);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.editor-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 76px);
  background: #eef3fb;
}

.watermark-editor-layout {
  grid-template-areas: "controls preview";
}

.watermark-editor-layout > .side-panel {
  grid-area: controls;
}

.watermark-preview-section {
  grid-area: preview;
  scroll-margin-top: 82px;
}

.editor-canvas {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(18px, 2vw, 30px);
}

.watermark-preview-shell {
  display: grid;
  gap: 14px;
  width: min(760px, 94%);
}

.watermark-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(226, 232, 244, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(36, 48, 84, 0.08);
}

.watermark-preview-head div {
  min-width: 0;
}

.watermark-preview-head span {
  display: block;
  color: #747d91;
  font-size: 12px;
  font-weight: 850;
}

.watermark-preview-head strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: #202638;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watermark-preview-head em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #675ff0;
  background: #f0edff;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.checker-canvas {
  position: relative;
  width: min(720px, 90%);
  aspect-ratio: 1.35;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(45deg, #e0e5f0 25%, transparent 25% 50%, #e0e5f0 50% 75%, transparent 75%) 0 0/28px 28px,
    #f8faff;
  box-shadow: var(--shadow);
}

.watermark-checker {
  width: 100%;
}

.preview-photo {
  position: absolute;
  inset: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #dfc8ab, #8390a4);
}

.id-photo-stage {
  display: grid;
  place-items: center;
  width: min(380px, 100%);
  min-width: 0;
  padding: 16px;
  background: #f8faff;
  box-shadow: var(--shadow);
}

.id-photo-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(268px, 300px);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
  width: min(760px, 100%);
  min-width: 0;
}

.id-photo-output-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: min(328px, 100%);
  overflow: hidden;
  border: 1px solid rgba(30, 42, 72, 0.12);
  background: #eef3fb;
  color: rgba(19, 25, 42, 0.52);
  font-size: 14px;
  font-weight: 850;
}

.id-photo-output-preview canvas,
.id-photo-output-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-photo-output-preview img.is-loading {
  opacity: 0;
}

.id-photo-empty-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.id-photo-output-preview.has-result {
  border-color: rgba(30, 42, 72, 0.18);
}

.id-photo-progress-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 21, 36, 0.36);
  backdrop-filter: blur(2px);
}

.id-photo-progress-panel {
  display: grid;
  gap: 12px;
  width: min(250px, 90%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #fff;
  background: rgba(29, 34, 52, 0.84);
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.28);
}

.id-photo-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
}

.id-photo-progress-head span {
  color: #d9d5ff;
  font-weight: 950;
}

.id-photo-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.id-photo-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7366f4, #f65dc7);
}

.id-photo-progress-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.id-photo-progress-overlay.is-error .id-photo-progress-track i {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.id-photo-result-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.id-photo-result-card {
  padding: 18px;
  border: 1px solid #e6ebf4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(35, 45, 78, 0.08);
}

.id-photo-result-card h2 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f7;
  color: #202638;
  font-size: 18px;
  font-weight: 900;
}

.id-photo-result-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.id-photo-result-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #7c8597;
  font-size: 13px;
  font-weight: 850;
}

.id-photo-result-meta strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #30374a;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.id-photo-result-meta strong.is-done {
  color: #18a989;
}

.id-photo-result-meta i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(30, 42, 72, 0.12);
}

.id-photo-result-download,
.id-photo-copy-link {
  height: 46px;
  border-radius: 10px;
}

.id-photo-copy-link {
  margin-top: 10px;
}

.id-photo-result-tip {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 10px;
  color: #697386;
  background: #f5f8ff;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 760;
}

.id-photo-result-tip strong {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.id-photo-editor {
  grid-template-columns: minmax(286px, 310px) minmax(0, 1fr);
}

.id-photo-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.98), #fff 34%),
    #fff;
}

.id-photo-panel .panel-title {
  margin: 2px 0 0;
  font-size: 23px;
  line-height: 1.16;
}

.id-photo-panel-head span {
  color: #7a8294;
  font-size: 12px;
  font-weight: 850;
}

.id-photo-panel .point-strip {
  margin: 0;
  padding: 12px 14px;
  border-color: #e4e9f4;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(35, 45, 78, 0.06);
}

.id-photo-section {
  padding: 14px;
  border: 1px solid #e8edf6;
  border-radius: 8px;
  background: #fff;
}

.id-photo-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  color: #2f3547;
  font-size: 14px;
  font-weight: 850;
}

.id-photo-section-title strong {
  color: #7a8294;
  font-size: 12px;
  font-weight: 850;
}

.id-photo-panel .color-dots {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 9px;
  align-items: center;
}

.id-photo-panel .color-dot {
  width: 30px;
  height: 30px;
  border-color: #fff;
  box-shadow: 0 0 0 1px #d9e0ed;
}

.id-photo-panel .color-dot.active {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #7467f5;
}

.id-photo-panel select {
  height: 44px;
  padding: 0 38px 0 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 760;
}

.id-photo-outfit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.id-photo-outfit-option {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #e2e7f1;
  border-radius: 8px;
  color: #4b5368;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.id-photo-outfit-option.active {
  border-color: #7566f5;
  color: #6f60f5;
  background: #f5f3ff;
  box-shadow: 0 8px 20px rgba(111, 96, 245, 0.1);
}

.id-photo-panel .upload-hint {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #eef2f8;
  border-radius: 8px;
  color: #7b8495;
  background: #f8faff;
  font-size: 13px;
  line-height: 1.55;
}

.id-photo-panel .task-status-card {
  margin-top: 0;
}

.id-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.id-photo-actions .ghost-btn,
.id-photo-actions .primary-btn {
  height: 48px;
  border-radius: 8px;
}

.id-photo-actions .ghost-btn {
  color: #333a4e;
  background: #fff;
}

.id-photo-download-btn {
  height: 48px;
  border-radius: 8px;
}

.id-photo-history {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.id-photo-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #22283a;
  font-size: 13px;
  font-weight: 900;
}

.id-photo-history-head span {
  color: #8a93a5;
  font-size: 12px;
  font-weight: 800;
}

.id-photo-history-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid #e6ebf4;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.id-photo-history-item.active {
  border-color: #7566f5;
  box-shadow: 0 10px 24px rgba(111, 96, 245, 0.1);
}

.id-photo-history-thumb {
  position: relative;
  width: 34px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(30, 42, 72, 0.16);
  border-radius: 4px;
}

.id-photo-history-thumb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f0c5ae;
  transform: translateX(-50%);
}

.id-photo-history-thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 30px;
  height: 18px;
  border-radius: 16px 16px 0 0;
  background: #f8f9fb;
  transform: translateX(-50%);
}

.id-photo-history-copy {
  min-width: 0;
}

.id-photo-history-copy strong,
.id-photo-history-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-photo-history-copy strong {
  color: #252b3e;
  font-size: 12px;
  font-weight: 900;
}

.id-photo-history-copy small {
  margin-top: 3px;
  color: #7d8799;
  font-size: 11px;
  font-weight: 760;
}

.id-photo-history-item em {
  padding: 5px 7px;
  border-radius: 999px;
  color: #6f60f5;
  background: #f2f0ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.id-photo-history-empty {
  padding: 12px;
  border: 1px dashed #dce3ee;
  border-radius: 10px;
  color: #8a93a5;
  background: #f8faff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.watermark-text {
  position: absolute;
  color: rgba(255, 255, 255, 0.78);
  font-size: 34px;
  font-weight: 900;
  transform: rotate(-24deg);
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.draw-strength-row {
  grid-template-columns: 88px minmax(0, 1fr) 42px;
  color: #3c4356;
  font-size: 13px;
  font-weight: 800;
}

.draw-strength-row input {
  height: auto;
  padding: 0;
}

.draw-strength-row strong {
  color: #7566f5;
  font-size: 13px;
  text-align: right;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  color: #353b4e;
  font-size: 14px;
  font-weight: 800;
}

.switch-row input {
  width: 42px;
  height: 24px;
  accent-color: #7566f5;
}

.color-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.color-dot {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #d9dfec;
  cursor: pointer;
}

.color-dot.active {
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 3px #6f63f5;
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tool-tab {
  height: 38px;
  border: 1px solid #e2e6f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.tool-tab.active {
  color: #fff;
  background: #6f63f5;
}

.montage-page {
  display: grid;
  grid-template-columns: 246px 1fr 330px;
  height: calc(100vh - 68px);
  min-height: 620px;
  overflow: hidden;
  background: #eef3fb;
}

.montage-left,
.montage-right {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 18px;
  background: #fff;
}

.montage-left {
  border-right: 1px solid #e7ebf3;
}

.montage-right {
  border-left: 1px solid #e7ebf3;
}

.template-title,
.right-title {
  margin-bottom: 14px;
  font-weight: 900;
}

.montage-left select {
  margin-bottom: 2px;
}

.template-group {
  margin: 16px 0 10px;
  color: #43495c;
  font-weight: 800;
}

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

.template-thumb {
  position: relative;
  display: grid;
  grid-template-rows: minmax(46px, 1fr) auto;
  gap: 5px;
  min-width: 0;
  min-height: 94px;
  padding: 7px;
  border: 2px solid #ecf0f4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.template-thumb.active {
  border-color: #6c8ee5;
  background: #f7f9ff;
}

.template-shape {
  position: relative;
  display: block;
  min-height: 46px;
  overflow: hidden;
  border-radius: 6px;
}

.template-shape span {
  position: absolute;
  border-radius: 3px;
  background: #d7dbe4;
}

.template-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #252b3c;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-thumb small {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #667085;
  background: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.template-thumb.active .template-name,
.template-thumb.active small {
  color: #5d68ea;
}

.montage-center {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
  align-content: start;
  justify-items: center;
  overflow: auto;
  padding: 28px 34px 96px;
  cursor: grab;
  min-height: 0;
  overscroll-behavior: contain;
  user-select: none;
}

.montage-center.is-panning {
  cursor: grabbing;
}

.montage-heading {
  width: min(510px, 100%);
  text-align: left;
}

.montage-heading h1 {
  margin: 0;
  color: #252a38;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.2;
}

.montage-heading p {
  margin: 8px 0 0;
  color: #6b7284;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.montage-canvas-shell {
  display: grid;
  place-items: start center;
  width: 100%;
  min-height: 0;
  padding-top: 4px;
}

.collage {
  position: relative;
  width: 510px;
  height: 510px;
  padding: 25px;
  gap: 25px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: scale(var(--montage-zoom, 0.55));
  transform-origin: top center;
}

.collage-cell {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #d9dfeb;
  color: #7d8495;
  background: #f8faff;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  font-size: 34px;
  overflow: hidden;
}

.collage-cell.has-image {
  border-color: transparent;
  color: transparent;
}

.cell-plus {
  color: #7d8495;
  font-size: 34px;
  font-weight: 900;
}

.collage-cell.dragging {
  opacity: 0.56;
}

.collage-cell.drag-over {
  outline: 3px solid rgba(111, 99, 245, 0.64);
  outline-offset: -3px;
}

.cell-tools {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.collage-cell:hover .cell-tools,
.collage-cell:focus-visible .cell-tools,
.cell-tools.show {
  opacity: 1;
}

.cell-tools i,
.cell-color-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(31, 37, 56, 0.78);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cell-color-control {
  min-width: 26px;
  width: 26px;
  padding: 3px;
}

.cell-color-control input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.scale-control {
  position: sticky;
  right: 42px;
  bottom: 22px;
  z-index: 5;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.montage-bottom-cue {
  position: sticky;
  bottom: 28px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -4px;
  border: 1px solid #e0e5f1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(36, 48, 84, 0.16);
  cursor: pointer;
}

.montage-bottom-cue span {
  width: 11px;
  height: 11px;
  border-right: 3px solid #6570ef;
  border-bottom: 3px solid #6570ef;
  transform: translateY(-2px) rotate(45deg);
}

.scale-control button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #6f63f5;
  cursor: pointer;
  font-weight: 900;
}

.scale-control input {
  width: 150px;
  height: auto;
  padding: 0;
}

.ratio-lock,
.custom-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin: -2px 0 12px;
  color: #3e4659;
  font-size: 13px;
  font-weight: 850;
}

.ratio-lock input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: #6f63f5;
}

.custom-color-row {
  justify-content: space-between;
  margin: 10px 0 0;
}

.custom-color-row input {
  width: 52px;
  height: 30px;
  padding: 2px;
  border-radius: 8px;
}

.scale-control strong {
  min-width: 44px;
  text-align: right;
  font-size: 13px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 22px;
  height: 22px;
  border: 1px solid #dce2ee;
  border-radius: 4px;
  cursor: pointer;
}

.swatch.active {
  box-shadow: 0 0 0 2px #6f63f5;
}

.download-wide {
  margin-top: 28px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(90deg, #5866f2, #715df4);
  cursor: pointer;
  width: 100%;
  font-weight: 800;
}

.commerce-workbench {
  display: grid;
  grid-template-columns: 326px minmax(560px, 1fr) 324px;
  min-height: calc(100vh - 76px);
  background: #f4f7fc;
}

.viral-video-workbench {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(52, 71, 130, 0.05), rgba(21, 151, 128, 0.045) 44%, rgba(255, 255, 255, 0) 76%),
    #f7f9fc;
}

.viral-video-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px 12px;
  border-right: 1px solid #e3e8f0;
  background:
    linear-gradient(180deg, rgba(252, 253, 255, 0.97), rgba(249, 251, 253, 0.97)),
    #f9fbfe;
  box-shadow: 8px 0 24px rgba(35, 45, 70, 0.026);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}

.viral-agent-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 0 1px;
}

.viral-agent-top span {
  color: #8a93a3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.viral-agent-top strong {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #647087;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.viral-video-panel .panel-title {
  margin: 2px 0 0;
  color: #151b2b;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

.viral-agent-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding: 0 1px 2px;
  color: #7c8494;
  font-size: 12px;
  font-weight: 760;
}

.viral-agent-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.viral-agent-metrics span + span::before {
  width: 1px;
  height: 10px;
  margin-right: 3px;
  background: #d8dee8;
  content: "";
}

.viral-agent-metrics strong {
  color: #283246;
  font-weight: 900;
}

.viral-agent-metrics em {
  color: #8a93a4;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.viral-flow-rail {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 0 2px;
}

.viral-flow-rail span {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #9aa3b2;
  font-size: 11px;
  font-weight: 820;
}

.viral-flow-rail span + span::before {
  width: 14px;
  height: 1px;
  margin: 0 7px;
  background: #dce3ed;
  content: "";
}

.viral-flow-rail span.is-active,
.viral-flow-rail span.is-done {
  color: #137657;
  background: transparent;
}

.viral-control-group {
  display: grid;
  gap: 6px;
  padding: 10px 0 0;
  border-top: 1px solid #e2e8f1;
  background: transparent;
}

.viral-control-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.viral-control-heading span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 18px;
  border-radius: 6px;
  color: #718097;
  background: #eef3f8;
  font-size: 11px;
  font-weight: 850;
}

.viral-control-heading strong {
  overflow: hidden;
  color: #253047;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-control-heading em {
  color: #7f8899;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.viral-upload-strip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px;
  border: 1px dashed #d9e2ee;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.viral-upload-strip.has-upload {
  border-style: solid;
  background: rgba(255, 255, 255, 0.82);
}

.viral-upload-thumb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  background:
    linear-gradient(135deg, #eef2f7, #fbfcfe),
    #f6f8fb;
}

.viral-upload-thumb span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #b9c4d4;
  border-radius: 7px;
  color: #526071;
  font-size: 12px;
  font-weight: 920;
}

.viral-upload-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.viral-upload-meta strong,
.viral-upload-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-upload-meta strong {
  color: #232c3f;
  font-size: 13px;
  font-weight: 880;
}

.viral-upload-meta span {
  color: #8b94a5;
  font-size: 11px;
  font-weight: 720;
}

.viral-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.viral-upload-actions button {
  min-width: 48px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid #e0e7f0;
  border-radius: 7px;
  color: #2e3749;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 820;
}

.viral-upload-actions button:first-child {
  color: #fff;
  border-color: #263149;
  background: #263149;
}

.viral-control-field {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.viral-control-field span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: #677286;
  font-size: 11px;
  font-weight: 800;
}

.viral-control-field span em {
  color: #9098a8;
  font-size: 11px;
  font-style: normal;
}

.viral-control-field input,
.viral-control-field select,
.viral-control-field textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #232b3d;
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 720;
  outline: none;
}

.viral-control-field input,
.viral-control-field select {
  height: 28px;
  padding: 0 10px;
}

.viral-control-url input {
  height: 29px;
}

.viral-control-field textarea {
  height: 38px;
  min-height: 0;
  padding: 7px 10px;
  resize: none;
  line-height: 1.45;
}

.viral-control-textarea.is-compact textarea {
  height: 34px;
  min-height: 0;
}

.viral-control-field input::placeholder,
.viral-control-field textarea::placeholder {
  color: #9da6b5;
  font-weight: 680;
}

.viral-control-field input:focus,
.viral-control-field select:focus,
.viral-control-field textarea:focus {
  border-color: #8b94e8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 113, 217, 0.1);
}

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

.viral-compact-grid .viral-control-field {
  grid-template-columns: 52px minmax(0, 1fr);
}

.viral-setting-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.viral-setting-row > span {
  color: #677286;
  font-size: 11px;
  font-weight: 800;
}

.viral-segment-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  min-height: 30px;
  padding: 3px;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  background: rgba(238, 243, 248, 0.72);
}

.viral-segment-control button {
  height: 22px;
  border: 0;
  border-radius: 7px;
  color: #6f7889;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
}

.viral-segment-control button.active {
  color: #253047;
  background: #fff;
  box-shadow: 0 4px 12px rgba(39, 50, 78, 0.08);
}

.viral-segment-control.is-wide button {
  font-size: 11px;
}

.viral-voice-control {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.66);
}

.viral-voice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.viral-voice-options button {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #647084;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.viral-voice-options button.active {
  border-color: #9bd9cc;
  color: #0f766e;
  background: #eaf8f4;
}

.viral-voice-options strong,
.viral-voice-options span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-voice-options strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.viral-voice-options span {
  color: #7f8899;
  font-size: 10px;
  font-weight: 760;
}

.viral-voice-preset {
  grid-template-columns: 62px minmax(0, 1fr);
}

.viral-voice-note {
  margin: 0;
}

.viral-brief-group {
  gap: 7px;
}

.viral-control-textarea {
  align-items: start;
  grid-template-columns: 80px minmax(0, 1fr);
}

.viral-control-textarea span {
  display: block;
  line-height: 1.25;
  white-space: nowrap;
}

.viral-control-textarea span em {
  display: block;
  margin-top: 2px;
}

.viral-video-stage {
  display: grid;
  align-content: stretch;
  min-width: 0;
  height: calc(100vh - 68px);
  min-height: 0;
  padding: 22px 36px 22px 28px;
  overflow: hidden;
}

.viral-video-studio-shell {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 344px;
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
}

.viral-video-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.viral-video-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 2px 2px 0;
}

.viral-video-stage-head span {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 9px;
  border: 1px solid #dfe5f1;
  border-radius: 999px;
  color: #5360c9;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.viral-video-stage-head h2 {
  margin: 7px 0 0;
  color: #1e2536;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 950;
}

.viral-video-board {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) 36px minmax(280px, 1fr) 36px minmax(150px, 0.55fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  max-width: none;
}

.viral-remix-board {
  min-height: 0;
}

.viral-remix-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(34, 45, 74, 0.052);
}

.viral-remix-reference {
  background:
    radial-gradient(circle at 50% 24%, rgba(99, 102, 241, 0.055), transparent 36%),
    #fff;
}

.viral-remix-output {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92)),
    #fff;
}

.viral-remix-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #edf1f6;
  background: rgba(255, 255, 255, 0.7);
}

.viral-remix-card-head span {
  color: #687286;
  font-size: 12px;
  font-weight: 900;
}

.viral-remix-card-head b {
  color: #15986f;
  font-size: 12px;
  font-weight: 950;
}

.viral-remix-reference-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcff, #f6f8fb);
}

.viral-remix-reference-media img {
  position: absolute;
  inset: clamp(14px, 2vh, 22px);
  width: calc(100% - clamp(28px, 4vh, 44px));
  height: calc(100% - clamp(28px, 4vh, 44px));
  object-fit: contain;
}

.viral-remix-reference-media strong {
  color: #8a93a6;
  font-size: 13px;
  font-weight: 900;
}

.viral-remix-phone {
  position: relative;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(146px, calc(100% - 24px));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(25, 32, 49, 0.08);
  border-radius: 18px;
  color: #dbe4f3;
  background:
    radial-gradient(circle at 50% 36%, rgba(116, 131, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #1d2637, #111827),
    #111827;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.viral-remix-phone strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.viral-remix-phone span {
  display: block;
  max-width: 118px;
  margin-top: 6px;
  overflow: hidden;
  color: #9ba6bb;
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-remix-phone em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #6ee7b7;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.viral-remix-phone video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viral-remix-arrow {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: #cfd7e5;
}

.viral-remix-arrow::after {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #cfd7e5;
  border-right: 2px solid #cfd7e5;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.viral-video-source,
.viral-video-motion-map {
  overflow: hidden;
  border: 1px solid #e2e8f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(34, 45, 74, 0.052);
}

.viral-video-source {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

.viral-video-card-label,
.viral-video-motion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f6;
  background: rgba(255, 255, 255, 0.62);
}

.viral-video-card-label span,
.viral-video-motion-head span {
  color: #687286;
  font-size: 12px;
  font-weight: 900;
}

.viral-video-card-label b,
.viral-video-motion-head b {
  color: #22a06b;
  font-size: 12px;
  font-weight: 950;
}

.viral-video-source-media {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(99, 102, 241, 0.055), transparent 38%),
    linear-gradient(180deg, #fbfcff, #f4f7fb);
}

.viral-video-source img {
  position: absolute;
  inset: clamp(14px, 2vh, 22px);
  display: block;
  width: calc(100% - clamp(28px, 4vh, 44px));
  height: calc(100% - clamp(28px, 4vh, 44px));
  max-width: calc(100% - clamp(28px, 4vh, 44px));
  max-height: calc(100% - clamp(28px, 4vh, 44px));
  object-fit: contain;
}

.viral-video-source strong {
  display: grid;
  place-items: center;
  color: #8a93a6;
  font-size: 14px;
}

.viral-video-motion-map {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  margin-top: 12px;
  align-self: stretch;
}

.viral-video-motion-visual {
  position: relative;
  grid-row: 1 / 3;
  height: auto;
  min-height: 132px;
  margin: 12px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(32, 38, 58, 0.94), rgba(56, 67, 102, 0.88)),
    #20263a;
}

.viral-video-motion-visual::before {
  position: absolute;
  inset: 20px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.viral-video-motion-visual::after {
  position: absolute;
  right: 24px;
  bottom: 20px;
  left: 24px;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, #7c6cff, #28d19f 64%, #ffcf6d);
}

.viral-video-motion-visual span {
  position: absolute;
  width: 44px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.viral-video-motion-visual span:nth-child(1) {
  top: 44px;
  left: 42px;
  transform: rotate(-8deg);
}

.viral-video-motion-visual span:nth-child(2) {
  top: 34px;
  left: calc(50% - 22px);
  transform: scale(1.08);
}

.viral-video-motion-visual span:nth-child(3) {
  top: 46px;
  right: 44px;
  transform: rotate(7deg);
}

.viral-video-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
  padding: 0 12px 12px 0;
}

.viral-video-timeline div {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px 12px;
  border: 1px solid #edf1f6;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(42, 54, 92, 0.035);
}

.viral-video-timeline b {
  color: #6d5cf0;
  font-size: 11px;
  font-weight: 900;
}

.viral-video-timeline strong {
  color: #30374a;
  font-size: 12px;
  font-weight: 900;
}

.viral-video-timeline em {
  color: #8a94a8;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

.viral-video-side-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
  align-content: stretch;
}

.viral-delivery-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(34, 45, 74, 0.052);
}

.viral-delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f6;
}

.viral-delivery-head span {
  display: block;
  color: #7b8496;
  font-size: 12px;
  font-weight: 850;
}

.viral-delivery-head strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
}

.viral-delivery-head em {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  color: #5460d4;
  background: #f2f4ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

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

.viral-delivery-metrics div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #edf1f6;
  border-radius: 10px;
  background: #fbfcff;
}

.viral-delivery-metrics span {
  color: #8a93a6;
  font-size: 11px;
  font-weight: 850;
}

.viral-delivery-metrics strong {
  overflow: hidden;
  color: #243047;
  font-size: 12px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-delivery-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.viral-delivery-actions .commerce-result-download,
.viral-delivery-actions .commerce-copy-link {
  height: 36px;
  border-radius: 9px;
  font-size: 12px;
}

.viral-video-result-card {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 10px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  border-color: #e4eaf2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(35, 45, 74, 0.058);
}

.viral-video-result-card .commerce-result-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
  padding-bottom: 10px;
}

.viral-video-result-card .commerce-result-title h2 {
  font-size: 16px;
}

.viral-video-result-card .commerce-result-title span {
  height: 24px;
  padding: 0 9px;
  background: #f4f6fb;
  font-size: 11px;
}

.viral-video-result-preview {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  place-items: center;
  aspect-ratio: 9 / 16;
  width: 100%;
  height: 100%;
  max-height: 204px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(25, 32, 49, 0.08);
  border-radius: 16px;
  color: #8a93a5;
  background:
    radial-gradient(circle at 50% 36%, rgba(116, 131, 255, 0.2), transparent 28%),
    linear-gradient(180deg, #1c2435, #121826),
    #161b28;
  font-size: 13px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.viral-video-result-preview.has-result {
  border-style: solid;
  background: #111827;
}

.viral-video-result-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viral-video-empty-phone {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #cbd3e3;
  text-align: center;
}

.viral-video-empty-phone span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #7c6cff, #28d19f);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06);
}

.viral-video-empty-phone strong {
  color: #fff;
  font-size: 12px;
  font-weight: 880;
}

.viral-video-empty-phone em {
  color: #9ba6bb;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.viral-video-result-card .commerce-result-meta {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  overflow: hidden;
  border: 1px solid #e8edf4;
  border-radius: 9px;
  background: rgba(250, 252, 255, 0.72);
  margin-bottom: 0;
}

.viral-video-result-card .commerce-result-meta div {
  min-height: 24px;
  padding: 0 8px;
  border-bottom-color: #edf1f6;
  font-size: 11px;
}

.viral-video-result-card .commerce-result-meta strong {
  color: #263046;
  font-size: 10px;
  font-weight: 880;
}

.viral-video-result-card .commerce-result-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 0;
  padding-right: 0;
}

.viral-video-result-card .commerce-result-download,
.viral-video-result-card .commerce-copy-link {
  height: 33px;
  border-radius: 8px;
  font-size: 12px;
}

.viral-video-result-card .commerce-result-download:disabled {
  color: rgba(255, 255, 255, 0.78);
  background: #dcd7fb;
  box-shadow: none;
}

.viral-video-side-stack .commerce-record-strip {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding-top: 0;
}

.viral-video-side-stack .commerce-record-head {
  align-items: baseline;
  margin-bottom: 8px;
  color: #151b2b;
  font-size: 14px;
}

.viral-video-side-stack .commerce-record-head strong {
  font-weight: 920;
}

.viral-video-side-stack .commerce-record-head span {
  color: #8c94a4;
  font-size: 11px;
  font-weight: 760;
}

.viral-video-side-stack .commerce-creation-empty {
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  border-radius: 9px;
  color: #8c94a4;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.commerce-control-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 20px 18px;
  border-right: 1px solid #e6ebf3;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.98), rgba(255, 255, 255, 0.98) 38%),
    #fff;
}

.commerce-panel-head span {
  color: #7a8294;
  font-size: 12px;
  font-weight: 850;
}

.commerce-control-panel .panel-title {
  margin: 2px 0 0;
  font-size: 23px;
  line-height: 1.16;
}

.commerce-control-panel .point-strip {
  margin: 0;
  padding: 9px 11px;
  border-color: #e4e9f4;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(35, 45, 78, 0.05);
}

.commerce-panel-section {
  padding: 11px 12px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.commerce-panel-section + .commerce-panel-section {
  margin-top: 1px;
}

.commerce-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: #2f3547;
  font-size: 14px;
  font-weight: 850;
}

.commerce-section-title strong {
  overflow: hidden;
  color: #7a8294;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.commerce-field-head strong,
.commerce-suite-field span {
  color: #343b4f;
  font-size: 13px;
  font-weight: 880;
  line-height: 1.2;
}

.commerce-field-head i,
.commerce-suite-field i {
  display: none;
}

.commerce-field-head em,
.commerce-suite-field em {
  display: none;
}

.commerce-field-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 31px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: #6d5cf0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.commerce-suite-upload {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  min-height: 98px;
  padding: 11px;
  border: 1px dashed #d6deec;
  border-radius: 10px;
  background: #f9fbff;
  cursor: pointer;
}

.commerce-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.commerce-upload-actions button {
  height: 33px;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  color: #30374a;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.commerce-upload-actions button:last-child {
  border-color: transparent;
  color: #fff;
  background: #6d5cf0;
}

.commerce-upload-copy {
  display: grid;
  gap: 5px;
  color: #30374a;
  text-align: center;
}

.commerce-upload-copy strong {
  font-size: 13px;
  font-weight: 900;
}

.commerce-upload-copy span {
  color: #747b8b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commerce-upload-thumbs {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  gap: 8px;
}

.commerce-upload-thumbs span {
  width: 42px;
  height: 42px;
  border: 1px solid #e3e0ef;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.commerce-suite-field {
  display: grid;
  gap: 6px;
}

.commerce-suite-field input,
.commerce-suite-field select,
.commerce-copy-field textarea {
  width: 100%;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  color: #30374a;
  background: #fbfcff;
  font-size: 13px;
  font-weight: 760;
}

.commerce-suite-field input,
.commerce-suite-field select {
  height: 37px;
  padding: 0 12px;
}

.viral-video-duration-note {
  min-height: 14px;
  color: #697386;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.viral-video-panel .viral-action-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 8px;
  margin: 0 -4px -2px;
  padding: 8px 4px 4px;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0), #f9fbff 30%);
  z-index: 3;
}

.viral-video-panel .commerce-reset-btn,
.viral-video-panel .commerce-suite-submit {
  height: 38px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 950;
}

.viral-video-panel .commerce-reset-btn {
  color: #4f5a6f;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.viral-video-panel .commerce-suite-submit {
  color: #fff;
  background:
    linear-gradient(135deg, #20283b, #4c55d5 58%, #15986f);
  box-shadow: 0 12px 26px rgba(76, 85, 213, 0.23);
}

.commerce-suite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.commerce-copy-field textarea {
  min-height: 58px;
  padding: 10px 12px 32px;
  resize: none;
  line-height: 1.5;
}

.commerce-copy-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: -32px;
  padding: 0 12px 9px;
  color: #737b8d;
  font-size: 12px;
  font-weight: 800;
}

.commerce-copy-footer button {
  color: #737b8d;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.commerce-preview-stage {
  display: grid;
  grid-template-rows: auto minmax(410px, auto) auto;
  gap: 15px;
  min-width: 0;
  padding: 26px 30px 24px;
  background:
    linear-gradient(180deg, rgba(246, 249, 254, 0.92), rgba(238, 243, 251, 0.92)),
    #f3f6fb;
}

.commerce-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: min(900px, 100%);
  margin: 0 auto;
}

.commerce-stage-head span {
  color: #7b8495;
  font-size: 12px;
  font-weight: 850;
}

.commerce-stage-head h2 {
  margin: 4px 0 0;
  color: #22283a;
  font-size: 24px;
  font-weight: 950;
}

.commerce-stage-head strong {
  color: #7068d8;
  font-size: 13px;
  font-weight: 900;
}

.commerce-stage-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.commerce-stage-pills span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(112, 104, 216, 0.14);
  border-radius: 999px;
  color: #655fc8;
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 880;
  box-shadow: 0 6px 16px rgba(57, 66, 105, 0.04);
}

.commerce-visual-preview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(430px, 1fr) 226px;
  gap: 16px;
  align-self: start;
  width: min(900px, 100%);
  min-height: 452px;
  margin: 0 auto;
}

.commerce-artboard {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 452px;
  padding: 17px;
  border: 1px solid #e5ebf4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 50px rgba(40, 52, 86, 0.1);
}

.commerce-artboard-head,
.commerce-artboard-foot,
.commerce-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commerce-artboard-head {
  margin-bottom: 12px;
}

.commerce-artboard-head span,
.commerce-artboard-foot span,
.commerce-preview-label span {
  color: #7a8294;
  font-size: 12px;
  font-weight: 850;
}

.commerce-artboard-head strong,
.commerce-preview-label strong {
  color: #7068d8;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.commerce-artboard-surface {
  display: grid;
  place-items: center;
  min-height: 314px;
  padding: 20px;
  border-radius: 12px;
  background:
    linear-gradient(45deg, rgba(231, 236, 246, 0.62) 25%, transparent 25% 50%, rgba(231, 236, 246, 0.62) 50% 75%, transparent 75%) 0 0/24px 24px,
    #f2f5fb;
}

.commerce-artboard-foot {
  margin-top: 12px;
}

.commerce-artboard-foot strong {
  min-width: 0;
  overflow: hidden;
  color: #30374a;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-main-art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(382px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(30, 42, 72, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #858ea1;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 14px 38px rgba(35, 45, 78, 0.11);
}

.commerce-main-art em {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(25, 31, 48, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.commerce-main-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.commerce-preview-modules {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(35, 45, 78, 0.065);
}

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

.commerce-plan-list span {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  color: #4e576c;
  background: #f8faff;
  font-size: 12px;
  font-weight: 900;
}

.commerce-plan-list i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  border-radius: 999px;
  color: #7068d8;
  background: #f0edff;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.commerce-plan-list b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-plan-note {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 12px;
  border-radius: 10px;
  color: #7b8495;
  background: #f6f8fd;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 780;
}

.commerce-plan-note strong {
  color: #30374a;
  font-size: 13px;
  font-weight: 900;
}

.commerce-module-section {
  width: min(900px, 100%);
  margin: 0 auto;
}

.commerce-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.commerce-module-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  min-height: 68px;
  padding: 11px 40px 10px 12px;
  border: 1px solid #e4eaf3;
  border-radius: 10px;
  color: #30374a;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: left;
}

.commerce-module-card b {
  grid-row: 1 / 3;
  align-self: start;
  padding: 4px 6px;
  border-radius: 999px;
  color: #8a93a5;
  background: #f4f6fb;
  font-size: 10px;
  font-weight: 900;
}

.commerce-module-card.active b {
  color: #655fc8;
  background: #f0edff;
}

.commerce-module-card.active {
  border-color: #d7d2ff;
  color: #56506f;
  background: #fbfaff;
  box-shadow: 0 7px 18px rgba(89, 82, 160, 0.055);
}

.commerce-module-card strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-module-card span {
  min-width: 0;
  overflow: hidden;
  color: #747b8b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-module-card em {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #7164ee;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.commerce-modules-toggle {
  display: block;
  margin: 14px auto 0;
  color: #7068d8;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
}

.commerce-submit-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
}

.commerce-suite-submit,
.commerce-reset-btn {
  height: 45px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 950;
}

.commerce-creation-center {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  min-height: calc(100vh - 76px);
  padding: 22px 22px 18px;
  border-left: 1px solid #e6ebf3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98)),
    #fff;
  overflow-y: auto;
}

.commerce-result-card {
  padding: 20px;
  border: 1px solid #e6ebf4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(35, 45, 78, 0.065);
}

.commerce-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf1f7;
}

.commerce-result-title h2 {
  margin: 0;
  color: #202638;
  font-size: 18px;
  font-weight: 900;
}

.commerce-result-title span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #7b8495;
  background: #f1f4fa;
  font-size: 12px;
  font-weight: 900;
}

.commerce-result-title span.is-done {
  color: #128c75;
  background: #e9fbf6;
}

.commerce-result-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1.28;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px dashed #dbe3ef;
  border-radius: 10px;
  color: #8a93a5;
  background: #f8faff;
  font-size: 13px;
  font-weight: 850;
}

.commerce-result-preview.has-result {
  border-style: solid;
  border-color: #e2e7f1;
  background: #fff;
}

.commerce-result-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.commerce-result-meta {
  display: grid;
  gap: 0;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.68);
}

.commerce-result-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid #edf1f7;
  color: #7c8597;
  font-size: 13px;
  font-weight: 850;
}

.commerce-result-meta div:last-child {
  border-bottom: 0;
}

.commerce-result-meta strong {
  overflow: hidden;
  color: #30374a;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-result-meta strong.is-done {
  color: #18a989;
}

.commerce-result-actions {
  display: grid;
  gap: 9px;
}

.commerce-result-download,
.commerce-copy-link {
  height: 44px;
  border-radius: 9px;
}

.commerce-result-download:disabled {
  background: #b7aef6;
}

.commerce-result-tip {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  color: #697386;
  background: #f5f8ff;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 760;
}

.commerce-result-tip strong {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.commerce-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.commerce-result-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 0;
  border: 1px solid #e1deec;
  border-radius: 12px;
  background: #f8f7fc;
}

.commerce-result-tile img,
.commerce-result-tile i {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.commerce-result-tile figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.72));
}

.commerce-result-tile strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-record-strip {
  margin: 0;
}

.commerce-record-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.commerce-record-head span {
  color: #848b99;
  font-size: 14px;
}

.commerce-record-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.commerce-record-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  border: 1px solid #e3e0ee;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.commerce-record-item.active {
  border-color: #684df6;
}

.commerce-record-item span {
  grid-row: span 2;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #f4f2fb center/cover;
}

.commerce-record-item strong,
.commerce-record-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-record-item strong {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.commerce-record-item small {
  color: #747b8b;
  font-size: 12px;
  font-weight: 800;
}

.commerce-record-item em {
  grid-row: 1 / 3;
  grid-column: 3;
  padding: 5px 7px;
  border-radius: 999px;
  color: #6f60f5;
  background: #f2f0ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.commerce-creation-empty {
  margin: 0;
  padding: 28px 18px;
  border: 1px dashed #d9d5e9;
  border-radius: 12px;
  color: #747b8b;
  background: #fbfaff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  text-align: center;
}

.commerce-library-modal {
  width: min(1040px, calc(100% - 34px));
  padding: 28px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%),
    #fff;
}

.commerce-library-head {
  display: grid;
  gap: 6px;
  padding-right: 54px;
  margin-bottom: 18px;
}

.commerce-library-head span {
  color: #7068d8;
  font-size: 13px;
  font-weight: 900;
}

.commerce-library-head h2 {
  margin: 0;
  color: #202638;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 950;
}

.commerce-library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.commerce-library-tabs button {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #e3e8f2;
  border-radius: 999px;
  color: #596174;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.commerce-library-tabs button.active {
  border-color: #d7d1ff;
  color: #655fc8;
  background: #f2f0ff;
}

.commerce-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.commerce-library-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e4eaf3;
  border-radius: 12px;
  color: #30374a;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 24px rgba(35, 45, 78, 0.055);
}

.commerce-library-card.active {
  border-color: #cfc7ff;
  background: #fbfaff;
  box-shadow: 0 14px 32px rgba(104, 77, 246, 0.11);
}

.commerce-library-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: #edf1f7 center/cover no-repeat;
}

.commerce-library-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.commerce-library-card b {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: #7068d8;
  background: #f0edff;
  font-size: 11px;
  font-weight: 950;
}

.commerce-library-card strong,
.commerce-library-card small,
.commerce-library-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-library-card strong {
  color: #1f2638;
  font-size: 15px;
  font-weight: 950;
}

.commerce-library-card small {
  color: #727b8d;
  font-size: 12px;
  font-weight: 780;
}

.commerce-library-card em {
  color: #8a93a5;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(18, 21, 33, 0.55);
}

.modal {
  position: relative;
  width: min(880px, calc(100% - 34px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e8ebf3;
  border-radius: 50%;
  color: #677084;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(45, 52, 76, 0.12);
  cursor: pointer;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: #2d3242;
  background: #fff;
  box-shadow: 0 16px 34px rgba(45, 52, 76, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.member-modal .modal-close {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 28px rgba(93, 56, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.member-modal .modal-close:hover,
.member-modal .modal-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.34);
}

.member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 78px 18px 26px;
  color: #fff;
  background: linear-gradient(90deg, #7d65f7, #ff5cc8);
}

.member-heading {
  display: grid;
  gap: 4px;
}

.member-heading span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.86;
}

.member-heading strong {
  font-size: 25px;
  line-height: 1.1;
}

.member-heading p {
  margin: 0;
  font-size: 13px;
  opacity: 0.88;
}

.member-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 220px;
  text-align: right;
}

.member-user span {
  font-size: 12px;
  opacity: 0.86;
}

.member-body {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 24px 24px;
}

.member-body h2 {
  margin: 0 0 12px;
  color: #252b3c;
  font-size: 19px;
  line-height: 1.2;
}

.benefit-list {
  display: grid;
  gap: 8px;
}

.benefit {
  padding: 11px 12px;
  border-radius: 12px;
  background: #f7f8ff;
}

.benefit h4 {
  margin: 0 0 4px;
  color: #262c3c;
  font-size: 14px;
}

.benefit p {
  margin: 0;
  color: #7b8192;
  font-size: 12px;
  line-height: 1.45;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.plan {
  min-height: 112px;
  padding: 12px 10px;
  border: 2px solid #edf0f7;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.plan.active {
  border-color: #7464f6;
  background: #f7f5ff;
}

.plan-name {
  font-weight: 900;
}

.plan .upload-hint {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.25;
}

.price {
  margin: 8px 0 3px;
  color: #6f61f5;
  font-size: 24px;
  font-weight: 900;
}

.line-price {
  color: #b1b7c6;
  font-size: 13px;
  text-decoration: line-through;
}

.pay-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #edf0f8;
  border-radius: 14px;
  background: #fafbff;
}

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  color: #596174;
}

.payment-method-row {
  align-items: flex-start;
}

.payment-channel-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e5e8f3;
  border-radius: 12px;
  background: #fff;
}

.payment-channel {
  min-width: 82px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  color: #596174;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.payment-channel.active {
  color: #fff;
  background: linear-gradient(90deg, #6f63f5, #836ff8);
  box-shadow: 0 8px 18px rgba(111, 99, 245, 0.22);
}

.payment-status-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #e6e9f4;
  border-radius: 14px;
  background: #fff;
}

.payment-status-card .payment-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #697084;
  font-size: 13px;
}

.payment-status-card .payment-order-row strong {
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  overflow-wrap: normal;
  color: #262c3c;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-status-card .payment-qr-card {
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  color: #596174;
  text-align: center;
}

.payment-qr-object,
.payment-qr-placeholder {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  margin: 0 auto;
  border: 1px solid #e9edf6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(32, 39, 57, 0.08);
}

.payment-qr-object {
  overflow: hidden;
  object-fit: contain;
}

.payment-qr-placeholder {
  display: grid;
  justify-content: center;
  gap: 8px;
  color: #697084;
  font-weight: 900;
}

.payment-qr-card span {
  color: #394154;
  font-size: 12px;
  font-weight: 900;
}

.payment-order-panel {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.payment-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-status-line strong {
  color: #242b3d;
  font-size: 21px;
  font-weight: 950;
}

.payment-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #5d50d6;
  background: #f0edff;
  font-size: 13px;
  font-weight: 900;
}

.payment-order-meta {
  display: grid;
  gap: 6px;
}

.payment-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 7px;
}

.payment-link,
.secondary-btn.payment-refresh,
.secondary-btn.payment-recreate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.payment-link {
  color: #fff;
  background: linear-gradient(90deg, #19b86a, #23c6a5);
}

.secondary-btn.payment-refresh,
.secondary-btn.payment-recreate {
  border: 1px solid #dfe4f1;
  color: #3e465c;
  background: #f8faff;
  cursor: pointer;
}

.payment-error {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #ffd4d4;
  border-radius: 10px;
  color: #c0393a;
  background: #fff4f4;
  font-size: 13px;
  line-height: 1.5;
}

.contact-modal {
  width: 268px;
  padding: 56px 26px 32px;
  text-align: center;
}

.user-center-modal {
  width: min(860px, calc(100% - 34px));
  padding: 24px;
}

.user-center-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-right: 48px;
}

.user-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b2140, #ff5fa5 52%, #ffd45c);
}

.user-center-head span,
.user-center-summary span,
.user-center-account span,
.user-center-section-head span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 800;
}

.user-center-head h2 {
  margin: 4px 0 2px;
  color: #20263a;
  font-size: 24px;
  line-height: 1.15;
}

.user-center-head p {
  margin: 0;
  color: #6d7588;
  font-size: 13px;
}

.user-center-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.user-center-actions .primary-btn,
.user-center-actions .ghost-btn,
.user-center-actions .secondary-btn {
  width: auto;
  min-width: 76px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.user-center-actions .ghost-btn,
.user-center-actions .secondary-btn {
  border: 1px solid #dfe4f1;
  color: #3e465c;
  background: #f8faff;
}

.user-center-refresh {
  min-width: 72px;
  height: 36px;
  border: 1px solid #dfe4f1;
  border-radius: 8px;
  color: #3e465c;
  background: #f8faff;
  cursor: pointer;
  font-weight: 900;
}

.user-center-summary,
.user-center-account {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.user-center-summary div,
.user-center-account div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e8ecf5;
  border-radius: 8px;
  background: #fbfcff;
}

.user-center-summary strong,
.user-center-account strong {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: #242b3d;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-recharge-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #e4e9f3;
  border-radius: 8px;
  background: #fbfcff;
}

.point-recharge-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(118px, auto) auto auto;
  align-items: end;
  gap: 10px;
}

.point-recharge-form label,
.point-recharge-form > div:not(.payment-channel-tabs) {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.point-recharge-form span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 900;
}

.point-recharge-form input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #dfe4f1;
  border-radius: 8px;
  color: #242b3d;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}

.point-recharge-form strong {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #242b3d;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.point-recharge-panel .primary-btn {
  min-height: 38px;
  border-radius: 8px;
  white-space: nowrap;
}

.recharge-center-modal {
  width: min(940px, calc(100% - 34px));
  padding: 0;
  overflow: hidden auto;
  background: #f7f8fc;
}

.recharge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 18px;
  align-items: center;
  padding: 26px 78px 24px 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 36%),
    linear-gradient(120deg, #246bfe 0%, #765cf4 48%, #ff5f9e 100%);
}

.recharge-hero span,
.recharge-balance-card span,
.recharge-balance-card small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.recharge-hero h2 {
  margin: 7px 0 6px;
  font-size: 30px;
  line-height: 1.12;
}

.recharge-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

.recharge-balance-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.recharge-balance-card strong {
  color: #fff;
  font-size: 28px;
  line-height: 1.05;
}

.recharge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  padding: 18px 20px 0;
}

.recharge-purchase-card,
.recharge-status-card,
.recharge-records,
.recharge-ledger-strip {
  border: 1px solid #e6eaf4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 45, 70, 0.08);
}

.recharge-purchase-card,
.recharge-status-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 342px;
  padding: 18px;
}

.recharge-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.recharge-section-title h3 {
  margin: 0;
  color: #20263a;
  font-size: 17px;
}

.recharge-section-title span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.recharge-input-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.recharge-amount-field,
.recharge-rate,
.recharge-pay-row > div {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.recharge-amount-field span,
.recharge-rate span,
.recharge-pay-row span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 900;
}

.recharge-amount-field input {
  width: 100%;
  height: 52px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid #dbe2f0;
  border-radius: 8px;
  color: #20263a;
  background: #fbfcff;
  font-size: 22px;
  font-weight: 950;
}

.recharge-rate {
  padding: 10px 12px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
}

.recharge-rate strong {
  color: #20263a;
  font-size: 15px;
}

.recharge-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.recharge-preset {
  display: grid;
  gap: 2px;
  min-height: 70px;
  padding: 10px;
  border: 1px solid #e4e9f3;
  border-radius: 8px;
  color: #333b50;
  background: #fbfcff;
  cursor: pointer;
  text-align: left;
}

.recharge-preset strong {
  font-size: 20px;
}

.recharge-preset span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 900;
}

.recharge-preset.active {
  border-color: #7468f4;
  color: #5b50e6;
  background: #f4f1ff;
  box-shadow: 0 10px 22px rgba(116, 104, 244, 0.14);
}

.recharge-pay-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: end;
}

.recharge-auto-status {
  display: grid;
  min-height: 44px;
  align-content: center;
  gap: 3px;
  padding: 8px 12px;
  border: 1px solid #e4e8f3;
  border-radius: 8px;
  background: #fbfcff;
}

.recharge-auto-status span {
  color: #8c94a8;
  font-size: 11px;
  font-weight: 900;
}

.recharge-auto-status strong {
  color: #5d50d6;
  font-size: 14px;
  line-height: 1.15;
}

.recharge-status-card .payment-status-card {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.recharge-status-card .payment-qr-object,
.recharge-status-card .payment-qr-placeholder {
  width: 170px;
  height: 170px;
}

.recharge-status-card .payment-order-panel {
  padding: 12px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #fbfcff;
}

.recharge-qr-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 246px;
  border: 1px dashed #dce2ef;
  border-radius: 8px;
  color: #8c94a8;
  background: #fbfcff;
  text-align: center;
}

.recharge-qr-empty strong {
  color: #242b3d;
  font-size: 34px;
  line-height: 1;
}

.recharge-records {
  display: grid;
  gap: 12px;
  margin: 14px 20px 0;
  padding: 16px;
}

.recharge-records[data-user-center-section] {
  scroll-margin-top: 18px;
}

.recharge-record-row em {
  color: #19a768;
}

.recharge-empty {
  min-height: 72px;
}

.recharge-ledger-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 14px 20px 20px;
  overflow: hidden;
}

.recharge-ledger-strip div {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid #edf0f7;
}

.recharge-ledger-strip div:last-child {
  border-right: 0;
}

.recharge-ledger-strip span {
  color: #8c94a8;
  font-size: 12px;
  font-weight: 900;
}

.recharge-ledger-strip strong {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: #242b3d;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.success-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 23, 38, 0.42);
  backdrop-filter: blur(8px);
  animation: pointSuccessLayer 0.22s ease-out both;
  overflow: hidden;
}

.point-success-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.point-success-confetti i {
  position: absolute;
  left: 50%;
  top: 48%;
  width: var(--size);
  height: calc(var(--size) * 1.6);
  border-radius: 3px;
  background: var(--color);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--angle));
  animation: pointSuccessConfetti 1.15s cubic-bezier(0.18, 0.74, 0.24, 1) var(--delay) both;
}

.point-success-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #20263a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 1)),
    radial-gradient(circle at 12% 0%, rgba(37, 196, 129, 0.18), transparent 34%);
  box-shadow: 0 26px 70px rgba(31, 38, 55, 0.28);
  animation: pointSuccessPop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.point-success-dialog::before,
.point-success-dialog::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.point-success-dialog::before {
  inset: -22px;
  border: 1px solid rgba(37, 196, 129, 0.22);
  border-radius: 14px;
  opacity: 0;
  animation: pointSuccessRing 1.2s ease-out 0.12s both;
}

.point-success-dialog::after {
  top: 0;
  right: 34px;
  width: 86px;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: skewX(-18deg) translateX(-220px);
  animation: pointSuccessShine 1.05s ease-out 0.18s both;
}

.point-success-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #15bd79, #36d69b);
  box-shadow: 0 16px 32px rgba(20, 174, 112, 0.26);
  font-size: 32px;
  font-weight: 950;
  animation: pointSuccessCheck 0.55s cubic-bezier(0.19, 1, 0.22, 1) 0.08s both;
}

.point-success-mark::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(37, 196, 129, 0.3);
  border-radius: 50%;
  animation: pointSuccessPulse 1.25s ease-out 0.2s both;
}

.point-success-kicker {
  color: #15a66d;
  font-size: 13px;
  font-weight: 950;
}

.point-success-dialog h2 {
  margin: -6px 0 0;
  font-size: 26px;
  line-height: 1.18;
}

.point-success-dialog p {
  margin: 0;
  color: #778197;
  font-size: 14px;
  line-height: 1.7;
}

.point-success-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.point-success-grid div,
.point-success-order {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e8edf6;
  border-radius: 8px;
  background: #fbfcff;
}

.point-success-grid span,
.point-success-order span {
  display: block;
  color: #8b94a8;
  font-size: 12px;
  font-weight: 900;
}

.point-success-grid strong,
.point-success-order strong {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: #20263a;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-success-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 2px;
}

.point-success-actions .primary-btn,
.point-success-actions .secondary-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
}

@keyframes pointSuccessLayer {
  from {
    opacity: 0;
  }
}

@keyframes pointSuccessPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
}

@keyframes pointSuccessCheck {
  from {
    opacity: 0;
    transform: scale(0.62) rotate(-12deg);
  }
}

@keyframes pointSuccessPulse {
  0% {
    opacity: 0.9;
    transform: scale(0.78);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes pointSuccessRing {
  0% {
    opacity: 0.65;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes pointSuccessShine {
  100% {
    transform: skewX(-18deg) translateX(260px);
  }
}

@keyframes pointSuccessConfetti {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(0.6);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) rotate(190deg) scale(1);
  }
}

.user-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

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

.user-center-section-head h3 {
  margin: 0;
  color: #20263a;
  font-size: 16px;
}

.user-center-list {
  display: grid;
  gap: 8px;
}

.user-center-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  color: #3d465a;
  background: #fff;
  cursor: default;
  text-align: left;
}

button.user-center-row {
  cursor: pointer;
}

button.user-center-row:hover {
  border-color: #dcd8ff;
  background: #fbfaff;
}

.user-center-row span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.user-center-row strong,
.user-center-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-center-row small {
  color: #8c94a8;
  font-size: 12px;
}

.user-center-row em {
  flex: 0 0 auto;
  color: #7468f4;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.user-center-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #dfe4f1;
  border-radius: 8px;
  color: #98a0b3;
  background: #fbfcff;
  font-size: 13px;
}

.user-center-empty.loading {
  margin-top: 18px;
}

.qr {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  width: 150px;
  height: 150px;
  margin: 18px auto 14px;
  padding: 9px;
  background: #fff;
  border: 1px solid #e8ebf3;
}

.qr span {
  background: #151923;
}

.login-modal {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  width: min(1060px, calc(100% - 48px));
  min-height: 560px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

.login-modal .modal-close {
  top: 22px;
  right: 22px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  color: #8b909b;
  background: transparent;
  box-shadow: none;
  font-size: 44px;
  font-weight: 300;
}

.login-modal .modal-close:hover,
.login-modal .modal-close:focus-visible {
  color: #3d4351;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.login-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 44px 40px;
  color: #fff;
  background:
    linear-gradient(152deg, rgba(255, 103, 207, 0.92) 0%, rgba(191, 79, 246, 0.92) 56%, rgba(121, 91, 255, 0.9) 100%),
    #d86af3;
}

.login-visual::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(231, 76, 224, 0.08), rgba(159, 68, 238, 0.46));
  content: "";
}

.login-brand,
.login-slogan {
  position: relative;
  z-index: 3;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 900;
}

.login-brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(78, 31, 148, 0.2);
}

.login-slogan {
  display: grid;
  gap: 14px;
  margin-top: 66px;
}

.login-slogan strong {
  font-size: 38px;
  font-weight: 950;
  line-height: 1.18;
}

.login-slogan span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.login-showcase {
  position: absolute;
  left: 42px;
  right: -54px;
  bottom: -70px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  transform: rotate(-10deg);
  transform-origin: center;
}

.login-showcase-tile {
  display: block;
  min-height: 184px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 46px rgba(84, 24, 150, 0.28);
}

.login-showcase-tile.tile-1 {
  min-height: 236px;
}

.login-showcase-tile.tile-4 {
  transform: translateY(-38px);
}

.login-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  padding: 76px 66px 34px;
  text-align: center;
}

.login-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 4px 0 70px;
}

.login-panel-head h2 {
  margin: 0;
  color: #3b3f4a;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}

.wechat-icon {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 30px;
  flex: 0 0 auto;
}

.wechat-icon::before,
.wechat-icon i {
  position: absolute;
  border-radius: 50%;
  background: #18b875;
  content: "";
}

.wechat-icon::before {
  left: 0;
  top: 0;
  width: 28px;
  height: 24px;
}

.wechat-icon i {
  right: 0;
  bottom: 0;
  width: 24px;
  height: 20px;
}

.wechat-icon::after {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    10px 0 0 #fff,
    18px 11px 0 #fff,
    26px 11px 0 #fff;
  content: "";
}

.login-panel .modal-flow-hint {
  margin: -52px 0 28px;
}

.wechat-qr-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 330px;
  height: 330px;
  margin: 0 auto 24px;
  padding: 22px;
  border: 8px solid #dedede;
  border-radius: 14px;
  background: #fff;
}

.wechat-login-tag {
  position: absolute;
  top: -48px;
  right: -44px;
  z-index: 2;
  min-width: 258px;
  height: 52px;
  padding: 0 24px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(95deg, #f46dcc, #9851f3);
  box-shadow: 0 14px 30px rgba(172, 80, 229, 0.22);
  font-size: 20px;
  font-weight: 900;
  line-height: 52px;
  white-space: nowrap;
}

.wechat-login-tag::after {
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 0;
  height: 0;
  border-top: 12px solid #b454ef;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
  content: "";
  transform: translateX(-50%);
}

.wechat-qr-object,
.wechat-qr-placeholder {
  display: grid;
  place-items: center;
  width: 286px;
  height: 286px;
  margin: 0 auto;
  background: #fff;
  object-fit: contain;
}

.wechat-qr-placeholder {
  gap: 12px;
  color: #555d70;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.wechat-login-tip {
  margin: 0 0 12px;
  color: #3f4451;
  font-size: 17px;
  font-weight: 800;
}

.qr-refresh {
  min-width: 110px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e1e6f0;
  border-radius: 999px;
  color: #666e81;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.qr-refresh:hover,
.qr-refresh:focus-visible {
  border-color: #cfd6e8;
  color: #424a5f;
  outline: none;
}

.wechat-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 40%, #fff 0 13%, transparent 14%),
    radial-gradient(circle at 36% 46%, #fff 0 18%, transparent 19%),
    #18b875;
}

.login-errors {
  width: min(360px, 100%);
  margin-top: 8px;
}

.auth-error {
  margin: 8px 0 0;
  text-align: left;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  background: #20263a;
  box-shadow: var(--shadow);
}

.hidden-input {
  display: none;
}

@media (min-width: 1381px) {
  .viral-video-workbench {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(760px, 1fr) 344px;
    justify-content: stretch;
    margin: 0;
  }

  .viral-video-board {
    grid-template-columns: minmax(150px, 0.55fr) 36px minmax(280px, 1fr) 36px minmax(150px, 0.55fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .viral-remix-source,
  .viral-remix-reference,
  .viral-remix-output {
    grid-row: auto;
    grid-column: auto;
  }

  .viral-remix-arrow {
    display: block;
  }
}

@media (max-width: 1380px) {
  .viral-video-workbench {
    grid-template-columns: 326px minmax(0, 1fr);
  }

  .viral-video-stage {
    padding: 18px 20px;
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 16px;
    width: 100%;
    margin: 0;
  }

  .viral-video-preview-card {
    min-height: auto;
    padding: 0;
  }

  .viral-video-board {
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .viral-remix-reference {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .viral-remix-source {
    grid-column: 2;
    grid-row: 1;
  }

  .viral-remix-output {
    grid-column: 2;
    grid-row: 2;
  }

  .viral-remix-arrow {
    display: none;
  }

  .viral-remix-phone {
    width: min(132px, calc(100% - 22px));
  }

  .viral-video-source {
    min-height: 0;
  }

  .viral-video-motion-map {
    min-height: 0;
  }

  .viral-video-result-preview {
    width: 100%;
    max-height: 184px;
  }

  .viral-video-motion-visual {
    height: 112px;
    min-height: 112px;
    margin: 12px;
  }

  .viral-video-motion-visual::before {
    inset: 18px;
  }

  .viral-video-motion-visual::after {
    right: 24px;
    bottom: 20px;
    left: 24px;
  }

  .viral-video-motion-visual span {
    width: 40px;
    height: 56px;
    border-radius: 12px;
  }

  .viral-video-motion-visual span:nth-child(1) {
    top: 30px;
    left: 36px;
  }

  .viral-video-motion-visual span:nth-child(2) {
    top: 24px;
    left: calc(50% - 20px);
  }

  .viral-video-motion-visual span:nth-child(3) {
    top: 32px;
    right: 38px;
  }

  .viral-video-timeline {
    padding: 0 12px 12px;
  }

  .viral-video-timeline div {
    min-height: 66px;
    grid-template-columns: 1fr;
  }

  .viral-video-stage-head {
    margin-bottom: 14px;
  }

  .viral-video-stage-head h2 {
    margin-top: 8px;
    font-size: 22px;
  }

  .viral-video-panel {
    gap: 10px;
    padding: 16px 14px 12px;
  }

  .viral-control-group {
    padding: 12px 0 0;
  }

  .viral-upload-strip {
    min-height: 58px;
  }

  .viral-control-field textarea {
    height: 46px;
    min-height: 0;
  }

  .viral-control-textarea.is-compact textarea {
    height: 38px;
    min-height: 0;
  }

  .viral-video-side-stack {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .viral-video-result-card {
    position: relative;
    top: auto;
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .viral-video-workbench {
    grid-template-columns: 286px minmax(0, 1fr);
    height: calc(100vh - 68px);
    min-height: calc(100vh - 68px);
    overflow: hidden;
  }

  .viral-video-panel {
    display: flex;
    max-height: calc(100vh - 68px);
    padding: 14px 13px 10px;
    border-right: 1px solid #e3e8f0;
    border-bottom: 0;
    overflow-y: auto;
  }

  .viral-agent-top,
  .viral-agent-metrics,
  .viral-flow-rail,
  .viral-video-panel .viral-action-bar {
    grid-column: 1 / -1;
  }

  .viral-brief-group {
    grid-column: auto;
  }

  .viral-control-group {
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid #e2e8f1;
    border-radius: 0;
    background: transparent;
  }

  .viral-control-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .viral-control-heading em {
    display: none;
  }

  .viral-control-field {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .viral-upload-strip {
    min-height: 44px;
  }

  .viral-control-field textarea {
    height: 34px;
    min-height: 0;
  }

  .viral-control-textarea.is-compact textarea {
    height: 32px;
    min-height: 0;
  }

  .viral-video-panel .viral-action-bar {
    padding-top: 6px;
  }

  .viral-video-panel .commerce-reset-btn,
  .viral-video-panel .commerce-suite-submit {
    height: 34px;
  }

  .viral-video-stage {
    height: calc(100vh - 68px);
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    grid-auto-rows: max-content;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .viral-video-preview-card {
    min-height: min(560px, calc(100vh - 112px));
  }

  .viral-video-board {
    grid-template-columns: minmax(0, 1fr) 136px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: none;
  }

  .viral-remix-reference {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .viral-remix-source {
    grid-column: 2;
    grid-row: 1;
  }

  .viral-remix-output {
    grid-column: 2;
    grid-row: 2;
  }

  .viral-remix-arrow {
    display: none;
  }

  .viral-video-side-stack {
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: minmax(250px, 0.88fr) minmax(260px, 1fr);
    height: auto;
    min-height: 277px;
  }

  .viral-video-result-card {
    position: relative;
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .viral-video-motion-map,
  .viral-video-side-stack .commerce-record-strip {
    min-height: 0;
  }
}

@media (max-width: 1050px) {
  .topbar-inner {
    width: calc(100% - 28px);
  }

  .login-modal {
    grid-template-columns: 390px minmax(0, 1fr);
  }

  .login-panel {
    padding-right: 42px;
    padding-left: 42px;
  }

  .login-panel-head h2 {
    font-size: 25px;
  }

  .wechat-qr-card {
    width: 306px;
    height: 306px;
  }

  .wechat-qr-object,
  .wechat-qr-placeholder {
    width: 262px;
    height: 262px;
  }

  .brand {
    min-width: unset;
  }

  .brand-sub {
    display: none;
  }

  .nav {
    gap: 1px;
    padding: 3px;
  }

  .nav-link {
    padding: 0 11px;
  }

  .dropdown-imageEdit {
    width: 480px;
  }

  .dropdown-matting {
    width: 318px;
  }

  .dropdown-draw {
    width: 292px;
  }

  .actions {
    min-width: 112px;
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-tools {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-card {
    align-items: center;
  }

  .footer-links {
    max-width: none;
  }

  .legal-content {
    padding: 24px;
  }

  .tools-banner,
		  .tool-hero-grid,
		  .workspace,
		  .workspace.with-style-drawer,
		  .editor-layout,
		  .montage-page,
		  .commerce-workbench,
		  .viral-video-workbench {
			    grid-template-columns: 1fr;
			  }

  .watermark-editor-layout {
    grid-template-areas:
      "preview"
      "controls";
  }

  .watermark-preview-section {
    padding-bottom: 0;
    scroll-margin-top: 132px;
  }

  .watermark-preview-shell {
    width: 100%;
  }

	  .side-panel,
	  .style-drawer,
	  .montage-left,
	  .montage-right {
	    height: auto;
	    min-height: auto;
	    max-height: none;
	  }

	  .result-area {
	    height: auto;
	    min-height: min(560px, calc(100vh - 68px));
	  }

	  .id-photo-editor {
	    grid-template-columns: 1fr;
	  }

  .id-photo-workspace {
    grid-template-columns: 1fr;
  }

  .id-photo-panel {
    min-height: auto;
  }

  .id-photo-panel .color-dots {
    grid-template-columns: repeat(7, minmax(24px, 30px));
  }

  .style-drawer {
    max-height: none;
    border-right: 0;
    border-top: 1px solid #e7ebf3;
  }

		  .montage-page {
		    display: block;
        height: auto;
        min-height: 0;
        overflow: visible;
		  }

		  .commerce-control-panel,
		  .viral-video-panel,
		  .commerce-creation-center {
		    min-height: auto;
		    border-right: 0;
		    border-left: 0;
		  }

		  .commerce-preview-stage {
		    padding: 24px;
		  }

		  .viral-video-stage {
		    padding: 18px;
		  }

		  .viral-video-side-stack {
		    grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 1fr);
		  }

  .viral-video-workbench {
    grid-template-columns: 286px minmax(0, 1fr);
    height: calc(100vh - 68px);
    min-height: calc(100vh - 68px);
    overflow: hidden;
  }

  .viral-video-panel {
    display: flex;
    max-height: calc(100vh - 68px);
    border-right: 1px solid #e3e8f0;
    overflow-y: auto;
  }

  .viral-agent-top,
  .viral-agent-metrics,
  .viral-flow-rail,
  .viral-brief-group,
  .viral-video-panel .viral-action-bar {
    grid-column: auto;
  }

  .viral-video-stage {
    height: calc(100vh - 68px);
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    grid-auto-rows: max-content;
    height: 100%;
    width: 100%;
    margin: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .viral-video-preview-card {
    min-height: min(560px, calc(100vh - 112px));
  }

  .viral-video-board {
    grid-template-columns: minmax(0, 1fr) 136px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .viral-remix-reference {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .viral-remix-source {
    grid-column: 2;
    grid-row: 1;
  }

  .viral-remix-output {
    grid-column: 2;
    grid-row: 2;
  }

  .viral-remix-arrow {
    display: none;
  }

  .viral-video-side-stack {
    grid-template-rows: auto;
    grid-template-columns: minmax(250px, 0.88fr) minmax(260px, 1fr);
    height: auto;
    min-height: 277px;
  }

  .viral-video-result-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .viral-video-motion-map {
    min-height: 0;
  }

  .viral-video-side-stack .commerce-record-strip {
    min-height: 220px;
  }

	  .commerce-visual-preview {
	    grid-template-columns: minmax(260px, 1fr) 260px;
	  }

	  .commerce-module-grid {
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }

  .commerce-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
	}

@media (max-width: 760px) {
  .topbar {
    height: auto;
  }

	  .commerce-suite-upload,
	  .commerce-suite-grid,
	  .commerce-visual-preview,
	  .commerce-module-grid,
	  .commerce-result-grid {
	    grid-template-columns: 1fr;
	  }

  .commerce-suite-upload {
    min-height: 220px;
    padding: 24px;
  }

	  .commerce-field-head strong,
	  .commerce-suite-field span {
	    font-size: 14px;
	  }

	  .commerce-suite-field input,
	  .commerce-suite-field select,
	  .commerce-copy-field textarea {
	    font-size: 14px;
	  }

	  .commerce-suite-submit {
	    height: 48px;
	    font-size: 15px;
	  }

	  .commerce-preview-stage,
	  .commerce-control-panel,
	  .commerce-creation-center {
	    padding: 18px;
	  }

	  .commerce-stage-head {
	    align-items: flex-start;
	    flex-direction: column;
	  }

	  .commerce-visual-preview {
	    min-height: auto;
	  }

	  .commerce-main-art {
	    min-height: 280px;
	  }

  .commerce-library-modal {
    padding: 22px 16px;
  }

  .commerce-library-grid {
    grid-template-columns: 1fr;
  }

  .login-modal {
    display: block;
    width: min(390px, calc(100% - 24px));
    min-height: 0;
    overflow: visible;
  }

  .login-modal .modal-close {
    top: 12px;
    right: 12px;
    font-size: 38px;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    padding: 58px 22px 24px;
  }

  .login-panel-head {
    gap: 10px;
    margin: 0 34px 48px;
  }

  .login-panel-head h2 {
    font-size: 21px;
    line-height: 1.3;
  }

  .wechat-icon {
    width: 32px;
    height: 27px;
  }

  .wechat-qr-card {
    width: min(296px, 100%);
    height: auto;
    aspect-ratio: 1;
    margin-bottom: 18px;
    padding: 18px;
    border-width: 7px;
  }

  .wechat-login-tag {
    top: -40px;
    right: 50%;
    min-width: 226px;
    height: 44px;
    padding: 0 18px;
    font-size: 16px;
    line-height: 44px;
    transform: translateX(50%);
  }

  .wechat-qr-object,
  .wechat-qr-placeholder {
    width: 100%;
    height: 100%;
  }

  .wechat-login-tip {
    font-size: 15px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 14px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .dropdown,
  .dropdown-imageEdit,
  .dropdown-matting,
  .dropdown-draw {
    position: fixed;
    top: 128px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 148px);
    overflow: auto;
    transform: translateY(8px);
  }

  .dropdown-imageEdit {
    grid-template-columns: 1fr;
  }

  .nav-item.open .dropdown {
    transform: translateY(0);
  }

  .actions {
    min-width: unset;
  }

  .hero {
    min-height: auto;
    padding: 30px 0 36px;
  }

  .legal-page {
    padding: 26px 16px 54px;
  }

  .legal-hero {
    padding: 18px 0 20px;
  }

  .legal-hero h1 {
    font-size: 32px;
  }

  .legal-hero p {
    font-size: 15px;
  }

  .legal-meta {
    display: grid;
    gap: 8px;
  }

  .legal-content {
    padding: 18px;
  }

  .legal-section h2 {
    font-size: 16px;
  }

  .legal-section p {
    font-size: 14px;
  }

  .hero-content {
    width: calc(100% - 24px);
  }

  .hero-brand-lockup {
    gap: 10px;
  }

  .hero-logo {
    width: 46px;
    height: 46px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 15px;
    line-height: 1.55;
  }

  .hero-tools,
  .gallery-grid,
  .tools-grid,
  .steps,
  .feature-section,
  .plans,
  .member-body {
    grid-template-columns: 1fr;
  }

  .feature-panel,
  .feature-panel.is-even {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 22px;
    padding: 26px 0;
  }

  .feature-panel.is-even .feature-media {
    order: 0;
  }

  .feature-copy h3 {
    font-size: 22px;
  }

  .feature-copy p {
    font-size: 14px;
    line-height: 1.75;
  }

  .payment-method-row,
  .payment-status-card .payment-order-row {
    align-items: stretch;
    flex-direction: column;
  }

  .member-top {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 14px 58px 14px 18px;
  }

  .member-heading {
    min-width: 0;
  }

  .member-heading strong {
    font-size: 22px;
  }

  .member-heading p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    font-size: 12px;
  }

  .member-user {
    min-width: 172px;
  }

  .member-body {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .benefit-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .benefit {
    padding: 10px;
  }

  .benefit p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

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

  .plan {
    min-height: 92px;
    padding: 10px 8px;
  }

  .price {
    font-size: 22px;
  }

  .pay-box {
    margin-top: 12px;
    padding: 12px;
  }

  .payment-status-card {
    grid-template-columns: 114px minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .payment-qr-object,
  .payment-qr-placeholder {
    width: 106px;
    height: 106px;
  }

  .payment-order-panel {
    width: 100%;
    gap: 8px;
  }

  .payment-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-link {
    display: none;
  }

  .payment-channel-tabs,
  .payment-channel {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .payment-status-card .payment-order-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
  }

  .payment-status-card .payment-order-row strong {
    width: 100%;
    max-width: none;
    text-align: right;
  }

  .user-center-modal {
    padding: 18px;
  }

  .user-center-head {
    grid-template-columns: 48px minmax(0, 1fr);
    padding-right: 42px;
  }

  .user-avatar-large {
    width: 48px;
    height: 48px;
  }

  .user-center-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .user-center-actions .primary-btn,
  .user-center-actions .ghost-btn,
  .user-center-actions .secondary-btn {
    width: 100%;
  }

  .user-center-refresh {
    grid-column: 1 / -1;
    width: 100%;
  }

  .user-center-summary,
  .user-center-account,
  .user-center-grid {
    grid-template-columns: 1fr;
  }

  .recharge-center-modal {
    width: min(100% - 24px, 560px);
  }

  .recharge-hero,
  .recharge-layout,
  .recharge-input-card,
  .recharge-pay-row,
  .recharge-ledger-strip {
    grid-template-columns: 1fr;
  }

  .recharge-hero {
    gap: 14px;
    padding: 22px 58px 20px 18px;
  }

  .recharge-hero h2 {
    font-size: 24px;
  }

  .recharge-balance-card {
    padding: 12px;
  }

  .recharge-layout {
    padding: 14px 14px 0;
  }

  .recharge-purchase-card,
  .recharge-status-card {
    min-height: 0;
    padding: 14px;
  }

  .recharge-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .recharge-section-title span {
    text-align: left;
  }

  .recharge-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recharge-create-btn {
    width: 100%;
  }

  .recharge-records {
    margin: 14px 14px 0;
    padding: 14px;
  }

  .recharge-ledger-strip {
    margin: 14px;
  }

  .recharge-ledger-strip div {
    border-right: 0;
    border-bottom: 1px solid #edf0f7;
  }

  .recharge-ledger-strip div:last-child {
    border-bottom: 0;
  }

  .point-success-dialog {
    padding: 24px 18px 18px;
  }

  .point-success-grid,
  .point-success-actions {
    grid-template-columns: 1fr;
  }

  .point-recharge-form {
    grid-template-columns: 1fr;
  }

  .point-recharge-panel .payment-status-card {
    grid-template-columns: 1fr;
  }

  .user-center-row {
    align-items: flex-start;
    min-height: 58px;
  }

  .user-center-row em {
    max-width: 92px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
  }

  .footer {
    padding: 54px 18px 42px;
    border-radius: 42px 42px 0 0;
  }

  .footer-card {
    gap: 28px;
    padding: 0;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-brand-title {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .footer-brand-name {
    font-size: 28px;
  }

  .footer-copy {
    max-width: none;
    font-size: 14px;
  }

  .footer-links {
    justify-content: center;
    max-width: none;
    font-size: 13px;
  }

  .faq-item {
    min-height: 0;
    line-height: 1.5;
  }

  .faq-question {
    align-items: flex-start;
    min-height: 0;
    padding: 16px;
  }

  .faq-answer {
    padding: 0 16px 16px;
  }

  .hero-tools {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 10px;
  }

  .gallery-card,
  .gallery-card:nth-child(1),
  .gallery-card:nth-child(2),
  .gallery-card:nth-child(3),
  .gallery-card:nth-child(4),
  .gallery-card:nth-child(5),
  .gallery-card:nth-child(6),
  .gallery-card:nth-child(7),
  .gallery-card:nth-child(8),
  .gallery-card:nth-child(9),
  .gallery-card:nth-child(10) {
    grid-row: auto;
    aspect-ratio: 1;
    height: auto;
  }

  .quick-tool {
    min-height: 0;
  }

  .quick-info {
    padding: 34px 10px 10px;
  }

  .quick-title {
    font-size: 14px;
  }

  .quick-text {
    font-size: 11px;
  }

  .home-gallery {
    width: calc(100% - 24px);
    margin-top: 24px;
    margin-bottom: 48px;
  }

  .home-gallery-head {
    align-items: center;
  }

  .home-gallery h2 {
    font-size: 24px;
  }

  .home-gallery-more {
    margin-top: 34px;
  }

  .home-gallery-more .more-btn {
    width: min(320px, calc(100vw - 48px));
    height: 46px;
    padding: 0 18px;
    font-size: 13px;
  }

  .tools-banner {
    padding: 28px 24px;
  }

  .tools-banner h1,
  .tool-title-block h1 {
    font-size: 34px;
  }

  .tool-hero-grid {
    width: calc(100% - 24px);
  }

  .before-after,
  .upload-card {
    min-height: 260px;
  }

  .upload-card {
    padding: 28px 18px 24px;
  }

  .upload-icon {
    width: 78px;
    height: 62px;
    margin-bottom: 22px;
  }

  .upload-icon::before {
    left: 17px;
    bottom: 14px;
    width: 44px;
    height: 27px;
  }

  .upload-icon::after {
    right: -16px;
    top: -12px;
    width: 40px;
    height: 30px;
    background-size: 17px 17px;
  }

  .upload-title {
    font-size: 15px;
  }

  .upload-inner .upload-hint {
    max-width: 320px;
    font-size: 13px;
    line-height: 1.55;
  }

  .try-row {
    margin-top: 38px;
  }

  .result-area,
  .editor-canvas {
    padding: 18px 12px;
  }

  .watermark-preview-shell {
    gap: 10px;
  }

  .watermark-preview-head {
    padding: 12px;
  }

  .watermark-preview-head strong {
    font-size: 14px;
  }

  .watermark-checker {
    aspect-ratio: 1.08;
    border-radius: 14px;
  }

  .watermark-checker .preview-photo {
    inset: 28px;
  }

  .history-panel {
    right: 12px;
    width: min(280px, calc(100% - 24px));
  }

  .tool-generation-list {
    grid-template-columns: 1fr;
  }

  .image-task-compare {
    grid-template-columns: 1fr;
  }

  .inpaint-workspace {
    grid-template-columns: 1fr;
  }

  .image-task-pane,
  .inpaint-mask-stage {
    min-height: 260px;
  }

  .point-strip {
    grid-template-columns: 1fr;
  }

  .id-photo-actions {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .id-photo-outfit-options {
    grid-template-columns: 1fr;
  }

  .viral-video-workbench {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 68px);
    overflow: visible;
  }

  .viral-video-panel,
  .viral-video-stage,
  .viral-video-workbench .commerce-creation-center {
    width: 100%;
  }

  .viral-video-panel {
    max-height: none;
    border-right: 0;
    display: grid;
    grid-template-columns: 1fr;
  }

  .viral-agent-metrics,
  .viral-compact-grid {
    grid-template-columns: 1fr;
  }

  .viral-agent-metrics {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .viral-flow-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viral-upload-strip {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .viral-upload-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

	  .viral-video-stage {
	    height: auto;
	    padding: 14px;
	    overflow: visible;
	  }

	  .viral-video-studio-shell {
	    grid-template-columns: 1fr;
	    width: 100%;
	    height: auto;
	  }

	  .viral-video-preview-card {
	    min-height: 0;
	    padding: 16px;
	  }

	  .viral-video-stage-head {
	    flex-direction: column;
	  }

	  .viral-video-stage-head h2 {
	    font-size: 24px;
	  }

	  .viral-video-side-stack {
	    grid-template-rows: auto;
	    grid-template-columns: 1fr;
	    height: auto;
	  }

	  .viral-video-board {
	    grid-template-columns: 1fr;
	  }

	  .viral-video-source,
	  .viral-video-motion-map {
	    min-height: 260px;
	  }

	  .viral-video-source-media {
	    min-height: 280px;
	  }

	  .viral-video-motion-visual {
	    min-height: 190px;
	  }

	  .viral-video-motion-visual span {
	    width: 54px;
	    height: 78px;
	  }

	  .viral-video-timeline div {
	    grid-template-columns: 1fr;
	    gap: 4px;
	    padding: 12px;
	  }
	}

@media (max-width: 560px) {
  .member-body {
    grid-template-columns: 1fr;
  }

  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .member-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 58px 16px 18px;
  }

  .member-user {
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
  }

  .benefit-list,
  .plans {
    grid-template-columns: 1fr;
  }

  .payment-status-card {
    grid-template-columns: 1fr;
  }
}

/* Final layout authority for the viral-video remix workbench. */
.viral-video-workbench {
  display: block;
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%),
    #f3f6fa;
}

.viral-console-shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 252, 0.86)),
    #f8fafc;
  box-shadow: 0 22px 54px rgba(30, 41, 59, 0.12);
}

.viral-video-panel {
  gap: 9px;
  min-height: 0;
  max-height: none;
  padding: 16px 14px 12px;
  border-right: 1px solid #dfe7f0;
  background:
    linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(241, 246, 249, 0.92)),
    #f8fafc;
  box-shadow: none;
}

.viral-video-panel .panel-title {
  font-size: 24px;
}

.viral-agent-top strong {
  border-radius: 7px;
  color: #0f766e;
  background: #e8f7f3;
}

.viral-agent-metrics {
  gap: 10px;
  color: #687384;
}

.viral-flow-rail {
  padding-bottom: 5px;
}

.viral-control-group {
  gap: 8px;
  padding-top: 11px;
}

.viral-control-field input,
.viral-control-field select,
.viral-control-field textarea {
  border-color: #dfe6ef;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.viral-segment-control {
  border-color: #dfe6ef;
  background: #edf2f7;
}

.viral-segment-control button.active {
  color: #142033;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.viral-video-panel .commerce-suite-submit {
  background: linear-gradient(135deg, #111827, #174f55 58%, #10a37f);
  box-shadow: 0 13px 28px rgba(16, 163, 127, 0.22);
}

.viral-video-stage {
  height: 100%;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.viral-video-studio-shell {
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.viral-video-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
}

.viral-video-stage-head {
  align-items: center;
  margin-bottom: 10px;
  padding: 0 1px;
}

.viral-video-stage-head span {
  height: 22px;
  border: 0;
  border-radius: 7px;
  color: #0f766e;
  background: #e8f7f3;
  font-size: 11px;
}

.viral-video-stage-head h2 {
  margin-top: 5px;
  color: #121826;
  font-size: 24px;
}

.viral-video-stage-head p {
  max-width: 520px;
  margin: 5px 0 0;
  color: #647084;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.viral-video-stage-head .commerce-stage-pills span {
  height: 24px;
  border-color: #dfe6ef;
  color: #475569;
  background: #fff;
  box-shadow: none;
}

.viral-video-board.viral-director-board {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 136px minmax(220px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(20, 184, 166, 0.12), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #172033 100%);
  box-shadow: 0 18px 42px rgba(30, 41, 59, 0.12);
}

.viral-theater,
.viral-engine-bridge {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 14px;
}

.viral-theater {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.96)),
    #0f172a;
}

.viral-theater-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
  color: #cbd5e1;
}

.viral-theater-head span,
.viral-theater-head b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-theater-head b {
  flex: 0 0 auto;
  color: #5eead4;
  font-weight: 950;
}

.viral-theater-screen {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(79, 70, 229, 0.22), transparent 30%),
    linear-gradient(180deg, #111827, #060913);
}

.viral-theater-screen::before {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  content: "";
  pointer-events: none;
}

.viral-theater-screen::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.2), rgba(94, 234, 212, 0.86), rgba(251, 191, 36, 0.74));
  content: "";
  opacity: 0.72;
}

.viral-theater-screen video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viral-theater-screen em {
  position: absolute;
  right: 14px;
  bottom: 16px;
  z-index: 2;
  color: #5eead4;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.viral-theater-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 9px;
  border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.viral-theater-tags span {
  display: grid;
  place-items: center;
  min-height: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-engine-bridge {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 54px auto;
  gap: 10px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(229, 238, 242, 0.92)),
    #f8fafc;
}

.viral-engine-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
}

.viral-engine-card > span,
.viral-engine-card > strong {
  overflow: hidden;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-engine-card > strong {
  color: #0f766e;
}

.viral-engine-status {
  display: grid;
  gap: 7px;
  place-items: center;
  min-height: 0;
  padding: 12px 8px;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 26%, rgba(20, 184, 166, 0.16), transparent 42%),
    #fff;
}

.viral-engine-status b,
.viral-engine-status em {
  overflow: hidden;
  max-width: 100%;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-engine-status b {
  color: #142033;
  font-size: 14px;
  font-weight: 950;
}

.viral-engine-status em {
  color: #647084;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.viral-engine-status.is-ready {
  border-color: #bfe5dd;
  background:
    radial-gradient(circle at 50% 26%, rgba(20, 184, 166, 0.2), transparent 42%),
    #f4fbf9;
}

.viral-engine-flow {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  color: #0f766e;
}

.viral-engine-flow i {
  width: 2px;
  min-height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #14b8a6, transparent);
}

.viral-engine-flow b {
  display: grid;
  place-items: center;
  width: 62px;
  height: 28px;
  border: 1px solid #cce5df;
  border-radius: 999px;
  color: #0f766e;
  background: #e8f7f3;
  font-size: 11px;
  font-weight: 950;
}

.viral-engine-tags {
  display: grid;
  gap: 6px;
}

.viral-engine-tags span {
  display: grid;
  place-items: center;
  min-height: 24px;
  border: 1px solid #dce5ee;
  border-radius: 7px;
  color: #475569;
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 850;
}

.viral-monitor,
.viral-hero-monitor {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.viral-monitor {
  grid-template-rows: 36px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(236, 243, 247, 0.94)),
    #f3f7fa;
}

.viral-hero-monitor {
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-rows: 36px minmax(0, 1fr);
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.viral-monitor-source {
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid #e2e8f0;
}

.viral-monitor-output {
  grid-column: 2;
  grid-row: 2;
}

.viral-monitor-head,
.viral-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 36px;
  padding: 0 11px;
}

.viral-monitor-head {
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  color: #4b5565;
  background: rgba(255, 255, 255, 0.62);
}

.viral-canvas-toolbar {
  border-bottom: 1px solid #e5ebf3;
  color: #4b5565;
  background: rgba(255, 255, 255, 0.88);
}

.viral-monitor-head span,
.viral-canvas-toolbar span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-monitor-head b,
.viral-canvas-toolbar strong {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
}

.viral-canvas-toolbar strong {
  color: #0f766e;
}

.viral-monitor-screen {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(99, 102, 241, 0.2), transparent 30%),
    linear-gradient(180deg, #111827, #070b13);
}

.viral-monitor-body,
.viral-reference-body {
  display: grid;
  min-height: 0;
  padding: 12px;
}

.viral-monitor-body {
  grid-template-columns: minmax(0, 1fr) 126px;
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(15, 118, 110, 0.07), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(239, 246, 249, 0.66));
}

.viral-reference-body {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.viral-monitor-source .viral-monitor-screen,
.viral-monitor-output .viral-monitor-screen {
  align-self: stretch;
  justify-self: stretch;
  width: auto;
  min-height: 0;
  aspect-ratio: auto;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 12px;
  box-shadow:
    0 16px 28px rgba(15, 23, 42, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.viral-monitor-meta,
.viral-reference-meta {
  display: grid;
  gap: 6px;
}

.viral-monitor-meta span,
.viral-reference-meta span {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  color: #647084;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-monitor-source .viral-monitor-meta,
.viral-monitor-output .viral-monitor-meta {
  align-content: center;
}

.viral-monitor-meta span::before,
.viral-reference-meta span::before {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 999px;
  background: #14b8a6;
  content: "";
}

.viral-reference-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.viral-reference-meta span {
  justify-content: center;
}

.viral-reference-meta span::before {
  margin-right: 7px;
}

.viral-monitor-source .viral-monitor-screen::before,
.viral-monitor-output .viral-monitor-screen::before {
  inset: 10px;
  border-radius: 14px;
}

.viral-monitor-screen::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  content: "";
  pointer-events: none;
}

.viral-monitor-screen::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.2), rgba(94, 234, 212, 0.86), rgba(251, 191, 36, 0.74));
  content: "";
  opacity: 0.72;
}

.viral-monitor-screen video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viral-monitor-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  justify-items: center;
  max-width: 128px;
  color: #94a3b8;
  text-align: center;
}

.viral-monitor-placeholder strong {
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.viral-monitor-placeholder span {
  max-width: 100%;
  overflow: hidden;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-monitor-screen em {
  position: absolute;
  right: 12px;
  bottom: 16px;
  z-index: 2;
  color: #5eead4;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.viral-main-canvas {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 249, 0.94)),
    #f8fafc;
}

.viral-main-canvas img {
  position: absolute;
  inset: clamp(14px, 2.2vh, 24px);
  z-index: 1;
  width: calc(100% - clamp(28px, 4.4vh, 48px));
  height: calc(100% - clamp(28px, 4.4vh, 48px));
  object-fit: contain;
}

.viral-main-canvas > strong {
  position: relative;
  z-index: 1;
  color: #647084;
  font-size: 14px;
  font-weight: 900;
}

.viral-canvas-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.7;
}

.viral-canvas-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.viral-canvas-caption span,
.viral-canvas-caption strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-canvas-caption span {
  color: #99f6e4;
}

.viral-canvas-caption strong {
  color: #fff;
}

.viral-video-motion-map {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  grid-template-rows: 34px minmax(0, 1fr);
  min-height: 106px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
}

.viral-video-motion-head {
  grid-column: 2;
  grid-row: 1;
  min-height: 34px;
  padding: 0 12px;
}

.viral-video-motion-visual {
  grid-column: 1;
  grid-row: 1 / 3;
  height: auto;
  min-height: 0;
  margin: 10px;
  border-radius: 10px;
}

.viral-video-motion-visual::before {
  inset: 16px;
}

.viral-video-motion-visual span {
  width: 34px;
  height: 48px;
}

.viral-video-motion-visual span:nth-child(1) {
  top: 32px;
  left: 28px;
}

.viral-video-motion-visual span:nth-child(2) {
  top: 25px;
  left: calc(50% - 17px);
}

.viral-video-motion-visual span:nth-child(3) {
  top: 34px;
  right: 30px;
}

.viral-video-timeline {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px 10px 0;
}

.viral-video-timeline div {
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 9px;
}

.viral-video-timeline b,
.viral-video-timeline strong,
.viral-video-timeline em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-video-side-stack {
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 1fr;
  height: 100%;
  min-height: 0;
}

.viral-delivery-card {
  gap: 10px;
  padding: 14px;
  border-color: #dfe6ef;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 252, 0.94)),
    #fff;
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.055);
}

.viral-delivery-head {
  padding-bottom: 10px;
}

.viral-delivery-head strong {
  font-size: 20px;
}

.viral-delivery-head em {
  border-radius: 7px;
  color: #0f766e;
  background: #e8f7f3;
}

.viral-delivery-metrics {
  gap: 7px;
}

.viral-delivery-metrics div {
  min-height: 52px;
  border-radius: 9px;
  background: #fff;
}

.viral-delivery-actions .commerce-result-download:disabled,
.viral-delivery-actions .commerce-copy-link:disabled {
  border-color: #e3e8f0;
  color: #9aa5b5;
  background: #edf2f7;
  box-shadow: none;
  opacity: 1;
}

.viral-video-side-stack .commerce-record-strip {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 0;
}

.viral-video-side-stack .commerce-record-head {
  margin-bottom: 8px;
}

.viral-video-side-stack .commerce-record-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.viral-video-side-stack .commerce-creation-empty {
  gap: 10px;
  min-height: 0;
  height: 100%;
  border: 1px dashed #cfd8e6;
  border-radius: 14px;
  color: #7b8799;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(248, 251, 252, 0.88)),
    #fff;
  font-size: 13px;
  font-weight: 850;
}

.viral-video-side-stack .commerce-creation-empty::before {
  display: block;
  width: 46px;
  height: 34px;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(15, 23, 42, 0.08) 16% 18%, transparent 18% 38%, rgba(15, 23, 42, 0.08) 38% 40%, transparent 40% 60%, rgba(15, 23, 42, 0.08) 60% 62%, transparent 62% 82%, rgba(15, 23, 42, 0.08) 82% 84%, transparent 84%),
    linear-gradient(135deg, #f8fafc, #eef4f8);
  content: "";
}

@media (min-width: 1600px) {
  .viral-console-shell {
    grid-template-columns: 318px minmax(0, 1fr);
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: minmax(164px, 0.54fr) minmax(420px, 1.45fr) minmax(164px, 0.54fr);
    gap: 14px;
    padding: 14px;
  }
}

@media (max-width: 1180px) {
  .viral-video-workbench {
    height: calc(100vh - 68px);
    min-height: calc(100vh - 68px);
    padding: 10px;
    overflow: hidden;
  }

  .viral-console-shell {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .viral-video-panel {
    display: flex;
    max-height: none;
    border-right: 1px solid #e3e8f0;
    border-bottom: 0;
    overflow-y: auto;
  }

  .viral-video-stage {
    height: 100%;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
  }

  .viral-video-studio-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
    height: 100%;
    overflow-y: auto;
  }

  .viral-video-preview-card {
    min-height: min(590px, calc(100vh - 130px));
  }

  .viral-video-stage-head {
    margin-bottom: 8px;
  }

  .viral-video-stage-head h2 {
    font-size: 22px;
  }

  .viral-video-stage-head p {
    display: none;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .viral-theater {
    grid-template-rows: 32px minmax(0, 1fr);
  }

  .viral-theater-tags,
  .viral-engine-tags {
    display: none;
  }

  .viral-theater-head {
    min-height: 32px;
    padding: 0 9px;
  }

  .viral-theater-head span,
  .viral-theater-head b {
    font-size: 11px;
  }

  .viral-engine-bridge {
    grid-template-rows: minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 8px;
  }

  .viral-engine-card {
    gap: 6px;
  }

  .viral-engine-card > span {
    display: none;
  }

  .viral-engine-flow b {
    width: 54px;
    height: 25px;
  }

  .viral-engine-thumb img {
    object-fit: contain;
  }

  .viral-video-motion-map {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 96px;
  }

  .viral-video-motion-visual span {
    width: 30px;
    height: 42px;
  }

  .viral-video-timeline div {
    min-height: 44px;
    padding: 7px 8px;
  }

  .viral-video-side-stack {
    grid-template-columns: minmax(230px, 0.9fr) minmax(240px, 1fr);
    grid-template-rows: auto;
    min-height: 238px;
    height: auto;
  }
}

@media (max-width: 760px) {
  .viral-video-workbench {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 68px);
    overflow: visible;
  }

  .viral-video-panel {
    display: grid;
    grid-template-columns: 1fr;
    max-height: none;
    border-right: 0;
  }

  .viral-video-stage {
    height: auto;
    overflow: visible;
  }

  .viral-video-studio-shell {
    height: auto;
    overflow: visible;
  }

  .viral-video-preview-card {
    min-height: 0;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .viral-monitor,
  .viral-hero-monitor {
    grid-column: auto;
    grid-row: auto;
    min-height: 240px;
  }

  .viral-hero-monitor {
    min-height: 340px;
  }

  .viral-video-motion-map,
  .viral-video-side-stack {
    grid-template-columns: 1fr;
    height: auto;
  }

  .viral-video-motion-map {
    grid-template-rows: auto auto auto;
  }

  .viral-video-motion-head,
  .viral-video-motion-visual,
  .viral-video-timeline {
    grid-column: 1;
    grid-row: auto;
  }

  .viral-video-motion-visual {
    min-height: 160px;
  }

  .viral-video-timeline {
    grid-template-columns: 1fr;
    padding: 0 10px 10px;
  }
}

/* Final front-end design pass: stage-first control console. */
.viral-video-workbench {
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8fafc 0%, #edf3f7 100%),
    #f4f7fb;
}

.viral-console-shell {
  display: grid;
  grid-template-areas:
    "stage"
    "controls";
  grid-template-columns: 1fr;
  grid-template-rows: minmax(420px, 1fr) 236px;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d9e2ee;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 18px 46px rgba(30, 41, 59, 0.1);
}

.viral-video-stage {
  grid-area: stage;
  height: 100%;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border-bottom: 1px solid #dfe7f0;
}

.viral-video-studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.viral-video-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 92px auto;
  min-height: 0;
}

.viral-video-stage-head {
  min-height: 46px;
  margin-bottom: 10px;
}

.viral-video-stage-head h2 {
  font-size: 22px;
}

.viral-video-stage-head p {
  max-width: 680px;
  font-size: 12px;
}

.viral-video-board.viral-director-board {
  grid-template-columns: minmax(260px, 1fr) 118px minmax(260px, 1fr);
  gap: 12px;
  padding: 12px;
  min-height: 0;
}

.viral-theater {
  grid-template-rows: 36px minmax(0, 1fr) 38px;
}

.viral-engine-bridge {
  grid-template-rows: minmax(0, 1fr) 48px auto;
  gap: 8px;
  padding: 9px;
}

.viral-video-motion-map {
  grid-template-columns: 142px minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 78px;
  margin-top: 10px;
  overflow: hidden;
}

.viral-video-motion-head {
  grid-column: 1;
  grid-row: 1;
  align-content: center;
  padding: 12px;
}

.viral-video-motion-visual {
  display: none;
}

.viral-video-timeline {
  grid-column: 2;
  grid-row: 1;
  gap: 8px;
  padding: 10px 10px 10px 0;
}

.viral-video-timeline div {
  min-height: 54px;
}

.viral-video-side-stack {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.viral-delivery-card {
  padding: 13px;
}

.viral-delivery-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viral-delivery-metrics div {
  min-height: 48px;
}

.viral-video-panel {
  grid-area: controls;
  display: grid;
  grid-template-columns: 170px 218px minmax(420px, 1.2fr) minmax(320px, 0.95fr) 176px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px 14px;
  overflow: hidden;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 251, 0.96)),
    #f8fafc;
  box-shadow: none;
}

.viral-agent-top {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.viral-video-panel .panel-title {
  font-size: 21px;
}

.viral-agent-metrics {
  grid-column: 1;
  grid-row: 2;
  align-content: start;
  gap: 8px;
}

.viral-flow-rail {
  grid-column: 2 / 5;
  grid-row: 1;
  align-self: center;
  padding: 0;
}

.viral-video-panel .viral-control-group {
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.viral-video-panel .viral-control-group:nth-of-type(1) {
  grid-column: 2;
  grid-row: 2;
}

.viral-video-panel .viral-control-group:nth-of-type(2) {
  grid-column: 3;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: start;
}

.viral-video-panel .viral-control-group:nth-of-type(2) .viral-control-heading,
.viral-video-panel .viral-control-group:nth-of-type(2) .viral-control-url,
.viral-video-panel .viral-control-group:nth-of-type(2) .viral-video-duration-note,
.viral-video-panel .viral-control-group:nth-of-type(2) .viral-voice-control {
  grid-column: 1 / -1;
}

.viral-video-panel .viral-control-group:nth-of-type(3) {
  grid-column: 4;
  grid-row: 2;
}

.viral-video-panel .viral-action-bar {
  grid-column: 5;
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.viral-video-panel .commerce-reset-btn,
.viral-video-panel .commerce-suite-submit {
  width: 100%;
  min-width: 0;
}

.viral-upload-strip {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 46px;
}

.viral-upload-actions {
  grid-column: 1 / -1;
  flex-direction: row;
}

.viral-upload-actions button {
  flex: 1;
}

.viral-compact-grid {
  gap: 8px;
}

.viral-control-field,
.viral-setting-row {
  grid-template-columns: 62px minmax(0, 1fr);
}

.viral-control-field input,
.viral-control-field select {
  height: 30px;
}

.viral-control-field textarea {
  height: 42px;
}

.viral-control-textarea.is-compact textarea {
  height: 38px;
}

.viral-voice-control {
  padding: 8px;
  gap: 7px;
}

.viral-voice-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.viral-voice-options button {
  min-height: 38px;
  padding: 6px 7px;
}

.viral-voice-options span {
  display: none;
}

.viral-voice-preset {
  grid-template-columns: 62px minmax(0, 1fr);
}

@media (max-width: 1280px) {
  .viral-console-shell {
    grid-template-rows: minmax(400px, 1fr) 250px;
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 10px;
  }

  .viral-video-panel {
    grid-template-columns: 154px 198px minmax(350px, 1.15fr) minmax(270px, 0.95fr) 154px;
    gap: 8px;
    padding: 10px;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: minmax(220px, 1fr) 102px minmax(220px, 1fr);
    gap: 8px;
    padding: 8px;
  }
}

@media (max-width: 1080px) {
  .viral-video-workbench {
    height: auto;
    min-height: calc(100vh - 68px);
    overflow: visible;
  }

  .viral-console-shell {
    grid-template-rows: auto auto;
    height: auto;
    overflow: visible;
  }

  .viral-video-stage {
    height: auto;
    min-height: 560px;
    overflow: visible;
  }

  .viral-video-studio-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .viral-video-preview-card {
    min-height: 560px;
  }

  .viral-video-side-stack {
    grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1fr);
    grid-template-rows: auto;
    height: auto;
  }

  .viral-video-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    height: auto;
    align-items: start;
    overflow: visible;
  }

  .viral-video-panel .viral-control-group {
    align-self: start;
  }

  .viral-agent-top,
  .viral-agent-metrics,
  .viral-flow-rail,
  .viral-video-panel .viral-control-group:nth-of-type(1),
  .viral-video-panel .viral-control-group:nth-of-type(2),
  .viral-video-panel .viral-control-group:nth-of-type(3),
  .viral-video-panel .viral-action-bar {
    grid-column: auto;
    grid-row: auto;
  }

  .viral-agent-top {
    grid-column: 1;
    grid-row: 1;
  }

  .viral-agent-metrics {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .viral-flow-rail {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .viral-video-panel .viral-control-group:nth-of-type(1) {
    grid-column: 1;
    grid-row: 3;
  }

  .viral-video-panel .viral-control-group:nth-of-type(2) {
    grid-column: 2;
    grid-row: 3 / span 2;
  }

  .viral-video-panel .viral-control-group:nth-of-type(3) {
    grid-column: 1;
    grid-row: 4;
  }

  .viral-video-panel .viral-action-bar {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .viral-agent-metrics,
  .viral-flow-rail {
    justify-content: flex-start;
  }

  .viral-video-panel .viral-action-bar {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  }
}

@media (max-width: 720px) {
  .viral-video-workbench {
    padding: 8px;
  }

  .viral-video-stage {
    min-height: 0;
    padding: 10px;
  }

  .viral-video-preview-card {
    min-height: 0;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: 1fr;
  }

  .viral-engine-bridge {
    min-height: 150px;
  }

  .viral-video-motion-map,
  .viral-video-side-stack,
  .viral-video-panel {
    grid-template-columns: 1fr;
  }

  .viral-video-panel .viral-action-bar {
    grid-template-columns: 1fr;
  }

  .viral-voice-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Corrected final pass: single-screen integrated console. */
.viral-video-workbench {
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  padding: 12px;
  overflow: hidden;
  background: #f4f7fb;
}

.viral-console-shell {
  display: grid;
  grid-template-areas: "controls stage";
  grid-template-columns: 258px minmax(0, 1fr);
  grid-template-rows: 1fr;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 18px 42px rgba(30, 41, 59, 0.1);
}

.viral-video-panel {
  grid-area: controls;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto auto auto auto minmax(0, auto);
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 12px 10px 10px;
  overflow-y: auto;
  border-right: 1px solid #e0e7f0;
  background:
    linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(242, 247, 250, 0.96)),
    #f8fafc;
}

.viral-agent-top,
.viral-agent-metrics,
.viral-flow-rail,
.viral-video-panel .viral-control-group:nth-of-type(1),
.viral-video-panel .viral-control-group:nth-of-type(2),
.viral-video-panel .viral-control-group:nth-of-type(3),
.viral-video-panel .viral-action-bar {
  grid-column: 1;
  grid-row: auto;
}

.viral-video-panel .panel-title {
  font-size: 20px;
}

.viral-agent-metrics {
  gap: 8px;
}

.viral-flow-rail {
  justify-content: flex-start;
  padding-bottom: 2px;
}

.viral-video-panel .viral-control-group {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow: visible;
  border: 1px solid #e2e8f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.viral-video-panel .viral-control-group:nth-of-type(1),
.viral-video-panel .viral-control-group:nth-of-type(2),
.viral-video-panel .viral-control-group:nth-of-type(3) {
  grid-template-columns: 1fr;
  align-content: start;
}

.viral-upload-strip {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 5px;
}

.viral-upload-actions {
  grid-column: auto;
  flex-direction: column;
}

.viral-upload-actions button {
  flex: 0 0 auto;
}

.viral-control-field,
.viral-setting-row {
  grid-template-columns: 1fr;
  gap: 4px;
}

.viral-control-field input,
.viral-control-field select {
  height: 28px;
}

.viral-control-field textarea {
  height: 38px;
}

.viral-control-textarea.is-compact textarea {
  height: 34px;
}

.viral-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.viral-compact-grid .viral-control-field {
  grid-template-columns: 1fr;
}

.viral-voice-control {
  gap: 6px;
  padding: 7px;
}

.viral-voice-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.viral-voice-options button {
  min-height: 30px;
  padding: 5px 4px;
  text-align: center;
}

.viral-voice-options span {
  display: none;
}

.viral-voice-note {
  line-height: 1.35;
}

.viral-video-panel .viral-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 8px;
  padding-top: 8px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.98) 34%),
    #f8fafc;
}

.viral-video-panel .commerce-reset-btn,
.viral-video-panel .commerce-suite-submit {
  width: 100%;
  min-width: 0;
}

.viral-video-stage {
  grid-area: stage;
  height: 100%;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border-bottom: 0;
}

.viral-video-studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  grid-template-rows: 1fr;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.viral-video-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 78px auto;
  height: 100%;
  min-height: 0;
}

.viral-video-stage-head {
  min-height: 42px;
  margin-bottom: 8px;
}

.viral-video-stage-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.viral-video-stage-head p {
  display: none;
}

.viral-video-stage-head .commerce-stage-pills {
  gap: 7px;
}

.viral-video-stage-head .commerce-stage-pills span {
  height: 23px;
}

.viral-video-board.viral-director-board {
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  padding: 8px;
}

.viral-theater {
  grid-template-rows: 32px minmax(0, 1fr);
}

.viral-theater-tags,
.viral-engine-tags {
  display: none;
}

.viral-theater-head {
  min-height: 32px;
  padding: 0 9px;
}

.viral-theater-screen::before {
  inset: 12px;
}

.viral-engine-bridge {
  grid-template-rows: minmax(0, 1fr) 34px;
  gap: 7px;
  padding: 7px;
}

.viral-engine-card > span {
  display: none;
}

.viral-engine-card > strong {
  display: none;
}

.viral-engine-flow b {
  width: 48px;
  height: 25px;
}

.viral-mixer-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 247, 0.9)),
    #f8fafc;
}

.viral-mixer-head {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: center;
}

.viral-mixer-head span {
  color: #66758a;
  font-size: 10px;
  font-weight: 900;
}

.viral-mixer-head strong {
  overflow: hidden;
  color: #0f766e;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-mixer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.viral-mixer-options button {
  height: 28px;
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  color: #526176;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.viral-mixer-options button.active {
  border-color: #9bd9cc;
  color: #0f766e;
  background: #e8f7f3;
}

.viral-mixer-select {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  color: #263244;
  background: #fff;
  font-size: 11px;
  font-weight: 850;
  outline: none;
}

.viral-mixer-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 5px;
  height: 42px;
  padding: 7px 8px;
  border: 1px solid #dfe7f0;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 247, 243, 0.72)),
    #fff;
}

.viral-mixer-bars i {
  display: block;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #14b8a6, #64748b);
  opacity: 0.88;
}

.viral-mixer-bars i:nth-child(1) {
  height: 18px;
}

.viral-mixer-bars i:nth-child(2) {
  height: 28px;
}

.viral-mixer-bars i:nth-child(3) {
  height: 22px;
}

.viral-mixer-bars i:nth-child(4) {
  height: 34px;
}

.viral-mixer-panel em {
  overflow: hidden;
  color: #7b8798;
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.35;
  text-align: center;
}

.viral-video-motion-map {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  min-height: 68px;
  margin-top: 8px;
}

.viral-video-motion-head {
  display: none;
}

.viral-video-motion-head span,
.viral-video-motion-head b {
  white-space: normal;
}

.viral-video-motion-visual {
  display: none;
}

.viral-video-timeline {
  grid-column: 1;
  grid-row: 1;
  gap: 6px;
  padding: 8px;
}

.viral-video-timeline div {
  min-height: 48px;
  padding: 7px 8px;
}

.viral-video-side-stack {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.viral-delivery-card {
  gap: 8px;
  min-height: 0;
  padding: 10px;
}

.viral-delivery-head {
  padding-bottom: 8px;
}

.viral-delivery-head strong {
  font-size: 18px;
}

.viral-delivery-metrics {
  grid-template-columns: 1fr;
  gap: 7px;
}

.viral-delivery-metrics div {
  min-height: 38px;
}

.viral-delivery-actions {
  gap: 8px;
}

.viral-video-side-stack .commerce-record-strip {
  min-height: 0;
}

.viral-video-side-stack .commerce-record-list {
  min-height: 0;
  overflow-y: auto;
}

@media (min-width: 1320px) {
  .viral-console-shell {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr) 292px;
    grid-template-rows: 1fr;
  }

  .viral-video-side-stack {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
  }
}

@media (max-width: 760px) {
  .viral-video-workbench {
    height: auto;
    overflow: visible;
  }

  .viral-console-shell {
    grid-template-areas:
      "stage"
      "controls";
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .viral-video-panel,
  .viral-video-stage,
  .viral-video-studio-shell,
  .viral-video-preview-card {
    height: auto;
    overflow: visible;
  }

  .viral-video-board.viral-director-board,
  .viral-video-side-stack {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Mixer space tuning. */
.viral-video-board.viral-director-board {
  grid-template-columns: minmax(0, 0.92fr) 156px minmax(0, 0.92fr);
}

.viral-mixer-panel {
  padding: 10px;
}

.viral-mixer-head strong {
  font-size: 14px;
}

.viral-mixer-options {
  gap: 6px;
}

.viral-mixer-options button {
  height: 30px;
  font-size: 12px;
}

.viral-mixer-bars {
  height: 54px;
  padding: 8px 12px;
}

@media (max-width: 1180px) {
  .viral-video-studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 174px;
  }

  .viral-video-side-stack {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    grid-template-rows: 1fr;
    height: 174px;
  }

  .viral-delivery-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viral-video-panel {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .viral-agent-top,
  .viral-agent-metrics,
  .viral-flow-rail,
  .viral-video-panel .viral-control-group:nth-of-type(1),
  .viral-video-panel .viral-control-group:nth-of-type(2),
  .viral-video-panel .viral-control-group:nth-of-type(3),
  .viral-video-panel .viral-action-bar {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Production visual reset: integrated dark control room. */
.viral-video-workbench {
  padding: 10px;
  background:
    linear-gradient(180deg, #f3f6fa 0%, #e9eef5 100%),
    #edf2f7;
}

.viral-console-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid #cfd9e6;
  border-radius: 14px;
  background: #0f172a;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.viral-video-panel {
  padding: 14px 12px 12px;
  border-right: 1px solid #d7e0ec;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 250, 0.98)),
    #f8fafc;
}

.viral-agent-top {
  min-height: 38px;
}

.viral-video-panel .panel-title {
  font-size: 23px;
  letter-spacing: 0;
}

.viral-agent-metrics {
  padding: 2px 0 4px;
}

.viral-video-panel .viral-control-group {
  gap: 7px;
  padding: 10px;
  border-color: #dfe7f1;
  border-radius: 10px;
  background: #fff;
}

.viral-upload-strip {
  border-radius: 9px;
  background: #f8fafc;
}

.viral-video-panel .viral-action-bar {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.98) 28%),
    #f8fafc;
}

.viral-video-stage {
  padding: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(20, 184, 166, 0.1), transparent 32%),
    linear-gradient(180deg, #111827, #0b1120);
}

.viral-video-studio-shell {
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 12px;
}

.viral-video-stage-head {
  min-height: 44px;
  margin-bottom: 10px;
}

.viral-video-stage-head span {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.14);
}

.viral-video-stage-head h2 {
  color: #f8fafc;
}

.viral-video-stage-head .commerce-stage-pills span {
  border-color: rgba(148, 163, 184, 0.2);
  color: #dbe6f3;
  background: rgba(15, 23, 42, 0.72);
}

.viral-video-board.viral-director-board {
  grid-template-columns: minmax(0, 0.9fr) 170px minmax(0, 0.9fr);
  gap: 10px;
  padding: 10px;
  border-color: rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.94)),
    #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.viral-theater,
.viral-engine-bridge {
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 12px;
}

.viral-theater {
  background: #0b1120;
}

.viral-theater-head {
  background: rgba(15, 23, 42, 0.82);
}

.viral-theater-screen {
  background:
    radial-gradient(circle at 50% 44%, rgba(99, 102, 241, 0.2), transparent 34%),
    linear-gradient(180deg, #111827, #030712);
}

.viral-engine-bridge {
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(226, 240, 241, 0.98), rgba(213, 231, 232, 0.96)),
    #e8f1f2;
}

.viral-mixer-panel {
  padding: 11px;
  border-color: #cbdde2;
  background:
    linear-gradient(180deg, #ffffff, #eef8f5),
    #f8fafc;
}

.viral-mixer-head span {
  color: #64748b;
}

.viral-mixer-head strong {
  font-size: 15px;
}

.viral-mixer-options button {
  height: 32px;
  border-radius: 8px;
}

.viral-mixer-bars {
  height: 62px;
}

.viral-engine-flow b {
  color: #0f766e;
  background: #ecfdf5;
}

.viral-video-motion-map {
  min-height: 70px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.84);
}

.viral-video-timeline div {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.viral-video-timeline b {
  color: #5eead4;
}

.viral-video-timeline strong {
  color: #f8fafc;
}

.viral-video-timeline em {
  color: #9ca3af;
}

.viral-delivery-card,
.viral-video-side-stack .commerce-record-strip {
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: #f8fafc;
}

.viral-delivery-card {
  padding: 12px;
}

.viral-video-side-stack .commerce-record-strip {
  padding: 12px;
}

@media (min-width: 1320px) {
  .viral-video-studio-shell {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 1180px) {
  .viral-console-shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .viral-video-stage {
    padding: 10px;
  }

  .viral-video-studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 168px;
  }

  .viral-video-board.viral-director-board {
    grid-template-columns: minmax(0, 0.9fr) 150px minmax(0, 0.9fr);
  }

  .viral-video-side-stack {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    grid-template-rows: 1fr;
    height: 168px;
  }
}

/* Product simplification: video comparison first, mixer as floating control. */
.viral-video-board.viral-director-board {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.viral-theater-source {
  grid-column: 1;
}

.viral-theater-output {
  grid-column: 2;
}

.viral-engine-bridge {
  position: absolute;
  top: 46px;
  left: 50%;
  z-index: 5;
  display: block;
  width: min(360px, calc(100% - 48px));
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: translateX(-50%);
}

.viral-engine-flow,
.viral-engine-tags {
  display: none;
}

.viral-mixer-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(203, 221, 226, 0.92);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow:
    0 18px 38px rgba(2, 6, 23, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

.viral-mixer-head {
  min-width: 68px;
  text-align: left;
}

.viral-mixer-head span {
  display: block;
  font-size: 10px;
}

.viral-mixer-head strong {
  display: block;
  max-width: 76px;
  font-size: 13px;
}

.viral-mixer-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.viral-mixer-options button {
  height: 30px;
  border-radius: 8px;
  font-size: 11px;
}

.viral-mixer-bars {
  height: 36px;
  padding: 5px 6px;
}

.viral-mixer-panel em,
.viral-mixer-select {
  grid-column: 1 / -1;
}

.viral-mixer-select {
  height: 28px;
}

.viral-theater-screen {
  padding-top: 34px;
}

@media (max-width: 1180px) {
  .viral-video-board.viral-director-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .viral-engine-bridge {
    width: min(320px, calc(100% - 36px));
  }

  .viral-mixer-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .viral-mixer-bars {
    display: none;
  }
}

.viral-video-panel .viral-control-field,
.viral-video-panel .viral-setting-row {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
}

.viral-video-panel .viral-control-field span,
.viral-video-panel .viral-setting-row > span {
  font-size: 10px;
  line-height: 1.2;
}

.viral-video-panel .viral-compact-grid .viral-control-field {
  grid-template-columns: 42px minmax(0, 1fr);
}

.viral-video-panel .viral-segment-control {
  min-height: 28px;
}

.viral-video-panel .viral-segment-control button {
  height: 21px;
  font-size: 11px;
}

/* Final product pass: true left-center-right video console. */
.viral-video-workbench {
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  padding: 10px;
  overflow: hidden;
  background: #edf3f8;
}

.viral-console-shell {
  display: grid;
  grid-template-areas: "controls stage delivery";
  grid-template-columns: clamp(236px, 23vw, 288px) minmax(340px, 1fr) clamp(168px, 18vw, 232px);
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 18px 40px rgba(24, 39, 75, 0.12);
}

.viral-video-panel {
  grid-area: controls;
  height: 100%;
  min-height: 0;
  padding: 12px 10px;
  overflow-y: auto;
  border-right: 1px solid #dfe7f1;
  background: #fbfdff;
}

.viral-video-panel .panel-title {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
}

.viral-agent-top {
  min-height: 36px;
}

.viral-agent-top span,
.viral-flow-rail span,
.viral-control-heading span,
.viral-control-heading em,
.viral-video-panel .viral-control-field span,
.viral-video-panel .viral-setting-row > span {
  letter-spacing: 0;
}

.viral-video-panel .viral-control-group {
  gap: 7px;
  padding: 9px;
  border-color: #e1e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.viral-upload-strip {
  min-height: 46px;
  border-radius: 8px;
  background: #f7fafc;
}

.viral-upload-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.viral-upload-actions button {
  min-height: 24px;
  border-radius: 6px;
  font-size: 11px;
}

.viral-video-panel .viral-control-field,
.viral-video-panel .viral-setting-row {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 6px;
}

.viral-video-panel .viral-control-field input,
.viral-video-panel .viral-control-field select {
  height: 30px;
  border-radius: 7px;
}

.viral-video-panel .viral-control-field textarea {
  height: 46px;
  border-radius: 7px;
}

.viral-video-panel .viral-control-textarea.is-compact textarea {
  height: 38px;
}

.viral-video-panel .viral-segment-control {
  min-height: 30px;
  border-radius: 8px;
}

.viral-video-panel .viral-segment-control button {
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
}

.viral-video-panel .viral-action-bar {
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: 8px;
  padding-top: 8px;
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 0), rgba(251, 253, 255, 0.98) 34%),
    #fbfdff;
}

.viral-video-panel .commerce-reset-btn,
.viral-video-panel .commerce-suite-submit {
  min-height: 38px;
  border-radius: 8px;
}

.viral-video-stage {
  grid-area: stage;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border-right: 1px solid #dfe7f1;
  background:
    linear-gradient(180deg, #f3f7fb, #edf3f7),
    #f2f6fb;
}

.viral-video-studio-shell {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.viral-video-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.viral-video-stage-head {
  min-height: 42px;
  margin: 0;
}

.viral-video-stage-head h2 {
  margin-top: 2px;
  color: #111827;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0;
}

.viral-video-stage-head p {
  display: none;
}

.viral-video-stage-head span {
  color: #6d28d9;
  background: #f1eafe;
}

.viral-video-stage-head .commerce-stage-pills {
  gap: 6px;
}

.viral-video-stage-head .commerce-stage-pills span {
  height: 24px;
  border-color: #e2e8f0;
  color: #334155;
  background: #fff;
  font-size: 11px;
}

.viral-video-board.viral-director-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #172033;
  border-radius: 8px;
  background: #111827;
  box-shadow: none;
}

.viral-video-board.viral-director-board::before {
  position: absolute;
  top: 48px;
  bottom: 16px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.34), transparent);
  content: "";
  pointer-events: none;
}

.viral-theater-source,
.viral-theater-output {
  grid-column: auto;
}

.viral-theater {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 8px;
  background: #0b1120;
}

.viral-theater-head {
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
  color: #cbd5e1;
  background: #111827;
}

.viral-theater-head span,
.viral-theater-head b {
  font-size: 12px;
  letter-spacing: 0;
}

.viral-theater-head b {
  color: #a7f3d0;
}

.viral-theater-screen {
  min-height: 0;
  padding-top: 0;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.78), rgba(3, 7, 18, 0.98)),
    #030712;
}

.viral-theater-screen::before {
  inset: 12px;
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.viral-theater-screen::after {
  right: 18px;
  bottom: 16px;
  left: 18px;
  height: 2px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.24), rgba(20, 184, 166, 0.78), rgba(251, 191, 36, 0.68));
}

.viral-theater-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viral-theater-screen em {
  right: 13px;
  bottom: 14px;
  color: #a7f3d0;
}

.viral-theater-tags {
  display: none;
}

.viral-monitor-placeholder {
  max-width: min(170px, 82%);
}

.viral-monitor-placeholder strong {
  color: #f8fafc;
  font-size: 13px;
}

.viral-monitor-placeholder span {
  white-space: normal;
}

.viral-audio-dock {
  display: grid;
  grid-template-areas:
    "title options"
    "wave detail";
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 7px 10px;
  min-height: 82px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fff;
}

.viral-audio-title {
  grid-area: title;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.viral-audio-title span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.viral-audio-title strong {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-audio-options {
  grid-area: options;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.viral-audio-options button {
  height: 31px;
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.viral-audio-options button.active {
  border-color: #a78bfa;
  color: #5b21b6;
  background: #f3eefe;
}

.viral-audio-wave {
  grid-area: wave;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
  height: 30px;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.viral-audio-wave i {
  display: block;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #8b5cf6, #14b8a6);
}

.viral-audio-wave i:nth-child(1) { height: 12px; }
.viral-audio-wave i:nth-child(2) { height: 20px; }
.viral-audio-wave i:nth-child(3) { height: 15px; }
.viral-audio-wave i:nth-child(4) { height: 24px; }
.viral-audio-wave i:nth-child(5) { height: 17px; }

.viral-audio-field {
  grid-area: detail;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.viral-audio-field span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.viral-audio-field input,
.viral-audio-field select {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  color: #1f2937;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.viral-audio-dock p {
  grid-area: detail;
  align-self: center;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-video-motion-map {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  min-height: 68px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.viral-video-motion-head,
.viral-video-motion-visual {
  display: none;
}

.viral-video-timeline {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
}

.viral-video-timeline div {
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  box-shadow: none;
}

.viral-video-timeline b,
.viral-video-timeline strong,
.viral-video-timeline em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-video-timeline b {
  color: #6d28d9;
}

.viral-video-timeline strong {
  color: #111827;
  font-size: 12px;
}

.viral-video-timeline em {
  color: #64748b;
  font-size: 11px;
}

.viral-video-side-stack {
  grid-area: delivery;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px 10px;
  overflow: hidden;
  background: #fbfdff;
}

.viral-delivery-card,
.viral-video-side-stack .commerce-record-strip {
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.viral-delivery-card {
  gap: 9px;
  min-height: 0;
  padding: 10px;
}

.viral-delivery-head {
  padding-bottom: 8px;
}

.viral-delivery-head strong {
  font-size: 18px;
  letter-spacing: 0;
}

.viral-delivery-head em {
  border-radius: 7px;
  color: #5b21b6;
  background: #f3eefe;
}

.viral-delivery-metrics {
  grid-template-columns: 1fr;
  gap: 7px;
}

.viral-delivery-metrics div {
  min-height: 38px;
  padding: 7px;
  border-radius: 7px;
  background: #f8fafc;
}

.viral-delivery-actions {
  gap: 7px;
}

.viral-delivery-actions .commerce-result-download,
.viral-delivery-actions .commerce-copy-link {
  min-height: 34px;
  border-radius: 7px;
}

.viral-video-side-stack .commerce-record-strip {
  min-height: 0;
  padding: 10px;
}

.viral-video-side-stack .commerce-record-head {
  margin-bottom: 8px;
}

.viral-video-side-stack .commerce-record-head strong {
  font-size: 14px;
}

.viral-video-side-stack .commerce-record-head span {
  font-size: 11px;
}

.viral-video-side-stack .commerce-record-list {
  min-height: 0;
  overflow-y: auto;
}

.viral-video-side-stack .commerce-creation-empty {
  min-height: 112px;
  border-radius: 8px;
  background: #f8fafc;
}

@media (min-width: 1320px) {
  .viral-console-shell {
    grid-template-columns: 292px minmax(520px, 1fr) 250px;
  }

  .viral-audio-dock {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .viral-console-shell {
    grid-template-columns: 220px minmax(320px, 1fr) 176px;
  }

  .viral-video-workbench {
    padding: 8px;
  }

  .viral-video-panel {
    padding: 10px 8px;
  }

  .viral-video-stage {
    padding: 10px;
  }

  .viral-video-side-stack {
    padding: 10px 8px;
  }

  .viral-video-stage-head .commerce-stage-pills span:nth-child(3),
  .viral-video-stage-head .commerce-stage-pills span:nth-child(4) {
    display: none;
  }

  .viral-audio-dock {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 6px 8px;
    min-height: 78px;
    padding: 8px;
  }

  .viral-audio-options {
    gap: 4px;
  }

  .viral-audio-options button {
    height: 29px;
    font-size: 10px;
  }

  .viral-audio-wave {
    height: 28px;
  }
}

.viral-video-panel .viral-compact-grid .viral-control-field {
  grid-template-columns: 1fr;
  gap: 3px;
}

.viral-video-panel .viral-compact-grid .viral-control-field span {
  white-space: nowrap;
}

.viral-delivery-head {
  align-items: flex-start;
}

.viral-delivery-head strong {
  white-space: nowrap;
}

.viral-delivery-actions {
  grid-template-columns: 1fr;
}

.viral-delivery-actions .commerce-result-download,
.viral-delivery-actions .commerce-copy-link {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .viral-video-workbench {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .viral-console-shell {
    grid-template-areas:
      "stage"
      "controls"
      "delivery";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    overflow: visible;
  }

  .viral-video-panel,
  .viral-video-stage,
  .viral-video-side-stack,
  .viral-video-studio-shell,
  .viral-video-preview-card {
    height: auto;
    overflow: visible;
  }

  .viral-video-stage {
    border-right: 0;
  }

  .viral-video-board.viral-director-board {
    min-height: 420px;
  }

  .viral-video-side-stack {
    grid-template-rows: auto auto;
  }
}

/* Premium polish for the public viral-video console. */
.viral-console-shell {
  border-color: #d4deeb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 253, 0.94)),
    #f8fafc;
}

.viral-video-panel {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, auto);
  gap: 8px;
  padding: 12px 12px 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafd 100%),
    #fbfdff;
}

.viral-agent-top {
  align-items: center;
  min-height: 40px;
  padding: 0 2px 2px;
}

.viral-agent-top span {
  color: #7c8799;
  font-size: 11px;
  font-weight: 900;
}

.viral-video-panel .panel-title {
  margin-top: 2px;
  color: #101827;
  font-size: 24px;
  font-weight: 950;
}

.viral-agent-top > strong {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cceee8;
  border-radius: 8px;
  color: #0f766e;
  background: #ecfdf8;
  font-size: 12px;
  font-weight: 950;
}

.viral-agent-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
}

.viral-agent-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: #667085;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.viral-agent-metrics span + span::before {
  display: none;
}

.viral-agent-metrics strong {
  color: #101827;
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
}

.viral-agent-metrics em {
  margin-left: 2px;
  color: #8b96a8;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.viral-flow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f3f7fb;
}

.viral-flow-rail span {
  justify-content: center;
  min-height: 24px;
  border-radius: 6px;
  color: #7b8798;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.viral-flow-rail span + span::before {
  display: none;
}

.viral-flow-rail span.is-active,
.viral-flow-rail span.is-done {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.08);
}

.viral-video-panel .viral-control-group {
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff),
    #fff;
}

.viral-control-heading {
  min-height: 24px;
  gap: 8px;
}

.viral-control-heading span {
  width: 26px;
  height: 22px;
  border-radius: 6px;
  color: #6d28d9;
  background: #f1eafe;
  font-size: 11px;
  font-weight: 950;
}

.viral-control-heading strong {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.viral-control-heading em {
  color: #7c8799;
  font-size: 11px;
  font-weight: 900;
}

.viral-upload-strip {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 52px;
  padding: 6px;
  border: 1px solid #d9e5f0;
  border-radius: 8px;
  background: #f8fbfe;
}

.viral-upload-thumb {
  width: 40px;
  height: 40px;
  border-color: #d2deeb;
  background: #fff;
}

.viral-upload-thumb span {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #334155;
}

.viral-upload-meta strong {
  color: #172033;
  font-size: 14px;
  font-weight: 950;
}

.viral-upload-meta span {
  color: #8b96a8;
  font-size: 11px;
  font-weight: 850;
}

.viral-upload-actions {
  gap: 6px;
}

.viral-upload-actions button {
  min-width: 54px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 950;
}

.viral-upload-actions button:first-child {
  border-color: #172033;
  background: #172033;
}

.viral-video-panel .viral-control-field,
.viral-video-panel .viral-setting-row,
.viral-video-panel .viral-control-textarea {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.viral-video-panel .viral-control-field span,
.viral-video-panel .viral-setting-row > span {
  min-height: 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.viral-video-panel .viral-control-field input,
.viral-video-panel .viral-control-field select {
  height: 32px;
  padding: 0 12px;
  border-color: #dbe5ef;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}

.viral-video-panel .viral-control-field textarea {
  height: 42px;
  padding: 7px 10px;
  border-color: #dbe5ef;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.viral-video-panel .viral-control-textarea.is-compact textarea {
  height: 36px;
}

.viral-compact-grid {
  gap: 8px;
}

.viral-video-panel .viral-compact-grid .viral-control-field {
  grid-template-columns: 1fr;
  gap: 4px;
}

.viral-video-duration-note {
  margin-top: -2px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.viral-video-panel .viral-segment-control {
  min-height: 32px;
  padding: 3px;
  border-color: #dbe5ef;
  border-radius: 9px;
  background: #eef3f8;
}

.viral-video-panel .viral-segment-control button {
  height: 24px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 950;
}

.viral-video-panel .viral-segment-control button.active {
  color: #111827;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.viral-video-panel .viral-action-bar {
  gap: 10px;
  padding-top: 8px;
}

.viral-video-panel .commerce-reset-btn,
.viral-video-panel .commerce-suite-submit {
  min-height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 950;
}

.viral-video-panel .commerce-suite-submit {
  background: linear-gradient(135deg, #101827, #0f9f7a);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.2);
}

/* Remove tab-like step rail and keep the left panel from covering fields. */
.viral-flow-rail {
  display: none !important;
}

.viral-video-panel {
  grid-template-rows: auto auto auto auto auto minmax(0, auto);
}

.viral-video-panel .viral-action-bar {
  position: static;
  bottom: auto;
  z-index: auto;
  padding-top: 6px;
  background: transparent;
}

.viral-video-panel .viral-control-group {
  min-height: 0;
}

.viral-video-panel .viral-control-field input,
.viral-video-panel .viral-control-field select {
  height: 30px;
}

.viral-video-panel .viral-control-field textarea {
  height: 34px;
}

.viral-video-panel .viral-control-textarea.is-compact textarea {
  height: 30px;
}

.viral-video-duration-note {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 900px) {
  .viral-console-shell {
    grid-template-columns: 244px minmax(300px, 1fr) 176px;
  }
}

.viral-brief-group {
  gap: 8px;
}

.viral-script-box {
  position: relative;
  display: block;
  min-height: 124px;
}

.viral-script-box textarea {
  width: 100%;
  height: 124px;
  min-height: 124px;
  padding: 12px 12px 48px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  color: #172033;
  background: #fff;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.45;
  resize: none;
  outline: none;
}

.viral-script-box textarea::placeholder {
  color: #9aa5b5;
  font-weight: 820;
}

.viral-script-box textarea:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.14);
}

.viral-script-optimize {
  position: absolute;
  right: 10px;
  bottom: 10px;
  height: 32px;
  min-width: 78px;
  padding: 0 13px;
  border: 1px solid #c7b8ff;
  border-radius: 7px;
  color: #5b21b6;
  background: #f3eefe;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.viral-script-optimize:disabled {
  cursor: default;
  opacity: 0.62;
}

/* Compact headers: no repeated marketing labels. */
.viral-agent-top {
  min-height: 32px;
  padding: 0;
}

.viral-agent-top > div {
  display: flex;
  align-items: center;
  min-width: 0;
}

.viral-agent-top span,
.viral-video-stage-head > div > span {
  display: none;
}

.viral-video-panel .panel-title {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.viral-agent-top > strong {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.viral-video-stage-head {
  min-height: 34px;
  align-items: center;
}

.viral-video-stage-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.viral-video-stage-head .commerce-stage-pills span {
  height: 24px;
}

/* Source stays as context; the generated video owns the main preview. */
.viral-console-shell {
  grid-template-columns: minmax(284px, 304px) minmax(0, 1fr) minmax(190px, 220px);
}

.viral-video-panel,
.viral-video-stage,
.viral-video-side-stack {
  min-width: 0;
}

.viral-upload-strip {
  grid-template-columns: 40px minmax(0, 1fr) max-content;
}

.viral-upload-actions {
  flex-direction: row;
  flex-wrap: nowrap;
  min-width: max-content;
}

.viral-upload-actions button {
  min-width: 48px;
  padding: 0 9px;
}

.viral-video-panel .viral-setting-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

.viral-video-panel .viral-segment-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.viral-video-panel .viral-segment-control button {
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-script-optimize {
  right: 8px;
  max-width: calc(100% - 16px);
}

.viral-video-preview-card {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.viral-video-board.viral-director-board {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}

.viral-video-board.viral-director-board::before {
  display: none;
}

.viral-source-compact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.88);
}

.viral-source-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  background: #020617;
}

.viral-source-mark span {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(20, 184, 166, 0.9);
  border-radius: 999px;
}

.viral-source-mini-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viral-source-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.viral-source-copy span {
  color: #93a4bb;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.viral-source-copy strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-source-compact b {
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 7px;
  color: #a7f3d0;
  background: rgba(20, 184, 166, 0.1);
  font-size: 11px;
  font-weight: 950;
  line-height: 22px;
  white-space: nowrap;
}

.viral-source-compact b.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.viral-watermark-guard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(18, 83, 87, 0.72));
}

.viral-watermark-guard span {
  color: #99f6e4;
  font-size: 11px;
  font-weight: 950;
}

.viral-watermark-guard strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 950;
}

.viral-watermark-guard p {
  grid-column: 1 / -1;
  margin: 0;
  color: #a7b6ca;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.viral-watermark-guard.is-blocked {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(92, 58, 18, 0.68));
}

.viral-output-main {
  grid-row: 3;
}

.viral-output-main .viral-theater-screen {
  padding-top: 0;
}

.viral-output-main .viral-monitor-placeholder {
  max-width: min(220px, 82%);
}

@media (max-width: 1040px) {
  .viral-console-shell {
    grid-template-areas:
      "controls stage"
      "controls delivery";
    grid-template-columns: 286px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 142px;
  }

  .viral-video-stage {
    border-right: 0;
    border-bottom: 1px solid #dfe7f1;
  }

  .viral-video-side-stack {
    grid-template-columns: minmax(300px, 0.68fr) minmax(0, 0.32fr);
    grid-template-rows: 1fr;
    gap: 8px;
    height: 100%;
    padding: 8px;
    overflow: hidden;
    border-left: 0;
    background: #fbfdff;
  }

  .viral-delivery-card {
    display: grid;
    grid-template-rows: 28px 38px 32px;
    gap: 6px;
    padding: 8px;
    overflow: hidden;
  }

  .viral-delivery-head {
    align-items: center;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .viral-delivery-head span {
    display: none;
  }

  .viral-delivery-head strong {
    margin: 0;
    font-size: 15px;
  }

  .viral-delivery-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .viral-delivery-metrics div {
    min-height: 30px;
    gap: 1px;
    padding: 4px 6px;
  }

  .viral-delivery-metrics span {
    font-size: 10px;
    line-height: 1;
  }

  .viral-delivery-metrics strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .viral-delivery-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .viral-delivery-actions .commerce-result-download,
  .viral-delivery-actions .commerce-copy-link {
    min-height: 30px;
  }

  .viral-video-side-stack .commerce-record-strip {
    min-height: 0;
    padding: 8px;
    overflow: hidden;
  }

  .viral-video-side-stack .commerce-record-head {
    margin-bottom: 6px;
  }

  .viral-video-side-stack .commerce-creation-empty {
    min-height: 66px;
  }
}

@media (max-width: 760px) {
  .viral-video-workbench {
    height: auto;
    min-height: calc(100vh - 68px);
    overflow: auto;
  }

  .viral-console-shell {
    grid-template-areas:
      "controls"
      "stage"
      "delivery";
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(480px, 58vh) auto;
    overflow: visible;
  }

  .viral-video-panel {
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #dfe7f1;
  }

  .viral-video-stage {
    min-height: 480px;
  }

  .viral-video-side-stack {
    grid-template-columns: 1fr;
    height: auto;
  }
}

@media (max-width: 1180px) {
  .api-banner {
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.78fr);
    min-height: 240px;
    padding: 28px 30px;
  }

  .api-doc-hero,
  .api-debug-hero {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.5fr);
  }

  .api-doc-layout,
  .api-debug-layout {
    gap: 16px;
  }

  .api-doc-layout {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .api-debug-layout {
    grid-template-columns: minmax(0, 1fr) 258px;
  }

  .api-debug-terminal code {
    font-size: 13px;
  }

  .api-console {
    grid-template-columns: 1fr;
  }

  .api-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .api-doc-hero,
  .api-debug-hero,
  .api-doc-layout,
  .api-debug-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .api-page {
    padding-bottom: 44px;
  }

  .api-console,
  .api-category-strip,
  .api-product-grid {
    width: calc(100% - 24px);
  }

  .api-banner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 28px 24px;
  }

  .api-access-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .api-flow,
  .api-console-stats,
  .api-card-meta,
  .api-product-grid {
    grid-template-columns: 1fr;
  }

  .api-console {
    padding: 14px;
    border-radius: 16px;
  }

  .api-console-main {
    padding: 2px;
  }

  .api-console-main h2 {
    font-size: 21px;
  }

  .api-card {
    min-height: 0;
    padding: 16px;
    border-radius: 16px;
  }

  .api-endpoint code {
    white-space: normal;
    word-break: break-word;
  }

  .api-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .api-card-link,
  .api-card-primary {
    width: 100%;
  }

  .api-banner-tags {
    gap: 8px;
  }

  .api-banner-tags span {
    height: 34px;
    font-size: 12px;
  }

  .api-banner-visual {
    height: 180px;
  }

  .api-tool-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .api-tool-footer button {
    width: 100%;
  }

  .api-doc-layout,
  .api-debug-layout {
    width: calc(100% - 24px);
    margin-bottom: 44px;
  }

  .api-doc-card,
  .api-debug-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .api-doc-cover,
  .api-debug-terminal {
    min-height: 0;
    height: 190px;
    border-radius: 18px;
  }

  .api-doc-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .api-doc-card-head h2 {
    font-size: 20px;
  }

  .api-doc-endpoint-line,
  .api-doc-auth-grid,
  .api-doc-table div,
  .api-doc-steps {
    grid-template-columns: 1fr;
  }

  .api-doc-endpoint-line code {
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
  }

  .api-doc-inline-actions,
  .api-debug-actions,
  .api-doc-support {
    align-items: stretch;
    flex-direction: column;
  }

  .api-doc-inline-actions button,
  .api-debug-actions button,
  .api-doc-support button {
    width: 100%;
  }

  .api-debug-field textarea {
    min-height: 220px;
  }
}
