:root {
  --bg: #f7f8fb;
  --ink: #101827;
  --muted: #7b8798;
  --line: #e7ebf2;
  --soft: #f2f5f9;
  --white: #fff;
  --orange: #ff5a3d;
  --orange-2: #ffe0a9;
  --purple: #b26dff;
  --blue: #3f8cff;
  --teal: #15a69d;
  --shadow: 0 24px 70px rgba(24, 35, 52, 0.12);
  --radius: 24px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

/* voice-library-favorites-remove-and-upload-width-lock */
.voice-library-tabs,
.voice-library-tabs [data-voice-library-tab="favorites"] {
  display: none !important;
}

.voice-library-console {
  grid-template-columns: minmax(0, 1fr) !important;
}

.voice-add-card {
  width: min(100%, 560px) !important;
}

@media (max-width: 640px) {
  #cloneVoiceCreateModal .voice-create-body {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #cloneVoiceCreateModal .voice-dropzone {
    width: 100% !important;
    max-width: none !important;
    min-height: 184px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 10px !important;
  }

  #cloneVoiceCreateModal .voice-dropzone small,
  #cloneVoiceCreateModal .voice-dropzone .wechat-file-hint,
  #cloneVoiceCreateModal .voice-dropzone .clone-upload-status {
    max-width: none !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    letter-spacing: 0 !important;
  }
}

/* mobile-nav3: deprecated clone forms must never leak into the modern workspace. */
.clone-panel.show .clone-grid.clone-legacy-forms {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

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

.discover-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.header-inner {
  height: 84px;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-link {
  display: flex;
  align-items: center;
  width: 210px;
  min-width: 190px;
  height: 54px;
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: nowrap;
  margin-left: auto;
}

.course-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 10px;
}

.pill-btn,
.benefit-btn,
.avatar-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(26, 36, 52, 0.04);
  white-space: nowrap;
}

.course-entry-btn {
  min-height: 46px;
  min-width: 96px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(21, 166, 157, 0.36);
  background: #e9fbf7;
  color: #0f766e;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(21, 166, 157, 0.08);
  white-space: nowrap;
}

body[data-view="courses"] .course-entry-btn {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 166, 157, 0.18);
}

body[data-view="courses"] .benefit-btn {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 6px 16px rgba(26, 36, 52, 0.04);
}

body[data-view="courses"] .benefit-btn span {
  display: none;
}

body[data-view="admin"] .header-actions,
body[data-view="admin"] .course-actions {
  display: none;
}

.benefit-btn {
  position: relative;
  background: linear-gradient(180deg, #ffe4b8, #ffd293);
  border-color: #ffc86e;
}

.benefit-btn span {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 12px;
  background: #e9dcff;
  color: #8b5cf6;
  font-size: 0.78rem;
}

.mobile-pricing-action {
  display: none;
}

body[data-view="admin"] .discover-main {
  max-width: 1180px;
  padding-top: 24px;
}

#adminView,
#courseCenter,
#tasksView,
#creatorView {
  scroll-margin-top: 104px;
}

#adminView {
  display: none;
}

body[data-view="admin"] #adminView {
  display: block;
  max-width: 1080px;
  margin: 0 auto;
}

body[data-view="admin"] .panel {
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(21, 33, 52, 0.06);
}

.avatar-btn {
  width: 58px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff8c57, #ee5d31);
}

.discover-main {
  max-width: 1580px;
  margin: 0 auto;
  padding: 26px 42px 64px;
}

.category-strip {
  height: 96px;
  display: flex;
  align-items: center;
  gap: 22px;
  overflow: hidden;
}

.category-chip {
  min-width: 118px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: #718096;
  font-weight: 900;
  filter: blur(1.6px);
}

.category-chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.category-chip.active,
.category-chip.soft {
  filter: none;
}

.category-chip.active {
  color: var(--orange);
  background: #fff2ed;
}

.category-chip.soft {
  color: var(--teal);
  background: #e7faf7;
}

.template-center {
  margin-top: 6px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #07090d;
  box-shadow: 0 24px 70px rgba(10, 17, 28, 0.18);
  color: #fff;
  overflow: hidden;
}

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

.template-head p {
  margin: 0 0 5px;
  color: #82f0d0;
  font-weight: 900;
}

.template-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

#templateCount {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dce6f2;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.template-showcase {
  position: relative;
  min-height: 520px;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 20px;
  background: #03050a;
}

.showcase-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 158px;
  gap: 8px;
  min-height: 520px;
  padding: 8px;
}

.showcase-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #11141b;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.showcase-tile.wide {
  grid-column: span 1;
  grid-row: span 1;
}

.showcase-tile.tall {
  grid-row: span 3;
}

.showcase-tile:nth-child(3) {
  grid-row: span 2;
}

.showcase-tile:nth-child(4) {
  grid-row: span 2;
}

.showcase-tile .template-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.74)),
    radial-gradient(circle at 50% 80%, rgba(122, 99, 255, 0.28), transparent 38%);
}

.showcase-tile-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  color: #fff;
}

.showcase-tile-meta b {
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-tile-meta small {
  color: rgba(236, 244, 255, 0.76);
  font-weight: 800;
}

.showcase-actions {
  position: absolute;
  left: 34%;
  right: 4%;
  bottom: 30px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  pointer-events: none;
}

.showcase-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  min-height: 104px;
  padding: 22px 24px 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 14% 18%, rgba(147, 121, 255, 0.7), transparent 34%),
    linear-gradient(135deg, rgba(113, 93, 255, 0.92), rgba(6, 9, 24, 0.96) 68%);
  color: #fff;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  pointer-events: auto;
}

.showcase-cta.primary {
  background:
    radial-gradient(circle at 12% 18%, rgba(87, 216, 192, 0.72), transparent 34%),
    linear-gradient(135deg, rgba(77, 88, 255, 0.92), rgba(6, 9, 24, 0.96) 68%);
}

.showcase-cta strong,
.showcase-cta em {
  display: block;
  min-width: 0;
}

.showcase-cta strong {
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  line-height: 1.04;
}

.showcase-cta em {
  margin-top: 7px;
  color: rgba(241, 245, 249, 0.62);
  font-size: 1rem;
  font-style: normal;
  font-weight: 900;
}

.showcase-cta i {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f8fafc;
  color: #0b1020;
  font-size: 2rem;
  font-style: normal;
  font-weight: 900;
}

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

.video-template-card {
  min-width: 0;
  min-height: 292px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #11141b;
  color: #fff;
  overflow: hidden;
  text-align: left;
  display: block;
  position: relative;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transition: 180ms ease;
}

.video-template-card.template-wide {
  grid-column: span 2;
}

.video-template-card.template-tall {
  min-height: 410px;
}

.video-template-card.template-small {
  min-height: 250px;
}

.video-template-card:hover,
.video-template-card.active {
  transform: translateY(-3px);
  border-color: rgba(130, 240, 208, 0.72);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(130, 240, 208, 0.12);
}

.template-media,
.template-media-el,
.template-fallback {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.template-media {
  position: absolute;
  inset: 0;
}

.template-media-el,
.template-fallback {
  position: absolute;
  inset: 0;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 240ms ease;
}

.video-template-card:hover .template-media-el {
  transform: scale(1.05);
}

.lazy-video-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #141827, #2b2440);
  color: #fff;
  cursor: pointer;
}

.lazy-video-preview .lazy-video-still,
.lazy-video-preview .video-still-fallback {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.video-still-fallback {
  background:
    radial-gradient(circle at 28% 24%, rgba(139, 92, 246, 0.22), transparent 34%),
    linear-gradient(135deg, #141827, #2b2440);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 950;
}

.lazy-video-play {
  grid-area: 1 / 1;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #5b0e8f;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  font-size: 1.2rem;
}

.lazy-video-hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.template-shade {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.86) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 48%);
}

.template-topline {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.template-topline span {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.54);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.template-cover-a { background: linear-gradient(135deg, #f7c0a8, #62c7d6); }
.template-cover-b { background: linear-gradient(135deg, #ff725e, #ffd06f); }
.template-cover-c { background: linear-gradient(135deg, #b26dff, #4aa3ff); }
.template-cover-d { background: linear-gradient(135deg, #222c3d, #b5a48e); }
.template-cover-e { background: linear-gradient(135deg, #f4b6c5, #7c4f99); }
.template-cover-f { background: linear-gradient(135deg, #101827, #d3b48a); }

.template-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 70px 14px 14px;
  display: grid;
  gap: 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.84) 58%, rgba(0, 0, 0, 0.96));
}

.template-copy b,
.template-copy small,
.template-copy i,
.template-copy em {
  overflow-wrap: anywhere;
}

.template-copy b {
  font-size: 1.06rem;
  line-height: 1.25;
}

.template-copy small {
  color: rgba(232, 238, 246, 0.82);
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.template-copy i,
.template-copy em {
  color: #82f0d0;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.template-copy em {
  color: rgba(255, 255, 255, 0.72);
}

.clone-panel {
  display: none;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(12, 19, 32, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(22, 31, 48, 0.12);
}

.clone-panel.show {
  display: flex;
  flex-direction: column;
}

.clone-head {
  order: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.clone-head p {
  margin: 0 0 4px;
  color: #0d9488;
  font-weight: 900;
}

.clone-head h2 {
  margin: 0;
  color: #111827;
  font-size: 1.35rem;
}

#cloneModePill {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff2ed;
  color: #f05b3f;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.clone-grid {
  order: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.clone-legacy-forms {
  display: none !important;
}

.clone-script-card {
  order: 8;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(236, 253, 249, 0.95), rgba(255, 255, 255, 0.96));
  display: grid;
  gap: 14px;
}

.clone-script-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.clone-script-head h3,
.clone-script-head p {
  margin: 0;
}

.clone-script-head h3 {
  color: #111827;
  font-size: 1.12rem;
}

.clone-script-head p,
.clone-script-status {
  color: #64748b;
  line-height: 1.55;
}

.clone-script-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 900;
}

.clone-script-card textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  min-height: 142px;
  padding: 12px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 700;
  line-height: 1.55;
  outline: none;
}

.clone-script-card textarea:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.compose-copy-agent {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(109, 40, 217, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.9), rgba(255, 255, 255, 0.92));
}

.compose-link-agent {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.88), rgba(255, 255, 255, 0.94));
}

.compose-copy-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compose-copy-agent-head div {
  display: grid;
  gap: 3px;
}

.compose-copy-agent-head span {
  color: #7c3aed;
  font-size: 0.72rem;
  font-weight: 900;
}

.compose-copy-agent-head strong {
  color: #111827;
  font-size: 1rem;
}

.compose-copy-agent-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.compose-link-agent .compose-copy-agent-link {
  grid-template-columns: 1fr;
}

.compose-copy-agent-link .mini-btn {
  min-height: 42px;
  white-space: nowrap;
}

.compose-copy-agent-link small {
  color: #7c8494;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.compose-copy-agent-extract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
}

.compose-copy-agent-extract div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compose-copy-agent-extract span,
.compose-copy-agent-extract small {
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 900;
}

.compose-copy-agent-extract strong {
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.45;
}

.compose-copy-agent-extract p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

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

.compose-copy-agent label,
.compose-copy-agent-wide {
  display: grid;
  gap: 6px;
}

.compose-copy-agent input,
.compose-copy-agent select,
.compose-copy-agent textarea,
.compose-link-agent input {
  width: 100%;
  min-width: 0;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.compose-copy-agent input,
.compose-copy-agent select,
.compose-link-agent input {
  height: 42px;
  padding: 0 12px;
}

.compose-copy-agent textarea {
  min-height: 92px;
  padding: 10px 12px;
}

.compose-copy-agent input:focus,
.compose-copy-agent select:focus,
.compose-copy-agent textarea:focus,
.compose-link-agent input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.compose-copy-agent-status {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.5;
}

.compose-copy-agent-status[data-tone="loading"] {
  color: #6d28d9;
  background: #f5f0ff;
}

.compose-copy-agent-status[data-tone="error"] {
  color: #b42318;
  background: #fff5f3;
}

.compose-copy-agent-status[data-tone="success"] {
  color: #047857;
  background: #ecfdf5;
}

.compose-link-agent[hidden],
.compose-copy-agent-extract[hidden],
.compose-copy-output[hidden],
.compose-copy-agent-status[hidden] {
  display: none !important;
}

.compose-copy-agent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.compose-copy-agent-actions .save-btn,
.compose-copy-agent-actions .mini-btn {
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 950;
}

.compose-copy-output {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(67, 38, 105, 0.08);
}

.compose-copy-output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.compose-copy-output-head div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compose-copy-output-head span {
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 950;
}

.compose-copy-output-head strong {
  color: #111827;
  font-size: 1rem;
  line-height: 1.45;
}

.compose-copy-output textarea {
  width: 100%;
  min-height: 320px;
  padding: 16px 18px;
  border: 1px solid #e4def0;
  border-radius: 12px;
  background: #fbfaff;
  color: #171226;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.75;
  resize: vertical;
}

.compose-copy-output textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  outline: none;
}

.compose-copy-output-actions {
  display: flex;
  justify-content: flex-end;
}

.compose-copy-output-actions .save-btn {
  min-width: 148px;
}

@media (max-width: 760px) {
  .compose-copy-agent-link,
  .compose-copy-agent-head,
  .compose-copy-agent-grid,
  .compose-copy-output-head {
    grid-template-columns: 1fr;
  }

  .compose-copy-agent-head,
  .compose-copy-output-head {
    display: grid;
  }

  .compose-copy-agent-extract {
    display: grid;
  }

  .compose-copy-agent-actions,
  .compose-copy-output-actions {
    justify-content: stretch;
  }

  .compose-copy-agent-actions .save-btn,
  .compose-copy-agent-actions .mini-btn,
  .compose-copy-output-actions .save-btn {
    width: 100%;
  }

  .compose-copy-output textarea {
    min-height: 260px;
  }
}

/* Compact composer: keep video synthesis on its own page, separate from the copy agent. */
.clone-panel.show #cloneVideoComposerCard {
  grid-column: 2 !important;
  grid-row: auto !important;
  order: 6 !important;
  align-self: start;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid rgba(124, 101, 156, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
}

.clone-video-mini-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.clone-video-mini-head div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.clone-video-mini-head h3,
.clone-video-mini-head p {
  margin: 0;
}

.clone-video-mini-head h3 {
  color: #171226;
  font-size: 1.25rem;
  line-height: 1.2;
}

.clone-video-mini-head p {
  color: #74658f;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.55;
}

.clone-video-mini-head > span {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #4b0a88;
  background: #eee6fb;
  font-size: 0.9rem;
  font-weight: 950;
  white-space: nowrap;
}

#cloneVideoComposerCard .clone-compose-layout {
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 16px;
}

#cloneVideoComposerCard .clone-compose-avatar-panel {
  gap: 10px;
}

#cloneVideoComposerCard .clone-compose-avatar-media,
#cloneVideoComposerCard .clone-compose-avatar-empty {
  min-height: 260px;
  border-radius: 16px;
}

#cloneVideoComposerCard .clone-compose-avatar-info,
#cloneVideoComposerCard .clone-compose-voice-pill,
#cloneVideoComposerCard .clone-compose-voice-card {
  border-radius: 14px;
  box-shadow: none;
}

#cloneVideoComposerCard .clone-compose-script-main {
  gap: 12px;
}

#cloneVideoComposerCard .clone-script-head {
  align-items: flex-start;
  gap: 10px;
}

#cloneVideoComposerCard .clone-script-head h3 {
  font-size: 1.08rem;
}

#cloneVideoComposerCard .clone-script-head p {
  font-size: 0.9rem;
}

#cloneVideoComposerCard #cloneScriptInput {
  min-height: 156px;
}

.clone-synthesis-options {
  display: grid;
  gap: 10px;
}

.clone-synthesis-option {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(220px, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  border: 1px solid rgba(124, 101, 156, 0.14);
  border-radius: 14px;
  background: #fbfaff;
}

.clone-synthesis-option span {
  color: #312842;
  font-weight: 950;
}

.clone-synthesis-option select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5dfef;
  border-radius: 12px;
  background:
    linear-gradient(45deg, transparent 50%, #6d28b2 50%) right 18px center / 7px 7px no-repeat,
    linear-gradient(135deg, #6d28b2 50%, transparent 50%) right 12px center / 7px 7px no-repeat,
    #f8f7fb;
  color: #171226;
  font: inherit;
  font-weight: 900;
  padding: 0 42px 0 14px;
  appearance: none;
  outline: none;
}

.clone-synthesis-option select:focus {
  border-color: rgba(109, 40, 178, 0.52);
  box-shadow: 0 0 0 3px rgba(109, 40, 178, 0.1);
}

.clone-synthesis-option small {
  grid-column: 2;
  color: #74658f;
  font-weight: 750;
  line-height: 1.45;
}

#cloneVideoComposerCard .clone-script-actions {
  gap: 10px;
}

#cloneVideoComposerCard .clone-script-actions .mini-btn,
#cloneVideoComposerCard .clone-script-actions .save-btn {
  min-height: 42px;
  padding: 0 18px;
}

#cloneVideoComposerCard .clone-audio-preview,
#cloneVideoComposerCard .clone-script-status {
  margin-top: 0;
}

.clone-panel.show #cloneCopyAgentPage {
  order: 6 !important;
}

@media (max-width: 1160px) {
  .clone-panel.show #cloneVideoComposerCard {
    grid-column: 1 !important;
  }

  #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .clone-synthesis-option {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .clone-synthesis-option small {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  .clone-video-mini-head {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-video-mini-head > span {
    width: fit-content;
  }

  #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: 1fr;
  }

  #cloneVideoComposerCard .clone-compose-avatar-media,
  #cloneVideoComposerCard .clone-compose-avatar-empty {
    min-height: 320px;
  }
}

.clone-script-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.clone-script-status {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.clone-script-status strong {
  color: #111827;
}

.clone-script-status.error {
  color: #b42318;
  background: #fff5f3;
}

.clone-script-status.loading {
  color: #7a4b00;
  background: #fff8e6;
}

.clone-script-status .status-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(122, 75, 0, 0.22);
  border-top-color: #c98200;
  border-radius: 999px;
  vertical-align: -2px;
  animation: cloneStatusSpin 0.8s linear infinite;
}

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

.clone-script-status .clone-audio {
  margin-top: 8px;
}

.clone-audio-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(236, 253, 249, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 34px rgba(13, 148, 136, 0.08);
}

.clone-audio-preview[hidden] {
  display: none;
}

.clone-audio-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.clone-audio-preview-head strong {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 950;
}

.clone-audio-preview-head span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 850;
}

.clone-audio-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clone-audio-preview-actions a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.clone-package-card {
  margin-top: 16px;
  border-color: rgba(240, 80, 58, 0.22);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.98));
}

.clone-tag.package {
  background: #fff2ed;
  color: #f0503a;
}

.clone-tag.upscale {
  background: #ecfdf9;
  color: #0f766e;
}

.clone-upscale-panel {
  display: grid;
  gap: 14px;
}

.clone-package-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.22), transparent);
  margin: 4px 0;
}

.clone-package-form {
  display: grid;
  gap: 12px;
}

.clone-package-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 900;
}

.clone-package-form input,
.clone-package-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.clone-package-form input:focus,
.clone-package-form select:focus {
  border-color: #f0503a;
  box-shadow: 0 0 0 3px rgba(240, 80, 58, 0.12);
}

.clone-package-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 12px;
}

.clone-package-result {
  display: grid;
  gap: 10px;
}

.clone-package-job {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(240, 80, 58, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.clone-package-job.upscale-job {
  border-color: rgba(15, 118, 110, 0.16);
}

.clone-package-job-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.clone-package-job p,
.clone-package-job small {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.clone-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  background: #fff;
}

.clone-card.muted {
  opacity: 0.56;
}

.clone-tag {
  width: fit-content;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eefbf8;
  color: #0d9488;
  font-size: 0.76rem;
  font-weight: 900;
}

.clone-card h3,
.clone-card p {
  margin: 0;
}

.clone-card h3 {
  color: #111827;
  font-size: 1.08rem;
}

.clone-card p,
.clone-card small,
.clone-result span,
.clone-result small {
  color: #64748b;
  line-height: 1.5;
}

.clone-card small {
  font-size: 0.78rem;
  font-weight: 800;
}

.clone-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 900;
}

.clone-card input,
.clone-card select,
.clone-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.clone-card input,
.clone-card select {
  min-height: 44px;
  padding: 0 12px;
}

.clone-card textarea {
  resize: vertical;
  padding: 11px 12px;
}

.clone-card input:focus,
.clone-card select:focus,
.clone-card textarea:focus {
  border-color: #0d9488;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.clone-consent {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.clone-consent input {
  width: 18px;
  min-height: 18px;
}

.clone-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: -2px;
}

.clone-upload-control {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(21, 166, 157, 0.28);
  background: #ecfdf9;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.clone-upload-control input.clone-asset-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
  z-index: 2;
}

.clone-upload-control > :not(input) {
  pointer-events: none;
}

.clone-upload-status {
  min-width: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-upload-status em {
  font-style: normal;
}

.clone-upload-status.error {
  color: #b42318;
  white-space: normal;
}

.clone-upload-status.success {
  color: #08795c;
  white-space: normal;
}

.clone-submit {
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a4d, #f0503a);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(240, 80, 58, 0.22);
}

.clone-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  display: grid;
  gap: 4px;
}

.clone-result strong {
  color: #111827;
}

.clone-result small {
  overflow-wrap: anywhere;
}

.clone-audio {
  width: 100%;
  min-height: 36px;
}

.clone-video-wrap {
  display: grid;
  gap: 10px;
  margin: 8px 0 4px;
}

.clone-video {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  max-height: 440px;
  border-radius: 10px;
  background: #111827;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.16);
}

.clone-video-lazy {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  max-height: 440px;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.16);
}

.clone-render-pending {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 12px;
  background: #f5f0ff;
  color: #4c1d95;
}

.clone-render-pending strong {
  color: #4c1d95;
}

.clone-source-preview {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.clone-source-preview small,
.clone-audio-material small {
  color: var(--muted);
  font-weight: 850;
}

.clone-source-media {
  width: min(100%, 280px);
  aspect-ratio: 9 / 16;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.12);
}

.clone-source-preview.compact {
  margin: 0;
}

.clone-source-preview.compact .clone-source-media {
  width: 100%;
  max-height: 320px;
}

.clone-source-preview.cover {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111827;
}

.clone-source-preview.cover small {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.clone-source-preview.cover .clone-source-media {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
}

.clone-audio-material {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

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

.clone-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.clone-action.danger {
  border: 1px solid rgba(225, 78, 64, 0.32);
  background: #fff5f3;
  color: #b42318;
}

.clone-action.danger:disabled {
  cursor: progress;
  opacity: 0.66;
}

.hero-stage {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: end;
  padding: 68px 0 40px;
  min-width: 0;
}

.blur-gallery {
  position: absolute;
  inset: 0 0 128px;
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 22px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.tile {
  height: 270px;
  border-radius: 32px;
  filter: blur(14px);
  opacity: 0.72;
}

.tile.tall {
  height: 350px;
}

.peach { background: linear-gradient(145deg, #ffd0b9, #9a5c45); }
.cyan { background: linear-gradient(145deg, #d9f9ff, #63c7d9); }
.rose { background: linear-gradient(145deg, #f7b5c7, #6e3541); }
.violet { background: linear-gradient(145deg, #d4c7ff, #7b67c7); }
.slate { background: linear-gradient(145deg, #18212f, #b58d7f); }
.sand { background: linear-gradient(145deg, #f3d6b5, #9a8067); }
.coral { background: linear-gradient(145deg, #ffb8a5, #7d3d36); }
.blue { background: linear-gradient(145deg, #abd8ff, #3f72b5); }

.composer-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #bd6dff, #49a1ff) border-box;
  box-shadow: 0 30px 80px rgba(21, 33, 52, 0.18);
  box-sizing: border-box;
}

.composer-card::before {
  content: none;
}

.composer-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 34px 0;
}

.composer-head p {
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 900;
}

.composer-head h1 {
  margin: 0;
  font-size: 1.8rem;
}

.mode-badge {
  height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff0cf;
  color: #a36600;
  font-size: 0.84rem;
  font-weight: 900;
}

.mode-badge.live {
  background: #ddf8ee;
  color: #16855c;
}

.prompt-wrap {
  position: relative;
  padding: 22px 34px 0;
}

#promptInput {
  width: 100%;
  min-height: 240px;
  border: 0;
  outline: 0;
  resize: vertical;
  color: #202938;
  font-size: 1.18rem;
  line-height: 1.72;
}

#promptInput::placeholder {
  color: #a5afbd;
}

.prompt-helper {
  position: absolute;
  top: 34px;
  right: 46px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f2f5fb;
  color: #526173;
  font-weight: 900;
}

.reference-panel {
  display: none;
  margin: 10px 34px 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed #d7dfeb;
  background: #f8fafc;
}

.reference-panel.show {
  display: block;
}

.reference-head,
.reference-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-head {
  justify-content: space-between;
  margin-bottom: 10px;
  color: #526173;
  font-weight: 900;
}

.reference-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 38px;
}

.reference-url {
  flex: 1;
  min-width: 0;
}

.reference-upload {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 166, 157, 0.28);
  background: #ecfdf9;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.reference-upload input {
  display: none;
}

.reference-status {
  min-width: 112px;
  max-width: 180px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.reference-status img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.reference-status em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-status.error {
  max-width: 260px;
  color: #b42318;
}

.remove-reference {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  border: 1px solid var(--line);
  font-weight: 900;
}

.composer-toolbar {
  min-height: 104px;
  padding: 22px 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #edf1f6;
  flex-wrap: wrap;
}

.model-select-wrap {
  position: relative;
  min-width: min(390px, 100%);
}

.model-trigger,
.composer-toolbar select,
.mention-btn,
.share-check,
#seedInput {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid #dfe5ee;
  background: #fff;
  color: #364254;
  font-weight: 800;
}

.model-trigger {
  width: 100%;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.model-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f5fb;
}

.chevron {
  color: #6b7280;
}

.composer-toolbar select {
  padding: 0 38px 0 16px;
}

.mention-btn {
  width: 50px;
  font-size: 1.25rem;
  background: #fafbfe;
}

.share-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: #7b8798;
}

.share-check input {
  width: 20px;
  height: 20px;
}

#seedInput {
  width: 108px;
  padding: 0 12px;
}

.generate-btn {
  margin-left: auto;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--orange);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(255, 90, 61, 0.24);
}

.generate-btn b {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.generate-estimate {
  flex-basis: 100%;
  margin-top: -4px;
  color: #7b8798;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: right;
}

.model-menu {
  position: absolute;
  left: -112px;
  bottom: calc(100% + 24px);
  width: min(620px, calc(100vw - 48px));
  max-height: 570px;
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid #e7edf5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 86px rgba(20, 32, 52, 0.18);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
  backdrop-filter: blur(22px);
}

.model-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.model-menu-title {
  margin-bottom: 16px;
  color: #526173;
  font-size: 1.15rem;
  font-weight: 900;
}

.model-option {
  width: 100%;
  min-height: 98px;
  padding: 14px 10px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.model-option:hover,
.model-option.active {
  background: #f7f9fc;
}

.horse-icon,
.seed-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #e5ebf3;
  background: #fff;
  font-size: 2rem;
}

.seed-icon {
  color: #4a8cff;
}

.model-option strong,
.model-option small {
  display: block;
}

.model-option strong {
  font-size: 1.2rem;
  line-height: 1.35;
}

.model-option em {
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #ff745f;
  color: #fff;
  font-size: 0.72rem;
  font-style: normal;
}

.model-option small {
  margin-top: 8px;
  color: #8290a1;
  font-size: 0.92rem;
}

.diagnosis-card {
  position: absolute;
  right: 64px;
  top: 96px;
  z-index: 4;
  width: 330px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(231, 235, 242, 0.92);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 54px rgba(25, 36, 56, 0.12);
  backdrop-filter: blur(18px);
}

#promptScore {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

#promptScore strong {
  font-size: 2rem;
}

#promptScore span,
.empty-note {
  color: var(--muted);
}

.check-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
  color: #526173;
}

.check-item b {
  color: var(--teal);
}

.check-item.warn b {
  color: #d97706;
}

#optimizedPrompt {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  resize: vertical;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(380px, 0.55fr);
  gap: 22px;
  margin-top: 22px;
}

body:not([data-view]) .section-grid,
body:not([data-view]) #tasksView,
body:not([data-view]) #courseCenter,
body[data-view="creator"] .section-grid,
body[data-view="creator"] #tasksView,
body[data-view="creator"] #courseCenter {
  display: none;
}

body[data-view="admin"] .category-strip,
body[data-view="admin"] #templateCenter,
body[data-view="admin"] #clonePanel,
body[data-view="admin"] #creatorView,
body[data-view="admin"] #pricingView,
body[data-view="admin"] #courseCenter,
body[data-view="admin"] .task-panel,
body[data-view="admin"] #tasksView {
  display: none;
}

body[data-view="admin"] .section-grid {
  display: block;
}

body[data-view="tasks"] .section-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-view="tasks"] .category-strip,
body[data-view="tasks"] #templateCenter,
body[data-view="tasks"] #clonePanel,
body[data-view="tasks"] #creatorView,
body[data-view="tasks"] #pricingView,
body[data-view="tasks"] #courseCenter,
body[data-view="tasks"] #adminView {
  display: none;
}

body[data-view="creator"] #legalView,
body[data-view="admin"] #legalView,
body[data-view="tasks"] #legalView,
body[data-view="courses"] #legalView {
  display: none;
}

body[data-view="courses"] .category-strip,
body[data-view="courses"] #templateCenter,
body[data-view="courses"] #clonePanel,
body[data-view="courses"] #creatorView,
body[data-view="courses"] #pricingView,
body[data-view="courses"] .section-grid,
body[data-view="courses"] #tasksView {
  display: none;
}

body[data-view="privacy"] .category-strip,
body[data-view="privacy"] #templateCenter,
body[data-view="privacy"] #clonePanel,
body[data-view="privacy"] #creatorView,
body[data-view="privacy"] #pricingView,
body[data-view="privacy"] #courseCenter,
body[data-view="privacy"] .section-grid,
body[data-view="privacy"] #tasksView,
body[data-view="terms"] .category-strip,
body[data-view="terms"] #templateCenter,
body[data-view="terms"] #clonePanel,
body[data-view="terms"] #creatorView,
body[data-view="terms"] #pricingView,
body[data-view="terms"] #courseCenter,
body[data-view="terms"] .section-grid,
body[data-view="terms"] #tasksView,
body[data-view="refund"] .category-strip,
body[data-view="refund"] #templateCenter,
body[data-view="refund"] #clonePanel,
body[data-view="refund"] #creatorView,
body[data-view="refund"] #pricingView,
body[data-view="refund"] #courseCenter,
body[data-view="refund"] .section-grid,
body[data-view="refund"] #tasksView,
body[data-view="authorization"] .category-strip,
body[data-view="authorization"] #templateCenter,
body[data-view="authorization"] #clonePanel,
body[data-view="authorization"] #creatorView,
body[data-view="authorization"] #pricingView,
body[data-view="authorization"] #courseCenter,
body[data-view="authorization"] .section-grid,
body[data-view="authorization"] #tasksView {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(21, 33, 52, 0.08);
  overflow: hidden;
}

.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.mini-btn,
.save-btn {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  background: #f2f5f9;
  color: #364254;
  font-weight: 900;
}

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

.mini-btn.danger {
  border: 1px solid rgba(225, 78, 64, 0.35);
  background: #fff5f3;
  color: #b42318;
}

#selectedTask,
.admin-form,
#taskTable,
#cloneJobTable {
  padding: 20px 22px;
}

.admin-lock {
  display: none;
  padding: 24px;
  background: #fbfcff;
}

.admin-lock.show,
#adminControls.show {
  display: block;
}

#adminControls {
  display: none;
}

.admin-lock strong {
  display: block;
  max-width: 520px;
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.admin-lock p {
  max-width: 520px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.login-form {
  max-width: 520px;
  display: grid;
  gap: 10px;
}

.login-form input {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 12px;
}

.login-form .save-btn {
  min-height: 44px;
  border-radius: 12px;
}

.task-summary {
  display: grid;
  gap: 7px;
}

.status {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #526173;
  font-size: 0.78rem;
  font-weight: 900;
}

.status.good {
  background: #ddf8ee;
  color: #16855c;
}

.status.work {
  background: #e4efff;
  color: #2563eb;
}

.status.bad {
  background: #fde8e8;
  color: #dc2626;
}

.result-video {
  width: 100%;
  margin-top: 14px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #111827;
}

.empty-state {
  min-height: 140px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed #dbe3ee;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}

.empty-state.compact {
  min-height: 88px;
  margin-top: 14px;
}

.task-mini-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-mini-grid span {
  padding: 10px;
  border-radius: 12px;
  background: #f2f5f9;
  text-align: center;
  font-weight: 900;
}

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

.admin-form label {
  display: grid;
  gap: 7px;
  color: #526173;
  font-size: 0.84rem;
  font-weight: 900;
}

input,
select,
textarea {
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  color: #111827;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: 42px;
  padding: 0 12px;
}

.admin-form textarea {
  min-height: 78px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.5;
  resize: vertical;
}

.deploy-box {
  margin: 0 22px 22px;
  padding: 14px;
  border-radius: 16px;
  background: #111827;
  color: #e5eef8;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.billing-section {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.billing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.billing-head p,
.credit-pack-head p {
  margin: 0 0 6px;
  color: var(--orange);
  font-weight: 900;
}

.billing-head h2,
.credit-pack-head h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  letter-spacing: 0;
}

.balance-card {
  min-width: 220px;
  padding: 16px;
  border-radius: 16px;
  background: #101827;
  color: #fff;
  display: grid;
  gap: 4px;
}

.balance-card span,
.balance-card small {
  color: rgba(255, 255, 255, 0.72);
}

.balance-card strong {
  font-size: 2rem;
}

.billing-alert {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.billing-alert span {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.pricing-collapsed-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f4fcfb;
  color: #087e77;
  font-weight: 900;
  line-height: 1.5;
}

.billing-section.pricing-catalog-open .pricing-collapsed-note {
  display: none;
}

.billing-section:not(.pricing-catalog-open) .plan-grid,
.billing-section:not(.pricing-catalog-open) .credit-pack-head,
.billing-section:not(.pricing-catalog-open) .credit-grid {
  display: none;
}

.plan-grid,
.credit-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.plan-grid,
.credit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card,
.credit-card {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfcff;
  display: grid;
  gap: 12px;
}

.plan-card.highlight {
  border-color: #ff896f;
  background: linear-gradient(180deg, #fff7f4, #fff);
  box-shadow: 0 18px 36px rgba(255, 90, 61, 0.12);
}

.plan-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffe8df;
  color: #d94022;
  font-size: 0.78rem;
  font-weight: 900;
}

.plan-card h3,
.credit-card h4 {
  margin: 0;
  font-size: 1.18rem;
}

.plan-card p,
.credit-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-price {
  color: #111827;
  font-size: 2rem;
  font-weight: 950;
}

.plan-price small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.plan-card > strong,
.credit-card > strong {
  color: var(--teal);
  font-size: 1.08rem;
}

.plan-card > small {
  color: var(--muted);
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
  color: #405166;
  line-height: 1.75;
}

.credit-pack-head {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.credit-pack-head span {
  color: var(--muted);
  font-weight: 900;
}

.credit-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.credit-card div span {
  font-size: 1.35rem;
  font-weight: 950;
}

.course-section {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.course-section,
.course-section *,
.course-admin-panel,
.course-admin-panel * {
  min-width: 0;
}

.course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.course-head p {
  margin: 0 0 6px;
  color: var(--orange);
  font-weight: 900;
}

.course-head h2 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.course-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.course-metrics article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  display: grid;
  gap: 4px;
}

.course-metrics span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.course-metrics strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

body[data-view="courses"] .course-metrics {
  display: none !important;
}

.course-layout {
  margin-top: 18px;
  display: block;
}

body[data-view="courses"] .course-detail {
  display: none !important;
}

body[data-view="courses"] .course-layout {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

.course-filter-bar {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.course-filter-bar input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  background: #fbfcff;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.course-card {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.course-card:hover,
.course-card.active,
.course-card[aria-selected="true"] {
  transform: translateY(-2px);
  border-color: rgba(21, 166, 157, 0.55);
  box-shadow: 0 18px 36px rgba(21, 33, 52, 0.1), 0 0 0 3px rgba(21, 166, 157, 0.09);
}

.course-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(21, 166, 157, 0.2), rgba(63, 140, 255, 0.14)),
    #eef3f8;
  overflow: hidden;
}

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

.course-card h3,
.course-detail h3,
.course-admin-table h3 {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.course-card h3 {
  font-size: 1.06rem;
}

.course-card p,
.course-detail p,
.course-admin-table p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.course-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.course-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.course-chip,
.course-status {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef3f8;
  color: #526173;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
  font-style: normal;
}

.course-chip {
  background: #e7faf7;
  color: #087e77;
}

.course-status.published {
  background: #ddf8ee;
  color: #16855c;
}

.course-card-price {
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 950;
}

.course-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.course-detail {
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 150px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
  box-shadow: 0 18px 42px rgba(21, 33, 52, 0.07);
  overflow: auto;
}

.course-detail-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.course-detail video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  background: #111827;
  overflow: hidden;
}

.course-detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.course-lesson,
.course-resource,
.course-live,
.course-question {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.course-live {
  border-color: #bdebe7;
  background: #f4fcfb;
}

.course-resource {
  background: #f8fafc;
}

.course-question {
  border-color: #d8e6ff;
  background: #f7faff;
}

.course-live-controls,
.course-question-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.course-question-form {
  margin-top: 16px;
  display: grid;
}

.course-question-form textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

.course-admin-panel {
  margin-top: 22px;
}

.course-admin-form {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.course-admin-form label {
  display: grid;
  gap: 7px;
  color: #526173;
  font-size: 0.84rem;
  font-weight: 900;
}

.course-admin-form label.wide {
  grid-column: 1 / -1;
}

.course-admin-form input,
.course-admin-form select,
.course-admin-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
}

.course-admin-form textarea {
  min-height: 108px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

.course-admin-form input[type="file"] {
  min-height: 46px;
  padding: 9px 12px;
  background: #fbfcff;
  color: var(--muted);
}

.course-admin-form > .save-btn {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 130px;
}

.course-admin-table {
  padding: 20px 22px;
  display: grid;
  gap: 10px;
  overflow-x: auto;
}

.course-admin-item {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.course-admin-item:hover,
.course-admin-item.active {
  border-color: rgba(21, 166, 157, 0.55);
  box-shadow: 0 0 0 3px rgba(21, 166, 157, 0.09);
}

.course-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.course-admin-table strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 8px;
}

.course-admin-table small {
  color: var(--muted);
  line-height: 1.45;
}

.tasks-view {
  margin-top: 22px;
}

.task-row {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) minmax(180px, 1fr) 120px;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 10px;
}

.task-row.active {
  border-color: #67a6ff;
  box-shadow: 0 0 0 3px rgba(63, 140, 255, 0.13);
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 39, 0.52);
  backdrop-filter: blur(10px);
}

.payment-modal.show {
  display: grid;
}

.payment-dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 12px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #374151;
  font-size: 1.2rem;
}

.modal-kicker {
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
}

.payment-dialog h3,
.payment-dialog p {
  margin: 0;
}

.payment-dialog p,
.payment-dialog small {
  color: var(--muted);
  line-height: 1.55;
}

.payment-qr {
  min-height: 180px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #cfd8e5;
  background:
    linear-gradient(90deg, rgba(16, 24, 39, 0.04) 25%, transparent 25% 50%, rgba(16, 24, 39, 0.04) 50% 75%, transparent 75%),
    #f8fafc;
  background-size: 28px 28px;
  display: grid;
  place-items: center;
  color: #111827;
  text-align: center;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.payment-qr-card {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
}

.payment-qr-card img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #fff;
}

.payment-qr-card strong {
  color: #111827;
  font-size: 1rem;
}

.payment-qr-card small {
  max-width: 300px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.payment-methods button {
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 3px;
  text-align: left;
}

.payment-methods button.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(21, 166, 157, 0.12);
}

.payment-methods button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.payment-methods small {
  font-size: 0.74rem;
  line-height: 1.3;
}

.payment-link {
  display: none;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #101827;
  color: #fff;
  font-weight: 900;
}

.login-panel {
  display: grid;
  gap: 10px;
}

.login-panel[hidden] {
  display: none;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.login-tab {
  min-height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 900;
}

.login-tab.active {
  background: #0f172a;
  color: #fff;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 900;
}

.login-panel input,
.sms-row input {
  min-height: 44px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 0 12px;
  background: #f8fafc;
}

.sms-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wechat-login-btn {
  min-height: 44px;
  border-radius: 12px;
  background: #17b26a;
  color: #fff;
  font-weight: 900;
}

.login-modal {
  z-index: 90;
  align-items: center;
  justify-items: center;
  padding: clamp(18px, 4vw, 54px);
  overflow: auto;
  background:
    radial-gradient(circle at 82% 8%, rgba(131, 174, 255, 0.2), transparent 30%),
    radial-gradient(circle at 18% 88%, rgba(79, 209, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #eef6ff 0%, #f8fbff 48%, #eef5ff 100%);
  backdrop-filter: none;
}

.login-modal::before,
.login-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
}

.login-modal::before {
  right: -160px;
  top: -220px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(83, 140, 236, 0.22) 0 2px, transparent 2px 18px);
  mask-image: linear-gradient(135deg, #000, transparent 72%);
}

.login-modal::after {
  left: -180px;
  bottom: -260px;
  width: 620px;
  height: 420px;
  background:
    linear-gradient(14deg, transparent 0 46%, rgba(87, 149, 231, 0.2) 47% 48%, transparent 49%),
    repeating-linear-gradient(8deg, transparent 0 18px, rgba(87, 149, 231, 0.16) 18px 20px);
  transform: rotate(-7deg);
  mask-image: linear-gradient(to top, #000, transparent 88%);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  align-content: center;
  gap: clamp(30px, 4vw, 54px);
}

.login-shell .modal-close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.86);
  color: #253044;
  box-shadow: 0 12px 30px rgba(74, 111, 167, 0.16);
}

.login-brand-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.login-brand-logo {
  width: min(330px, 72vw);
  height: auto;
  display: block;
}

.login-brand-hero h2 {
  margin: 0;
  color: #1d2633;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.login-brand-hero h2 span {
  background: linear-gradient(90deg, #4f7dff 0%, #9b55ff 52%, #1d2633 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-brand-hero h2 b {
  margin: 0 0.08em;
  color: #243044;
  font-weight: 900;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
  min-height: 520px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 228, 244, 0.92);
  box-shadow: 0 34px 96px rgba(65, 97, 150, 0.18);
  overflow: hidden;
}

.login-proof-panel {
  position: relative;
  min-height: 520px;
  padding: clamp(34px, 5vw, 62px);
  display: grid;
  align-content: center;
  gap: 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 14% 12%, rgba(64, 131, 255, 0.16), transparent 32%);
}

.login-proof-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 58%, #fff 100%);
  pointer-events: none;
}

.login-proof-title,
.login-proof-grid,
.login-proof-footer {
  position: relative;
  z-index: 1;
}

.login-proof-title {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.login-proof-title strong {
  position: relative;
  color: #1c2634;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 950;
}

.login-proof-title strong::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -8px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, #35d8e6, #477bff);
  transform: rotate(-2deg);
  z-index: -1;
  opacity: 0.7;
}

.login-proof-title span {
  color: #596b83;
  font-size: 0.92rem;
  font-weight: 850;
}

.login-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 14px;
}

.login-proof-grid span {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(223, 232, 246, 0.86);
  box-shadow: 0 14px 28px rgba(61, 91, 136, 0.07);
  color: #516176;
  font-size: 0.82rem;
  font-weight: 950;
}

.login-proof-grid span:nth-child(3n + 1) {
  color: #345bd8;
}

.login-proof-grid span:nth-child(3n + 2) {
  color: #0f8b99;
}

.login-proof-grid span:nth-child(3n) {
  color: #111827;
}

.login-proof-footer {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(240, 247, 255, 0.82);
  border: 1px solid rgba(216, 229, 247, 0.9);
}

.login-proof-footer span {
  color: #4971ff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.login-proof-footer strong {
  color: #1d2633;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 950;
}

.login-dialog {
  width: 100%;
  min-height: 520px;
  align-content: start;
  padding: clamp(38px, 5vw, 58px);
  border-radius: 28px 0 0 28px;
  box-shadow: -14px 0 34px rgba(78, 116, 176, 0.08);
  background: rgba(255, 255, 255, 0.98);
  gap: 18px;
}

.login-dialog .login-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 0 10px;
}

.login-dialog .login-tab {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa4b3;
  font-size: 1.18rem;
  font-weight: 900;
}

.login-dialog .login-tab.active {
  background: transparent;
  color: #1f6bff;
  text-shadow: 0 8px 20px rgba(31, 107, 255, 0.14);
}

.login-dialog .login-panel {
  gap: 18px;
}

.login-dialog .login-panel label {
  gap: 10px;
  color: #687486;
  font-size: 0.92rem;
  font-weight: 850;
}

.login-dialog .login-panel input,
.login-dialog .sms-row input {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #d9e0ea;
  background: #fff;
  color: #1d2633;
  font-size: 1rem;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-dialog .login-panel input::placeholder,
.login-dialog .sms-row input::placeholder {
  color: #b3bbc8;
}

.login-dialog .sms-row {
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
}

.login-dialog .mini-btn {
  min-height: 52px;
  border-radius: 14px;
  background: #eef5ff;
  color: #1f6bff;
  font-weight: 900;
}

.login-sms-status {
  min-height: 42px;
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f4f8ff;
  color: #315982;
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.45;
}

.login-sms-status[hidden] {
  display: none;
}

.login-sms-status[data-tone="success"] {
  border-color: #bdebd8;
  background: #f0fbf6;
  color: #08795c;
}

.login-sms-status[data-tone="error"] {
  border-color: #ffd0c8;
  background: #fff5f2;
  color: #c23b2a;
}

.login-sms-status[data-tone="loading"] {
  border-color: #d9e7ff;
  background: #f4f8ff;
  color: #1f6bff;
}

.login-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: #5d6878;
  font-size: 0.92rem;
  font-weight: 780;
}

.login-inline-actions button {
  padding: 0;
  background: transparent;
  color: #1f6bff;
  font-size: inherit;
  font-weight: 900;
}

.login-inline-actions .login-forgot {
  margin-left: auto;
  color: #6f7785;
  font-weight: 800;
}

.login-dialog .save-btn {
  min-height: 54px;
  margin-top: 122px;
  border-radius: 12px;
  background: #82b2fb;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 850;
  box-shadow: none;
}

.login-dialog #setPasswordForm .save-btn,
.login-dialog #phoneLoginForm .save-btn {
  margin-top: 48px;
}

.login-agreement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #687486;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.45;
}

.login-agreement input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #1f6bff;
  flex: 0 0 auto;
}

.login-agreement a {
  color: #1f6bff;
  font-weight: 900;
}

.login-dialog #loginHint {
  color: #8b96a7;
  font-size: 0.78rem;
}

.site-footer {
  max-width: 1580px;
  margin: 0 auto;
  padding: 20px 42px 42px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.site-footer-icp {
  color: #7b8797;
}

.site-footer-icp:hover,
.site-footer-icp:focus-visible {
  color: #4b16b8;
}

.legal-section {
  padding: 18px 0 42px;
}

.legal-doc {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(21, 33, 52, 0.08);
}

.legal-doc h1 {
  margin: 0 0 18px;
}

.legal-doc p {
  color: #4b5563;
  line-height: 1.8;
}

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

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 13px 16px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .header-inner {
    height: auto;
    min-height: 92px;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .diagnosis-card {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    margin: 18px auto 0;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-detail {
    position: relative;
    top: auto;
    max-height: none;
  }

  .course-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-admin-item {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.45fr) auto;
  }

  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    background: #f4f7fb;
  }

  .discover-main {
    width: 100%;
    max-width: 100vw;
    padding: 14px 14px 42px;
  }

  .header-inner {
    min-height: 82px;
    padding: 14px;
    gap: 10px;
    flex-direction: row;
    align-items: center;
  }

  .header-actions {
    width: auto;
    max-width: none;
    margin-left: auto;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 0;
  }

  .course-actions {
    margin-left: 0;
  }

  .brand-link {
    width: clamp(148px, 48vw, 190px);
    min-width: 0;
    height: 48px;
  }

  .brand-logo-img {
    height: 44px;
  }

  .pill-btn,
  .benefit-btn,
  .avatar-btn,
  .course-entry-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .desktop-action {
    display: none;
  }

  .mobile-primary-action {
    background: #101827;
    border-color: #101827;
    color: #fff;
    box-shadow: 0 10px 22px rgba(16, 24, 39, 0.16);
  }

  .mobile-pricing-action {
    display: block;
    border-color: rgba(21, 166, 157, 0.34);
    background: #effdfa;
    color: #0f766e;
  }

  body[data-view="courses"] .header-actions {
    display: none;
  }

  body[data-view="courses"] .course-actions {
    margin-left: auto;
  }

  .category-strip {
    height: 64px;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-strip::-webkit-scrollbar,
  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex: 0 0 auto;
    min-width: auto;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    filter: none;
    font-size: 0.92rem;
  }

  .template-center {
    width: auto;
    max-width: none;
    margin-right: 0;
    padding: 18px 12px;
    border-radius: 20px;
  }

  .template-grid,
  .video-template-card {
    width: 100%;
    max-width: 100%;
  }

  .template-head,
  .template-head > div,
  .template-head h2 {
    max-width: 100%;
    min-width: 0;
  }

  .template-head h2 {
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .template-head p {
    font-size: 0.9rem;
  }

  #templateCount {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .template-topline {
    left: 10px;
    right: 10px;
  }

  .template-topline span {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .clone-panel {
    margin-top: 12px;
    padding: 16px 12px;
    border-radius: 18px;
  }

  .clone-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .clone-head h2 {
    font-size: 1.08rem;
    line-height: 1.35;
  }

  .clone-grid {
    grid-template-columns: 1fr;
  }

  .clone-script-card {
    padding: 14px;
    border-radius: 14px;
  }

  .clone-script-head {
    flex-direction: column;
    gap: 8px;
  }

  .clone-script-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-script-actions .mini-btn,
  .clone-script-actions .save-btn {
    width: 100%;
  }

  .clone-package-row {
    grid-template-columns: 1fr;
  }

  .clone-card {
    padding: 14px;
    border-radius: 14px;
  }

  .clone-card.muted {
    opacity: 1;
  }

  .hero-stage {
    min-height: auto;
    padding: 22px 0 24px;
    display: block;
  }

  .blur-gallery {
    display: none;
  }

  .composer-card,
  .diagnosis-card {
    width: 100%;
  }

  .composer-card {
    border-width: 1px;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(21, 33, 52, 0.1);
  }

  .composer-head {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 20px;
  }

  .composer-head h1 {
    font-size: 1.32rem;
    line-height: 1.25;
  }

  .composer-head p {
    margin-bottom: 6px;
    font-size: 0.9rem;
  }

  .mode-badge {
    height: auto;
    min-height: 30px;
    padding: 6px 11px;
    font-size: 0.78rem;
  }

  .composer-toolbar,
  .composer-head,
  .prompt-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .prompt-wrap {
    padding-top: 12px;
  }

  #promptInput {
    min-height: 160px;
    font-size: 1rem;
    line-height: 1.65;
    padding-top: 42px;
  }

  .prompt-helper {
    top: 18px;
    right: 18px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .composer-toolbar {
    min-height: auto;
    padding-top: 16px;
    padding-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .model-select-wrap,
  .generate-btn {
    grid-column: 1 / -1;
  }

  .model-select-wrap,
  .composer-toolbar select,
  #seedInput {
    width: 100%;
  }

  .model-trigger,
  .composer-toolbar select,
  .mention-btn,
  .share-check,
  #seedInput {
    min-height: 46px;
    border-radius: 13px;
    font-size: 0.92rem;
  }

  .mention-btn {
    width: 100%;
  }

  .share-check {
    justify-content: center;
  }

  .generate-btn {
    margin-left: 0;
    justify-content: center;
    min-height: 54px;
    border-radius: 15px;
  }

  .generate-estimate {
    margin-top: -2px;
    text-align: center;
  }

  .model-menu {
    left: 0;
    right: auto;
    bottom: calc(100% + 12px);
    width: min(100%, calc(100vw - 28px));
    max-height: min(70vh, 520px);
    padding: 14px;
    border-radius: 18px;
  }

  .model-option {
    min-height: 82px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .horse-icon,
  .seed-icon {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }

  .model-option strong {
    font-size: 1rem;
  }

  .model-option small {
    font-size: 0.84rem;
  }

  .diagnosis-card {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
  }

  #promptScore strong {
    font-size: 1.5rem;
  }

  .section-grid {
    margin-top: 16px;
    gap: 16px;
  }

  .panel {
    border-radius: 18px;
  }

  .panel-head {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .billing-section {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .billing-head,
  .credit-pack-head {
    flex-direction: column;
    align-items: stretch;
  }

  .balance-card {
    min-width: 0;
  }

  #selectedTask,
  .admin-form,
  #taskTable {
    padding: 16px;
  }

  .reference-panel {
    margin-left: 18px;
    margin-right: 18px;
    border-radius: 16px;
  }

  .reference-head,
  .reference-row {
    align-items: stretch;
  }

  .reference-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .admin-form,
  .task-row,
  .task-mini-grid,
  .plan-grid,
  .credit-grid,
  .course-metrics,
  .course-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .course-head {
    display: grid;
  }

  .course-admin-form,
  .course-admin-item,
  .course-filter-bar {
    grid-template-columns: 1fr;
  }

  .video-template-card.template-wide {
    grid-column: span 1;
  }

  .video-template-card,
  .video-template-card.template-small {
    min-height: 318px;
  }

  .video-template-card.template-tall {
    min-height: 390px;
  }

  .template-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .discover-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-link {
    width: clamp(138px, 50vw, 168px);
  }

  .brand-logo-img {
    height: 40px;
  }

  .mobile-primary-action {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .mobile-pricing-action,
  .course-entry-btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .template-center {
    border-radius: 18px;
    padding: 16px 10px;
  }

  .video-template-card,
  .video-template-card.template-small {
    min-height: 304px;
  }

  .video-template-card.template-tall {
    min-height: 360px;
  }

  .template-copy {
    padding: 64px 12px 12px;
  }

  .template-copy b {
    font-size: 1rem;
  }

  .template-copy small {
    font-size: 0.82rem;
  }

  .composer-card {
    border-radius: 18px;
  }

  .composer-toolbar {
    grid-template-columns: 1fr;
  }

  .payment-dialog {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .payment-actions {
    grid-template-columns: 1fr;
  }

  .payment-methods,
  .sms-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 18px 14px 34px;
    gap: 12px;
  }

  .legal-doc {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .mention-btn,
  .share-check {
    display: none;
  }

  .prompt-helper {
    position: static;
    width: 100%;
    margin-bottom: 10px;
  }

  #promptInput {
    padding-top: 0;
    min-height: 140px;
  }

  .task-row {
    gap: 8px;
  }
}


/* PonyClip page structure update 2026-05-27 */
body[data-view="home"] #creatorView,
body[data-view="home"] #pricingView,
body[data-view="home"] #courseCenter,
body[data-view="home"] .section-grid,
body[data-view="home"] #tasksView,
body[data-view="home"] #legalView {
  display: none !important;
}

body[data-view="member"] .category-strip,
body[data-view="member"] #templateCenter,
body[data-view="member"] #clonePanel,
body[data-view="member"] #creatorView,
body[data-view="member"] #courseCenter,
body[data-view="member"] .section-grid,
body[data-view="member"] #tasksView,
body[data-view="member"] #legalView,
body[data-view="profile"] .category-strip,
body[data-view="profile"] #templateCenter,
body[data-view="profile"] #clonePanel,
body[data-view="profile"] #creatorView,
body[data-view="profile"] #pricingView,
body[data-view="profile"] #courseCenter,
body[data-view="profile"] #adminView,
body[data-view="profile"] #legalView,
body[data-view="creator"] #pricingView {
  display: none !important;
}

body[data-view="member"] #pricingView,
body[data-view="profile"] #tasksView {
  display: block !important;
}

body[data-view="profile"] .section-grid {
  display: block !important;
  grid-template-columns: minmax(0, 1fr);
}

.personal-center-btn {
  min-width: 110px;
}

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

.profile-summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  display: grid;
  gap: 7px;
}

.profile-summary-card span,
.task-table-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.profile-summary-card strong {
  color: var(--ink);
  font-size: 1.85rem;
  line-height: 1;
}

.profile-summary-card small {
  color: var(--muted);
  line-height: 1.45;
}

.profile-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.profile-account-actions .mini-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
}

.task-table-head {
  margin: 4px 0 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.task-table-head h3 {
  margin: 0;
}

body[data-view="courses"] .course-section.course-detail-mode .course-detail {
  display: grid !important;
  position: relative;
  top: auto;
  max-height: none;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body[data-view="courses"] .course-section.course-list-mode .course-detail {
  display: none !important;
}

body[data-view="courses"] .course-section.course-detail-mode .course-filter-bar,
body[data-view="courses"] .course-section.course-detail-mode .course-grid {
  display: none !important;
}

.course-card {
  cursor: pointer;
}

.course-detail-page {
  display: grid;
  gap: 18px;
}

.course-back-btn {
  justify-self: start;
  margin-bottom: 10px;
  min-height: 38px;
}

.course-detail-hero,
.course-player-card,
.course-detail-section,
.course-purchase-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(20, 31, 49, 0.06);
}

.course-detail-hero {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.course-detail-cover {
  min-height: 260px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(21, 166, 157, 0.18), rgba(63, 140, 255, 0.12)),
    #eef3f8;
}

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

.course-detail-info {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
}

.course-detail-info h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.12;
}

.course-detail-info p {
  font-size: 1rem;
}

.course-detail-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-weight: 900;
}

.course-access-pill {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 950;
}

.course-access-pill.locked {
  color: #9a3b10;
  background: #fff0df;
}

.course-access-pill.unlocked {
  color: #087e77;
  background: #e7faf7;
}

.course-detail-price {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.course-purchase-panel {
  margin-top: 6px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(260px, 1.15fr);
  gap: 14px;
  align-items: center;
  box-shadow: none;
}

.course-purchase-panel span,
.course-purchase-panel small {
  display: block;
  color: var(--muted);
  font-weight: 850;
}

.course-purchase-panel strong {
  margin-top: 4px;
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
}

.course-purchase-panel.unlocked {
  grid-template-columns: 1fr;
  background: #f4fcfb;
}

.course-purchase-actions,
.course-redeem-form {
  display: grid;
  gap: 10px;
}

.course-redeem-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.course-redeem-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: #fbfcff;
}

.course-player-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.course-player-card h3 {
  font-size: 1.15rem;
}

.course-player-card .empty-state {
  min-height: 180px;
}

.course-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.course-tabs button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.course-tabs button.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
}

body[data-view="courses"] .course-detail-page .course-detail-section {
  margin-top: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.course-overview-section {
  font-size: 1rem;
}

.course-detail-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.course-catalog-section {
  gap: 14px;
}

.course-catalog-group {
  display: grid;
  gap: 8px;
}

.course-catalog-group h4 {
  margin: 0;
  padding: 4px 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.course-catalog-row {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.course-catalog-row:hover,
.course-catalog-row.active {
  border-color: rgba(21, 166, 157, 0.45);
  box-shadow: 0 14px 30px rgba(21, 33, 52, 0.08);
  transform: translateY(-1px);
}

.course-catalog-row:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.course-catalog-row .course-lesson-title {
  font-size: 1rem;
  font-weight: 950;
}

.course-catalog-row small {
  color: var(--muted);
  font-weight: 850;
}

.course-catalog-row i {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .course-detail-hero,
  .course-purchase-panel {
    grid-template-columns: 1fr;
  }

  .course-detail-cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .course-redeem-form {
    grid-template-columns: 1fr;
  }

  .course-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .course-tabs button {
    padding: 0 10px;
  }

  .course-catalog-row {
    min-height: 68px;
  }

  .profile-summary-grid {
    grid-template-columns: 1fr;
  }

  .task-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* PonyClip sidebar navigation update 2026-05-27 */
.discover-main {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  column-gap: 22px;
  align-items: start;
}

.discover-main > :not(.category-strip) {
  grid-column: 2;
  min-width: 0;
}

.category-strip {
  grid-column: 1;
  position: sticky;
  top: 110px;
  height: auto;
  min-height: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(24, 35, 52, 0.08);
}

.category-chip {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 12px;
  filter: none !important;
  font-size: 0.92rem;
}

.workbench-action {
  background: #fff;
  border-color: var(--line);
  color: #1f2937;
  box-shadow: 0 6px 16px rgba(26, 36, 52, 0.04);
}

body[data-view="creator"] .workbench-action {
  background: #101827;
  border-color: #101827;
  color: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 39, 0.16);
}

body[data-view="admin"] .discover-main,
body[data-view="courses"] .discover-main,
body[data-view="member"] .discover-main,
body[data-view="profile"] .discover-main,
body[data-view="privacy"] .discover-main,
body[data-view="terms"] .discover-main,
body[data-view="refund"] .discover-main,
body[data-view="authorization"] .discover-main {
  display: block;
}

body[data-view="admin"] .discover-main > :not(.category-strip),
body[data-view="courses"] .discover-main > :not(.category-strip),
body[data-view="member"] .discover-main > :not(.category-strip),
body[data-view="profile"] .discover-main > :not(.category-strip),
body[data-view="privacy"] .discover-main > :not(.category-strip),
body[data-view="terms"] .discover-main > :not(.category-strip),
body[data-view="refund"] .discover-main > :not(.category-strip),
body[data-view="authorization"] .discover-main > :not(.category-strip) {
  grid-column: auto;
}

@media (max-width: 900px) {
  .discover-main {
    display: block;
  }

  .category-strip {
    position: static;
    top: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 8px;
    margin-bottom: 14px;
    border-radius: 18px;
    scrollbar-width: none;
  }

  .category-chip {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    justify-content: center;
    padding: 0 16px;
  }

  .workbench-action {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9rem;
  }
}


/* PonyClip HappyHorse-style experience layout 2026-05-28 */
.discover-header {
  background: #101827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
}

.header-inner {
  height: 72px;
  max-width: none;
  padding: 0 28px;
  justify-content: flex-start;
  gap: 24px;
}

.brand-link {
  width: auto;
  min-width: 0;
  height: 50px;
  gap: 12px;
  color: #fff;
}

.brand-logo-img {
  display: none;
}

.brand-mark-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.22));
}

.brand-word {
  color: #9dccff;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.header-actions {
  flex: 1 1 auto;
  margin-left: 22px;
  justify-content: flex-start;
  gap: 34px;
}

.nav-text-btn {
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d9e2ee;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 850;
  white-space: nowrap;
}

.nav-text-btn:hover,
body[data-view="creator"] .workbench-action,
body[data-view="member"] .member-nav-action,
body[data-view="courses"] .course-nav-action {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.nav-icon {
  color: #b8c2d4;
  font-size: 1rem;
  line-height: 1;
}

.course-actions {
  margin-left: auto;
  gap: 14px;
}

.language-switch {
  min-height: 44px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(88, 28, 135, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.language-option {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 850;
  white-space: nowrap;
}

.language-option.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.account-entry-btn {
  min-height: 46px;
  padding: 0 22px;
  max-width: 180px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.36);
  background: linear-gradient(135deg, #c4b5fd, #6d28d9 64%, #4c1d95);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(91, 33, 182, 0.32);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-entry-btn.logged-out {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(226, 232, 240, 0.24);
  box-shadow: none;
}

body[data-view="home"] .workbench-action,
body[data-view="home"] .member-nav-action,
body[data-view="home"] .course-nav-action {
  color: #d9e2ee;
}

.discover-main {
  max-width: none;
  padding: 0 42px 72px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}

.landing-hero {
  grid-column: 1 / -1;
  min-height: 520px;
  margin: 0 -42px 26px;
  padding: 72px 42px 64px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  color: #eef4ff;
  background:
    linear-gradient(180deg, rgba(16, 24, 39, 0.12), rgba(16, 24, 39, 0.9)),
    radial-gradient(circle at 48% 58%, rgba(255, 156, 46, 0.45), transparent 22%),
    radial-gradient(circle at 65% 26%, rgba(59, 130, 246, 0.42), transparent 25%),
    linear-gradient(135deg, #0b1220 0%, #111827 48%, #07111f 100%);
}

.discover-main > #landingHero {
  grid-column: 1 / -1;
}

body:not([data-view="home"]) #landingHero {
  display: none;
}

.discover-main > #aiDiagnosisEntry {
  grid-column: 1 / -1;
}

body:not([data-view="home"]) #aiDiagnosisEntry {
  display: none;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 146, 40, 0.5) 37%, rgba(255, 146, 40, 0.18) 38%, transparent 42%),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent 28%);
  opacity: 0.8;
  animation: heroSweep 9s ease-in-out infinite alternate;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.9), transparent);
  box-shadow: 0 -120px 160px rgba(251, 146, 60, 0.25);
}

.hero-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.32;
  z-index: -1;
  animation: floatGlow 8s ease-in-out infinite;
}

.hero-glow-a {
  left: 15%;
  top: 16%;
  background: #8b5cf6;
}

.hero-glow-b {
  right: 18%;
  bottom: 13%;
  background: #f97316;
  animation-delay: -3s;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.34);
  background: rgba(54, 27, 118, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  color: #e9ddff;
  font-weight: 900;
}

.hero-kicker i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  font-style: normal;
}

.landing-hero h1 {
  margin: 34px 0 18px;
  max-width: 1280px;
  font-size: clamp(3.2rem, 6vw, 5.7rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 950;
}

@media (min-width: 901px) {
  .landing-hero h1 {
    white-space: nowrap;
  }
}

.landing-hero p {
  max-width: 900px;
  margin: 0;
  color: #c9d5ea;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.65;
  font-weight: 750;
}

.hero-actions {
  margin-top: 34px;
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 248px));
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 62px;
  min-width: 248px;
  padding: 0 34px;
  border-radius: 999px;
  line-height: 1;
  font-size: 1.08rem;
  font-weight: 950;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-primary {
  gap: 12px;
  background: linear-gradient(135deg, #c4b5fd 0%, #7c3aed 48%, #26106b 100%);
  color: #fff;
  box-shadow: 0 18px 46px rgba(124, 58, 237, 0.36);
}

.hero-secondary {
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e5edf9;
}

.hero-primary:hover,
.hero-secondary:hover {
  transform: translateY(-2px);
}

.digital-human-hero-link {
  text-decoration: none;
}

.digital-human-hero-link:hover {
  border-color: rgba(196, 181, 253, 0.62);
  background: rgba(124, 58, 237, 0.2);
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.28);
}

.hero-metrics {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-metrics span {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-weight: 850;
}

.hero-metrics strong {
  color: #fff;
}

.ai-diagnosis-entry {
  margin: 0 0 26px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  border: 1px solid rgba(25, 170, 160, 0.28);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(24, 35, 52, 0.08);
}

.ai-diagnosis-entry p {
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 950;
}

.ai-diagnosis-entry h2 {
  margin: 0;
  color: #07111f;
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.ai-diagnosis-entry span {
  display: block;
  margin-top: 10px;
  max-width: 900px;
  color: #657188;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 750;
}

.ai-diagnosis-entry-btn {
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(25, 170, 160, 0.24);
  white-space: nowrap;
}

.category-strip {
  width: 132px;
  gap: 6px;
  padding: 7px;
  border-radius: 16px;
}

.category-chip {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.template-center,
.clone-panel {
  animation: contentRise 520ms ease both;
}

.video-template-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.video-template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.18);
}

@keyframes heroSweep {
  from {
    transform: translateX(-3%) scale(1);
  }
  to {
    transform: translateX(3%) scale(1.04);
  }
}

@keyframes floatGlow {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -18px, 0) scale(1.08);
  }
}

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

@media (max-width: 900px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    padding: 10px 12px;
    gap: 12px;
  }

  .brand-link {
    height: 44px;
  }

  .brand-mark-img {
    width: 34px;
    height: 34px;
  }

  .brand-word {
    display: none;
  }

  .header-actions,
  body[data-view="courses"] .header-actions {
    display: flex;
    flex: 1 1 auto;
    width: auto;
    margin-left: 0;
    gap: 16px;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .nav-text-btn {
    min-height: 40px;
    font-size: 0.9rem;
    gap: 6px;
  }

  .course-actions,
  body[data-view="courses"] .course-actions {
    margin-left: 0;
    gap: 8px;
  }

  .language-switch {
    min-height: 38px;
    padding: 3px;
  }

  .language-option {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .account-entry-btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .discover-main {
    display: block;
    padding: 0 14px 48px;
  }

  .landing-hero {
    min-height: 520px;
    margin: 0 -14px 18px;
    padding: 54px 18px 48px;
  }

  .landing-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
    white-space: normal;
  }

  .landing-hero p {
    font-size: 1rem;
  }

  .hero-primary,
  .hero-secondary {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 56px;
  }

  .hero-actions {
    width: min(100%, 320px);
    grid-template-columns: 1fr;
  }

  .ai-diagnosis-entry {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 18px;
  }

  .ai-diagnosis-entry-btn {
    width: 100%;
  }

  .category-strip {
    width: auto;
    position: static;
    top: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 8px;
    margin-bottom: 14px;
    border-radius: 18px;
    scrollbar-width: none;
  }

  .category-chip {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    justify-content: center;
    padding: 0 14px;
  }

  .reference-row {
    grid-template-columns: minmax(0, 1fr) auto 38px;
  }

  .reference-status {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

/* Profile history and workbench sidebar refinement */
.discover-main {
  grid-template-columns: clamp(180px, 15vw, 220px) minmax(0, 1fr);
  column-gap: 26px;
}

.category-strip {
  width: auto;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.category-chip {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  justify-content: flex-start;
  gap: 10px;
  font-size: 0.96rem;
  box-shadow: none;
}

.category-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.38;
}

.category-chip.active::before {
  opacity: 1;
}

#selectedTask,
#taskTable {
  padding: 14px 22px 22px;
}

body[data-view="profile"] .task-panel .panel-head {
  padding-bottom: 12px;
}

body[data-view="profile"] #selectedTask {
  padding-top: 12px;
}

/* Workbench category toolbar */
body[data-view="home"] .discover-main,
body[data-view="creator"] .discover-main {
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
}

body[data-view="home"] .discover-main > :not(.category-strip),
body[data-view="creator"] .discover-main > :not(.category-strip) {
  grid-column: 1;
}

body[data-view="home"] .category-strip,
body[data-view="creator"] .category-strip {
  grid-column: 1;
  position: static;
  top: auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0 0 22px;
  padding: 14px clamp(16px, 3vw, 36px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 42px);
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 28px;
  scrollbar-width: none;
}

body[data-view="home"] .category-strip::-webkit-scrollbar,
body[data-view="creator"] .category-strip::-webkit-scrollbar {
  display: none;
}

body[data-view="home"] .category-chip,
body[data-view="creator"] .category-chip {
  width: auto;
  min-width: clamp(132px, 13vw, 220px);
  min-height: 52px;
  flex: 0 0 auto;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #718096;
  box-shadow: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

body[data-view="home"] .category-chip:hover,
body[data-view="home"] .category-chip:focus-visible,
body[data-view="home"] .category-chip:active,
body[data-view="home"] .category-chip.active,
body[data-view="creator"] .category-chip:hover,
body[data-view="creator"] .category-chip:focus-visible,
body[data-view="creator"] .category-chip:active,
body[data-view="creator"] .category-chip.active {
  color: var(--orange);
  background: #fff2ed;
  border-color: rgba(255, 113, 82, 0.18);
  box-shadow: 0 14px 34px rgba(255, 113, 82, 0.12);
  transform: translateY(-1px);
}

body[data-view="home"] .category-chip:hover::before,
body[data-view="home"] .category-chip:focus-visible::before,
body[data-view="home"] .category-chip:active::before,
body[data-view="creator"] .category-chip:hover::before,
body[data-view="creator"] .category-chip:focus-visible::before,
body[data-view="creator"] .category-chip:active::before {
  opacity: 1;
}

.recent-history-grid.empty {
  display: grid;
}

.recent-feature-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}

.recent-feature-card > div:first-child {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.recent-feature-card strong {
  font-size: 1.02rem;
}

.recent-feature-card small {
  color: var(--muted);
  word-break: break-all;
}

.recent-preview {
  min-height: 116px;
}

.recent-preview .result-video,
.recent-preview .recent-video-lazy,
.recent-preview .empty-state {
  margin-top: 0;
  min-height: 116px;
  border-radius: 16px;
}

.recent-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recent-meta span {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f2f5f9;
  color: #344256;
  text-align: center;
  font-weight: 900;
}

#taskTable {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#taskTable .empty-state {
  grid-column: 1 / -1;
}

.clone-history-head {
  padding: 0 22px;
}

#cloneJobTable {
  display: grid;
  gap: 12px;
  padding-top: 0;
}

.clone-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.clone-history-info {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.clone-history-info strong,
.clone-history-info small,
.clone-history-info p {
  overflow-wrap: anywhere;
}

.clone-history-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.clone-history-media {
  min-width: 0;
}

.clone-history-video,
.clone-history-lazy {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  border-radius: 12px;
  background: #111827;
}

.clone-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-row.history-card {
  width: auto;
  min-height: 132px;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 9px;
  border-radius: 18px;
}

.task-row.history-card strong {
  min-height: 2.6em;
  line-height: 1.3;
}

.task-row.history-card small {
  color: var(--muted);
  word-break: break-all;
}

.task-row.history-card > span:last-child {
  color: #526173;
  font-weight: 800;
}

/* Workbench alignment: keep the composer inside the main content column. */
body[data-view="creator"] #creatorView {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 23vw, 360px);
  gap: 24px;
  align-items: start;
}

body[data-view="creator"] #creatorView .blur-gallery {
  grid-column: 1 / -1;
}

body[data-view="creator"] #creatorView .composer-card {
  grid-column: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

body[data-view="creator"] #creatorView .diagnosis-card {
  position: relative;
  top: auto;
  right: auto;
  grid-column: 2;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  body[data-view="creator"] #creatorView {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="creator"] #creatorView .diagnosis-card {
    grid-column: 1;
  }

  #taskTable {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body[data-view="creator"] #creatorView {
    min-height: auto;
    padding: 22px 0 28px;
  }

  .discover-main {
    display: block;
  }

  .category-strip {
    width: auto;
  }

  .category-chip {
    justify-content: center;
  }

  .category-chip::before {
    display: none;
  }

  .recent-feature-card,
  #taskTable,
  .clone-history-card {
    grid-template-columns: 1fr;
  }

  .recent-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clone-history-video {
    width: min(100%, 300px);
  }
}

/* Digital human agent secondary page entry */
.clone-agent-link {
  order: 2;
  display: grid;
  gap: 5px;
  margin: -6px 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.92)),
    #fff;
  color: var(--ink);
  text-decoration: none;
}

.clone-agent-link:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.clone-agent-link span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.clone-agent-link strong {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
}

.clone-agent-link small {
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.template-center.clone-workspace-mode {
  display: none;
}

.clone-flow-steps {
  order: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.clone-flow-steps span {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 950;
}

.clone-flow-steps b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
}

.clone-flow-steps span.active {
  border-color: rgba(240, 80, 58, 0.28);
  background: #fff6f2;
  color: #f0503a;
}

.clone-flow-steps span.active b {
  background: #f0503a;
  color: #fff;
}

body[data-view="creator"] #creatorView.clone-workspace-mode,
.hero-stage.clone-workspace-mode {
  display: none !important;
}

.clone-library {
  order: 5;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #fff;
}

.clone-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
}

.clone-library-title {
  display: grid;
  gap: 4px;
}

.clone-library-title span {
  color: #0d9488;
  font-size: 0.78rem;
  font-weight: 950;
}

.clone-library-title h3,
.clone-library-title p {
  margin: 0;
}

.clone-library-title h3 {
  color: #111827;
  font-size: 1.28rem;
}

.clone-library-title p {
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.45;
}

.clone-library-tabs {
  display: none !important;
}

.voice-library {
  order: 6;
}

.voice-library-console {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}

.voice-library-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
}

.voice-library-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #312842;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  padding: 0 18px;
  cursor: pointer;
}

.voice-library-tabs button.active {
  color: #6d28b2;
  background: #eee6fb;
}

.voice-add-card {
  width: min(100%, 520px);
  min-height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1.5px dashed rgba(109, 40, 178, 0.48);
  border-radius: 14px;
  background: #fff;
  color: #5b0e8f;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.voice-add-card:hover {
  transform: translateY(-2px);
  border-color: #5b0e8f;
  box-shadow: 0 18px 36px rgba(55, 32, 94, 0.11);
}

.voice-add-plus {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #5b0e8f;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.voice-add-card strong {
  font-size: 1.08rem;
  font-weight: 950;
}

.voice-add-card small {
  max-width: 360px;
  color: #7f6a9d;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.45;
}

.clone-library-tabs {
  display: flex;
  align-items: center;
  gap: 36px;
}

.clone-library-tabs button {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #8a96a8;
  font-size: 1.28rem;
  font-weight: 950;
  cursor: pointer;
}

.clone-library-tabs button.active {
  color: #111827;
}

.clone-library-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -17px;
  height: 3px;
  border-radius: 999px;
  background: #111827;
}

.clone-library-search {
  position: relative;
  width: min(100%, 330px);
  display: block;
}

.clone-library-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.clone-library-search input {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #f4f6f9;
  color: #111827;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  outline: none;
  padding: 0 16px;
}

.clone-library-search input:focus {
  box-shadow: 0 0 0 3px rgba(240, 80, 58, 0.14);
}

.clone-library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.clone-batch-btn {
  min-height: 44px;
  border: 1px solid #e4e8f0;
  border-radius: 999px;
  background: #fff;
  color: #657084;
  font: inherit;
  font-weight: 950;
  padding: 0 22px;
  cursor: pointer;
}

.clone-batch-btn {
  border-radius: 8px;
  background: #f1f3f6;
  color: #111827;
}

.clone-create-inline-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(91, 14, 143, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, #7a18c9, #4f0bb8);
  color: #fff;
  font: inherit;
  font-weight: 950;
  padding: 0 24px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(91, 14, 143, 0.2);
}

.clone-create-inline-btn:hover,
.clone-create-inline-btn:focus-visible {
  background: linear-gradient(135deg, #8623d4, #5d10c8);
  outline: none;
}

.clone-create-inline-btn span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  line-height: 1;
  font-size: 1.1rem;
}

.clone-create-inline-btn strong {
  font-weight: 950;
}

.clone-material-library {
  order: 4;
}

.clone-media-upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  margin-top: 18px;
}

.clone-media-upload-panel label:not(.clone-media-upload-control) {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.clone-media-upload-panel input[type="text"],
#cloneMediaUploadFolderInput {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e3e8f1;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  font-weight: 800;
  padding: 0 14px;
  outline: none;
}

.clone-media-upload-control {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 8px;
  background: #ecfeff;
  color: #134e4a;
  font-weight: 950;
  padding: 0 18px;
  cursor: pointer;
}

.clone-media-upload-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.clone-media-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
}

.clone-media-status[data-tone="success"] {
  background: #ecfdf5;
  color: #047857;
}

.clone-media-status[data-tone="error"] {
  background: #fef2f2;
  color: #b91c1c;
}

.clone-media-tools {
  margin-top: 16px;
}

.clone-media-folder-filters button b {
  margin-left: 6px;
  color: #94a3b8;
  font-size: 0.86em;
}

.clone-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.clone-media-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 164px auto auto;
  overflow: hidden;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.clone-media-preview {
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f8fafc;
}

.clone-media-preview img,
.clone-media-preview video,
.clone-media-preview .clone-media-lazy {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clone-media-preview audio {
  width: calc(100% - 24px);
}

.clone-media-audio-mark,
.clone-media-file-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eee6fb;
  color: #5b0e8f;
  font-weight: 950;
}

.clone-media-file-mark {
  border-radius: 12px;
  background: #e2e8f0;
  color: #334155;
}

.clone-media-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 14px 14px 0;
}

.clone-media-copy span {
  color: #0d9488;
  font-size: 0.82rem;
  font-weight: 950;
}

.clone-media-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-media-copy small {
  color: #64748b;
  font-weight: 800;
}

.clone-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.clone-media-actions button,
.clone-media-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
  color: #4b0a88;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
}

.clone-media-actions button:hover,
.clone-media-actions a:hover {
  background: #f4efff;
  border-color: #dbc7f4;
}

.clone-media-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  grid-column: 1 / -1;
  border: 1px dashed #d7deea;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.clone-media-empty strong {
  color: #111827;
  font-size: 1.08rem;
}

@media (max-width: 820px) {
  .clone-media-upload-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .clone-media-upload-control,
  .clone-media-upload-panel .clone-batch-btn {
    width: 100%;
  }

  .clone-media-grid {
    grid-template-columns: 1fr;
  }
}

.digital-human-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 24px;
  margin-top: 22px;
}

.digital-human-create-card {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  border: 2px dashed rgba(109, 40, 178, 0.46);
  border-radius: 22px;
  background: #fff;
  color: #5b0e8f;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(55, 32, 94, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.digital-human-create-card:hover,
.digital-human-create-card:focus-visible {
  transform: translateY(-2px);
  border-color: #5b0e8f;
  box-shadow: 0 26px 60px rgba(55, 32, 94, 0.14);
  outline: none;
}

.digital-human-create-plus {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7d1fd1, #4d0bc2);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.digital-human-create-card strong {
  color: #5b0e8f;
  font-size: 1.28rem;
  font-weight: 950;
}

.digital-human-card {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.digital-human-card.asset-ready {
  align-content: start;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(55, 32, 94, 0.08);
  content-visibility: auto;
  contain-intrinsic-size: 430px 360px;
}

.digital-human-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: #edf2f7;
  box-shadow: none;
}

.digital-human-media img,
.digital-human-media video,
.digital-human-media .digital-human-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.digital-human-media img.digital-human-thumb {
  background: linear-gradient(135deg, #edf2f7, #f8fafc);
}

.digital-human-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.72));
  pointer-events: none;
}

.digital-human-card.asset-ready .digital-human-media::after {
  display: none;
}

.digital-human-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #0f766e;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(255, 122, 77, 0.14)),
    #f8fafc;
  text-align: center;
}

.digital-human-placeholder strong {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  font-size: 2rem;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

.digital-human-placeholder span {
  font-size: 0.78rem;
  font-weight: 950;
}

.digital-human-menu,
.digital-human-status {
  position: absolute;
  z-index: 3;
  top: 10px;
}

.digital-human-menu {
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.digital-human-status {
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 950;
}

.digital-human-overlay {
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 8px;
}

.digital-human-overlay button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.digital-human-overlay button:first-child {
  background: linear-gradient(135deg, #ff7a4d, #f04432);
  color: #fff;
  box-shadow: 0 12px 28px rgba(240, 68, 50, 0.28);
}

.digital-human-overlay button + button {
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
}

.digital-human-overlay button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.digital-human-info {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.digital-human-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.digital-human-info strong {
  color: #111827;
  font-size: 1.02rem;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-material-count {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f1ff;
  color: #5b0e8f !important;
  font-size: 0.86rem !important;
  font-weight: 950 !important;
}

.digital-human-info span,
.digital-human-info small {
  color: #657084;
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.digital-human-card-time,
.clone-work-time {
  color: #8b5cf6 !important;
  font-weight: 900 !important;
}

.digital-human-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: stretch;
}

.digital-human-create-action {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #8a22d3, #4d0bc2);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(91, 14, 143, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.digital-human-create-action:hover,
.digital-human-create-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(91, 14, 143, 0.28);
  outline: none;
}

.digital-human-delete-action {
  min-height: 48px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.digital-human-delete-action:disabled {
  cursor: progress;
  opacity: 0.66;
}

.digital-human-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #d6dde8;
  border-radius: 12px;
  background: #f8fafc;
  color: #657084;
  text-align: center;
  padding: 22px;
}

.digital-human-empty strong {
  color: #111827;
  font-size: 1rem;
}

.digital-human-empty span {
  max-width: 460px;
  line-height: 1.55;
}

.clone-workflow-head {
  order: 7;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
}

.clone-final-head {
  order: 9;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 12px;
}

.clone-final-head h3,
.clone-final-head p {
  margin: 0;
}

.clone-final-head h3 {
  color: #111827;
  font-size: 1.12rem;
}

.clone-final-head p {
  margin-top: 4px;
  color: #64748b;
  font-weight: 850;
}

.clone-final-head > span {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 950;
}

.clone-result {
  order: 10;
}

.clone-package-card {
  order: 11;
}

.voice-asset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.voice-library-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.voice-library-section-title.public-title {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #f0ebf7;
}

.voice-library-section-title h4 {
  margin: 0;
  color: #171226;
  font-size: 1.18rem;
  font-weight: 950;
}

.voice-library-section-title span {
  display: block;
  margin-top: 4px;
  color: #8b809d;
  font-size: 0.86rem;
  font-weight: 850;
}

.voice-library-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px 20px;
}

.voice-library-card-grid.own-voices {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.public-voice-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.public-voice-gender-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.public-voice-gender-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #e5def0;
  border-radius: 999px;
  background: #fff;
  color: #3f3650;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(55, 32, 94, 0.045);
}

.public-voice-gender-tabs button span {
  min-width: 26px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #7c3aed;
  background: #f1e8fb;
  font-size: 0.78rem;
  font-weight: 950;
}

.public-voice-gender-tabs button.active,
.public-voice-gender-tabs button:hover {
  color: #fff;
  border-color: #5b0e8f;
  background: #5b0e8f;
  box-shadow: 0 12px 26px rgba(91, 14, 143, 0.18);
}

.public-voice-gender-tabs button.active span,
.public-voice-gender-tabs button:hover span {
  color: #5b0e8f;
  background: #fff;
}

.public-voice-filters button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid #e9e2f4;
  border-radius: 999px;
  background: #fff;
  color: #6f647f;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.public-voice-filters button span {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  color: #7c3aed;
  background: #f3edfc;
  font-size: 0.76rem;
  font-weight: 950;
}

.public-voice-filters button.active,
.public-voice-filters button:hover {
  color: #4b0a88;
  border-color: rgba(109, 40, 178, 0.26);
  background: #eee6fb;
}

.public-voice-filters button.active span,
.public-voice-filters button:hover span {
  color: #fff;
  background: #7c3aed;
}

.public-voice-groups {
  display: grid;
  gap: 22px;
}

.public-voice-gender-group {
  display: grid;
  gap: 14px;
}

.public-voice-gender-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.public-voice-gender-title strong {
  color: #171226;
  font-size: 1rem;
  font-weight: 950;
}

.public-voice-gender-title span {
  color: #8b809d;
  font-size: 0.82rem;
  font-weight: 850;
}

.voice-asset-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px 20px;
  border: 1px solid #ece6f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(55, 32, 94, 0.05);
}

.voice-asset-card.selected {
  border-color: rgba(109, 40, 178, 0.42);
  box-shadow: 0 16px 34px rgba(109, 40, 178, 0.13);
}

.voice-asset-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(75, 10, 136, 0.72);
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.95), transparent 38%),
    linear-gradient(135deg, #bff8df, #f5d9e9 58%, #b9d9ff);
  font-size: 1.25rem;
  font-weight: 950;
}

.voice-asset-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.voice-asset-main strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.voice-asset-main small,
.voice-asset-main p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.voice-asset-status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 950;
}

.voice-asset-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.voice-asset-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #5b0e8f;
  color: #fff;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.voice-asset-actions button.danger {
  color: #991b1b;
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.voice-asset-time {
  color: #8b5cf6 !important;
}

.voice-asset-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.public-voice-card {
  min-height: 136px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid #ece6f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(55, 32, 94, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.public-voice-card:hover,
.public-voice-card.selected {
  transform: translateY(-1px);
  border-color: rgba(109, 40, 178, 0.38);
  box-shadow: 0 16px 34px rgba(109, 40, 178, 0.12);
}

.public-voice-card.gender-female {
  border-left: 4px solid #d8b4fe;
}

.public-voice-card.gender-male {
  border-left: 4px solid #93c5fd;
}

.public-voice-card.gender-other {
  border-left: 4px solid #bbf7d0;
}

.public-voice-main {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.public-voice-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(75, 10, 136, 0.72);
  font-size: 1.2rem;
  font-weight: 950;
}

.public-voice-avatar.tone-1 {
  background: linear-gradient(135deg, #e5d9ff, #c9f5e4 52%, #bee0ff);
}

.public-voice-avatar.tone-2 {
  background: linear-gradient(135deg, #c9f5e4, #ffe0ec 55%, #d6d4ff);
}

.public-voice-avatar.tone-3 {
  background: linear-gradient(135deg, #dbeafe, #cef5e5 54%, #ffe8b8);
}

.public-voice-avatar.tone-4 {
  background: linear-gradient(135deg, #f5d0fe, #d1fae5 55%, #bfdbfe);
}

.public-voice-avatar.tone-5 {
  background: linear-gradient(135deg, #d8f3dc, #fbcfe8 55%, #ddd6fe);
}

.public-voice-avatar.tone-6 {
  background: linear-gradient(135deg, #c7d2fe, #fef3c7 54%, #bbf7d0);
}

.public-voice-avatar.tone-7 {
  background: linear-gradient(135deg, #fecdd3, #d9f99d 52%, #bae6fd);
}

.public-voice-avatar.tone-8 {
  background: linear-gradient(135deg, #bfdbfe, #fce7f3 52%, #bbf7d0);
}

.public-voice-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.public-voice-copy strong {
  color: #171226;
  font-size: 1.02rem;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-voice-chip {
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #9b93a8;
  background: #f0eef3;
  font-size: 0.82rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-voice-copy small {
  color: #8b809d;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.public-voice-use {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #5b0e8f;
  background: #f1e8fb;
  font-size: 0.8rem;
  font-weight: 950;
}

.public-voice-card.selected .public-voice-use {
  color: #fff;
  background: #5b0e8f;
}

.public-voice-preview {
  width: 100%;
  height: 32px;
}

.voice-empty.compact {
  min-height: 128px;
  align-content: center;
}

.clone-workflow-head h3,
.clone-workflow-head p {
  margin: 0;
}

.clone-workflow-head h3 {
  color: #111827;
  font-size: 1.12rem;
}

.clone-workflow-head p {
  margin-top: 4px;
  color: #657084;
  font-weight: 850;
  line-height: 1.5;
}

.clone-workflow-head > span {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff2ed;
  color: #f05b3f;
  font-size: 0.8rem;
  font-weight: 950;
}

.clone-preview-modal[hidden] {
  display: none;
}

.clone-preview-modal {
  position: fixed;
  z-index: 5000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.clone-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.clone-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  max-height: 92vh;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
}

.clone-preview-head,
.clone-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clone-preview-head h3,
.clone-preview-head span {
  margin: 0;
}

.clone-preview-head span {
  color: #0d9488;
  font-size: 0.78rem;
  font-weight: 950;
}

.clone-preview-head h3 {
  margin-top: 4px;
  color: #111827;
  font-size: 1.2rem;
}

.clone-preview-head button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font-weight: 950;
  cursor: pointer;
}

.clone-preview-body {
  display: grid;
  gap: 12px;
}

.clone-preview-body video,
.clone-preview-body img,
.clone-preview-body .clone-preview-lazy {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 68vh;
  border-radius: 12px;
  background: #111827;
  object-fit: contain;
}

.clone-preview-meta {
  display: grid;
  gap: 4px;
  color: #657084;
  font-weight: 850;
}

.clone-preview-meta strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.clone-preview-actions .clone-submit {
  width: auto;
  min-width: 190px;
  padding: 0 18px;
}

.digital-human-card.person-card {
  cursor: default;
}

.digital-human-secondary-action {
  min-height: 48px;
  border-radius: 12px;
  background: #f5f1ff;
  color: #5b0e8f;
  font-size: 0.9rem;
  font-weight: 950;
}

.clone-preview-dialog:has(.clone-person-detail) {
  width: min(94vw, 1080px);
}

.clone-person-detail {
  display: grid;
  gap: 16px;
}

.clone-person-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7d8ff;
  border-radius: 14px;
  background: #fbf8ff;
}

.clone-person-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.clone-person-summary strong {
  color: #111827;
  font-size: 1.1rem;
  font-weight: 950;
}

.clone-person-summary span {
  color: #657084;
  font-size: 0.88rem;
  font-weight: 850;
}

.clone-person-upload {
  position: relative;
  flex: 0 0 auto;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 2px solid #7c3aed;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbf7ff 0%, #f0e7ff 100%);
  color: #4c1d95;
  font-size: 0.96rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.clone-person-upload::before {
  content: "+";
  width: 24px;
  height: 24px;
  margin-right: 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

.clone-person-upload:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fff 0%, #efe3ff 100%);
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.22);
}

.clone-person-upload.is-loading {
  cursor: progress;
  opacity: 0.72;
}

.clone-person-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.clone-person-upload-status {
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 900;
}

.clone-person-upload-status[data-tone="success"] {
  background: #ecfdf5;
  color: #047857;
}

.clone-person-upload-status[data-tone="error"] {
  background: #fff1f2;
  color: #be123c;
}

.clone-person-variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.clone-person-variant-card {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(55, 32, 94, 0.08);
}

.clone-person-variant-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #edf2f7;
}

.clone-person-variant-media img,
.clone-person-variant-media video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  border-radius: 0;
  object-fit: cover;
  background: #edf2f7;
}

.clone-person-variant-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.clone-person-variant-copy strong {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-person-variant-copy span,
.clone-person-variant-copy small {
  color: #657084;
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.clone-person-variant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clone-person-variant-actions .mini-btn {
  min-height: 36px;
  border-radius: 9px;
  font-size: 0.84rem;
}

.clone-person-variant-actions [data-avatar-use],
.clone-person-variant-actions [data-avatar-media-use] {
  min-height: 44px;
  border: 2px solid #6d28d9;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(91, 33, 182, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.clone-person-variant-actions [data-avatar-use]::before,
.clone-person-variant-actions [data-avatar-media-use]::before {
  content: "→";
  margin-right: 6px;
  font-weight: 950;
}

.clone-person-variant-actions [data-avatar-use]:hover,
.clone-person-variant-actions [data-avatar-media-use]:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 16px 34px rgba(91, 33, 182, 0.28);
}

@media (max-width: 760px) {
  .clone-preview-modal {
    padding: 10px;
    place-items: end center;
  }

  .clone-preview-dialog:has(.clone-person-detail) {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .clone-person-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-person-upload {
    width: 100%;
  }

  .clone-person-variant-grid {
    grid-template-columns: 1fr;
  }

  .clone-person-variant-card {
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: start;
  }

  .clone-person-variant-media {
    aspect-ratio: 4 / 5;
  }

  .clone-person-variant-actions {
    grid-column: 1 / -1;
  }

  .clone-person-variant-actions .mini-btn {
    flex: 1 1 92px;
  }
}

/* Digital-human studio layout */
.clone-panel.show {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px 20px;
  align-items: start;
  padding: 24px;
  border: 0;
  border-radius: 18px;
  background: #f6f8fb;
  box-shadow: none;
}

.clone-panel.show .clone-head,
.clone-panel.show .clone-agent-link,
.clone-panel.show .clone-flow-steps,
.clone-panel.show .clone-final-head,
.clone-panel.show .clone-result,
.clone-panel.show .clone-package-card,
.clone-panel.show .clone-preview-modal {
  grid-column: 1 / -1;
}

.clone-panel.show .clone-head {
  margin: 0;
  padding: 0 2px;
}

.clone-panel.show .clone-head p {
  color: #0d9488;
  font-size: 0.88rem;
}

.clone-panel.show .clone-head h2 {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: 0;
}

.clone-panel.show #cloneModePill {
  min-height: 34px;
  background: #eafaf7;
  color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.clone-panel.show .clone-agent-link {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: min(100%, 300px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border-color: #e4e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.clone-panel.show .clone-agent-link span,
.clone-panel.show .clone-agent-link small {
  display: none;
}

.clone-panel.show .clone-agent-link strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.clone-panel.show .clone-flow-steps {
  margin: 0;
  padding: 14px;
  border: 1px solid #e7ebf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.clone-panel.show #cloneLibrary {
  grid-column: 1;
  grid-row: 4;
  margin: 0;
  min-height: 0;
}

.clone-panel.show #cloneVoiceLibraryPanel,
.clone-panel.show #cloneVoiceMarketPanel {
  grid-column: 1;
  grid-row: 5;
  margin: 0;
}

.clone-panel.show .clone-workflow-head {
  grid-column: 2;
  grid-row: 4;
  margin: 0;
  align-self: start;
  padding: 18px 18px 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
  border: 1px solid #e8edf4;
  border-bottom: 0;
  align-items: flex-start;
  flex-direction: column;
}

.clone-panel.show .clone-workflow-head h3 {
  font-size: 1.28rem;
}

.clone-panel.show .clone-workflow-head > span {
  background: #eafaf7;
  color: #0f766e;
}

.clone-panel.show #cloneScriptCard {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  margin: 142px 0 0;
  border-radius: 0;
  border-color: #e8edf4;
  border-top: 0;
  border-bottom: 0;
  background: #fff;
}

.clone-panel.show .clone-grid {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 600px;
  padding: 0 18px 18px;
  border: 1px solid #e8edf4;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.clone-panel.show .clone-card {
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.clone-panel.show .clone-card.muted {
  opacity: 1;
}

.clone-panel.show .clone-library {
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.clone-panel.show .clone-library-head {
  align-items: flex-start;
}

.clone-panel.show .clone-library-title h3 {
  font-size: 1.2rem;
}

.clone-panel.show .clone-library-search input,
.clone-panel.show .clone-card input,
.clone-panel.show .clone-card select,
.clone-panel.show .clone-card textarea,
.clone-panel.show .clone-script-card textarea {
  border-radius: 10px;
  background: #f6f8fb;
}

.clone-panel.show .digital-human-grid {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 18px;
}

.clone-panel.show .digital-human-media {
  border-radius: 12px;
  box-shadow: none;
}

.clone-panel.show .digital-human-card {
  padding: 10px;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  background: #fff;
}

.clone-panel.show .digital-human-info strong {
  font-size: 0.9rem;
}

.clone-panel.show .clone-final-head {
  margin: 0;
  padding: 4px 2px 0;
}

.clone-panel.show .clone-result {
  margin: 0;
  border: 1px solid #e8edf4;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.clone-panel.show .clone-package-card {
  margin: 0;
  border-color: #e8edf4;
  background: #fff;
}

@media (max-width: 1120px) {
  .clone-panel.show {
    grid-template-columns: 1fr;
  }

  .clone-panel.show .clone-agent-link,
  .clone-panel.show #cloneLibrary,
  .clone-panel.show #cloneVoiceLibraryPanel,
  .clone-panel.show #cloneVoiceMarketPanel,
  .clone-panel.show #cloneCopyAgentPage,
  .clone-panel.show .clone-workflow-head,
  .clone-panel.show #cloneScriptCard,
  .clone-panel.show .clone-grid {
    grid-column: 1;
    grid-row: auto;
  }

  .clone-panel.show .clone-agent-link {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .clone-library {
    padding: 14px;
    border-radius: 14px;
  }

  .clone-library-head,
  .clone-library-tools,
  .clone-workflow-head,
  .clone-final-head,
  .clone-preview-head,
  .clone-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-library-tabs {
    gap: 22px;
    overflow-x: auto;
  }

  .clone-flow-steps {
    grid-template-columns: 1fr;
  }

  .voice-asset-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .voice-asset-actions {
    grid-column: 1;
  }

  .voice-asset-actions button {
    width: 100%;
  }

  .clone-library-tabs button {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .clone-library-search {
    width: 100%;
  }

  .clone-batch-btn {
    width: fit-content;
  }

  .digital-human-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .digital-human-overlay {
    left: 9px;
    right: 9px;
    bottom: 9px;
  }

  .digital-human-overlay button {
    min-height: 36px;
    font-size: 0.82rem;
  }

  .clone-preview-dialog {
    width: min(94vw, 560px);
    padding: 14px;
  }

  .clone-preview-actions .clone-submit,
  .clone-preview-actions .mini-btn {
    width: 100%;
  }
}

/* Left navigation + digital-human library workspace */
.clone-panel.show {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 18px 26px;
  align-items: start;
  min-height: 760px;
  margin-top: 18px;
  padding: 22px 24px 36px;
  border: 0;
  border-radius: 0;
  background: #f6f3fb;
  box-shadow: none;
  scroll-margin-top: 96px;
}

.clone-panel.show .clone-side-nav {
  grid-column: 1;
  grid-row: 1 / span 24;
  position: sticky;
  top: 104px;
  order: 0 !important;
}

.clone-side-nav {
  min-height: 650px;
  padding: 22px 16px;
  border-right: 1px solid rgba(124, 101, 156, 0.18);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
}

.clone-side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  padding: 0 8px 8px;
}

.clone-side-brand span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 950;
  background: linear-gradient(145deg, #5b0e8f, #2e006e);
  box-shadow: 0 14px 28px rgba(83, 25, 138, 0.28);
}

.clone-side-brand-mark {
  width: 46px;
  height: 46px;
  display: block;
  flex: 0 0 auto;
  border-radius: 12px;
  filter: drop-shadow(0 14px 28px rgba(83, 25, 138, 0.22));
}

.clone-side-brand strong {
  color: #171226;
  font-size: 1.12rem;
  line-height: 1.2;
}

.clone-side-nav button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #2d243d;
  background: transparent;
  font-size: 1rem;
  font-weight: 900;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.clone-side-nav button:hover {
  background: rgba(110, 38, 173, 0.08);
  color: #4b0a88;
}

.clone-side-nav button.active {
  color: #4b0a88;
  background: #eee6fb;
}

.clone-side-nav button i {
  width: 28px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #6d28b2;
  background: rgba(109, 40, 178, 0.1);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.clone-panel.show .clone-head,
.clone-panel.show .clone-agent-link,
.clone-panel.show .clone-flow-steps,
.clone-panel.show #cloneHomePanel,
.clone-panel.show #cloneMaterialLibraryPanel,
.clone-panel.show .clone-quick-card,
.clone-panel.show #cloneLibrary,
.clone-panel.show #cloneVoiceLibraryPanel,
.clone-panel.show #cloneVoiceMarketPanel,
.clone-panel.show #cloneCopyAgentPage,
.clone-panel.show .clone-workflow-head,
.clone-panel.show #cloneScriptCard,
.clone-panel.show .clone-grid,
.clone-panel.show .clone-final-head,
.clone-panel.show .clone-result,
.clone-panel.show #cloneWorksPanel,
.clone-panel.show .clone-package-card {
  grid-column: 2 !important;
  grid-row: auto !important;
  align-self: start;
}

.clone-panel.show .clone-agent-link {
  display: none;
}

.clone-panel.show .clone-quick-card {
  display: none;
}

.clone-panel.show .clone-head {
  min-height: 62px;
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(124, 101, 156, 0.18);
  order: 1 !important;
}

.clone-panel.show .clone-head p {
  color: #7f6a9d;
  font-size: 0.86rem;
}

.clone-panel.show .clone-head h2 {
  color: #171226;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: 0;
}

.clone-panel.show #cloneModePill {
  min-height: 34px;
  border-radius: 18px;
  background: #fff2d9;
  color: #8a4d00;
  box-shadow: inset 0 0 0 1px rgba(255, 178, 74, 0.36);
}

.clone-panel.show .clone-flow-steps {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(124, 101, 156, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
  order: 2 !important;
}

.clone-panel.show .clone-flow-steps span {
  min-height: 44px;
  border-color: #ece6f5;
  background: #fbfaff;
  color: #695c7d;
}

.clone-panel.show .clone-flow-steps span.active {
  border-color: rgba(109, 40, 178, 0.28);
  background: #eee6fb;
  color: #4b0a88;
}

.clone-panel.show .clone-flow-steps span.active b {
  background: #5b0e8f;
}

.clone-quick-card {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  order: 3 !important;
}

.clone-quick-create {
  min-height: 248px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px 22px;
  border: 1.6px dashed rgba(109, 40, 178, 0.48);
  border-radius: 18px;
  color: #4b0a88;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.07);
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.clone-quick-create:hover {
  transform: translateY(-2px);
  border-color: #5b0e8f;
  box-shadow: 0 24px 48px rgba(55, 32, 94, 0.12);
}

.clone-quick-plus {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #4b0a88;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.clone-quick-create strong {
  font-size: 1.1rem;
}

.clone-quick-create small,
.clone-quick-guide span {
  color: #7f6a9d;
  line-height: 1.55;
}

.clone-quick-guide {
  min-height: 248px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px 28px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(124, 101, 156, 0.13);
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
}

.clone-quick-guide strong {
  color: #171226;
  font-size: 1.3rem;
}

.clone-panel.show .clone-library,
.clone-panel.show .clone-workflow-head,
.clone-panel.show .clone-script-card,
.clone-panel.show .clone-grid,
.clone-panel.show .clone-result,
.clone-panel.show .clone-package-card {
  border: 1px solid rgba(124, 101, 156, 0.13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
}

.clone-panel.show #cloneLibrary,
.clone-panel.show #cloneVoiceLibraryPanel,
.clone-panel.show #cloneVoiceMarketPanel {
  margin: 0;
  padding: 22px;
}

.clone-panel.show #cloneLibrary {
  order: 4 !important;
}

.clone-panel.show #cloneVoiceLibraryPanel {
  order: 5 !important;
}

.clone-panel.show #cloneVoiceMarketPanel {
  order: 5 !important;
}

.clone-panel.show .clone-library-title span {
  color: #6d28b2;
}

.clone-panel.show .clone-library-title h3 {
  color: #171226;
  font-size: 1.24rem;
}

.clone-panel.show .clone-library-search input,
.clone-panel.show .clone-card input,
.clone-panel.show .clone-card select,
.clone-panel.show .clone-card textarea,
.clone-panel.show .clone-script-card textarea {
  border-radius: 12px;
  background: #f8f7fb;
  border-color: #e5dfef;
}

.clone-panel.show .clone-batch-btn,
.clone-panel.show .mini-btn {
  border: 1px solid #e5dfef;
  background: #f4f1fa;
  color: #4b0a88;
}

.clone-panel.show .save-btn,
.clone-panel.show .clone-submit {
  background: #ff5b3f;
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 91, 63, 0.18);
}

.clone-panel.show .clone-workflow-head {
  margin: 0;
  padding: 22px 22px 0;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  order: 6 !important;
}

.clone-panel.show .clone-workflow-head > span {
  color: #4b0a88;
  background: #eee6fb;
}

.clone-panel.show #cloneScriptCard {
  margin: 0 !important;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  order: 7 !important;
}

.clone-panel.show .clone-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 !important;
  padding: 0 22px 22px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
  order: 8 !important;
}

.clone-panel.show .clone-card {
  padding: 18px;
  border-radius: 14px;
  background: #fbfaff;
  border-color: #ece6f5;
}

.clone-panel.show .clone-card.muted {
  opacity: 1;
}

.clone-panel.show .digital-human-grid {
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 24px;
}

.clone-panel.show .digital-human-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(55, 32, 94, 0.08);
}

.clone-panel.show .digital-human-media {
  border-radius: 18px;
}

.clone-panel.show .digital-human-create-action {
  background: linear-gradient(135deg, #8a22d3, #4d0bc2);
}

.clone-panel.show .clone-final-head {
  margin: 0;
  order: 9 !important;
}

.clone-panel.show .clone-result,
.clone-panel.show .clone-package-card {
  margin: 0;
}

.clone-panel.show .clone-result {
  order: 10 !important;
}

.clone-panel.show .clone-package-card {
  order: 11 !important;
}

.clone-create-modal[hidden] {
  display: none;
}

.clone-create-modal {
  position: fixed;
  z-index: 6200;
  inset: 0;
  display: grid;
  justify-items: end;
  background: rgba(18, 12, 30, 0.48);
}

.clone-create-backdrop {
  position: fixed;
  inset: 0;
}

.clone-create-dialog {
  position: relative;
  width: min(1120px, 58vw);
  min-width: 720px;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: #fff;
  box-shadow: -24px 0 70px rgba(18, 12, 30, 0.22);
}

.clone-create-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid #ece6f5;
}

.clone-create-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #8b809d;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
}

.clone-create-head h3 {
  margin: 0;
  color: #171226;
  font-size: 1.22rem;
}

.clone-create-body {
  overflow: auto;
  padding: 28px 30px 32px;
}

.clone-create-body h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #171226;
  font-size: 1.12rem;
}

.clone-create-body h4 span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6d28b2;
  font-size: 0.9rem;
  font-weight: 950;
}

.voice-create-dialog {
  width: min(880px, 50vw);
  min-width: 640px;
}

.voice-create-body {
  display: grid;
  gap: 18px;
  align-content: start;
}

.voice-requirements {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.voice-field {
  display: grid;
  gap: 8px;
  color: #312842;
  font-size: 0.9rem;
  font-weight: 900;
}

.voice-field input,
.voice-field textarea,
.voice-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid #e5dfef;
  border-radius: 12px;
  background: #f8f7fb;
  color: #171226;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.voice-field input,
.voice-field select {
  min-height: 48px;
  padding: 0 14px;
}

.voice-field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #6d28b2 50%) right 18px center / 7px 7px no-repeat,
    linear-gradient(135deg, #6d28b2 50%, transparent 50%) right 12px center / 7px 7px no-repeat,
    #f8f7fb;
  padding-right: 42px;
}

.voice-field textarea {
  resize: vertical;
  min-height: 86px;
  padding: 12px 14px;
  line-height: 1.5;
}

.voice-field input:focus,
.voice-field textarea:focus,
.voice-field select:focus {
  border-color: rgba(109, 40, 178, 0.52);
  box-shadow: 0 0 0 3px rgba(109, 40, 178, 0.1);
}

.voice-dropzone {
  min-height: 190px;
}

.clone-requirements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 12px;
  color: #6c6477;
  background: #f7f6fa;
  font-weight: 850;
}

.clone-requirements strong {
  grid-column: 1 / -1;
  color: #171226;
  font-size: 1rem;
}

.clone-requirements.voice-requirements {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.clone-video-dropzone {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 34px;
  border: 1.6px dashed rgba(109, 40, 178, 0.42);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.clone-video-dropzone.voice-dropzone {
  min-height: 168px;
  padding: 28px 22px 24px;
  gap: 10px;
}

.clone-video-dropzone input.clone-asset-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
  z-index: 5;
}

.clone-video-dropzone > :not(input) {
  pointer-events: none;
}

.clone-upload-cloud {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #6d28b2;
  background: #f0e7fb;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.clone-video-dropzone strong {
  color: #171226;
  font-size: 1.05rem;
}

.clone-video-dropzone small {
  color: #8b809d;
  font-size: 0.96rem;
}

.wechat-file-button,
.wechat-file-hint {
  display: none;
}

.voice-dropzone .wechat-file-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #6d28b2;
  box-shadow: 0 10px 22px rgba(109, 40, 178, 0.16);
  font-size: 0.9rem;
  font-weight: 950;
  cursor: pointer;
}

.voice-dropzone .wechat-file-hint {
  display: block;
  color: #6f6484;
  font-size: 0.84rem;
  line-height: 1.48;
}

.clone-video-dropzone .clone-upload-status {
  min-height: 22px;
  color: #4b0a88;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 850;
}

.clone-video-dropzone .clone-upload-status.error {
  color: #b42318;
}

.clone-video-dropzone .clone-upload-status.success {
  color: #08795c;
}

.clone-create-footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0 30px;
  border-top: 1px solid #ece6f5;
  background: #fff;
}

.clone-create-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #312842;
  font-size: 1rem;
  font-weight: 850;
}

.clone-create-consent input {
  width: 22px;
  height: 22px;
  accent-color: #6d28b2;
}

.clone-create-status {
  flex: 1 1 300px;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #ded6ec;
  border-radius: 10px;
  background: #f8f5ff;
  color: #554467;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.35;
}

.clone-create-status[hidden] {
  display: none;
}

.clone-create-status[data-tone="loading"] {
  border-color: #d9c7ff;
  background: #f5efff;
  color: #5b16a3;
}

.clone-create-status[data-tone="success"] {
  border-color: #bdebd8;
  background: #f0fbf6;
  color: #08795c;
}

.clone-create-status[data-tone="error"] {
  border-color: #ffd0c8;
  background: #fff5f2;
  color: #c23b2a;
}

#quickVoiceStatus {
  display: grid;
  gap: 6px;
  min-width: min(100%, 360px);
}

#quickVoiceStatus[hidden] {
  display: none;
}

#quickVoiceStatus strong,
#quickVoiceStatus span,
#quickVoiceStatus small {
  display: block;
}

#quickVoiceStatus small {
  color: #6b7280;
  font-size: 0.82rem;
}

.voice-upload-ready-audio {
  width: min(100%, 420px);
  height: 36px;
}

.clone-create-consent span {
  color: #4b0a88;
}

.clone-create-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clone-create-confirm {
  min-width: 116px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 10px;
  color: #fff;
  background: #4b0a88;
  font-size: 1rem;
  font-weight: 950;
}

.clone-panel.show {
  font-size: 17px;
}

.clone-panel.show [data-clone-page][hidden] {
  display: none !important;
}

.clone-panel.show .clone-head h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.12;
}

.clone-panel.show input,
.clone-panel.show textarea,
.clone-panel.show select,
.clone-panel.show button {
  font-size: 1rem;
}

.clone-side-nav button {
  min-height: 64px;
  font-size: 1.1rem;
}

.clone-panel.show {
  grid-template-columns: 306px minmax(0, 1fr);
}

.clone-side-nav {
  min-height: calc(100vh - 132px);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
}

.clone-side-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.clone-side-section-label {
  margin: 8px 0 12px;
  padding: 0 4px;
  color: #aaa1b8;
  font-size: 1.05rem;
  font-weight: 850;
}

.clone-side-section-label.manage {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(124, 101, 156, 0.16);
}

.clone-side-nav button {
  min-height: 68px;
  gap: 18px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.clone-side-nav button i {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.clone-side-nav button.active {
  color: #6d14c9;
  background: #eee6fb;
}

.clone-side-footer {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(124, 101, 156, 0.16);
}

.clone-side-nav .clone-side-create {
  min-height: 76px;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #8b10d5, #4d0be3);
  font-size: 1.25rem;
  font-weight: 950;
  box-shadow: 0 18px 34px rgba(91, 20, 196, 0.28);
}

.clone-side-nav .clone-side-account {
  min-height: 84px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 20px;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 101, 156, 0.16);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 34px rgba(55, 32, 94, 0.08);
}

.clone-side-account-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8b10d5, #4d0be3);
  font-size: 1.4rem;
  font-weight: 950;
}

.clone-side-account-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.clone-side-account-copy strong {
  color: #171226;
  font-size: 1.08rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-side-account-copy small {
  color: #aaa1b8;
  font-size: 0.98rem;
  font-weight: 800;
}

.clone-side-account-arrow {
  color: #171226;
  font-size: 1.2rem;
  font-weight: 900;
}

.clone-home-panel {
  order: 3 !important;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(62, 29, 100, 0.08);
}

.clone-home-hero {
  max-width: 820px;
}

.clone-home-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  color: #6d28b2;
  font-weight: 950;
}

.clone-home-hero h3 {
  margin: 0 0 12px;
  color: #171226;
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.15;
}

.clone-home-hero p {
  margin: 0;
  color: #74658f;
  font-size: 1.08rem;
  line-height: 1.75;
  font-weight: 800;
}

.clone-home-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.clone-home-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(111, 64, 156, 0.16);
  border-radius: 18px;
  color: #241a35;
  background: #fbfaff;
  text-align: left;
  box-shadow: 0 14px 34px rgba(71, 36, 122, 0.06);
}

.clone-home-card:hover {
  border-color: rgba(109, 40, 178, 0.35);
  transform: translateY(-2px);
}

.clone-home-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #6d28b2;
  background: #eee6fb;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 950;
}

.clone-copy-agent-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.clone-copy-agent-intro {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.clone-copy-agent-intro h3 {
  margin: 0;
  color: #171226;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.18;
}

.clone-copy-agent-intro p {
  margin: 0;
  color: #74658f;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.7;
}

.clone-copy-agent-host {
  display: grid;
  gap: 16px;
}

.clone-panel.show #cloneCopyAgentPage {
  grid-column: 2 !important;
  order: 6 !important;
  margin: 0;
}

.clone-home-card strong {
  color: #171226;
  font-size: 1.18rem;
  line-height: 1.25;
}

.clone-home-card span {
  color: #74658f;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 750;
}

.clone-panel.show .clone-library-title h3,
.clone-panel.show .clone-workflow-head h3,
.clone-panel.show .clone-script-head h3,
.clone-panel.show .clone-final-head h3 {
  font-size: 1.55rem;
}

.clone-panel.show .clone-library-title p,
.clone-panel.show .clone-workflow-head p,
.clone-panel.show .clone-script-head p,
.clone-panel.show .clone-final-head p {
  font-size: 1.05rem;
  line-height: 1.65;
}

.clone-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.clone-works-library {
  order: 3 !important;
}

.clone-work-card {
  overflow: hidden;
  border: 1px solid rgba(124, 101, 156, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(62, 29, 100, 0.08);
}

.clone-work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f6f3fb;
}

.clone-work-media video,
.clone-work-media img,
.clone-work-media .clone-work-lazy {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clone-work-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: #74658f;
  font-weight: 900;
  text-align: center;
}

.clone-work-info {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.clone-work-info strong {
  color: #171226;
  font-size: 1.08rem;
}

.clone-work-info p,
.clone-work-info small {
  margin: 0;
  color: #74658f;
  line-height: 1.5;
  font-weight: 750;
}

.clone-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.clone-compose-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.clone-compose-avatar-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
}

.clone-compose-avatar-media {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #171226;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.clone-compose-avatar-media video,
.clone-compose-avatar-media img,
.clone-compose-avatar-media .clone-compose-avatar-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clone-compose-change {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  background: #5b0e8f;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(75, 10, 136, 0.34);
}

.clone-compose-avatar-info,
.clone-compose-avatar-empty,
.clone-compose-voice-pill,
.clone-compose-voice-card {
  border: 1px solid rgba(124, 101, 156, 0.14);
  border-radius: 18px;
  background: #fbfaff;
  box-shadow: 0 14px 32px rgba(55, 32, 94, 0.05);
}

.clone-compose-avatar-info {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.clone-compose-avatar-info strong,
.clone-compose-avatar-empty strong,
.clone-compose-voice-pill strong,
.clone-compose-voice-card strong {
  color: #171226;
  font-size: 1.08rem;
  line-height: 1.3;
}

.clone-compose-avatar-info small,
.clone-compose-avatar-empty p,
.clone-compose-voice-pill small,
.clone-compose-voice-card p {
  margin: 0;
  color: #74658f;
  font-weight: 750;
  line-height: 1.5;
}

.clone-compose-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.clone-compose-avatar-empty {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.clone-compose-avatar-empty .clone-tag {
  width: fit-content;
}

.clone-compose-voice-card {
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.clone-compose-voice-card .clone-tag {
  width: fit-content;
}

.clone-compose-voice-card strong {
  font-size: 1.12rem;
}

.clone-compose-voice-card p {
  max-width: 280px;
}

.clone-compose-voice-actions {
  justify-content: center;
  margin-top: 0;
}

.clone-compose-voice-actions .save-btn,
.clone-compose-voice-actions .mini-btn {
  min-width: 142px;
}

.clone-compose-voice-pill {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(124, 101, 156, 0.14);
  padding: 16px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.clone-compose-voice-pill:hover,
.clone-compose-voice-pill:focus-visible {
  background: #f7f1ff;
  border-color: rgba(109, 40, 178, 0.38);
  box-shadow: 0 18px 36px rgba(75, 10, 136, 0.1);
  transform: translateY(-1px);
}

.clone-compose-voice-pill span {
  color: #6d28b2;
  font-size: 0.86rem;
  font-weight: 950;
}

.clone-compose-voice-pill small {
  color: #6d28b2;
  font-weight: 900;
}

.clone-compose-script-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.clone-avatar-picker-modal[hidden] {
  display: none;
}

.clone-avatar-picker-modal {
  position: fixed;
  z-index: 6300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(18, 12, 30, 0.48);
}

.clone-picker-backdrop {
  position: fixed;
  inset: 0;
}

.clone-picker-dialog {
  position: relative;
  width: min(1180px, 92vw);
  max-height: min(820px, 88vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 36px 90px rgba(18, 12, 30, 0.28);
}

.clone-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid #ece6f5;
}

.clone-picker-head span {
  color: #6d28b2;
  font-weight: 950;
}

.clone-picker-head h3 {
  margin: 6px 0;
  color: #171226;
  font-size: 1.55rem;
}

.clone-picker-head p {
  margin: 0;
  color: #74658f;
  font-weight: 750;
}

.clone-picker-head button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #3a304c;
  background: #f4f1fa;
  font-size: 1.35rem;
}

.clone-avatar-picker-grid {
  min-height: 280px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding: 24px 28px 28px;
}

.clone-voice-picker-dialog {
  width: min(1180px, 94vw);
}

.clone-voice-picker-body {
  min-height: 360px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px 28px 28px;
}

.clone-voice-picker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.clone-voice-picker-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #e6def2;
  border-radius: 999px;
  background: #fff;
  color: #3f3650;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 950;
  cursor: pointer;
}

.clone-voice-picker-tabs button span {
  min-width: 26px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #7c3aed;
  background: #f1e8fb;
  font-size: 0.78rem;
  font-weight: 950;
}

.clone-voice-picker-tabs button.active {
  color: #fff;
  border-color: #5b0e8f;
  background: #5b0e8f;
  box-shadow: 0 12px 26px rgba(91, 14, 143, 0.18);
}

.clone-voice-picker-tabs button.active span {
  color: #5b0e8f;
  background: #fff;
}

.clone-picker-search {
  display: grid;
  gap: 8px;
}

.clone-picker-search span {
  color: #3f3650;
  font-size: 0.88rem;
  font-weight: 950;
}

.clone-picker-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e7e0f1;
  border-radius: 14px;
  outline: none;
  background: #fbfaff;
  color: #171226;
  font: inherit;
  font-weight: 850;
}

.clone-picker-search input:focus {
  border-color: rgba(109, 40, 178, 0.38);
  box-shadow: 0 0 0 4px rgba(109, 40, 178, 0.1);
}

.clone-voice-picker-section {
  display: grid;
  gap: 16px;
}

.clone-voice-picker-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.clone-voice-picker-card {
  align-items: start;
}

.clone-voice-picker-card .voice-asset-actions {
  grid-column: 1 / -1;
}

.clone-voice-picker-modal .public-voice-groups {
  margin-top: 4px;
}

.clone-picker-avatar-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ece6f5;
  border-radius: 18px;
  background: #fbfaff;
}

.clone-picker-avatar-card.selected {
  border-color: rgba(109, 40, 178, 0.46);
  box-shadow: 0 16px 34px rgba(75, 10, 136, 0.12);
}

.clone-picker-avatar-media {
  aspect-ratio: 9 / 12;
  overflow: hidden;
  border-radius: 14px;
  background: #171226;
}

.clone-picker-avatar-media video,
.clone-picker-avatar-media img,
.clone-picker-avatar-media .digital-human-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clone-picker-avatar-copy {
  display: grid;
  gap: 6px;
}

.clone-picker-avatar-copy strong {
  color: #171226;
  font-size: 1rem;
}

.clone-picker-avatar-copy small {
  color: #74658f;
  line-height: 1.45;
  font-weight: 750;
}

body.clone-create-open {
  overflow: hidden;
}

.short-copy-panel.show {
  display: block;
  margin-top: 18px;
  scroll-margin-top: 96px;
}

.short-copy-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 24px;
  min-height: 760px;
  padding: 22px 24px 36px;
  background: #f6f3fb;
}

.short-copy-side {
  position: sticky;
  top: 104px;
  min-height: 650px;
  padding: 22px 16px;
  border-right: 1px solid rgba(124, 101, 156, 0.18);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.short-copy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  padding: 0 8px 8px;
}

.short-copy-brand span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 950;
  background: linear-gradient(145deg, #5b0e8f, #2e006e);
  box-shadow: 0 14px 28px rgba(83, 25, 138, 0.28);
}

.short-copy-brand strong {
  color: #171226;
  font-size: 1.08rem;
  line-height: 1.2;
}

.short-copy-step {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  padding: 0 16px;
  border-radius: 12px;
  color: #2d243d;
  font-size: 1rem;
  font-weight: 900;
}

.short-copy-step.active {
  color: #4b0a88;
  background: #eee6fb;
}

.short-copy-step b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #6d28b2;
  background: rgba(109, 40, 178, 0.1);
  font-size: 0.78rem;
}

.short-copy-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.short-copy-head,
.short-copy-block,
.short-copy-result {
  border: 1px solid rgba(124, 101, 156, 0.13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
}

.short-copy-head {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.short-copy-head p,
.short-copy-block-title small {
  margin: 0;
  color: #7f6a9d;
  font-size: 0.86rem;
  font-weight: 900;
}

.short-copy-head h2 {
  margin: 4px 0 8px;
  color: #171226;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.short-copy-head span {
  display: block;
  max-width: 820px;
  color: #695c7d;
  line-height: 1.65;
  font-weight: 750;
}

.short-copy-head > strong {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 18px;
  color: #8a4d00;
  background: #fff2d9;
  box-shadow: inset 0 0 0 1px rgba(255, 178, 74, 0.36);
  font-size: 0.86rem;
}

.short-copy-form {
  display: grid;
  gap: 18px;
}

.short-copy-block {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.short-copy-block-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ece6f5;
}

.short-copy-block-title span {
  color: #171226;
  font-size: 1.12rem;
  font-weight: 950;
}

.short-copy-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.short-copy-option-grid.hook {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.short-copy-option {
  min-height: 86px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid #e5dfef;
  border-radius: 14px;
  background: #fbfaff;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.short-copy-option:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 40, 178, 0.3);
  box-shadow: 0 12px 26px rgba(55, 32, 94, 0.08);
}

.short-copy-option.active {
  border-color: rgba(109, 40, 178, 0.38);
  background: #eee6fb;
  color: #4b0a88;
  box-shadow: 0 12px 28px rgba(93, 33, 150, 0.12);
}

.short-copy-option strong {
  color: inherit;
  font-size: 0.98rem;
  font-weight: 950;
}

.short-copy-option span {
  color: #7f6a9d;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 750;
}

.short-copy-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.short-copy-form label {
  display: grid;
  gap: 8px;
  color: #171226;
  font-weight: 950;
}

.short-copy-form label.wide {
  grid-column: 1 / -1;
}

.short-copy-form input,
.short-copy-form select,
.short-copy-form textarea {
  width: 100%;
  border: 1px solid #e5dfef;
  border-radius: 12px;
  background: #f8f7fb;
  color: #171226;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 750;
  outline: none;
}

.short-copy-form input,
.short-copy-form select {
  min-height: 50px;
  padding: 0 14px;
}

.short-copy-form textarea {
  min-height: 104px;
  padding: 13px 14px;
  line-height: 1.6;
  resize: vertical;
}

.short-copy-form input:focus,
.short-copy-form select:focus,
.short-copy-form textarea:focus {
  border-color: rgba(109, 40, 178, 0.38);
  box-shadow: 0 0 0 3px rgba(109, 40, 178, 0.09);
}

.short-copy-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

#shortCopyStatus {
  flex: 1;
  color: #695c7d;
  font-size: 0.92rem;
  font-weight: 850;
}

#shortCopyStatus[data-tone="success"] {
  color: #047857;
}

#shortCopyStatus[data-tone="error"] {
  color: #b42318;
}

#shortCopyStatus[data-tone="loading"] {
  color: #4b0a88;
}

.short-copy-generate,
.short-result-toolbar button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: #f4f1fa;
  color: #4b0a88;
  font-size: 0.96rem;
  font-weight: 950;
}

.short-copy-generate,
.short-result-toolbar button.primary {
  background: #ff5b3f;
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 91, 63, 0.18);
}

.short-copy-generate:disabled {
  opacity: 0.68;
  cursor: wait;
}

.short-copy-result {
  min-height: 190px;
  padding: 22px;
}

.short-copy-empty {
  min-height: 144px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(124, 101, 156, 0.22);
  border-radius: 16px;
  background: #fbfaff;
  color: #7f6a9d;
  text-align: center;
  font-weight: 850;
}

.short-copy-empty strong {
  color: #171226;
  font-size: 1.05rem;
}

.short-copy-empty.compact {
  min-height: 86px;
}

.short-result-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ece6f5;
}

.short-result-toolbar > div {
  margin-right: auto;
  display: grid;
  gap: 4px;
}

.short-result-toolbar span {
  color: #7f6a9d;
  font-size: 0.82rem;
  font-weight: 900;
}

.short-result-toolbar strong {
  color: #171226;
  font-size: 1rem;
}

.short-result-section {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid #f0ebf7;
}

.short-result-section:last-child {
  border-bottom: 0;
}

.short-result-section h3 {
  margin: 0;
  color: #171226;
  font-size: 1.02rem;
  font-weight: 950;
}

.short-result-section p,
.short-result-section pre {
  margin: 0;
  color: #2d243d;
  line-height: 1.72;
  white-space: pre-wrap;
  font: inherit;
  font-weight: 760;
}

.short-result-section.script pre {
  padding: 16px;
  border-radius: 14px;
  background: #fbfaff;
  border: 1px solid #ece6f5;
}

.short-title-list,
.short-shot-grid,
.short-rewrite-grid {
  display: grid;
  gap: 10px;
}

.short-title-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.short-title-list span,
.short-shot-card,
.short-rewrite-grid article {
  border: 1px solid #ece6f5;
  border-radius: 14px;
  background: #fbfaff;
}

.short-title-list span {
  padding: 13px 14px;
  color: #4b0a88;
  font-weight: 950;
  line-height: 1.45;
}

.short-shot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.short-shot-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.short-shot-card span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #4b0a88;
  background: #eee6fb;
  font-size: 0.78rem;
  font-weight: 950;
}

.short-shot-card strong {
  color: #171226;
  line-height: 1.55;
}

.short-shot-card small {
  color: #695c7d;
  line-height: 1.52;
  font-weight: 750;
}

.short-shot-card em {
  color: #8a4d00;
  font-style: normal;
  font-weight: 900;
}

.short-result-section.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.short-rewrite-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.short-rewrite-grid article {
  padding: 14px;
}

.short-rewrite-grid span {
  display: block;
  margin-bottom: 8px;
  color: #4b0a88;
  font-weight: 950;
}

.short-result-section.warning {
  padding: 16px;
  border: 1px solid rgba(255, 178, 74, 0.36);
  border-radius: 14px;
  background: #fffaf0;
}

@media (max-width: 1180px) {
  .short-copy-shell {
    grid-template-columns: 1fr;
  }

  .short-copy-side {
    position: static;
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-right: 0;
  }

  .short-copy-brand {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .short-copy-option-grid,
  .short-copy-option-grid.hook {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clone-panel.show {
    grid-template-columns: 1fr;
  }

  .voice-library-card-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .clone-panel.show .clone-side-nav,
  .clone-panel.show .clone-head,
  .clone-panel.show .clone-flow-steps,
  .clone-panel.show #cloneHomePanel,
  .clone-panel.show #cloneMaterialLibraryPanel,
  .clone-panel.show .clone-quick-card,
  .clone-panel.show #cloneLibrary,
  .clone-panel.show #cloneVoiceLibraryPanel,
  .clone-panel.show #cloneVoiceMarketPanel,
  .clone-panel.show .clone-workflow-head,
  .clone-panel.show #cloneScriptCard,
  .clone-panel.show .clone-grid,
  .clone-panel.show .clone-final-head,
  .clone-panel.show .clone-result,
  .clone-panel.show #cloneWorksPanel,
  .clone-panel.show .clone-package-card {
    grid-column: 1 !important;
  }

  .clone-panel.show .clone-side-nav {
    position: static;
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-right: 0;
  }

  .clone-side-brand {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .clone-side-nav button {
    justify-content: center;
    padding: 0 10px;
  }

  .clone-home-grid,
  .clone-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clone-compose-layout {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .short-copy-shell {
    padding: 16px 12px 28px;
  }

  .short-copy-side,
  .short-copy-option-grid,
  .short-copy-option-grid.hook,
  .short-copy-field-grid,
  .short-title-list,
  .short-shot-grid,
  .short-rewrite-grid,
  .short-result-section.two-col {
    grid-template-columns: 1fr;
  }

  .short-copy-head,
  .short-result-toolbar,
  .short-copy-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .short-copy-head > strong,
  .short-copy-generate,
  .short-result-toolbar button {
    width: 100%;
  }

  .clone-panel.show {
    padding: 16px 12px 28px;
  }

  .clone-panel.show .clone-side-nav,
  .clone-home-grid,
  .clone-work-grid,
  .clone-compose-layout,
  .clone-quick-card,
  .clone-panel.show .clone-grid,
  .voice-library-card-grid,
  .clone-requirements {
    grid-template-columns: 1fr;
  }

  .public-voice-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .public-voice-use {
    grid-column: 2;
    width: fit-content;
  }

  .clone-side-nav button {
    justify-content: flex-start;
  }

  .clone-compose-avatar-media,
  .clone-compose-avatar-empty {
    min-height: 320px;
  }

  .clone-avatar-picker-modal {
    padding: 12px;
  }

  .clone-picker-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px;
  }

  .clone-avatar-picker-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .clone-voice-picker-body {
    padding: 16px;
  }

  .clone-voice-picker-tabs button,
  .clone-picker-search input {
    width: 100%;
  }

  .clone-create-dialog {
    width: 100vw;
    min-width: 0;
  }

  .clone-create-footer {
    align-items: stretch;
    flex-direction: column;
    height: auto;
    padding: 16px;
  }

  .clone-create-actions,
  .clone-create-actions .mini-btn,
  .clone-create-confirm {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .digital-human-grid {
    grid-template-columns: 1fr;
  }
}

.worker-admin-panel {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.96));
}

.worker-admin-panel .panel-head.compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.worker-admin-panel h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.worker-admin-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.worker-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.worker-admin-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #fff;
}

.worker-admin-grid strong {
  color: var(--ink);
  font-size: 16px;
}

.worker-admin-grid textarea {
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  resize: vertical;
  color: var(--ink);
  background: #f8fafc;
}

.worker-admin-grid .download-link {
  justify-content: center;
  text-decoration: none;
}

.worker-runtime-status {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.worker-runtime-status p {
  margin: 0;
}

.billing-grant-form {
  grid-template-columns: minmax(180px, 0.95fr) minmax(220px, 1.15fr) repeat(3, minmax(130px, 0.7fr)) minmax(210px, 1fr) auto;
  align-items: end;
}

.billing-name-field textarea,
.billing-phone-field textarea {
  min-height: 86px;
}

.admin-security-panel {
  border-color: rgba(91, 80, 220, 0.18);
  background: linear-gradient(135deg, rgba(91, 80, 220, 0.07), rgba(255, 255, 255, 0.96));
}

.admin-password-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  align-items: end;
}

.platform-ledger-panel {
  border-color: rgba(91, 80, 220, 0.18);
  background: linear-gradient(135deg, rgba(91, 80, 220, 0.07), rgba(255, 255, 255, 0.96));
}

.platform-ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.platform-ledger-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #fff;
}

.platform-ledger-grid span,
.platform-ledger-row small,
.platform-ledger-total {
  color: var(--muted);
}

.platform-ledger-grid strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.platform-ledger-grid article.warning {
  border-color: rgba(225, 78, 64, 0.35);
  background: #fff7f5;
}

.platform-topup-form {
  grid-template-columns: minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(120px, 0.6fr) minmax(130px, 0.7fr) minmax(220px, 1.2fr) auto;
  align-items: end;
}

.platform-ledger-list {
  margin-top: 14px;
}

.platform-ledger-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.platform-ledger-columns > article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #fff;
}

.platform-ledger-columns h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.platform-ledger-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.82);
}

.platform-ledger-row strong,
.platform-ledger-row span {
  color: var(--ink);
  font-weight: 900;
}

.platform-ledger-total {
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.82);
  font-weight: 900;
}

.billing-admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.billing-admin-search {
  flex: 1 1 420px;
  max-width: 640px;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.billing-admin-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 850;
}

.billing-admin-search input:focus {
  outline: none;
  border-color: rgba(20, 184, 166, 0.52);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.billing-admin-search-meta {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.billing-admin-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.billing-admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr) minmax(180px, 0.85fr) minmax(360px, 1.4fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #fff;
}

.billing-admin-row.warning {
  border-color: rgba(225, 78, 64, 0.32);
  background: #fff8f6;
}

.billing-customer-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.billing-customer-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-name-edit-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(109, 40, 217, 0.18);
  border-radius: 999px;
  background: #f7f2ff;
  color: #5b21b6;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.billing-name-edit-btn:hover {
  border-color: rgba(109, 40, 217, 0.34);
  background: #ede4ff;
}

.billing-admin-row strong,
.billing-admin-row span {
  color: var(--ink);
  font-weight: 900;
}

.billing-reserve-cell {
  display: grid;
  gap: 3px;
}

.billing-reserve-cell strong {
  font-size: 0.95rem;
}

.billing-admin-row small {
  color: var(--muted);
  line-height: 1.5;
}

.usage-record-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.usage-records-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.usage-record-header,
.usage-record-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(180px, 1.2fr) minmax(100px, .65fr) minmax(120px, .75fr) minmax(220px, 1.3fr);
  gap: 12px;
  align-items: center;
}

.usage-record-header {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 4px;
}

.usage-record-row {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.usage-record-row.failed {
  border-color: rgba(225, 78, 64, 0.32);
  background: #fff8f6;
}

.usage-record-row.refunded {
  border-color: rgba(217, 119, 6, 0.30);
  background: #fffaf2;
}

.usage-record-row strong,
.usage-record-row span {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.usage-record-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.42;
  word-break: break-word;
}

.billing-admin-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.billing-adjust-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 8px;
}

.billing-adjust-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
}

.billing-adjust-fields input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  font-weight: 900;
  color: var(--ink);
  background: #fff;
}

.billing-adjust-buttons {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.billing-admin-actions .mini-btn {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.billing-admin-actions .mini-btn.danger {
  border-color: rgba(225, 78, 64, 0.25);
  color: #b42318;
  background: #fff7f5;
}

body[data-view="admin"] .discover-main {
  width: 100%;
  max-width: none;
  padding-left: clamp(16px, 2vw, 32px);
  padding-right: clamp(16px, 2vw, 32px);
}

body[data-view="admin"] #adminView {
  width: 100%;
  max-width: none;
}

body[data-view="admin"] #adminView.panel {
  overflow: visible;
}

@media (max-width: 900px) {
  .usage-record-header {
    display: none;
  }

  .usage-record-row {
    grid-template-columns: 1fr;
  }
}

#billingAdminPanel {
  overflow: visible;
}

.billing-admin-list {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 10px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.billing-admin-list::-webkit-scrollbar {
  height: 10px;
}

.billing-admin-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.75);
}

.billing-admin-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.42);
}

.billing-admin-row {
  min-width: 1280px;
}

.billing-admin-row > * {
  min-width: 0;
}

@media (max-width: 980px) {
  .worker-admin-grid {
    grid-template-columns: 1fr;
  }

  .platform-ledger-grid,
  .platform-topup-form,
  .platform-ledger-columns,
  .admin-password-form,
  .billing-grant-form,
  .billing-admin-row {
    grid-template-columns: 1fr;
  }

  .billing-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-admin-search {
    max-width: none;
  }

  .billing-admin-search-meta {
    white-space: normal;
  }

  .worker-admin-panel .panel-head.compact {
    display: grid;
  }
}

/* Larger portrait previews for digital-human works */
.clone-panel.show #cloneWorksPanel {
  padding: 28px;
}

.clone-panel.show #cloneWorksGrid.clone-work-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 520px));
  gap: 28px;
  align-items: start;
}

#cloneWorksGrid .clone-work-card {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 58px rgba(62, 29, 100, 0.12);
}

#cloneWorksGrid .clone-work-media {
  aspect-ratio: 9 / 13;
  min-height: 520px;
  background: #0f1020;
}

#cloneWorksGrid .clone-work-media video,
#cloneWorksGrid .clone-work-media img {
  object-fit: contain;
  background: #0f1020;
}

#cloneWorksGrid .clone-work-info {
  gap: 12px;
  padding: 22px;
}

#cloneWorksGrid .clone-work-info strong {
  font-size: 1.18rem;
  line-height: 1.35;
}

#cloneWorksGrid .clone-work-actions {
  gap: 10px;
}

#cloneWorksGrid .clone-work-actions .clone-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .clone-panel.show #cloneWorksPanel {
    padding: 18px;
  }

  .clone-panel.show #cloneWorksGrid.clone-work-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #cloneWorksGrid .clone-work-media {
    min-height: 430px;
  }
}

@media (max-width: 980px) {
  .login-modal {
    padding: 16px;
    align-items: start;
  }

  .login-shell {
    min-height: auto;
    gap: 24px;
    padding: 22px 0;
  }

  .login-shell .modal-close {
    top: 6px;
    right: 6px;
  }

  .login-brand-logo {
    width: min(260px, 68vw);
  }

  .login-brand-hero h2 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .login-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 24px;
  }

  .login-proof-panel {
    min-height: 0;
    padding: 28px 22px;
  }

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

  .login-proof-grid span {
    min-height: 44px;
    font-size: 0.78rem;
  }

  .login-dialog {
    min-height: 0;
    padding: 28px 22px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 -10px 28px rgba(78, 116, 176, 0.08);
  }

  .login-dialog .sms-row {
    grid-template-columns: 1fr;
  }

  .login-dialog .save-btn,
  .login-dialog #setPasswordForm .save-btn,
  .login-dialog #phoneLoginForm .save-btn {
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .login-brand-hero {
    gap: 12px;
  }

  .login-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-proof-footer {
    padding: 14px;
  }

  .login-dialog .login-tabs {
    gap: 20px;
  }

  .login-dialog .login-tab {
    font-size: 1.04rem;
  }

  .login-inline-actions {
    flex-wrap: wrap;
  }

  .login-inline-actions .login-forgot {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }
}

/* Digital human asset library */
.clone-panel.show .clone-head {
  min-height: 78px;
  align-items: center;
  padding: 0 0 14px;
}

.clone-panel.show .clone-head > div {
  min-width: 0;
}

.clone-panel.show #cloneModePill {
  align-self: center;
  display: inline-flex;
  align-items: center;
}

.clone-panel.show .clone-flow-steps,
.clone-home-panel {
  width: 100%;
  padding: 28px;
}

.clone-panel.show #cloneHomePanel {
  min-height: clamp(600px, calc(100vh - 250px), 720px);
  display: grid;
  align-content: start;
}

.clone-panel.show .clone-flow-steps {
  gap: 16px;
}

.clone-panel.show .clone-flow-steps span {
  min-height: 58px;
  padding: 0 18px;
  border-radius: 14px;
}

.clone-panel.show .clone-flow-steps b {
  width: 34px;
  height: 34px;
  font-size: 0.92rem;
}

.clone-home-hero {
  max-width: none;
}

.clone-home-grid {
  gap: 20px;
  margin-top: 28px;
}

.clone-home-card {
  min-height: 202px;
  display: grid;
  grid-template-rows: 52px minmax(34px, auto) 1fr;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

.clone-home-card i {
  width: 52px;
  height: 52px;
}

.clone-home-card strong {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.clone-home-card span {
  align-self: start;
}

.clone-panel.show .clone-quick-card {
  display: none !important;
}

.clone-panel.show #cloneLibrary {
  padding: 26px;
}

.clone-panel.show #cloneAvatarLibrary.digital-human-grid {
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 28px;
  align-items: start;
}

#cloneAvatarLibrary .digital-human-create-card,
#cloneAvatarLibrary .digital-human-card.asset-ready {
  min-height: 430px;
}

#cloneAvatarLibrary .digital-human-card.asset-ready {
  padding: 18px;
}

#cloneAvatarLibrary .digital-human-card.asset-ready .digital-human-media {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
}

#cloneAvatarLibrary .digital-human-card.asset-ready .digital-human-info {
  min-height: 126px;
}

@media (max-width: 760px) {
  .clone-panel.show .clone-head {
    min-height: auto;
    align-items: flex-start;
    gap: 12px;
  }

  .clone-panel.show .clone-flow-steps,
  .clone-home-panel {
    padding: 18px;
  }

  .clone-panel.show #cloneHomePanel {
    min-height: auto;
  }

  .clone-panel.show .clone-flow-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .clone-home-card {
    min-height: 172px;
  }

  .clone-panel.show #cloneLibrary {
    padding: 18px;
  }

  .clone-panel.show #cloneAvatarLibrary.digital-human-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #cloneAvatarLibrary .digital-human-create-card,
  #cloneAvatarLibrary .digital-human-card.asset-ready {
    min-height: 360px;
  }
}

/* Final override for the compact video composer placement. */
.clone-video-mini-card {
  min-width: 0;
}

.clone-panel.show #cloneVideoComposerCard {
  grid-column: 2 !important;
  grid-row: auto !important;
  order: 6 !important;
  align-self: start;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid rgba(124, 101, 156, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 32, 94, 0.06);
}

.clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 16px;
}

.clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
.clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
  min-height: 260px;
}

.clone-panel.show #cloneVideoComposerCard #cloneScriptInput {
  min-height: 156px;
}

.clone-panel.show #cloneCopyAgentPage {
  order: 6 !important;
}

@media (max-width: 1160px) {
  .clone-panel.show #cloneVideoComposerCard {
    grid-column: 1 !important;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: 1fr;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
    min-height: 320px;
  }
}

/* compose-video-comfort-lock: video compose page spacing and result block visibility. */
.clone-video-mini-card {
  min-width: 0;
}

.clone-panel.show #cloneVideoComposerCard {
  padding: 30px 36px 34px !important;
  border-radius: 20px !important;
}

.clone-panel.show #cloneVideoComposerCard .clone-video-mini-head {
  margin-bottom: 24px !important;
}

.clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
  gap: 32px !important;
}

.clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
.clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
  min-height: 300px !important;
}

.clone-panel.show #cloneVideoComposerCard #cloneScriptInput {
  min-height: 220px !important;
}

.clone-panel.show #cloneVideoComposerCard .clone-compose-script-main {
  gap: 18px !important;
}

.clone-panel.show .clone-final-head[data-clone-page="compose"],
.clone-panel.show #cloneResult[data-clone-page="compose"] {
  display: none !important;
}

@media (max-width: 1160px) {
  .clone-panel.show #cloneVideoComposerCard {
    padding: 26px !important;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
    gap: 24px !important;
  }
}

@media (max-width: 860px) {
  .clone-panel.show #cloneVideoComposerCard {
    padding: 22px !important;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: 1fr !important;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
    min-height: 280px !important;
  }

  .clone-panel.show #cloneVideoComposerCard #cloneScriptInput {
    min-height: 190px !important;
  }
}

/* mobile-upload-fix: keep WeChat/mobile pages from falling back to desktop width. */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .discover-header,
  .discover-main,
  .page-shell,
  .creator-layout,
  .creator-main,
  .clone-panel.show,
  .clone-panel.show > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .header-inner {
    height: auto !important;
    min-height: 64px !important;
    padding: 10px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
  }

  .header-inner::-webkit-scrollbar {
    display: none;
  }

  .brand-link {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .brand-word {
    display: none !important;
  }

  .header-actions {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    gap: 10px !important;
    overflow-x: auto;
    justify-content: flex-start !important;
  }

  .course-actions,
  body[data-view="courses"] .course-actions {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    gap: 8px !important;
  }

  .language-switch {
    min-height: 36px !important;
    padding: 3px !important;
  }

  .language-option {
    min-height: 30px !important;
    padding: 0 8px !important;
    font-size: 0.78rem !important;
  }

  .personal-center-btn {
    min-width: 0 !important;
    max-width: 132px !important;
    height: 40px !important;
    padding: 0 12px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .clone-panel.show {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    min-height: 0 !important;
    margin-top: 12px !important;
    padding: 12px !important;
    overflow-x: hidden !important;
  }

  .clone-panel.show .clone-side-nav {
    grid-column: 1 !important;
    grid-row: auto !important;
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
  }

  .clone-side-brand,
  .clone-side-account,
  .clone-side-section-label,
  .clone-side-footer {
    display: none !important;
  }

  .clone-side-scroll {
    display: flex !important;
    gap: 8px !important;
    min-height: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-right: 0 !important;
  }

  .clone-side-scroll::-webkit-scrollbar,
  .clone-panel.show .clone-flow-steps::-webkit-scrollbar {
    display: none;
  }

  .clone-side-nav button {
    flex: 0 0 auto !important;
    min-width: 96px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
  }

  .clone-panel.show .clone-head,
  .clone-panel.show .clone-flow-steps,
  .clone-panel.show #cloneHomePanel,
  .clone-panel.show #cloneMaterialLibraryPanel,
  .clone-panel.show #cloneLibrary,
  .clone-panel.show #cloneVoiceLibraryPanel,
  .clone-panel.show #cloneVoiceMarketPanel,
  .clone-panel.show #cloneCopyAgentPage,
  .clone-panel.show .clone-workflow-head,
  .clone-panel.show #cloneScriptCard,
  .clone-panel.show #cloneVideoComposerCard,
  .clone-panel.show .clone-grid,
  .clone-panel.show .clone-final-head,
  .clone-panel.show .clone-result {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .clone-panel.show .clone-flow-steps {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    padding: 10px !important;
    overflow-x: auto !important;
  }

  .clone-panel.show .clone-flow-steps span {
    flex: 0 0 auto !important;
    min-width: 128px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
  }

  .clone-copy-agent-card,
  .clone-panel.show #cloneVideoComposerCard {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .clone-copy-agent-intro h3 {
    font-size: 1.42rem !important;
    line-height: 1.22 !important;
  }

  .clone-copy-agent-intro p {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }

  .compose-copy-agent-grid,
  .compose-copy-agent-link,
  .clone-compose-layout,
  .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
  .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
    min-height: 240px !important;
  }

  .clone-create-modal {
    justify-items: stretch !important;
    align-items: stretch !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  .clone-create-dialog,
  .voice-create-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  .clone-create-head {
    flex: 0 0 auto;
    background: #fff;
    z-index: 2;
  }

  .clone-create-body {
    min-height: 0 !important;
    height: auto !important;
    padding: 16px 16px 132px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .clone-requirements,
  .clone-requirements.voice-requirements {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .clone-video-dropzone {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 260px !important;
    padding: 20px 14px !important;
    overflow: hidden !important;
  }

  .clone-video-dropzone.voice-dropzone {
    min-height: 190px !important;
  }

  .voice-dropzone .wechat-file-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    color: #fff;
    background: #6d28b2;
    font-size: 0.92rem;
    font-weight: 950;
  }

  .voice-dropzone .wechat-file-hint {
    display: block;
    color: #6f6484;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .clone-video-dropzone strong,
  .clone-video-dropzone small,
  .clone-video-dropzone .clone-upload-status {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .clone-video-dropzone .clone-upload-status em {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .clone-create-footer {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6400;
    width: 100%;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
    gap: 10px !important;
    background: #fff;
    border-top: 1px solid #eee7f7;
    box-shadow: 0 -10px 24px rgba(42, 25, 72, 0.08);
  }

  .clone-create-consent,
  .clone-create-actions {
    width: 100%;
  }

  .clone-create-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
}

/* mobile-h5-shell: phone-only PonyClip workflow polish. Desktop rules stay untouched. */
@media (max-width: 640px) {
  :root {
    --pony-mobile-gutter: 14px;
    --pony-mobile-bottom-nav: 82px;
    --pony-mobile-surface: #fff;
    --pony-mobile-page: #f7f3fb;
    --pony-mobile-border: #eadff5;
  }

  html,
  body {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    background: var(--pony-mobile-page) !important;
  }

  body.clone-create-open {
    overflow: hidden !important;
  }

  .discover-main,
  .page-shell,
  .creator-layout,
  .creator-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .discover-main,
  .creator-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:has(#clonePanel.show) .category-strip {
    display: none !important;
  }

  body:has(#clonePanel.show) #landingHero {
    display: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show {
    margin-top: 0 !important;
  }

  .header-inner {
    min-height: 58px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .brand-link {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
  }

  .course-actions {
    gap: 6px !important;
  }

  .language-switch {
    transform: scale(0.92);
    transform-origin: center;
  }

  .personal-center-btn {
    max-width: 118px !important;
    min-width: 0 !important;
    padding: 0 10px !important;
    font-size: 0.86rem !important;
  }

  .clone-panel.show {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: calc(100dvh - 58px) !important;
    margin: 0 !important;
    padding: 10px var(--pony-mobile-gutter) 18px !important;
    background: var(--pony-mobile-page) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    overflow-x: hidden !important;
  }

  .clone-panel.show > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .clone-panel.show .clone-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: -10px calc(var(--pony-mobile-gutter) * -1) 10px !important;
    padding: 12px var(--pony-mobile-gutter) 10px !important;
    border-radius: 0 0 18px 18px !important;
    background: rgba(247, 243, 251, 0.96) !important;
    box-shadow: 0 8px 24px rgba(48, 28, 78, 0.08) !important;
    backdrop-filter: blur(14px);
  }

  .clone-panel.show .clone-head p,
  .clone-panel.show .clone-agent-link {
    display: none !important;
  }

  .clone-panel.show .clone-head h2 {
    max-width: 220px !important;
    margin: 0 !important;
    font-size: 1.42rem !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
  }

  .clone-panel.show #cloneModePill {
    flex: 0 0 auto !important;
    max-width: 136px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.78rem !important;
  }

  .clone-panel.show .clone-side-nav {
    position: sticky !important;
    top: 58px !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 34 !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    padding: 8px !important;
    border: 1px solid var(--pony-mobile-border) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 10px 26px rgba(39, 24, 70, 0.1) !important;
    overflow: hidden !important;
  }

  body.clone-create-open .clone-panel.show .clone-side-nav {
    display: none !important;
  }

  .clone-side-brand,
  .clone-side-account,
  .clone-side-section-label,
  .clone-side-footer {
    display: none !important;
  }

  .clone-side-scroll {
    display: flex !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .clone-side-scroll::-webkit-scrollbar,
  .clone-panel.show .clone-flow-steps::-webkit-scrollbar,
  .public-voice-filters::-webkit-scrollbar,
  .public-voice-gender-tabs::-webkit-scrollbar,
  .voice-library-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .clone-side-nav button {
    flex: 0 0 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    min-height: 54px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 5px 4px !important;
    border-radius: 15px !important;
    scroll-snap-align: center;
    font-size: 0.72rem !important;
    line-height: 1.12 !important;
  }

  .clone-side-nav button i {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 9px !important;
    font-size: 0.65rem !important;
  }

  .clone-side-nav button span {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .clone-panel.show .clone-flow-steps {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    margin: 0 0 10px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    background: var(--pony-mobile-surface) !important;
    box-shadow: 0 8px 24px rgba(50, 29, 82, 0.06) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .clone-panel.show .clone-flow-steps span {
    flex: 0 0 104px !important;
    min-width: 104px !important;
    min-height: 34px !important;
    gap: 6px !important;
    padding: 0 8px !important;
    border-radius: 12px !important;
    font-size: 0.76rem !important;
    white-space: nowrap !important;
  }

  .clone-panel.show .clone-flow-steps b {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.76rem !important;
  }

  .clone-home-panel,
  .clone-panel.show #cloneHomePanel,
  .clone-panel.show #cloneMaterialLibraryPanel,
  .clone-panel.show #cloneLibrary,
  .clone-panel.show #cloneVoiceLibraryPanel,
  .clone-panel.show #cloneVoiceMarketPanel,
  .clone-panel.show #cloneCopyAgentPage,
  .clone-panel.show #cloneScriptCard,
  .clone-panel.show #cloneVideoComposerCard,
  .clone-panel.show .clone-workflow-head,
  .clone-panel.show .clone-result,
  .clone-panel.show .clone-package-card,
  .clone-panel.show #cloneWorksPanel {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    padding: 16px !important;
    border: 1px solid var(--pony-mobile-border) !important;
    border-radius: 20px !important;
    background: var(--pony-mobile-surface) !important;
    box-shadow: 0 12px 30px rgba(45, 27, 79, 0.08) !important;
  }

  .clone-home-hero {
    margin: 0 0 12px !important;
  }

  .clone-home-hero span {
    display: none !important;
  }

  .clone-home-hero h3 {
    margin: 0 0 8px !important;
    font-size: 1.28rem !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
  }

  .clone-home-hero p {
    margin: 0 !important;
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }

  .clone-home-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .clone-home-card {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    text-align: left !important;
  }

  .clone-home-card i {
    grid-row: 1 / span 2;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    font-size: 0.86rem !important;
  }

  .clone-home-card strong {
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .clone-home-card span {
    font-size: 0.84rem !important;
    line-height: 1.42 !important;
  }

  .clone-panel.show .clone-quick-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin: 0 0 12px !important;
  }

  .clone-quick-create {
    min-height: 148px !important;
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .clone-quick-guide {
    display: none !important;
  }

  .clone-panel.show .clone-library-head,
  .clone-panel.show .clone-workflow-head,
  .clone-panel.show .clone-final-head,
  .voice-library-console,
  .public-voice-filters,
  .public-voice-gender-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .clone-panel.show .clone-library-title {
    min-width: 220px !important;
  }

  .clone-panel.show .clone-library-title h3,
  .clone-panel.show .clone-workflow-head h3,
  .clone-panel.show .clone-script-head h3,
  .clone-panel.show .clone-final-head h3 {
    font-size: 1.08rem !important;
    line-height: 1.25 !important;
  }

  .clone-panel.show .clone-library-title p,
  .clone-panel.show .clone-workflow-head p,
  .clone-panel.show .clone-script-head p,
  .clone-panel.show .clone-final-head p {
    font-size: 0.84rem !important;
    line-height: 1.42 !important;
  }

  .clone-panel.show .digital-human-grid,
  .clone-panel.show .clone-grid,
  .voice-asset-grid,
  .voice-library-card-grid,
  .clone-voice-picker-grid,
  .clone-panel.show #cloneWorksGrid.clone-work-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .digital-human-card,
  .digital-human-create-card,
  .voice-asset-card,
  .public-voice-card,
  .clone-card,
  .clone-script-card,
  .clone-work-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-radius: 18px !important;
  }

  #cloneAvatarLibrary .digital-human-create-card,
  #cloneAvatarLibrary .digital-human-card.asset-ready {
    min-height: 0 !important;
  }

  .digital-human-media {
    aspect-ratio: 9 / 12 !important;
    min-height: 0 !important;
    max-height: 420px !important;
  }

  .voice-asset-card,
  .public-voice-card {
    padding: 14px !important;
  }

  .voice-asset-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .voice-asset-actions button,
  .public-voice-use,
  .clone-submit,
  .save-btn,
  .mini-btn {
    min-height: 42px !important;
    font-size: 0.9rem !important;
  }

  .page-shell .clone-panel.show #cloneVideoComposerCard {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .page-shell .clone-panel.show #cloneVideoComposerCard .clone-video-mini-head {
    margin-bottom: 14px !important;
  }

  .page-shell .clone-panel.show #cloneVideoComposerCard .clone-compose-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .page-shell .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-media,
  .page-shell .clone-panel.show #cloneVideoComposerCard .clone-compose-avatar-empty {
    min-height: 220px !important;
  }

  .page-shell .clone-panel.show #cloneVideoComposerCard #cloneScriptInput {
    min-height: 168px !important;
  }

  .clone-panel.show input,
  .clone-panel.show textarea,
  .clone-panel.show select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  .clone-create-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 6200 !important;
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .clone-create-modal[hidden] {
    display: none !important;
  }

  .clone-create-backdrop {
    display: none !important;
  }

  .clone-create-dialog,
  .voice-create-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  .clone-create-head {
    min-height: 66px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #eee8f5 !important;
    background: #fff !important;
    z-index: 3 !important;
  }

  .clone-create-close {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    font-size: 1.3rem !important;
  }

  .clone-create-head h3 {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 1.22rem !important;
    line-height: 1.2 !important;
  }

  .clone-create-body {
    min-height: 0 !important;
    height: auto !important;
    padding: 16px 16px calc(130px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .clone-create-body h4 {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    font-size: 1.18rem !important;
    line-height: 1.25 !important;
  }

  .clone-requirements,
  .clone-requirements.voice-requirements {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    margin: 0 0 16px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    background: #f6f3fb !important;
  }

  .clone-requirements span {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  .voice-field {
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .voice-field input,
  .voice-field textarea,
  .voice-field select {
    min-height: 54px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
  }

  .clone-video-dropzone {
    min-height: 240px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 14px !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .clone-video-dropzone.voice-dropzone {
    min-height: 178px !important;
  }

  .clone-upload-cloud {
    width: 72px !important;
    height: 72px !important;
    font-size: 2.1rem !important;
  }

  .clone-video-dropzone strong {
    font-size: 0.98rem !important;
    line-height: 1.35 !important;
  }

  .clone-video-dropzone small,
  .clone-video-dropzone .clone-upload-status {
    font-size: 0.86rem !important;
    line-height: 1.42 !important;
  }

  .clone-video-dropzone strong,
  .clone-video-dropzone small,
  .clone-video-dropzone .clone-upload-status,
  .clone-video-dropzone .clone-upload-status em {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .clone-video-dropzone .clone-upload-status {
    max-height: 3.8em !important;
  }

  .voice-dropzone .wechat-file-button {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 40px !important;
    margin-top: 4px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    background: #6d28b2 !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
  }

  .voice-dropzone .wechat-file-hint {
    display: block !important;
    color: #756984 !important;
    font-size: 0.78rem !important;
    line-height: 1.42 !important;
  }

  .clone-create-footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 6500 !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #eee8f5 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 -12px 28px rgba(42, 25, 72, 0.1) !important;
  }

  .clone-create-consent {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  .clone-create-consent input {
    width: 24px !important;
    height: 24px !important;
  }

  .clone-create-status {
    margin: 0 !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
  }

  .clone-create-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .clone-create-actions .mini-btn,
  .clone-create-confirm {
    min-width: 0 !important;
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
  }

  .clone-avatar-picker-modal {
    z-index: 6300 !important;
    padding: 0 !important;
  }

  .clone-picker-dialog,
  .clone-voice-picker-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  .clone-picker-head {
    padding: 14px 16px !important;
  }

  .clone-avatar-picker-grid,
  .clone-voice-picker-body {
    padding: 12px !important;
    overflow-x: hidden !important;
  }

  .clone-avatar-picker-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* mobile-step-pages: phone-only digital-human pages with guided next-step routing. */
@media (max-width: 640px) {
  .clone-panel.show [data-clone-page][hidden] {
    display: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show .clone-nav-home,
  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel,
  body:has(#clonePanel.show) .clone-panel.show .clone-flow-steps {
    display: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show .clone-side-nav {
    margin-bottom: 12px !important;
  }

  body:has(#clonePanel.show) .clone-panel.show .clone-side-scroll {
    align-items: stretch !important;
    scroll-padding-left: 4px !important;
  }

  body:has(#clonePanel.show) .clone-panel.show .clone-side-nav button.active {
    background: linear-gradient(135deg, #7b1fd4, #4e05b5) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(93, 24, 171, 0.22) !important;
  }

  body:has(#clonePanel.show) .clone-panel.show .clone-side-nav button.active i {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneQuickCard,
  body:has(#clonePanel.show) .clone-panel.show #cloneLibrary,
  body:has(#clonePanel.show) .clone-panel.show #cloneVoiceLibraryPanel,
  body:has(#clonePanel.show) .clone-panel.show #cloneVoiceMarketPanel,
  body:has(#clonePanel.show) .clone-panel.show #cloneCopyAgentPage,
  body:has(#clonePanel.show) .clone-panel.show #cloneVideoComposerCard,
  body:has(#clonePanel.show) .clone-panel.show #cloneWorksPanel,
  body:has(#clonePanel.show) .clone-panel.show #clonePackageCard {
    animation: cloneMobilePageIn 0.18s ease-out;
  }

  .clone-mobile-step-actions {
    display: grid !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid #eee7f7 !important;
  }

  .clone-mobile-step-actions p {
    margin: 0 !important;
    color: #756984 !important;
    font-size: 0.86rem !important;
    line-height: 1.45 !important;
  }

  .clone-mobile-step-actions div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .clone-mobile-step-actions div:has(.secondary) {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr) !important;
  }

  .clone-mobile-step-btn {
    min-width: 0 !important;
    min-height: 50px !important;
    border-radius: 15px !important;
    border: 1px solid #eadff5 !important;
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
  }

  .clone-mobile-step-btn.primary {
    border-color: transparent !important;
    background: linear-gradient(135deg, #ff624b, #ff3f35) !important;
    color: #fff !important;
    box-shadow: 0 12px 22px rgba(255, 80, 64, 0.18) !important;
  }

  .clone-mobile-step-btn.secondary {
    background: #f7f1ff !important;
    color: #5b178d !important;
  }
}

@media (min-width: 641px) {
  .clone-mobile-step-actions {
    display: none !important;
  }
}

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

/* mobile-wechat-voice-upload-lock: file inputs stay native-clickable in mobile and WeChat browsers. */
.clone-video-dropzone,
.clone-upload-control {
  position: relative;
  overflow: hidden;
}

.clone-video-dropzone input.clone-asset-file,
.clone-upload-control input.clone-asset-file {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0.001 !important;
  cursor: pointer !important;
  z-index: 20 !important;
}

.clone-video-dropzone > :not(input),
.clone-upload-control > :not(input) {
  pointer-events: none !important;
}

.voice-dropzone {
  cursor: pointer !important;
}

.voice-dropzone input.clone-asset-file {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0.001 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 60 !important;
}

.voice-dropzone > :not(input) {
  pointer-events: none !important;
}

.voice-dropzone .clone-upload-cloud {
  width: 52px !important;
  height: 52px !important;
  font-size: 2rem !important;
}

.voice-dropzone strong {
  font-size: 0.96rem !important;
}

.voice-dropzone small,
.voice-dropzone .wechat-file-hint {
  font-size: 0.78rem !important;
  line-height: 1.38 !important;
}

/* mobile-nav3-final: keep legacy clone forms hidden after all later clone-grid overrides. */
#cloneLegacyForms,
.clone-grid.clone-legacy-forms,
.clone-panel.show .clone-grid.clone-legacy-forms {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* customer-facing-legacy-form-lock: technical URL clone forms must not appear in the client workflow. */
#avatarCloneForm,
#voiceCloneForm {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* vidu-generator-layout-lock: Vidu-like text/image/reference creator with unified works panel. */
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 720px;
  padding: 26px 0 38px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .blur-gallery {
  display: none;
}

body[data-view="creator"] #templateCenter {
  display: none !important;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(460px, 1.24fr);
  gap: 22px;
  width: 100%;
  min-width: 0;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 16px;
  min-width: 0;
}

.vidu-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: #121821;
  box-shadow: 0 16px 34px rgba(18, 24, 33, 0.12);
}

.vidu-mode-tab {
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #aeb8c7;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.vidu-mode-tab.active {
  background: #f8fafc;
  color: #121827;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-card {
  grid-column: auto;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: #171c24;
  color: #f8fafc;
  box-shadow: none;
  overflow: hidden;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head {
  padding: 22px 24px 0;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head p {
  color: #6ee7d8;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head h1 {
  color: #f8fafc;
  font-size: 1.34rem;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .mode-badge {
  background: rgba(255, 177, 66, 0.13);
  color: #ffc56f;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .prompt-wrap {
  padding: 18px 24px 0;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput {
  min-height: 210px;
  padding: 20px;
  border: 1px solid #29313d;
  border-radius: 18px;
  background: #10141b;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.72;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput::placeholder {
  color: #717d8e;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .prompt-helper {
  top: 30px;
  right: 38px;
  background: #27303c;
  color: #dce6f3;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-panel {
  margin: 16px 24px 0;
  border: 1px solid #29313d;
  border-radius: 18px;
  background: #10141b;
  color: #dce6f3;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-head {
  color: #eef5ff;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(94px, auto) 38px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-url,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #seedInput,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar select,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-trigger {
  border-color: #2d3744;
  background: #10141b;
  color: #f8fafc;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
  padding: 18px 24px 24px;
  gap: 10px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-select-wrap {
  min-width: min(100%, 290px);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn {
  min-width: 168px;
  background: linear-gradient(135deg, #4f7cff, #23c6ad);
  color: #fff;
  box-shadow: 0 14px 28px rgba(35, 198, 173, 0.2);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-estimate {
  color: #9aa6b8;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .diagnosis-card {
  position: relative;
  top: auto;
  right: auto;
  grid-column: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(223, 230, 242, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(25, 36, 56, 0.08);
}

.creator-works-panel {
  display: flex;
  min-width: 0;
  min-height: 604px;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: #171c24;
  color: #f8fafc;
  box-shadow: 0 20px 42px rgba(18, 24, 33, 0.12);
}

.creator-works-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.creator-works-head p,
.creator-works-head h2,
.creator-works-head span {
  margin: 0;
}

.creator-works-head p {
  color: #6ee7d8;
  font-weight: 900;
}

.creator-works-head h2 {
  margin-top: 4px;
  color: #f8fafc;
  font-size: 1.58rem;
}

.creator-works-head span {
  display: block;
  margin-top: 6px;
  color: #9aa6b8;
  font-size: 0.92rem;
  font-weight: 800;
}

.creator-works-refresh {
  flex: 0 0 auto;
  border-color: #2d3744;
  background: #10141b;
  color: #f8fafc;
}

.creator-works-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.creator-works-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 420px;
  place-items: center;
  border: 1px dashed #374151;
  border-radius: 18px;
  color: #9aa6b8;
  text-align: center;
  font-weight: 900;
}

.creator-work-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #29313d;
  border-radius: 18px;
  background: #10141b;
}

.creator-work-card.active {
  border-color: #23c6ad;
  box-shadow: 0 0 0 2px rgba(35, 198, 173, 0.12);
}

.creator-work-preview {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #0b111c;
}

.creator-work-video,
.creator-work-lazy,
.creator-work-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
}

.creator-work-video {
  object-fit: contain;
  background: #0b111c;
}

.creator-work-lazy {
  background: #0b111c;
}

.creator-work-placeholder {
  gap: 6px;
  padding: 18px;
  color: #9aa6b8;
  text-align: center;
}

.creator-work-placeholder strong {
  color: #f8fafc;
}

.creator-work-placeholder span {
  max-width: 220px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.creator-work-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.creator-work-info strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-work-info small {
  overflow: hidden;
  color: #8d99ab;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-work-info p {
  margin: 0;
  color: #9aa6b8;
  font-size: 0.86rem;
  font-weight: 800;
}

.creator-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.creator-work-actions .mini-btn {
  min-height: 38px;
  border-color: #2d3744;
  background: #171c24;
  color: #f8fafc;
  text-decoration: none;
}

.creator-work-actions .mini-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #4f7cff, #23c6ad);
  color: #fff;
}

.creator-work-actions .mini-btn.template-save {
  border-color: rgba(110, 231, 216, 0.28);
  background: rgba(35, 198, 173, 0.12);
  color: #6ee7d8;
}

@media (max-width: 1180px) {
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .creator-works-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .template-showcase {
    min-height: 0;
    margin-bottom: 14px;
    border-radius: 18px;
  }

  .showcase-mosaic {
    display: flex;
    min-height: 0;
    padding: 8px;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .showcase-mosaic::-webkit-scrollbar {
    display: none;
  }

  .showcase-tile,
  .showcase-tile.wide,
  .showcase-tile.tall,
  .showcase-tile:nth-child(3),
  .showcase-tile:nth-child(4) {
    flex: 0 0 76%;
    width: 76%;
    min-height: 260px;
    grid-column: auto;
    grid-row: auto;
    scroll-snap-align: start;
  }

  .showcase-actions {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 8px 8px 12px;
  }

  .showcase-cta {
    min-height: 74px;
    padding: 16px 16px 16px 20px;
    border-radius: 22px;
  }

  .showcase-cta strong {
    font-size: 1.22rem;
  }

  .showcase-cta em {
    font-size: 0.9rem;
  }

  .showcase-cta i {
    width: 42px;
    height: 42px;
    font-size: 1.55rem;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) {
    padding: 14px 0 22px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
    gap: 12px;
  }

  .vidu-mode-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    border-radius: 16px;
  }

  .vidu-mode-tab {
    min-height: 46px;
    font-size: 0.9rem;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-card,
  .creator-works-panel {
    border-radius: 18px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .prompt-wrap,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-panel {
    margin-left: 16px;
    margin-right: 16px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head {
    display: grid;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput {
    min-height: 180px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-select-wrap,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn {
    width: 100%;
    min-width: 0;
  }

  .creator-works-panel {
    padding: 16px;
  }

  .creator-works-head {
    display: grid;
  }

  .creator-works-body {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .creator-works-empty {
    min-height: 220px;
  }
}

/* mobile-home-showcase-fit: keep the HappyHorse-style home and module strip inside phone width. */
@media (max-width: 640px) {
  body[data-view="home"] .discover-header {
    overflow: hidden;
  }

  body[data-view="home"] .header-inner {
    overflow: hidden !important;
  }

  body[data-view="home"] .header-actions {
    gap: 8px !important;
  }

  body[data-view="home"] .nav-text-btn {
    min-height: 36px !important;
    font-size: 0.82rem !important;
    gap: 4px !important;
  }

  body[data-view="home"] .course-nav-action {
    display: none !important;
  }

  body[data-view="home"] .language-switch {
    display: none !important;
  }

  body[data-view="home"] .personal-center-btn {
    max-width: 96px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 0.82rem !important;
  }

  body[data-view="home"] .landing-hero {
    min-height: 560px !important;
    padding: 42px 16px 38px !important;
  }

  body[data-view="home"] .landing-hero h1 {
    width: 100%;
    max-width: calc(100vw - 32px) !important;
    margin-top: 28px !important;
    font-size: clamp(1.85rem, 8.8vw, 2.4rem) !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }

  body[data-view="home"] .landing-hero p {
    max-width: calc(100vw - 32px) !important;
    font-size: 0.96rem !important;
    line-height: 1.55 !important;
  }

  body[data-view="home"] .hero-actions {
    width: min(100%, 320px) !important;
    gap: 10px !important;
  }

  body[data-view="home"] .hero-primary,
  body[data-view="home"] .hero-secondary {
    min-height: 54px !important;
  }

  body[data-view="home"] .category-strip {
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  body[data-view="home"] .category-chip {
    min-width: 106px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
  }
}

/* mobile-home-workbench-lock: make the digital-human home a real mobile entry screen, not a tiny nav strip. */
@media (max-width: 640px) {
  body:has(.clone-panel.show #cloneHomePanel:not([hidden])) .clone-panel.show .clone-side-nav {
    display: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel.clone-home-panel:not([hidden]) {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-hero {
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 22px 18px !important;
    border: 1px solid rgba(209, 190, 239, 0.88) !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, rgba(248, 243, 255, 0.98), rgba(255, 255, 255, 0.96)) !important;
    box-shadow: 0 16px 36px rgba(71, 36, 122, 0.1) !important;
    text-align: left !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-hero p {
    display: none !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-card {
    min-height: 148px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 16px !important;
    border-radius: 20px !important;
    text-align: left !important;
  }

  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-card:first-child,
  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-card:nth-child(4),
  body:has(#clonePanel.show) .clone-panel.show #cloneHomePanel:not([hidden]) .clone-home-card:nth-child(5) {
    grid-column: 1 / -1 !important;
    min-height: 132px !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
  }
}

/* mobile-hh-home-width-lock: sync the desktop HappyHorse-style entry to phones without page-wide overflow. */
@media (max-width: 640px) {
  html,
  body,
  .site-shell,
  .discover-header,
  .discover-main,
  .landing-hero,
  .template-center,
  .template-showcase {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .discover-header {
    position: sticky !important;
  }

  .header-inner {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 58px !important;
    padding: 8px 12px !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .brand-link {
    grid-column: 1 !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
  }

  .header-actions {
    grid-column: 2 !important;
    display: flex !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  body[data-view="home"] .workbench-action,
  body[data-view="home"] .member-nav-action,
  body[data-view="home"] .course-nav-action {
    display: none !important;
  }

  .course-actions {
    grid-column: 3 !important;
    display: flex !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
    margin-left: 0 !important;
  }

  .course-actions .language-switch {
    display: none !important;
  }

  .account-entry-btn,
  .personal-center-btn {
    width: auto !important;
    max-width: 112px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 0.86rem !important;
  }

  .discover-main {
    display: block !important;
    width: 100% !important;
    padding: 0 12px 44px !important;
  }

  .landing-hero {
    width: calc(100% + 24px) !important;
    min-height: 545px !important;
    margin: 0 -12px 18px !important;
    padding: 46px 18px 38px !important;
    justify-items: center !important;
  }

  .landing-hero h1 {
    max-width: min(100%, 350px) !important;
    margin: 26px auto 0 !important;
    font-size: clamp(2rem, 10.2vw, 2.48rem) !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  .landing-hero p {
    max-width: min(100%, 340px) !important;
    font-size: 0.94rem !important;
    line-height: 1.58 !important;
    overflow-wrap: anywhere !important;
  }

  .hero-actions {
    width: min(100%, 320px) !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-primary,
  .hero-secondary {
    width: 100% !important;
    min-height: 54px !important;
  }

  .hero-metrics {
    width: min(100%, 340px) !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  .hero-metrics::-webkit-scrollbar {
    display: none !important;
  }

  .category-strip {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
    padding: 9px 10px !important;
    justify-content: flex-start !important;
    border-radius: 22px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .category-chip {
    flex: 0 0 auto !important;
    min-width: 100px !important;
    min-height: 42px !important;
    padding: 0 13px !important;
    font-size: 0.9rem !important;
  }

  .template-center {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 20px !important;
  }

  .template-head {
    display: grid !important;
    gap: 8px !important;
    padding-right: 0 !important;
  }

  .template-head h2 {
    max-width: 100% !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
  }

  #templateCount {
    width: fit-content !important;
    max-width: 100% !important;
  }

  .template-showcase {
    width: 100% !important;
  }

  .showcase-mosaic {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .showcase-tile,
  .showcase-tile.wide,
  .showcase-tile.tall,
  .showcase-tile:nth-child(3),
  .showcase-tile:nth-child(4) {
    flex-basis: min(82%, 300px) !important;
    width: min(82%, 300px) !important;
  }

  .template-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* mobile-hh-home-header-final: keep the phone header simple and visible. */
@media (max-width: 640px) {
  body[data-view="home"] .discover-header {
    overflow: hidden !important;
  }

  body[data-view="home"] .header-inner {
    position: relative !important;
    display: block !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 8px 12px !important;
    overflow: hidden !important;
  }

  body[data-view="home"] .brand-link {
    position: absolute !important;
    left: 12px !important;
    top: 9px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  body[data-view="home"] .header-actions {
    display: none !important;
  }

  body[data-view="home"] .course-actions {
    position: absolute !important;
    right: 12px !important;
    top: 10px !important;
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 80px) !important;
    margin: 0 !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
  }

  body[data-view="home"] .course-actions .language-switch {
    display: none !important;
  }

  body[data-view="home"] .account-entry-btn,
  body[data-view="home"] .personal-center-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 116px !important;
    min-width: 86px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 0.84rem !important;
    white-space: nowrap !important;
  }

  body[data-view="home"] .landing-hero h1 {
    max-width: 318px !important;
    font-size: clamp(1.7rem, 7.4vw, 1.86rem) !important;
    line-height: 1.14 !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }
}

/* happyhorse-layout-v2: homepage is a black material wall with floating creation entries. */
body[data-view="home"] {
  background: #030407;
}

body[data-view="home"] .discover-header {
  background: rgba(3, 4, 8, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 901px) {
  body[data-view="home"] .discover-main {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 22px;
    padding: 24px 28px 54px;
    background: #030407;
  }

  body[data-view="home"] #landingHero {
    display: none !important;
  }

  body[data-view="home"] .category-strip {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 94px;
    display: flex;
    flex-direction: column;
    align-self: start;
    width: 76px;
    min-height: calc(100vh - 126px);
    margin: 0;
    padding: 10px 8px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: #080d14;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  }

  body[data-view="home"] .category-chip {
    width: 100%;
    min-width: 0;
    min-height: 76px;
    padding: 8px 6px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: rgba(226, 232, 240, 0.62);
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  body[data-view="home"] .category-chip.active,
  body[data-view="home"] .category-chip:hover,
  body[data-view="home"] .category-chip:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: none;
  }

  body[data-view="home"] #templateCenter.template-center {
    grid-column: 2 / -1 !important;
    grid-row: 1 !important;
    min-height: calc(100vh - 126px);
    margin: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: #050609;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    overflow: hidden;
  }

  body[data-view="home"] .template-head {
    margin: 0 0 16px;
    align-items: flex-start;
  }

  body[data-view="home"] .template-head p {
    margin-bottom: 8px;
    color: #69f0c8;
    font-size: 0.96rem;
  }

  body[data-view="home"] .template-head h2 {
    max-width: 980px;
    color: #fff;
    font-size: clamp(1.45rem, 2.3vw, 2.35rem);
    line-height: 1.12;
    font-weight: 950;
  }

  body[data-view="home"] #templateCount {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #e8eef8;
  }

  body[data-view="home"] .template-showcase {
    min-height: min(760px, calc(100vh - 212px));
    margin: 0 0 18px;
    border-radius: 18px;
    background: #050609;
  }

  body[data-view="home"] .showcase-mosaic {
    grid-template-columns: 1.18fr 1fr 1fr 0.86fr;
    grid-auto-rows: clamp(112px, 12.2vh, 150px);
    grid-auto-flow: dense;
    min-height: min(760px, calc(100vh - 212px));
    padding: 0;
    gap: 8px;
  }

  body[data-view="home"] .showcase-tile {
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.11);
    background: #101217;
  }

  body[data-view="home"] .showcase-tile.tile-1 {
    grid-row: span 2;
  }

  body[data-view="home"] .showcase-tile.tile-2 {
    grid-row: span 4;
  }

  body[data-view="home"] .showcase-tile.tile-3 {
    grid-row: span 3;
  }

  body[data-view="home"] .showcase-tile.tile-4 {
    grid-row: span 2;
  }

  body[data-view="home"] .showcase-tile.tile-5 {
    grid-row: span 3;
  }

  body[data-view="home"] .showcase-tile.tile-6 {
    grid-row: span 2;
  }

  body[data-view="home"] .showcase-tile.tile-7 {
    grid-row: span 3;
  }

  body[data-view="home"] .showcase-tile.tile-8 {
    grid-row: span 2;
  }

  body[data-view="home"] .showcase-tile-topline {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
  }

  body[data-view="home"] .showcase-tile-topline i,
  body[data-view="home"] .showcase-tile-topline em {
    min-height: 32px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 950;
    backdrop-filter: blur(12px);
  }

  body[data-view="home"] .showcase-tile-topline em {
    background: rgba(255, 255, 255, 0.18);
  }

  body[data-view="home"] .showcase-tile-meta {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  body[data-view="home"] .showcase-tile-meta i {
    color: #76f4cf;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 950;
  }

  body[data-view="home"] .showcase-tile-meta b {
    font-size: clamp(1rem, 1.35vw, 1.38rem);
  }

  body[data-view="home"] .showcase-actions {
    left: 34%;
    right: 4%;
    bottom: 30px;
    gap: 18px;
  }

  body[data-view="home"] .showcase-cta {
    min-height: 112px;
    padding: 24px 24px 24px 32px;
    border-radius: 999px;
    background:
      radial-gradient(circle at 12% 12%, rgba(172, 146, 255, 0.82), transparent 32%),
      linear-gradient(135deg, rgba(116, 92, 255, 0.95), rgba(5, 8, 24, 0.98) 72%);
  }

  body[data-view="home"] .showcase-cta.primary {
    background:
      radial-gradient(circle at 12% 12%, rgba(100, 221, 199, 0.78), transparent 32%),
      linear-gradient(135deg, rgba(86, 99, 255, 0.96), rgba(5, 8, 24, 0.98) 72%);
  }

  body[data-view="home"] .template-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 900px) {
  body[data-view="home"] {
    background: #030407 !important;
  }

  body[data-view="home"] .discover-main {
    background: #030407 !important;
  }

  body[data-view="home"] #landingHero {
    display: none !important;
  }

  body[data-view="home"] .category-strip {
    margin-top: 12px !important;
    background: #080d14 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
  }

  body[data-view="home"] .category-chip {
    color: rgba(226, 232, 240, 0.72) !important;
  }

  body[data-view="home"] .category-chip.active {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
  }

  body[data-view="home"] .template-center {
    margin-top: 12px !important;
    padding: 14px 12px 18px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #050609 !important;
  }

  body[data-view="home"] .showcase-tile-topline {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  body[data-view="home"] .showcase-tile-topline i,
  body[data-view="home"] .showcase-tile-topline em {
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 950;
  }
}

/* creator-cleanup-v1: keep the video creator as a clear two-panel workbench. */
body[data-view="creator"] {
  background: #05070c;
}

body[data-view="creator"] .discover-main {
  display: block !important;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding: 24px clamp(18px, 2.4vw, 34px) 42px !important;
  background: #05070c !important;
  overflow-x: hidden;
}

body[data-view="creator"] .category-strip,
body[data-view="creator"] #templateCenter {
  display: none !important;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) {
  width: min(100%, 1980px);
  min-height: calc(100vh - 138px) !important;
  margin: 0 auto;
  padding: 0 !important;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
  display: grid;
  grid-template-columns: minmax(620px, 1.16fr) minmax(520px, 0.84fr) !important;
  align-items: start;
  gap: 24px;
  width: 100%;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
  display: grid;
  grid-template-rows: max-content max-content max-content !important;
  align-content: start !important;
  align-items: start;
  gap: 16px;
  min-width: 0;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs {
  align-self: start;
  min-height: 70px;
  padding: 8px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #121821;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tab {
  min-height: 54px;
  padding: 0 14px;
  border-radius: 15px;
  white-space: nowrap;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tab.active {
  background: #f8fafc;
  color: #101722;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-card {
  align-self: start;
  overflow: visible;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput {
  min-height: clamp(168px, 26vh, 250px);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-select-wrap {
  flex: 1 1 320px;
  min-width: 0;
  width: auto;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar select {
  flex: 0 0 auto;
  width: auto;
  min-width: 92px;
  white-space: nowrap;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #durationInput {
  min-width: 142px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .mention-btn {
  flex: 0 0 48px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .share-check {
  flex: 0 0 auto;
  white-space: nowrap;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #seedInput {
  flex: 0 1 112px;
  min-width: 92px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn {
  flex: 0 0 172px;
  width: 172px;
  white-space: nowrap;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn {
  min-height: 48px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn span {
  white-space: nowrap;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-estimate {
  flex: 1 0 100%;
  margin-top: 2px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .diagnosis-card {
  align-self: start;
  min-height: 0;
}

body[data-view="creator"] .creator-works-panel {
  align-self: start;
  min-height: calc(100vh - 138px);
  max-height: calc(100vh - 138px);
  overflow: hidden;
}

body[data-view="creator"] .creator-works-body {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-view="creator"] .creator-works-empty {
  min-height: 300px;
}

@media (max-width: 1180px) {
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-view="creator"] .creator-works-panel {
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 720px) {
  body[data-view="creator"] .discover-main {
    min-height: auto;
    padding: 12px 12px 24px !important;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) {
    min-height: 0 !important;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
    gap: 12px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* home-banner-restore-v1: keep the original PonyClip homepage banner as the first screen. */
body[data-view="home"] .discover-main {
  display: grid !important;
  grid-template-columns: 132px minmax(0, 1fr) !important;
  column-gap: 18px !important;
  align-items: start !important;
  padding: 0 42px 72px !important;
  background: transparent !important;
}

body[data-view="home"] #landingHero.landing-hero {
  display: grid !important;
  grid-column: 1 / -1 !important;
  min-height: 520px !important;
  margin: 0 -42px 26px !important;
  padding: 72px 42px 64px !important;
}

body[data-view="home"] #templateCenter.template-center {
  grid-column: 2 !important;
  grid-row: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}

body[data-view="home"] .category-strip {
  grid-column: 1 !important;
  grid-row: auto !important;
}

@media (min-width: 901px) {
  body[data-view="home"] #landingHero.landing-hero h1 {
    white-space: nowrap !important;
  }
}

@media (max-width: 900px) {
  body[data-view="home"] .discover-main {
    display: block !important;
    width: 100% !important;
    padding: 0 12px 44px !important;
    background: #030407 !important;
  }

  body[data-view="home"] #landingHero.landing-hero {
    display: grid !important;
    width: calc(100% + 24px) !important;
    min-height: calc(100svh - 112px) !important;
    margin: 0 -12px 18px !important;
    padding: 46px 18px 38px !important;
    justify-items: center !important;
    align-content: center !important;
  }

  body[data-view="home"] #landingHero.landing-hero h1 {
    width: 100% !important;
    max-width: min(100%, 392px) !important;
    margin: 26px auto 18px !important;
    font-size: clamp(2.6rem, 10.4vw, 3.15rem) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  body[data-view="home"] #landingHero.landing-hero p {
    max-width: min(100%, 380px) !important;
    margin: 0 auto !important;
    font-size: clamp(1rem, 4.4vw, 1.18rem) !important;
    line-height: 1.62 !important;
    font-weight: 780 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  body[data-view="home"] #landingHero .hero-actions {
    width: min(100%, 330px) !important;
    margin-top: 32px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body[data-view="home"] #landingHero .hero-primary,
  body[data-view="home"] #landingHero .hero-secondary {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    padding: 0 24px !important;
    font-size: 1.05rem !important;
  }

  body[data-view="home"] #landingHero .hero-metrics {
    width: min(100%, 340px) !important;
    max-width: 340px !important;
    margin-top: 30px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  body[data-view="home"] #landingHero .hero-metrics span {
    max-width: none !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 16px !important;
    white-space: nowrap !important;
  }

  body[data-view="home"] .course-actions .language-switch,
  body[data-view="home"] .language-switch {
    display: inline-flex !important;
  }

  body[data-view="home"] .account-entry-btn,
  body[data-view="home"] .personal-center-btn {
    display: inline-flex !important;
  }
}

/* happyhorse-layout-v1: PonyClip creator follows HappyHorse-style generate/edit workspace. */
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
  grid-template-columns: 74px minmax(430px, 0.86fr) minmax(520px, 1.14fr) !important;
  gap: 0;
  min-height: calc(100vh - 138px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: #0f1217;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.pony-creator-rail {
  display: grid;
  grid-template-rows: auto repeat(4, auto) minmax(24px, 1fr) auto;
  justify-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #090c11;
}

.pony-rail-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(91, 77, 255, 0.22);
}

.pony-rail-btn {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #f2f5fb;
  font-size: 1.22rem;
  font-weight: 950;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.pony-rail-btn:hover,
.pony-rail-btn.active {
  border-color: rgba(112, 97, 255, 0.54);
  background: linear-gradient(180deg, rgba(112, 97, 255, 0.32), rgba(112, 97, 255, 0.12));
  color: #ffffff;
  box-shadow: inset 0 -3px 0 #6d5dfc;
}

.pony-rail-bottom {
  align-self: end;
  color: #8e98a8;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
  min-height: calc(100vh - 138px);
  padding: 0 24px 22px;
  overflow: auto;
  border-right: 1px solid #20242c;
  background: #111419;
  scrollbar-color: #343a45 transparent;
}

.pony-main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-height: 86px;
  margin: 0 -24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at 27% 0%, rgba(119, 103, 255, 0.26), transparent 28%),
    linear-gradient(180deg, #101318, #111419);
}

.pony-main-tab {
  position: relative;
  height: 86px;
  border: 0;
  background: transparent;
  color: #6f7682;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 950;
  cursor: pointer;
}

.pony-main-tab.active {
  color: #e9edf5;
}

.pony-main-tab:focus-visible,
.pony-rail-btn:focus-visible {
  outline: 2px solid #7667ff;
  outline-offset: -2px;
}

.pony-main-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54%;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, #7667ff, transparent);
  box-shadow: 0 0 26px rgba(118, 103, 255, 0.86);
  transform: translateX(-50%);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs {
  display: flex;
  gap: 14px;
  min-height: 0;
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tab {
  flex: 0 0 auto;
  min-height: 52px;
  min-width: 116px;
  padding: 0 22px;
  border-radius: 999px;
  background: transparent;
  color: #a5adba;
  font-size: 1rem;
  font-weight: 950;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tab.active {
  background: #2a2e36;
  color: #f7f9fc;
  box-shadow: none;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-card {
  margin-top: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f7f9fc;
  overflow: visible;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-head {
  display: none;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .prompt-wrap {
  padding: 18px 0 0;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput {
  min-height: clamp(260px, 34vh, 380px);
  padding: 24px;
  border: 1px solid #242934;
  border-radius: 22px;
  background: #191d24;
  color: #eef2f8;
  font-size: 1.02rem;
  line-height: 1.68;
  resize: vertical;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput::placeholder {
  color: #6f7785;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .prompt-helper {
  top: 32px;
  right: 14px;
  min-height: 34px;
  background: #252a34;
  color: #aeb7c6;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-panel {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-head {
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: #e2e8f0;
  font-size: 1.05rem;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-head span::before {
  content: "⇧";
  margin-right: 8px;
  color: #abb4c2;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-row {
  grid-template-columns: minmax(0, 1fr) auto auto 38px;
  gap: 10px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-url,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #seedInput,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar select,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-trigger {
  border-color: #242934;
  background: #191d24;
  color: #eef2f8;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-upload {
  border-color: #2e3542;
  background: #202631;
  color: #f0f4fb;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  margin: 28px -24px -22px;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(17, 20, 25, 0.86), #111419 34%);
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-select-wrap {
  flex: 0 1 160px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-trigger {
  min-height: 48px;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  border-radius: 14px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-icon,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .horse-icon {
  background: #242a35;
  color: #ffffff;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar select,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .mention-btn,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .share-check,
body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #seedInput {
  min-height: 48px;
  border-radius: 14px;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn {
  flex: 0 0 144px;
  width: 144px;
  min-height: 52px;
  margin-left: auto;
  border-radius: 22px;
  background: #242936;
  color: #6f7785;
  box-shadow: none;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn:not(:disabled) {
  background: linear-gradient(135deg, #6f5cff, #4c38d8);
  color: #ffffff;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-estimate {
  flex: 1 0 100%;
  margin: 0;
  color: #6f7785;
  text-align: left;
}

body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .diagnosis-card {
  display: none;
}

body[data-view="creator"] .pony-preview-panel.creator-works-panel {
  position: relative;
  display: grid;
  min-height: calc(100vh - 138px);
  max-height: calc(100vh - 138px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000000;
  color: #f7f9fc;
  overflow: hidden;
  box-shadow: none;
}

.pony-preview-stage {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 138px);
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(112, 97, 255, 0.08), transparent 28%),
    #000000;
}

.pony-preview-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(430px, 76%);
  color: #6f7785;
  text-align: center;
}

.pony-preview-empty img {
  width: 142px;
  height: 142px;
  border-radius: 32px;
  opacity: 0.72;
  filter: grayscale(1) brightness(1.55);
}

.pony-preview-empty strong {
  color: #7b8390;
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
  font-weight: 950;
}

.pony-preview-empty span {
  max-width: 360px;
  color: #5d6572;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.6;
}

.pony-preview-video,
.pony-preview-lazy {
  width: min(82%, 900px);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 250px);
  border-radius: 18px;
  background: #05070c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

.pony-preview-caption {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #cfd6e2;
  font-weight: 900;
}

.pony-preview-caption span {
  color: #7c8593;
  font-size: 0.92rem;
}

body[data-view="creator"] .pony-preview-panel .creator-works-head,
body[data-view="creator"] .pony-preview-panel .creator-works-body {
  display: none;
}

@media (max-width: 1180px) {
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    min-height: 0;
  }

  body[data-view="creator"] .pony-preview-panel.creator-works-panel {
    grid-column: 1 / -1;
    min-height: min(520px, 64vh);
    max-height: none;
    border-top: 1px solid #20242c;
  }

  .pony-preview-stage {
    min-height: min(520px, 64vh);
  }
}

@media (max-width: 720px) {
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-workspace {
    display: grid;
    grid-template-columns: 1fr !important;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .pony-creator-rail {
    position: sticky;
    top: 0;
    z-index: 8;
    grid-template-columns: auto repeat(4, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .pony-rail-logo {
    width: 36px;
    height: 36px;
  }

  .pony-rail-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1rem;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-left {
    min-height: 0;
    padding: 0 14px 16px;
    border-right: 0;
  }

  .pony-main-tabs {
    min-height: 70px;
    margin: 0 -14px;
  }

  .pony-main-tab {
    height: 70px;
    font-size: 1.12rem;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs {
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .vidu-mode-tab {
    min-width: 96px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #promptInput {
    min-height: 230px;
    border-radius: 18px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .reference-status {
    max-width: 100%;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar {
    position: static;
    margin: 18px -14px -16px;
    padding: 14px;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .model-select-wrap,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .generate-btn,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .composer-toolbar select,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) #seedInput {
    flex: 1 1 100%;
    width: 100%;
  }

  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .mention-btn,
  body[data-view="creator"] #creatorView:not(.clone-workspace-mode) .share-check {
    flex: 1 1 calc(50% - 6px);
  }

  body[data-view="creator"] .pony-preview-panel.creator-works-panel,
  .pony-preview-stage {
    min-height: 360px;
  }

  .pony-preview-empty img {
    width: 94px;
    height: 94px;
    border-radius: 24px;
  }

  .pony-preview-caption {
    position: static;
    display: grid;
    padding: 14px;
  }
}

@media (max-width: 640px) {
  body[data-view="home"] .discover-header {
    overflow: hidden !important;
  }

  body[data-view="home"] .header-inner {
    position: static !important;
    display: grid !important;
    grid-template-columns: 40px minmax(116px, 1fr) auto !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 8px 9px !important;
    gap: 7px !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  body[data-view="home"] .brand-link {
    position: static !important;
    grid-column: 1 !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
  }

  body[data-view="home"] .brand-word {
    display: none !important;
  }

  body[data-view="home"] .header-actions {
    grid-column: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="home"] .workbench-action,
  body[data-view="home"] .member-nav-action {
    display: inline-flex !important;
    min-height: 34px !important;
    padding: 0 !important;
    gap: 3px !important;
    flex: 0 0 auto !important;
    font-size: 0.82rem !important;
  }

  body[data-view="home"] .course-nav-action {
    display: inline-flex !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 34px !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
  }

  body[data-view="home"] .course-nav-action .nav-icon {
    color: #b8c2d4 !important;
    font-size: 0.9rem !important;
  }

  body[data-view="home"] .course-actions {
    position: static !important;
    grid-column: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body[data-view="home"] .course-actions .language-switch,
  body[data-view="home"] .language-switch {
    display: inline-flex !important;
    min-height: 34px !important;
    padding: 3px !important;
    transform: scale(0.86) !important;
    transform-origin: right center !important;
  }

  body[data-view="home"] .language-option {
    min-height: 28px !important;
    padding: 0 7px !important;
    font-size: 0.72rem !important;
  }

  body[data-view="home"] .account-entry-btn,
  body[data-view="home"] .personal-center-btn {
    min-width: 74px !important;
    max-width: 86px !important;
    min-height: 36px !important;
    padding: 0 9px !important;
    font-size: 0.76rem !important;
  }

  body[data-view="home"] .header-actions,
  body[data-view="home"] .workbench-action,
  body[data-view="home"] .member-nav-action {
    visibility: visible !important;
  }
}

/* home-bottom-capability-entries-v2: keep the two core entries after the full homepage waterfall, not over the middle. */
body[data-view="home"] .home-capability-entries {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  gap: 28px !important;
  margin: 32px 0 20px !important;
}

body[data-view="home"] .home-capability-cta {
  min-height: 116px !important;
  padding: 24px 28px 24px 34px !important;
}

@media (max-width: 900px) {
  body[data-view="home"] .home-capability-entries {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin: 18px 0 4px !important;
  }

body[data-view="home"] .home-capability-cta {
  min-height: 78px !important;
  padding: 16px 16px 16px 20px !important;
  border-radius: 24px !important;
  }
}

/* video-edit-workspace-v1: make video edit a dedicated upload-and-edit surface. */
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .vidu-mode-tabs {
  display: none !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .vidu-left {
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100vh - 138px) !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .composer-card {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  margin-top: 0 !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .reference-panel {
  order: 1 !important;
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 280px !important;
  margin: 24px 0 18px !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .reference-head {
  display: none !important;
}

.video-edit-source-card {
  display: grid;
  gap: 14px;
  height: 100%;
  min-height: clamp(300px, 44vh, 520px);
}

.video-edit-upload-zone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: clamp(250px, 38vh, 460px);
  border: 1px dashed rgba(126, 134, 150, 0.46);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(109, 93, 252, 0.1), transparent 30%),
    #101318;
  color: #7f8796;
  text-align: center;
  cursor: pointer;
}

.video-edit-upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.video-edit-upload-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #394050;
  border-radius: 12px;
  color: #aeb7c6;
  font-size: 2rem;
  font-weight: 500;
}

.video-edit-upload-zone strong {
  color: #9aa3b3;
  font-size: 1.05rem;
  font-weight: 900;
}

.video-edit-upload-zone em {
  max-width: 360px;
  color: #697282;
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.55;
}

.video-edit-source-url {
  min-height: 48px !important;
}

.video-edit-source-status {
  color: #778294;
  font-size: 0.9rem;
  font-weight: 800;
}

.video-edit-source-status.error {
  color: #ff8f8f;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .prompt-wrap {
  order: 2 !important;
  margin-top: auto !important;
  padding: 0 !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #promptInput {
  min-height: 136px !important;
  max-height: 210px !important;
  padding: 22px 24px 22px 84px !important;
  border-radius: 22px 22px 0 0 !important;
  background: #191d24 !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .prompt-wrap::before {
  content: "+";
  position: absolute;
  left: 24px;
  top: 28px;
  z-index: 2;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 12px;
  background: #252b36;
  color: #aeb7c6;
  font-size: 1.6rem;
  font-weight: 800;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .prompt-helper,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .model-select-wrap,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #ratioInput,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .mention-btn,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .share-check,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #seedInput,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .generate-estimate {
  display: none !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .composer-toolbar {
  order: 3 !important;
  min-height: 76px !important;
  margin: 0 -24px -22px !important;
  padding: 14px 24px 18px !important;
  border-top: 0 !important;
  background: #191d24 !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #durationInput,
body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #resolutionInput {
  flex: 0 0 92px !important;
  min-height: 48px !important;
  border-radius: 14px !important;
  background: #252b36 !important;
  cursor: pointer !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #durationInput {
  flex-basis: 110px !important;
}

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .generate-btn {
  flex: 0 0 132px !important;
  width: 132px !important;
  margin-left: auto !important;
  border-radius: 22px !important;
}

@media (max-width: 720px) {
  body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .reference-panel {
    margin-top: 16px !important;
  }

  .video-edit-source-card {
    min-height: 320px;
  }

  .video-edit-upload-zone {
    min-height: 260px;
  }

  body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) #promptInput {
    padding-left: 76px !important;
  }

body[data-view="creator"] #creatorView.video-edit-workspace:not(.clone-workspace-mode) .composer-toolbar {
    margin: 0 -14px -16px !important;
    padding: 12px 14px 16px !important;
  }
}

/* home-horizontal-module-nav-v1: keep the core module entry in the bar below the hero banner. */
@media (min-width: 901px) {
  body[data-view="home"] .discover-main {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
  }

  body[data-view="home"] #landingHero.landing-hero {
    grid-column: 1 / -1 !important;
    margin-bottom: 0 !important;
  }

  body[data-view="home"] .category-strip {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    position: relative !important;
    top: auto !important;
    z-index: 4 !important;
    width: auto !important;
    min-height: 94px !important;
    margin: 0 -42px 28px !important;
    padding: 18px 42px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    border: 0 !important;
    border-top: 1px solid rgba(215, 166, 72, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    background: #030407 !important;
    box-shadow: none !important;
  }

  body[data-view="home"] .category-chip {
    width: auto !important;
    min-width: 150px !important;
    min-height: 50px !important;
    padding: 0 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(232, 238, 248, 0.76) !important;
    font-size: 0.96rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body[data-view="home"] .category-chip::before {
    display: none !important;
  }

  body[data-view="home"] .category-chip.active,
  body[data-view="home"] .category-chip:hover,
  body[data-view="home"] .category-chip:focus-visible {
    border-color: rgba(130, 240, 208, 0.56) !important;
    background: rgba(130, 240, 208, 0.14) !important;
    color: #ffffff !important;
  }

  body[data-view="home"] #templateCenter.template-center {
    grid-column: 1 / -1 !important;
  }
}

/* home-topview-scenarios-v2: Topview-style commercial scenario cards powered by PonyClip prompts. */
body[data-view="home"] .template-center {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="home"] .template-head,
body[data-view="home"] #templateCount,
body[data-view="home"] #videoTemplateGrid,
body[data-view="home"] .home-capability-entries {
  display: none !important;
}

body[data-view="home"] .template-showcase.home-scenario-showcase {
  min-height: 0 !important;
  margin: 0 0 38px !important;
  overflow: visible !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-view="home"] .home-scenario-head {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  color: #ffffff;
}

body[data-view="home"] .home-scenario-head span {
  color: #72f2cd;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-view="home"] .home-scenario-head strong {
  color: #ffffff;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1.14;
  font-weight: 950;
  letter-spacing: 0;
}

body[data-view="home"] .home-scenario-head em {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 1rem;
  line-height: 1.6;
  font-style: normal;
  font-weight: 700;
}

body[data-view="home"] .home-scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body[data-view="home"] .home-scenario-card {
  position: relative;
  min-height: 178px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 118%, rgba(255, 255, 255, 0.08), transparent 44%),
    linear-gradient(180deg, #242424 0%, #191919 48%, #111111 100%);
  color: #ffffff;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[data-view="home"] .home-scenario-card:hover,
body[data-view="home"] .home-scenario-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(130, 240, 208, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.36);
}

body[data-view="home"] .home-scenario-card strong {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 96%;
  color: #f8fafc;
  font-size: clamp(0.98rem, 1.25vw, 1.18rem);
  line-height: 1.28;
  font-weight: 950;
  letter-spacing: 0;
}

body[data-view="home"] .home-scenario-media {
  position: absolute;
  left: 24px;
  right: 18px;
  bottom: 18px;
  height: 88px;
  z-index: 1;
}

body[data-view="home"] .home-scenario-shot {
  position: absolute;
  top: 10px;
  width: 54%;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #222;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

body[data-view="home"] .home-scenario-shot.shot-1 {
  left: 0;
  transform: rotate(-7deg);
  opacity: 0.78;
}

body[data-view="home"] .home-scenario-shot.shot-2 {
  left: 22%;
  top: 0;
  z-index: 2;
  width: 58%;
  height: 86px;
  transform: none;
  opacity: 1;
}

body[data-view="home"] .home-scenario-shot.shot-3 {
  right: 0;
  transform: rotate(7deg);
  opacity: 0.72;
}

body[data-view="home"] .home-scenario-fallback {
  position: absolute;
  inset: 10px 18px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #262b36, #6d5cff);
}

@media (max-width: 1180px) {
  body[data-view="home"] .home-scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-view="home"] .template-showcase.home-scenario-showcase {
    margin-bottom: 24px !important;
  }

  body[data-view="home"] .home-scenario-head {
    margin-bottom: 14px;
  }

  body[data-view="home"] .home-scenario-head strong {
    font-size: 1.36rem;
  }

  body[data-view="home"] .home-scenario-head em {
    font-size: 0.92rem;
  }

  body[data-view="home"] .home-scenario-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 2px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body[data-view="home"] .home-scenario-grid::-webkit-scrollbar {
    display: none;
  }

  body[data-view="home"] .home-scenario-card {
    flex: 0 0 84%;
    min-height: 188px;
    scroll-snap-align: start;
  }

  body[data-view="home"] .home-scenario-card strong {
    font-size: 1.05rem;
  }
}

/* home-short-video-agent-v2: compact short-video agent typography below the hero. */
body[data-view="home"] .template-showcase.home-scenario-showcase {
  margin: 0 0 48px !important;
}

body[data-view="home"] .home-agent-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 8px auto 26px;
  color: #fff;
  text-align: center;
}

body[data-view="home"] .home-agent-head span {
  color: #72f2cd;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-view="home"] .home-agent-head strong {
  max-width: 980px;
  color: #fff;
  font-size: clamp(2.05rem, 3.4vw, 3.25rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-view="home"] .home-agent-head em {
  max-width: 840px;
  color: rgba(245, 247, 255, 0.68);
  font-size: clamp(0.92rem, 1.02vw, 1.02rem);
  line-height: 1.58;
  font-style: normal;
  font-weight: 680;
}

body[data-view="home"] .home-agent-console {
  width: min(100%, 1600px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(26, 26, 26, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-view="home"] .home-agent-tabs {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
}

body[data-view="home"] .home-agent-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.96rem;
  font-weight: 820;
  letter-spacing: 0;
  cursor: pointer;
}

body[data-view="home"] .home-agent-tabs button.active {
  color: #fff;
}

body[data-view="home"] .home-agent-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
}

body[data-view="home"] .home-agent-body {
  min-height: 382px;
  padding: 24px 32px 28px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

body[data-view="home"] .home-agent-assets {
  display: flex;
  align-items: center;
  gap: 16px;
}

body[data-view="home"] .home-agent-asset,
body[data-view="home"] .home-agent-add {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

body[data-view="home"] .home-agent-asset {
  position: relative;
  display: grid;
  align-items: end;
}

body[data-view="home"] .home-agent-asset img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-view="home"] .home-agent-asset em {
  position: relative;
  z-index: 2;
  padding: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

body[data-view="home"] .home-agent-asset.muted {
  opacity: 0.68;
}

body[data-view="home"] .home-agent-add {
  display: grid;
  place-items: center;
  border: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 2rem;
  cursor: pointer;
}

body[data-view="home"] .home-agent-prompt {
  width: 100%;
  min-height: 145px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.16vw, 1.24rem);
  line-height: 1.78;
  font-weight: 660;
}

body[data-view="home"] .home-agent-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body[data-view="home"] .home-agent-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

body[data-view="home"] .home-agent-controls span {
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  font-weight: 760;
}

body[data-view="home"] .home-agent-submit {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #111;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(255, 255, 255, 0.16);
}

body[data-view="home"] .home-agent-quick-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px auto 28px;
}

body[data-view="home"] .home-agent-quick-tags button {
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
  font-weight: 780;
  cursor: pointer;
}

body[data-view="home"] .home-agent-quick-tags button.active,
body[data-view="home"] .home-agent-quick-tags button:hover,
body[data-view="home"] .home-agent-quick-tags button:focus-visible {
  color: #fff;
  border-color: rgba(130, 240, 208, 0.28);
  background: rgba(130, 240, 208, 0.16);
}

body[data-view="home"] .home-scenario-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

body[data-view="home"] .home-scenario-card {
  display: flex;
  flex-direction: column;
  min-height: 286px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 110%, rgba(255, 255, 255, 0.07), transparent 42%),
    linear-gradient(180deg, #262626 0%, #1c1c1c 45%, #121212 100%);
}

body[data-view="home"] .home-scenario-card.active {
  border-color: rgba(130, 240, 208, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.42);
}

body[data-view="home"] .home-scenario-card strong {
  min-height: 2.7em;
  font-size: clamp(0.96rem, 1.04vw, 1.08rem);
  font-weight: 880;
}

body[data-view="home"] .home-scenario-media {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  height: 142px;
  margin: 18px 0 14px;
}

body[data-view="home"] .home-scenario-shot {
  top: 18px;
  width: 46%;
  height: 104px;
  border-radius: 16px;
}

body[data-view="home"] .home-scenario-shot.shot-1 {
  left: 2%;
  transform: rotate(-7deg);
}

body[data-view="home"] .home-scenario-shot.shot-2 {
  left: 18%;
  top: 0;
  width: 64%;
  height: 132px;
  border-radius: 18px;
}

body[data-view="home"] .home-scenario-shot.shot-3 {
  right: 2%;
  transform: rotate(7deg);
}

body[data-view="home"] .home-scenario-card small {
  display: block;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 680;
}

@media (max-width: 1180px) {
  body[data-view="home"] .home-agent-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-view="home"] .home-agent-tabs::-webkit-scrollbar {
    display: none;
  }

  body[data-view="home"] .home-scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-view="home"] .home-agent-head {
    justify-items: start;
    text-align: left;
    margin: 0 0 18px;
  }

  body[data-view="home"] .home-agent-head strong {
    font-size: 1.72rem;
  }

  body[data-view="home"] .home-agent-console {
    border-radius: 22px;
  }

  body[data-view="home"] .home-agent-tabs {
    min-height: 58px;
    gap: 18px;
    padding: 0 18px;
  }

  body[data-view="home"] .home-agent-body {
    min-height: 330px;
    padding: 18px;
  }

  body[data-view="home"] .home-agent-asset,
  body[data-view="home"] .home-agent-add {
    width: 72px;
    height: 72px;
  }

  body[data-view="home"] .home-agent-prompt {
    min-height: 135px;
    font-size: 0.92rem;
    line-height: 1.68;
  }

  body[data-view="home"] .home-agent-footer {
    align-items: flex-end;
  }

  body[data-view="home"] .home-agent-controls {
    gap: 8px;
  }

  body[data-view="home"] .home-agent-controls span {
    padding: 9px 11px;
    font-size: 0.82rem;
  }

  body[data-view="home"] .home-agent-submit {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
  }

  body[data-view="home"] .home-agent-quick-tags {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  body[data-view="home"] .home-agent-quick-tags::-webkit-scrollbar {
    display: none;
  }

  body[data-view="home"] .home-scenario-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    overflow: visible;
    padding: 0;
  }

  body[data-view="home"] .home-scenario-card {
    min-height: 248px;
  }

  body[data-view="home"] .home-scenario-media {
    height: 124px;
  }

body[data-view="home"] .home-scenario-shot.shot-2 {
    height: 116px;
  }
}

/* home-entry-dimensions-v1: lock the two primary homepage entries to matching pill sizes. */
body[data-view="home"] .category-strip {
  min-height: 110px !important;
  margin: 0 -42px 28px !important;
  padding: 4px 42px 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #030407 !important;
}

body[data-view="home"] .category-chip {
  width: 226px !important;
  min-width: 226px !important;
  max-width: 226px !important;
  height: 76px !important;
  min-height: 76px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.17) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  color: rgba(232, 238, 248, 0.92) !important;
  font-size: 1.18rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-view="home"] .category-chip.active,
body[data-view="home"] .category-chip:hover,
body[data-view="home"] .category-chip:focus-visible {
  border-color: rgba(130, 240, 208, 0.7) !important;
  background: rgba(20, 76, 62, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 52px rgba(40, 210, 176, 0.12) !important;
}

body[data-view="home"] .home-capability-entries {
  display: grid !important;
  grid-template-columns: repeat(2, 560px) !important;
  justify-content: center !important;
  gap: 54px !important;
  width: 100% !important;
  max-width: 1220px !important;
  margin: 34px auto 54px !important;
  padding: 0 !important;
}

body[data-view="home"] .home-capability-cta,
body[data-view="home"] .showcase-cta.home-capability-cta {
  width: 560px !important;
  min-height: 138px !important;
  padding: 28px 34px 28px 62px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(110deg, rgba(126, 102, 240, 0.95), rgba(49, 36, 125, 0.88) 46%, rgba(5, 8, 24, 0.98) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 20px 56px rgba(0, 0, 0, 0.34) !important;
}

body[data-view="home"] .home-capability-cta span {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
  text-align: left !important;
}

body[data-view="home"] .home-capability-cta strong {
  color: #ffffff !important;
  font-size: 2rem !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
}

body[data-view="home"] .home-capability-cta em {
  color: rgba(255, 255, 255, 0.56) !important;
  font-size: 1.18rem !important;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

body[data-view="home"] .home-capability-cta i {
  width: 76px !important;
  height: 76px !important;
  flex: 0 0 76px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.93) !important;
  color: #0b0d12 !important;
  font-size: 2.35rem !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

@media (max-width: 760px) {
  body[data-view="home"] .category-strip {
    min-height: 92px !important;
    margin: 0 -16px 20px !important;
    padding: 8px 16px 24px !important;
    gap: 10px !important;
  }

  body[data-view="home"] .category-chip {
    width: calc((100vw - 54px) / 2) !important;
    min-width: 0 !important;
    max-width: 190px !important;
    height: 58px !important;
    min-height: 58px !important;
    font-size: 0.98rem !important;
  }

  body[data-view="home"] .home-capability-entries {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    margin: 22px auto 34px !important;
  }

  body[data-view="home"] .home-capability-cta,
  body[data-view="home"] .showcase-cta.home-capability-cta {
    width: 100% !important;
    min-height: 104px !important;
    padding: 22px 22px 22px 28px !important;
  }

  body[data-view="home"] .home-capability-cta strong {
    font-size: 1.45rem !important;
  }

  body[data-view="home"] .home-capability-cta em {
    font-size: 0.96rem !important;
  }

  body[data-view="home"] .home-capability-cta i {
    width: 56px !important;
    height: 56px !important;
    flex-basis: 56px !important;
    font-size: 1.85rem !important;
  }
}

/* home-category-compact-cta-v2: keep the two primary entries as medium buttons, not oversized banners. */
body[data-view="home"] .category-strip {
  min-height: 108px !important;
  margin: 0 -42px 22px !important;
  padding: 16px clamp(32px, 5vw, 96px) 18px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(260px, 360px)) !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(16px, 2vw, 28px) !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #030407 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-view="home"] .category-chip {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 72px !important;
  min-height: 72px !important;
  padding: 0 18px 0 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(153, 142, 255, 0.24) !important;
  background:
    radial-gradient(circle at 9% 24%, rgba(223, 207, 255, 0.84), rgba(160, 139, 255, 0.42) 20%, transparent 42%),
    linear-gradient(110deg, rgba(142, 119, 243, 0.96) 0%, rgba(54, 43, 132, 0.94) 46%, rgba(6, 9, 27, 0.99) 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.24) !important;
  transform: none !important;
}

body[data-view="home"] .category-chip::before {
  display: none !important;
}

body[data-view="home"] .category-chip.active,
body[data-view="home"] .category-chip:hover,
body[data-view="home"] .category-chip:focus-visible {
  border-color: rgba(171, 157, 255, 0.66) !important;
  background:
    radial-gradient(circle at 9% 24%, rgba(235, 226, 255, 0.88), rgba(162, 139, 255, 0.48) 20%, transparent 42%),
    linear-gradient(110deg, rgba(152, 126, 250, 0.98) 0%, rgba(56, 43, 137, 0.96) 46%, rgba(6, 9, 27, 0.99) 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 34px rgba(82, 66, 180, 0.18) !important;
}

body[data-view="home"] .category-chip span {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  text-align: left !important;
}

body[data-view="home"] .category-chip strong {
  color: #ffffff !important;
  font-size: 1.18rem !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body[data-view="home"] .category-chip em {
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 0.78rem !important;
  font-style: normal !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

body[data-view="home"] .category-chip i {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #070a12 !important;
  font-size: 1.35rem !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

body[data-view="home"] .home-capability-entries {
  display: none !important;
}

@media (max-width: 900px) {
  body[data-view="home"] .category-strip {
    min-height: 0 !important;
    margin: 0 -16px 14px !important;
    padding: 12px 16px 16px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body[data-view="home"] .category-chip {
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 14px 0 16px !important;
    border-radius: 18px !important;
  }

  body[data-view="home"] .category-chip strong {
    font-size: 1.06rem !important;
  }

  body[data-view="home"] .category-chip em {
    font-size: 0.72rem !important;
    white-space: normal !important;
  }

  body[data-view="home"] .category-chip i {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    font-size: 1.2rem !important;
  }
}
