﻿:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-soft: #f4f7f9;
  --line: #dce3e8;
  --line-strong: #c9d4dc;
  --text: #111827;
  --muted: #687581;
  --muted-2: #94a0aa;
  --teal: #007f8f;
  --teal-dark: #00636f;
  --teal-soft: #e6f6f7;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #dc2626;
  --shadow: 0 14px 35px rgba(28, 41, 54, 0.08);
  color-scheme: light;
}

/* Smart montage console */
.sci-fi-shell .smart-montage-workspace {
  min-width: 0;
  padding: 16px;
  color: #eaf7ff;
}

.sci-fi-shell .smart-montage-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  margin-bottom: 14px;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid rgba(95, 211, 255, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 0%, rgba(150, 72, 255, 0.24), transparent 46%),
    linear-gradient(115deg, rgba(41, 29, 92, 0.9), rgba(7, 40, 59, 0.92));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.sci-fi-shell .smart-montage-header::after {
  position: absolute;
  inset: auto -8% -70% 38%;
  height: 130px;
  content: "";
  background: radial-gradient(ellipse, rgba(41, 218, 246, 0.18), transparent 68%);
  pointer-events: none;
}

.sci-fi-shell .smart-montage-header h2 {
  margin: 4px 0;
  font-size: clamp(23px, 2vw, 31px);
  letter-spacing: -0.02em;
}

.sci-fi-shell .smart-montage-header p {
  margin: 0;
  color: #92a8bd;
}

.montage-header-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.montage-header-status > span,
.montage-source-count,
.montage-template-selected-label {
  padding: 7px 11px;
  color: #75e9fb;
  border: 1px solid rgba(56, 212, 242, 0.25);
  border-radius: 999px;
  background: rgba(6, 24, 42, 0.56);
  font-size: 12px;
}

.montage-console-grid {
  display: grid;
  gap: 14px;
}

.montage-console-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(116, 153, 210, 0.2);
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(14, 24, 52, 0.96), rgba(6, 15, 34, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 14px 35px rgba(0, 0, 0, 0.16);
}

.montage-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(122, 156, 205, 0.14);
}

.montage-panel-heading > div {
  min-width: 0;
  flex: 1;
}

.montage-panel-heading h3,
.montage-results h3 {
  margin: 0;
  color: #f6fbff;
  font-size: 17px;
}

.montage-panel-heading p {
  margin: 3px 0 0;
  color: #71869d;
  font-size: 11px;
}

.montage-panel-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #63e4f7;
  border: 1px solid rgba(74, 208, 242, 0.28);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(117, 66, 201, 0.3), rgba(24, 170, 203, 0.2));
  font: 700 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.montage-field {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.montage-field-label,
.montage-color-field > span {
  color: #b9c8d8;
  font-size: 12px;
  font-weight: 650;
}

.montage-field select,
.montage-field textarea {
  width: 100%;
  color: #e7f5ff;
  border: 1px solid rgba(95, 137, 195, 0.18);
  border-radius: 10px;
  outline: none;
  background: rgba(4, 13, 31, 0.72);
}

.montage-field select {
  min-height: 45px;
  padding: 0 12px;
}

.montage-field textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.montage-field select:focus,
.montage-field textarea:focus {
  border-color: rgba(51, 215, 245, 0.62);
  box-shadow: 0 0 0 3px rgba(52, 211, 242, 0.08);
}

.montage-compact-dropzone {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  cursor: pointer;
  border: 1px dashed rgba(49, 211, 242, 0.38);
  border-radius: 11px;
  background: rgba(5, 29, 47, 0.5);
}

.montage-compact-dropzone > i {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  color: #62e7f8;
  border-radius: 10px;
  background: rgba(36, 202, 235, 0.11);
  font-size: 19px;
}

.montage-compact-dropzone span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.montage-compact-dropzone b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-compact-dropzone small {
  color: #71869d;
  font-size: 10px;
}

.montage-compact-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.montage-source-list {
  display: grid;
  gap: 7px;
  max-height: 195px;
  margin-bottom: 12px;
  overflow: auto;
}

.montage-source-list article,
.montage-empty-state {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(100, 137, 193, 0.14);
  border-radius: 9px;
  background: rgba(3, 12, 28, 0.58);
}

.montage-source-list article > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.montage-source-list article b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-source-list article small,
.montage-empty-state {
  color: #71869d;
  font-size: 10px;
}

.montage-source-list article > i {
  color: #2bd8bc;
}

.montage-analysis-row,
.montage-switch-row,
.montage-audio-tip,
.montage-edit-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  padding: 11px;
  border: 1px solid rgba(91, 141, 198, 0.16);
  border-radius: 10px;
  background: rgba(4, 14, 31, 0.58);
}

.montage-analysis-row > span,
.montage-switch-row > span,
.montage-audio-tip > span,
.montage-edit-note > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.montage-analysis-row b,
.montage-switch-row b,
.montage-audio-tip b,
.montage-edit-note b {
  font-size: 11px;
}

.montage-analysis-row small,
.montage-switch-row small,
.montage-audio-tip small,
.montage-edit-note small {
  color: #71869d;
  font-size: 10px;
}

.montage-analysis-row button,
.montage-copy-summary button,
.montage-secondary-button {
  min-height: 34px;
  padding: 0 11px;
  color: #7ae9f9;
  border: 1px solid rgba(47, 209, 240, 0.3);
  border-radius: 8px;
  background: rgba(20, 124, 151, 0.18);
}

.montage-analysis-row button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.montage-insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 14px;
}

.montage-insight-list span {
  display: grid;
  min-height: 58px;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(95, 135, 189, 0.16);
  border-radius: 9px;
  background: rgba(3, 12, 28, 0.48);
}

.montage-insight-list b {
  font-size: 16px;
}

.montage-insight-list small {
  color: #6d8299;
  font-size: 9px;
}

.montage-switch-row input {
  width: 17px;
  height: 17px;
  min-width: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: #2bdcf2;
}

.montage-switch-row.is-disabled {
  opacity: 0.5;
}

.montage-copy-summary {
  padding: 13px;
  border: 1px solid rgba(146, 90, 242, 0.22);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(78, 39, 142, 0.22), rgba(6, 34, 48, 0.38));
}

.montage-copy-summary h4 {
  margin: 7px 0;
  font-size: 14px;
}

.montage-copy-summary p {
  margin: 0 0 10px;
  color: #8fa4b8;
  font-size: 11px;
  line-height: 1.65;
}

.montage-preview-kicker,
#montagePreviewEvidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #63e3f5;
  font-size: 10px;
}

.montage-template-picker {
  position: relative;
}

.montage-template-trigger,
.montage-template-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: #eaf7ff;
  text-align: left;
  border: 1px solid rgba(53, 211, 241, 0.2);
  border-radius: 10px;
  background: rgba(3, 13, 30, 0.78);
}

.montage-template-trigger img,
.montage-template-menu img {
  width: 48px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
}

.montage-template-trigger span,
.montage-template-menu span {
  display: grid;
  min-width: 0;
  flex: 1;
}

.montage-template-trigger small,
.montage-template-menu small {
  color: #758aa0;
  font-size: 10px;
}

.montage-template-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(95, 211, 255, 0.24);
  border-radius: 12px;
  background: #071226;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.48);
}

.montage-template-menu[hidden] {
  display: none;
}

.montage-template-menu button.is-selected {
  border-color: rgba(59, 220, 246, 0.58);
  background: rgba(37, 151, 189, 0.16);
}

.montage-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border-radius: 10px;
  background: rgba(2, 10, 24, 0.72);
}

.montage-segmented button {
  min-height: 38px;
  color: #7d91a8;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.montage-segmented button.is-active {
  color: #7eeafa;
  border-color: rgba(52, 211, 242, 0.35);
  background: rgba(35, 154, 189, 0.18);
}

.montage-panel-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(118, 150, 196, 0.14);
}

.montage-caption-master {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6ee8f8;
  font-size: 10px;
}

.montage-caption-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.montage-color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.montage-color-field input {
  width: 42px;
  height: 34px;
  padding: 2px;
  border: 1px solid rgba(95, 137, 195, 0.25);
  border-radius: 8px;
  background: #050d1d;
}

.montage-generate-bar {
  position: sticky;
  z-index: 12;
  bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(57, 215, 245, 0.25);
  border-radius: 15px;
  background: rgba(5, 14, 32, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.montage-generate-summary {
  display: flex;
  align-items: center;
  gap: 11px;
}

.montage-generate-summary > i {
  color: #64e5f7;
  font-size: 21px;
}

.montage-generate-summary span {
  display: grid;
  gap: 3px;
}

.montage-generate-summary small {
  color: #74899f;
  font-size: 10px;
}

#startSmartMontageGeneration {
  min-height: 43px;
  padding: 0 20px;
  color: #07111e;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #a654f3, #32d9f1);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(47, 212, 241, 0.18);
}

#startSmartMontageGeneration:disabled {
  cursor: wait;
  filter: grayscale(0.55);
  opacity: 0.6;
}

.montage-generate-progress {
  grid-column: 1 / -1;
}

.montage-generate-progress > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.montage-generate-progress > i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(105, 135, 180, 0.16);
}

.montage-generate-progress > i > b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #aa55f4, #2eddf3);
  transition: width 0.3s ease;
}

.montage-results {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(113, 150, 206, 0.19);
  border-radius: 17px;
  background: rgba(7, 16, 36, 0.92);
}

.montage-results > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.montage-results > header > span {
  color: #73889f;
  font-size: 11px;
}

.montage-variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.montage-project-recovery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(245, 190, 74, 0.3);
  border-radius: 13px;
  background: linear-gradient(110deg, rgba(245, 158, 11, 0.09), rgba(23, 36, 64, 0.7));
}

.montage-project-recovery > i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffd071;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  font-size: 18px;
}

.montage-project-recovery > div {
  display: grid;
  gap: 4px;
}

.montage-project-recovery small {
  color: #9eb0c5;
  line-height: 1.55;
}

.montage-project-recovery button {
  min-height: 38px;
  padding: 0 14px;
  color: #07111e;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(90deg, #f0b64e, #55d9ef);
  font-weight: 800;
}

.montage-variant-card {
  display: grid;
  gap: 9px;
  min-height: 172px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(91, 140, 200, 0.18);
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(44, 31, 93, 0.34), rgba(3, 18, 33, 0.68));
}

.montage-variant-card > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #6ce8fa;
  border: 1px solid rgba(64, 218, 245, 0.3);
  border-radius: 10px;
  background: rgba(34, 169, 200, 0.13);
  font-weight: 800;
}

.montage-variant-card small {
  color: #788da3;
}

.montage-variant-meta,
.montage-variant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.montage-risk-badge,
.montage-stock-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(93, 125, 173, 0.13);
  color: #9eb4c9;
  font-size: 9px;
}

.montage-risk-badge.is-low { color: #48e2b9; background: rgba(35, 180, 143, 0.12); }
.montage-risk-badge.is-medium { color: #ffd26a; background: rgba(210, 150, 36, 0.13); }
.montage-risk-badge.is-high,
.montage-risk-badge.is-blocked { color: #ff8294; background: rgba(222, 63, 90, 0.13); }

.montage-variant-actions button {
  min-height: 33px;
  padding: 0 10px;
  color: #b6cbe0;
  border: 1px solid rgba(95, 137, 195, 0.23);
  border-radius: 8px;
  background: rgba(5, 15, 32, 0.68);
}

.montage-variant-actions button.is-primary {
  color: #73e9fa;
  border-color: rgba(52, 213, 242, 0.35);
}

.montage-variant-actions button.is-review {
  color: #f7d58b;
  border-color: rgba(245, 190, 74, 0.34);
  background: rgba(245, 158, 11, 0.08);
}

.montage-variant-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.montage-variant-card.is-empty .montage-variant-actions {
  margin-top: auto;
}

@media (max-width: 720px) {
  .montage-project-recovery {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .montage-project-recovery button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.montage-risk-dialog,
.montage-video-preview {
  display: grid;
  gap: 16px;
  color: #dce8ff;
}

.montage-risk-overview {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.montage-risk-overview h3,
.montage-risk-overview p,
.montage-risk-section h4,
.montage-video-preview p {
  margin: 0;
}

.montage-risk-overview h3 {
  margin: 3px 0 5px;
  color: #f8fbff;
  font-size: 19px;
}

.montage-risk-overview p,
.montage-video-preview p {
  color: #8fa5c6;
  font-size: 12px;
  line-height: 1.65;
}

.montage-risk-score {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 22px;
  background: rgba(34, 211, 238, 0.08);
  color: #67e8f9;
}

.montage-risk-score b {
  font-size: 28px;
  line-height: 1;
}

.montage-risk-score small {
  margin-top: 5px;
  color: currentColor;
  font-size: 10px;
}

.montage-risk-score.is-medium {
  border-color: rgba(245, 190, 74, 0.34);
  background: rgba(245, 158, 11, 0.09);
  color: #fcd34d;
}

.montage-risk-score.is-high,
.montage-risk-score.is-blocked {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(244, 63, 94, 0.09);
  color: #fb7185;
}

.montage-risk-factors {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 8, 21, 0.52);
}

.montage-risk-factor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  color: #aebfda;
  font-size: 11px;
}

.montage-risk-factor b {
  color: #f8fbff;
}

.montage-risk-factor i {
  grid-column: 1 / -1;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(105, 135, 180, 0.16);
}

.montage-risk-factor em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #a855f7, #fb7185);
}

.montage-risk-section {
  display: grid;
  gap: 9px;
}

.montage-risk-section h4 {
  color: #f8fbff;
  font-size: 13px;
}

.montage-risk-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(130, 156, 255, 0.18);
  border-radius: 12px;
  color: #8194b6;
  font-size: 11px;
  text-align: center;
}

.montage-risk-segments {
  display: grid;
  gap: 7px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.montage-risk-segments li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 11px;
  background: rgba(8, 15, 33, 0.68);
}

.montage-risk-segments li b {
  color: #7ee8fa;
  font-size: 10px;
}

.montage-risk-segments li span {
  color: #c4d2e8;
  font-size: 11px;
}

.montage-review-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(245, 190, 74, 0.24);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.07);
  color: #d7b976;
}

.montage-review-notice p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.montage-risk-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.montage-review-pass {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5ee6bd;
  font-size: 12px;
  font-weight: 800;
}

.montage-video-preview video {
  display: block;
  width: 100%;
  max-height: min(68vh, 680px);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 16px;
  background: #020617;
}

@media (min-width: 1600px) {
  .montage-console-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 1024px) and (max-width: 1599px) {
  .montage-console-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .sci-fi-shell .smart-montage-workspace {
    padding: 10px;
  }

  .montage-console-grid,
  .montage-variant-grid {
    grid-template-columns: 1fr;
  }

  .sci-fi-shell .smart-montage-header,
  .montage-results > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .montage-generate-bar {
    position: static;
    grid-template-columns: 1fr;
  }

  #startSmartMontageGeneration {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell[hidden],
.login-screen[hidden],
.password-change-screen[hidden] {
  display: none;
}

.login-screen,
.password-change-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 127, 143, 0.12), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(37, 99, 235, 0.08), transparent 30%),
    var(--bg);
}

.password-change-card {
  border-color: rgba(0, 127, 143, 0.32);
}

.login-card {
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-card-header {
  padding: 30px 32px 20px;
  text-align: left;
}

/* bilingual voice script switch */
.language-switch-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
}

.language-switch-backdrop[hidden] {
  display: none !important;
}

.language-switch-dialog {
  width: min(520px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px 16px;
  padding: 26px;
  border: 1px solid rgba(130, 156, 255, 0.24);
  border-radius: 20px;
  background: rgba(9, 15, 32, 0.98);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), 0 0 32px rgba(79, 70, 229, 0.12);
}

.language-switch-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.12);
  color: #fde047;
  font-size: 22px;
}

.language-switch-copy h2 {
  margin: 0;
  color: #f8fbff;
  font-size: 20px;
  line-height: 1.35;
}

.language-switch-copy p {
  margin: 8px 0 0;
  color: #9cacc7;
  font-size: 14px;
  line-height: 1.7;
}

.language-switch-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  justify-self: end;
  width: min(292px, 100%);
  margin-top: 8px;
}

.language-switch-actions .ghost-button,
.language-switch-actions .primary-button {
  min-height: 44px;
  border-radius: 12px;
}

.language-switch-actions .ghost-button {
  border-color: rgba(125, 154, 205, 0.42);
  background: rgba(15, 27, 51, 0.78);
  color: #dce7f8;
}

.language-switch-actions .ghost-button:hover {
  border-color: rgba(55, 216, 255, 0.62);
  background: rgba(23, 43, 78, 0.92);
  color: #ffffff;
}

@media (max-width: 640px) {
  .language-switch-backdrop {
    padding: 12px;
  }

  .language-switch-dialog {
    width: calc(100vw - 24px);
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 22px 18px;
    border-radius: 18px;
  }

  .language-switch-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .language-switch-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* 2026-06-30 sentence compliance editor */
.sci-fi-shell .sentence-editor-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(94, 122, 184, 0.2);
}

.sci-fi-shell .sentence-editor-metrics {
  color: #a9badb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sci-fi-shell .copy-compliance-summary {
  min-width: 0;
  overflow: hidden;
  color: #7e92bc;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sci-fi-shell .copy-compliance-summary[data-status="pass"] {
  color: #48dfb0;
}

.sci-fi-shell .copy-compliance-summary[data-status="review"],
.sci-fi-shell .copy-compliance-summary[data-status="checking"] {
  color: #f8c96b;
}

.sci-fi-shell .copy-compliance-summary[data-status="risk"],
.sci-fi-shell .copy-compliance-summary[data-status="failed"] {
  color: #ff7f9c;
}

.sci-fi-shell .sentence-editor {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(89, 116, 181, 0.28);
  border-radius: 12px;
  background: rgba(3, 8, 22, 0.56);
  scrollbar-color: rgba(145, 98, 255, 0.72) rgba(8, 17, 38, 0.72);
  scrollbar-width: thin;
}

.sci-fi-shell .sentence-editor-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: start;
  min-height: 62px;
  padding: 15px 12px;
  border-bottom: 1px solid rgba(88, 111, 168, 0.16);
  transition: background 160ms ease, border-color 160ms ease;
}

.sci-fi-shell .sentence-editor-row:last-child {
  border-bottom: 0;
}

.sci-fi-shell .sentence-editor-row:focus-within {
  background: rgba(74, 62, 160, 0.1);
  box-shadow: inset 2px 0 0 #8f66ff;
}

.sci-fi-shell .sentence-editor-row.has-warning {
  box-shadow: inset 2px 0 0 rgba(248, 201, 107, 0.84);
}

.sci-fi-shell .sentence-editor-row.has-risk {
  box-shadow: inset 2px 0 0 rgba(255, 92, 130, 0.9);
}

.sci-fi-shell .sentence-editor-index {
  padding-top: 5px;
  color: #7184ad;
  font: 700 11px/1.4 "Inter", "Noto Sans SC", sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
}

.sci-fi-shell .sentence-editor-content {
  min-width: 0;
}

.sci-fi-shell .sentence-editor-input {
  display: block;
  width: 100%;
  min-height: 28px;
  overflow: hidden;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3f7ff;
  font: 650 15px/1.7 "Inter", "Noto Sans SC", sans-serif;
  letter-spacing: 0.01em;
  caret-color: #58dfff;
}

.sci-fi-shell .sentence-editor-input:focus {
  box-shadow: none;
}

.sci-fi-shell .sentence-editor-input::placeholder {
  color: #53668f;
}

.sci-fi-shell .sentence-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  gap: 4px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.sci-fi-shell .sentence-editor-row:hover .sentence-editor-actions,
.sci-fi-shell .sentence-editor-row:focus-within .sentence-editor-actions {
  opacity: 1;
}

.sci-fi-shell .sentence-editor-actions button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(87, 117, 185, 0.32);
  border-radius: 7px;
  background: rgba(7, 15, 34, 0.86);
  color: #8fa8d8;
  cursor: pointer;
}

.sci-fi-shell .sentence-editor-actions button:hover,
.sci-fi-shell .sentence-editor-actions button:focus-visible {
  border-color: rgba(81, 218, 255, 0.62);
  color: #6ce7ff;
  outline: 0;
}

.sci-fi-shell .sentence-editor-feedback {
  margin-top: 7px;
}

.sci-fi-shell .sentence-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(84, 112, 176, 0.25);
  border-radius: 999px;
  background: rgba(12, 23, 49, 0.76);
  color: #7489b3;
  font-size: 11px;
  font-weight: 700;
}

.sci-fi-shell .sentence-risk-badge:not(:disabled) {
  cursor: pointer;
}

.sci-fi-shell .sentence-risk-badge.is-warning {
  border-color: rgba(248, 201, 107, 0.46);
  background: rgba(248, 183, 64, 0.09);
  color: #f8cf79;
}

.sci-fi-shell .sentence-risk-badge.is-risk {
  border-color: rgba(255, 92, 130, 0.5);
  background: rgba(255, 67, 114, 0.1);
  color: #ff89a5;
}

.sci-fi-shell .sentence-compliance-details {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.sci-fi-shell .sentence-compliance-details[hidden] {
  display: none;
}

.sci-fi-shell .sentence-compliance-issue {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(248, 201, 107, 0.28);
  border-radius: 8px;
  background: rgba(87, 57, 16, 0.13);
  color: #c6d2ec;
  font-size: 12px;
  line-height: 1.55;
}

.sci-fi-shell .sentence-compliance-issue.is-risk {
  border-color: rgba(255, 92, 130, 0.34);
  background: rgba(96, 22, 47, 0.15);
}

.sci-fi-shell .sentence-compliance-issue b {
  color: #f5f8ff;
}

.sci-fi-shell .sentence-compliance-issue em {
  color: #8fa4cf;
  font-style: normal;
}

.sci-fi-shell .copy-compliance-disclaimer {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 10px 0 0;
  color: #7185ad;
  font-size: 11px;
  line-height: 1.5;
}

.sci-fi-shell .sentence-editor-empty {
  padding: 32px 18px;
  color: #687ba2;
  text-align: center;
}

@media (max-width: 760px) {
  .sci-fi-shell .sentence-editor-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sci-fi-shell .copy-compliance-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .sci-fi-shell .sentence-editor {
    max-height: 62vh;
  }

  .sci-fi-shell .sentence-editor-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 13px 10px;
  }

  .sci-fi-shell .sentence-editor-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: flex-end;
    opacity: 1;
  }

  .sci-fi-shell .sentence-editor-actions button {
    width: 44px;
    height: 44px;
  }

  .sci-fi-shell .sentence-editor-input {
    font-size: 15px;
  }

  .sci-fi-shell .sentence-risk-badge {
    min-height: 32px;
  }
}

.login-brand-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0, 127, 143, 0.2);
}

.login-brand-lockup {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.login-brand-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.login-brand-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-brand-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-card-header h1 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.login-card-header p {
  margin: 0;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 15px;
  padding: 2px 32px 24px;
}

.login-form .remote-session-message {
  min-height: 20px;
  padding: 0;
}

.login-submit {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  margin-top: 2px;
}

.login-policy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.login-policy i {
  color: var(--teal);
  font-size: 16px;
}

.app-shell {
  display: grid;
  grid-template-columns: 168px minmax(940px, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  background: var(--surface);
  border-color: var(--line);
  border-style: solid;
}

.sidebar {
  display: flex;
  flex-direction: column;
  border-width: 0 1px 0 0;
}

.brand {
  display: grid;
  grid-template-columns: 28px 1fr 24px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.brand strong {
  display: block;
  max-width: 92px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand span {
  color: var(--muted);
  font-size: 11px;
}

.icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2d3a44;
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.mobile-sidebar-toggle,
.mobile-sidebar-backdrop {
  display: none;
}

.mobile-topbar-brand {
  display: none;
}

/* 2026-06-29 generated product logo */
.login-brand-mark.product-logo-mark,
.brand-mark.product-logo-mark,
.mobile-topbar-brand img.product-logo-mark {
  object-fit: cover;
  background: #050816;
}

.login-brand-mark.product-logo-mark {
  width: 48px;
  height: 48px;
  margin: 0;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 14px;
  box-shadow:
    0 0 26px rgba(34, 211, 238, 0.18),
    0 14px 34px rgba(0, 0, 0, 0.22);
}

/* 2026-06-29 commercial login lockup */
.login-brand-lockup .login-brand-mark.product-logo-mark {
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.2),
    0 12px 28px rgba(0, 0, 0, 0.2);
}

.module-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 9px;
}

.module-button,
.plain-nav {
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #192630;
  text-align: left;
}

.module-button {
  padding: 10px 8px;
}

.module-button i,
.plain-nav i {
  font-size: 18px;
}

.module-button b {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

.module-button span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.module-button.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 127, 143, 0.2);
}

.module-button.active span {
  color: rgba(255, 255, 255, 0.82);
}

.module-button:not(.active):hover,
.plain-nav:hover {
  background: var(--surface-soft);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 14px 9px 16px;
  border-top: 1px solid var(--line);
}

.plain-nav {
  padding: 8px 8px;
  color: #33404a;
}

.plain-nav.active-soft {
  color: var(--teal);
}

.profile {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
}

.profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.profile b {
  display: block;
  font-size: 13px;
}

.profile small {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dff8e8;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-section-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  width: auto;
  min-width: 0;
}

.remote-session-summary {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: 12px;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: 12px;
}

.account-menu-toggle {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 178px;
  padding: 3px 9px 3px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #17242f;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.account-menu-toggle:hover,
.account-menu-open .account-menu-toggle {
  border-color: rgba(8, 143, 157, 0.28);
  background: #f4fbfc;
}

/* 2026-06-29 centered account avatar */
.account-avatar-frame {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.12);
}

.account-avatar-frame img {
  position: absolute;
  left: -21%;
  top: -11%;
  display: block;
  width: 122%;
  height: 122%;
  object-fit: cover;
}

.account-avatar-frame-sm {
  width: 34px;
  height: 34px;
}

.account-avatar-frame-lg {
  width: 40px;
  height: 40px;
}

.account-menu-toggle .account-menu-copy {
  min-width: 0;
  text-align: left;
}

.account-menu-toggle b,
.account-menu-toggle small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-toggle b {
  font-size: 12px;
  line-height: 1.15;
}

.account-menu-toggle small {
  margin-top: 2px;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
}

.account-menu-toggle > i {
  color: #607080;
  font-size: 16px;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.account-menu-panel[hidden] {
  display: none !important;
}

.account-menu-open .account-menu-panel {
  display: grid;
}

.account-menu-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: #f7fcfc;
}

.account-menu-card b {
  display: block;
  font-size: 13px;
}

.account-logout {
  justify-content: center;
  width: 100%;
}

.remote-api-status {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-api-status.is-online {
  color: #0a7e52;
}

.remote-session-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.remote-session-message.is-error {
  color: #b93b2f;
}

.top-section-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #526273;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.top-section-button i {
  color: #718096;
  font-size: 18px;
}

.top-section-button:hover {
  border-color: #c9d4df;
  background: #f8fafc;
  color: #1f2d3a;
}

.top-section-button.active {
  border-color: rgba(8, 143, 157, 0.26);
  background: #e9fbfd;
  color: var(--teal-dark);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.top-section-button.active i {
  color: var(--teal);
}

.resource-library-workspace {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
}

.resource-library-workspace[hidden] {
  display: none;
}

.resource-library-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.resource-library-header h2 {
  margin: 4px 0 0;
  color: #17242f;
  font-size: 22px;
}

.resource-library-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.resource-library-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-filter {
  border: 1px solid #cfe5e7;
  border-radius: 999px;
  background: #fff;
  color: #405466;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.resource-filter.active {
  border-color: rgba(8, 143, 157, 0.35);
  background: #e9fbfd;
  color: var(--teal-dark);
}

.resource-library-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.resource-library-empty,
.resource-library-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.resource-library-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: #4d5d6c;
}

.resource-library-empty i {
  color: var(--teal);
  font-size: 26px;
}

.resource-library-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.resource-library-card.is-selectable {
  grid-template-columns: auto 44px minmax(0, 1fr);
}

.resource-library-card.is-selected {
  border-color: rgba(8, 143, 157, 0.55);
  background: #f0fcfd;
  box-shadow: 0 0 0 2px rgba(8, 143, 157, 0.08);
}

.resource-library-card-select {
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.resource-library-card-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.resource-library-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9fbfd;
  color: var(--teal-dark);
  font-size: 22px;
}

.resource-library-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resource-library-card-title b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-library-card-title span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.resource-library-card-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.resource-library-card-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4fbfc;
}

.resource-library-card-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publish-account-workspace {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
}

.publish-account-workspace[hidden] {
  display: none;
}

.publish-account-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.publish-account-header h2 {
  margin: 4px 0 0;
  color: #17242f;
  font-size: 22px;
}

.publish-account-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.publish-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
}

.publish-account-list-panel,
.publish-account-form-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}

.publish-account-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.publish-account-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid #d7e6e8;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.publish-account-card.is-default {
  border-color: rgba(8, 143, 157, 0.42);
  box-shadow: 0 14px 36px rgba(8, 143, 157, 0.08);
}

.publish-account-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
}

.publish-account-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.publish-account-title b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-account-title span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.publish-account-meta,
.publish-account-links,
.publish-account-actions {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.publish-account-meta span,
.publish-account-links span,
.publish-account-links a {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4fbfc;
  color: #4d5d6c;
  text-decoration: none;
}

.publish-account-status.valid {
  background: #ecfdf3;
  color: #087443;
}

.publish-account-status.needs-login,
.publish-account-status.expired {
  background: #fff7ed;
  color: #b45309;
}

.publish-account-status.checking {
  background: #eef2ff;
  color: #4338ca;
}

.publish-account-default-badge {
  background: #e9fbfd !important;
  color: var(--teal-dark) !important;
  font-weight: 900;
}

.publish-account-form-panel {
  display: grid;
  gap: 9px;
  align-content: start;
}

.publish-account-form-panel select,
.publish-account-form-panel input,
.publish-account-form-panel textarea {
  width: 100%;
}

.publish-account-default {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #405466;
  font-size: 13px;
  font-weight: 800;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.resource-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 22% 18%, rgba(34, 211, 238, 0.12), transparent 34%),
    radial-gradient(circle at 78% 80%, rgba(168, 85, 247, 0.14), transparent 38%),
    rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(14px);
}

.resource-preview-overlay[hidden] {
  display: none !important;
}

.resource-preview-dialog {
  width: min(860px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(11, 17, 36, 0.98), rgba(4, 9, 23, 0.98)),
    rgba(9, 15, 32, 0.98);
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 48px rgba(34, 211, 238, 0.12);
  overflow: hidden;
  color: #edf4ff;
}

.resource-preview-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.18), transparent 24%, transparent 76%, rgba(168, 85, 247, 0.18)),
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.16), transparent 34%);
  opacity: 0.78;
}

.resource-preview-dialog::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.76), rgba(217, 70, 239, 0.7), transparent);
}

.resource-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(90deg, rgba(16, 24, 48, 0.88), rgba(11, 18, 39, 0.68)),
    rgba(7, 12, 28, 0.92);
}

.resource-preview-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resource-preview-eyebrow {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}

.resource-preview-header h2 {
  max-width: min(620px, 62vw);
  margin: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: 19px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-preview-header small {
  color: #93a4bf;
  font-size: 12px;
  font-weight: 700;
}

.resource-preview-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 86px;
  height: 38px;
  border: 1px solid rgba(130, 156, 255, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.14)),
    rgba(10, 16, 34, 0.86);
  color: #dbeafe;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.32),
    0 0 20px rgba(34, 211, 238, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.resource-preview-close:hover {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(34, 211, 238, 0.22);
  transform: translateY(-1px);
}

.resource-preview-close i {
  color: #67e8f9;
  font-size: 16px;
}

.resource-preview-body {
  min-height: 180px;
  position: relative;
  z-index: 1;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
}

.resource-preview-body video,
.resource-preview-body audio {
  width: 100%;
  position: relative;
  z-index: 1;
}

.resource-preview-body video {
  max-height: 70vh;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 16px;
  background: #020617;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

.resource-preview-body audio {
  padding: 16px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 16px;
  background: rgba(5, 9, 21, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.resource-preview-json {
  max-height: 70vh;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(8, 14, 30, 0.92), rgba(3, 7, 18, 0.94)),
    rgba(5, 9, 21, 0.9);
  color: #e5efff;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.resource-preview-loading,
.resource-preview-error {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 16px;
  background: rgba(5, 9, 21, 0.72);
  color: #cfe7ff;
}

.resource-preview-loading i,
.resource-preview-error i {
  color: #67e8f9;
  font-size: 26px;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45));
}

.digital-human-manager-workspace {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
}

.digital-human-manager-workspace[hidden] {
  display: none;
}

.digital-human-manager-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.digital-human-manager-header h2 {
  margin: 4px 0 0;
  color: #17242f;
  font-size: 22px;
  letter-spacing: 0;
}

.digital-human-manager-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.workspace-kicker {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.digital-human-library-summary {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cfe5e7;
  border-radius: 8px;
  background: #f4fbfc;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.digital-human-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 14px;
}

.digital-human-library-panel,
.digital-human-upload-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.digital-human-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.digital-human-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 192px;
  overflow: hidden;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  background: #fbfcfd;
}

.digital-human-card.is-selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(8, 143, 157, 0.18);
}

.digital-human-card.is-ineligible {
  background: #fcf9f8;
}

.digital-human-card-preview {
  position: relative;
  min-height: 192px;
  overflow: hidden;
  background: #17242f;
}

.digital-human-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.digital-human-preview-open {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

.digital-human-preview-open video {
  pointer-events: none;
}

.digital-human-preview-open:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: -3px;
}

.digital-human-orientation-badge,
.digital-human-preview-affordance {
  position: absolute;
  bottom: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(2, 6, 23, 0.78);
  color: #e6f7ff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.digital-human-orientation-badge {
  left: 7px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.digital-human-preview-affordance {
  right: 7px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 15px;
}

.digital-human-preview-player {
  display: grid;
  width: 100%;
  min-height: min(62vh, 620px);
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 18px;
  background: #020617;
}

.digital-human-preview-player video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 190px);
  object-fit: contain;
  background: #020617;
}

.digital-human-preview-player.is-portrait video {
  width: auto;
  height: min(74vh, 760px);
}

.digital-human-status {
  position: absolute;
  left: 7px;
  top: 7px;
  bottom: auto;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.digital-human-status.is-ready {
  background: rgba(10, 126, 82, 0.9);
}

.digital-human-status.is-rejected {
  background: rgba(185, 59, 47, 0.92);
}

.digital-human-card-body {
  display: flex;
  min-width: 0;
  padding: 13px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.digital-human-card-title {
  display: grid;
  gap: 5px;
}

.digital-human-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.digital-human-card-title b {
  overflow-wrap: anywhere;
  color: #1f2d3a;
  font-size: 14px;
}

.digital-human-card-title span {
  color: #0a7e52;
  font-size: 11px;
  font-weight: 800;
}

.digital-human-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.digital-human-card-meta span {
  padding: 4px 6px;
  border-radius: 6px;
  background: #edf2f6;
  color: #536273;
  font-size: 10px;
  font-weight: 800;
}

.digital-human-select {
  justify-content: center;
  width: 100%;
}

.digital-human-validation-error {
  margin: 0;
  color: #b93b2f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.digital-human-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbd6df;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.digital-human-empty i {
  color: var(--teal);
  font-size: 26px;
}

.digital-human-empty.is-error i {
  color: #b93b2f;
}

.digital-human-file-field {
  display: grid;
  min-height: 132px;
  margin-top: 14px;
  padding: 16px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed #9eb9c1;
  border-radius: 8px;
  background: #f5fafb;
  color: #2a3c48;
  cursor: pointer;
  text-align: center;
}

.digital-human-file-field:hover {
  border-color: var(--teal);
  background: #eef9fa;
}

.digital-human-file-field i {
  color: var(--teal-dark);
  font-size: 28px;
}

.digital-human-file-field b {
  font-size: 13px;
}

.digital-human-file-field span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.digital-human-file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.digital-human-profile-picker {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.digital-human-profile-picker > div {
  display: grid;
  gap: 7px;
}

.digital-human-profile-picker > div > span {
  color: #748291;
  font-size: 12px;
  font-weight: 700;
}

.digital-human-segmented,
.digital-human-resolution-options {
  display: grid;
  gap: 2px;
  padding: 3px;
  border: 1px solid #edf2f6;
  border-radius: 8px;
  background: #f8fafb;
}

.digital-human-segmented {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.digital-human-resolution-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.digital-human-segmented label,
.digital-human-resolution-options label {
  min-width: 0;
}

.digital-human-segmented input,
.digital-human-resolution-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.digital-human-segmented span,
.digital-human-resolution-options span {
  display: grid;
  min-height: 46px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 7px;
  color: #536273;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.digital-human-resolution-options span {
  display: flex;
  min-height: 38px;
  justify-content: center;
  gap: 3px;
}

.digital-human-resolution-options i {
  color: var(--teal);
  font-size: 12px;
}

.digital-human-segmented input:checked + span,
.digital-human-resolution-options input:checked + span {
  background: #fff;
  color: #1f2d3a;
  box-shadow: 0 4px 13px rgba(25, 43, 58, 0.08);
}

.ratio-preview {
  display: block;
  border: 2px solid currentColor;
  border-radius: 4px;
  opacity: 0.9;
}

.ratio-21x9 { width: 16px; height: 5px; }
.ratio-16x9 { width: 15px; height: 7px; }
.ratio-4x3 { width: 13px; height: 9px; }
.ratio-1x1 { width: 10px; height: 10px; }
.ratio-3x4 { width: 8px; height: 12px; }
.ratio-9x16 { width: 7px; height: 15px; }

.digital-human-constraints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.digital-human-constraints span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  color: #536273;
  font-size: 11px;
  line-height: 1.45;
}

.digital-human-constraints i {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 15px;
}

.digital-human-upload-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.digital-human-upload-action {
  justify-content: center;
  width: 100%;
  margin-top: 14px;
}

.digital-human-upload-status {
  min-height: 18px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.digital-human-upload-status.is-error {
  color: #b93b2f;
}

.digital-human-upload-status.is-success {
  color: #0a7e52;
}

.digital-human-upload-status.is-working {
  color: var(--teal-dark);
}

.voice-manager-workspace {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
}

.voice-manager-workspace[hidden] {
  display: none;
}

.voice-manager-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.voice-manager-header h2 {
  margin: 4px 0 0;
  color: #17242f;
  font-size: 22px;
}

.voice-manager-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.voice-library-summary {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cfe5e7;
  border-radius: 8px;
  background: #f4fbfc;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.voice-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 14px;
}

.voice-library-panel,
.voice-upload-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.voice-source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.52);
}

.voice-source-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.voice-source-tabs button.is-active {
  background: var(--surface);
  color: var(--teal-dark);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08);
}

.voice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.voice-library-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  background: #fbfcfd;
}

.voice-library-card.is-selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(8, 143, 157, 0.18);
}

.voice-library-card.is-ineligible {
  background: #fcf9f8;
}

.voice-library-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voice-library-card-title b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1f2d3a;
  font-size: 14px;
}

.voice-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.voice-status {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.voice-status.is-ready {
  background: #0a7e52;
}

.voice-status.is-rejected {
  background: #b93b2f;
}

.voice-status.is-official {
  border: 1px solid rgba(8, 143, 157, 0.28);
  background: rgba(8, 143, 157, 0.12);
  color: var(--teal-dark);
}

.voice-library-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.voice-library-card audio {
  width: 100%;
  height: 34px;
}

.voice-select {
  justify-content: center;
  width: 100%;
}

.voice-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbd6df;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.voice-empty i {
  color: var(--teal);
  font-size: 26px;
}

.voice-empty.is-error i {
  color: #b93b2f;
}

.voice-file-field {
  display: grid;
  min-height: 132px;
  margin-top: 14px;
  padding: 16px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed #9eb9c1;
  border-radius: 8px;
  background: #f5fafb;
  color: #2a3c48;
  cursor: pointer;
  text-align: center;
}

.voice-file-field:hover {
  border-color: var(--teal);
  background: #eef9fa;
}

.voice-file-field i {
  color: var(--teal-dark);
  font-size: 28px;
}

.voice-file-field b {
  font-size: 13px;
}

.voice-file-field span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.voice-file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.voice-constraints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.voice-constraints span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  color: #536273;
  font-size: 11px;
  line-height: 1.45;
}

.voice-constraints i {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 15px;
}

.voice-upload-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.voice-upload-action {
  justify-content: center;
  width: 100%;
  margin-top: 14px;
}

.voice-upload-status {
  min-height: 18px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.voice-upload-status.is-error {
  color: #b93b2f;
}

.voice-upload-status.is-success {
  color: #0a7e52;
}

.voice-upload-status.is-working {
  color: var(--teal-dark);
}

.motion-output-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.motion-output-meta > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.spinning {
  animation: autovideo-spin 0.8s linear infinite;
}

@keyframes autovideo-spin {
  to { transform: rotate(360deg); }
}

.project-select {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.project-select button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #33404a;
  font-size: 13px;
  padding-left: 20px;
}

.env-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.env-pill.connected span {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.env-pill.dry-run span {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.env-pill.unconnected span {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.primary-button,
.ghost-button,
.mini-button,
.full-button,
.table-more,
.docs-link,
.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #23313c;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  font-weight: 700;
}

.primary-button {
  border-color: var(--teal-dark);
  background: var(--teal);
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.ghost-button:hover,
.mini-button:hover,
.full-button:hover,
.chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.ghost-button.compact {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.ghost-button.danger {
  border-color: #f0c3bd;
  color: #b93b2f;
}

.ghost-button.danger:hover {
  border-color: #d9887e;
  background: #fff1ef;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 22px 56px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.real-run-panel {
  display: grid;
  gap: 12px;
  margin: 12px 14px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.real-run-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.real-run-panel h2 {
  margin: 0;
  color: #16232d;
  font-size: 15px;
  font-weight: 800;
}

.real-run-panel header span {
  color: var(--muted);
  font-size: 12px;
}

.toggle-field,
.real-stage-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2f3d48;
  font-size: 12px;
  font-weight: 700;
}

.toggle-field input,
.real-stage-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.real-run-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}

.real-run-grid .wide {
  grid-column: span 1;
}

.real-stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 2px;
}

.real-stage-row .guard {
  color: #865a00;
}

.stage-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #687581;
}

.stage-step::before {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(-50% + 23px);
  right: calc(50% + 23px);
  height: 2px;
  background: var(--line-strong);
}

.stage-step:first-child::before {
  display: none;
}

.stage-step.completed::before,
.stage-step.active::before {
  background: var(--teal);
}

.step-badge {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #eef2f5;
  color: #58636d;
  font-weight: 800;
  z-index: 1;
}

.stage-step.active .step-badge {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 5px rgba(0, 127, 143, 0.14);
}

.stage-step.completed:not(.active) .step-badge {
  background: #e9fbf6;
  color: var(--teal);
  border-color: var(--teal);
}

.stage-step b {
  color: #23313c;
  font-size: 13px;
}

.stage-step span {
  font-size: 12px;
}

.stage-card,
.queue-card,
.backend-panel,
.work-panel,
.copy-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stage-card {
  margin: 12px 14px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.section-header h2,
.work-panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.copywriting-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 14px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.copywriting-titlebar h2 {
  margin: 0;
  color: #16232d;
  font-size: 18px;
  font-weight: 800;
}

.copywriting-titlebar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.copywriting-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 12px;
  padding: 12px 14px 0;
}

.copywriting-workspace[hidden] {
  display: none;
}

.title-topic-workspace {
  display: grid;
  padding: 12px 14px 0;
}

.title-topic-workspace[hidden] {
  display: none;
}

.audio-video-workspace {
  display: grid;
  padding: 12px 14px 0;
}

.audio-video-workspace[hidden] {
  display: none;
}

.audio-video-grid {
  display: grid;
  grid-template-columns: minmax(280px, 31fr) minmax(280px, 29fr) minmax(420px, 40fr);
  gap: 12px;
  align-items: start;
}

.av-panel {
  min-width: 0;
  min-height: 438px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.av-panel-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 16px;
}

.av-panel h3 {
  margin: 0;
  color: #1c2a35;
  font-size: 15px;
  font-weight: 800;
}

.av-panel small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.av-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: #27343f;
  font-size: 12px;
  font-weight: 800;
}

.engine-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.engine-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #cfe5e7;
  border-radius: 8px;
  background: #f4fbfc;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.av-main-action {
  justify-content: center;
  width: 100%;
  margin-top: 14px;
}

.audio-preview {
  display: grid;
  min-height: 168px;
  margin-top: 16px;
  place-items: center;
  border: 1px solid #cfe5e7;
  border-radius: 8px;
  background: #f7fcfc;
}

.audio-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.audio-empty i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 22px;
}

.audio-ready {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
}

.audio-ready b,
.audio-ready span {
  display: block;
}

.audio-ready b {
  color: #17242e;
  font-size: 14px;
}

.audio-ready span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.audio-ready audio {
  width: 100%;
}

.artifact-path {
  overflow-wrap: anywhere;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #31414c;
  font-size: 12px;
  line-height: 1.45;
}

.video-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.video-config-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  gap: 12px;
}

.digital-human-audio-upload {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed #b7d7dc;
  border-radius: 8px;
  background: #f7fcfc;
}

.digital-human-audio-upload input[type="file"] {
  width: 100%;
}

.digital-human-audio-upload small {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.digital-human-audio-upload audio {
  width: 100%;
}

.loop-mode-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.loop-mode-field legend {
  grid-column: 1 / -1;
  margin-bottom: -1px;
  color: #27343f;
  font-size: 12px;
  font-weight: 800;
}

.loop-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: #26343f;
  font-size: 12px;
  font-weight: 800;
}

.loop-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.digital-human-stage {
  display: grid;
  min-height: 440px;
  margin-top: 16px;
  place-items: center;
  border: 1px solid #d6e0e6;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 247, 248, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(0, 127, 143, 0.05) 20px 21px);
}

.phone-preview {
  position: relative;
  width: min(258px, 92%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 8px solid #111827;
  border-radius: 28px;
  background: linear-gradient(180deg, #e8f8f8 0%, #f7fbfb 48%, #dce9ee 100%);
  box-shadow: 0 24px 42px rgba(17, 24, 39, 0.16);
}

.phone-preview .generated-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  z-index: 1;
}

.phone-preview.has-landscape-media .generated-video {
  inset: 50% 0 auto;
  height: auto;
  max-height: 58%;
  transform: translateY(-50%);
}

.remotion-preview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  width: min(360px, 100%);
}

.remotion-preview-strip img {
  aspect-ratio: 9 / 16;
  width: 100%;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #020617;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.remotion-prompt-artifact {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(360px, 100%);
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(14, 165, 167, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.remotion-prompt-artifact i {
  color: var(--teal);
  font-size: 16px;
}

.remotion-prompt-artifact b {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-motion-workspace {
  min-width: 0;
  padding: 24px 28px 36px;
}

.subtitle-motion-workspace[hidden] {
  display: none;
}

.publisher-workspace {
  min-width: 0;
  padding: 24px 28px 36px;
}

.publisher-workspace[hidden] {
  display: none;
}

.subtitle-motion-header,
.publisher-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.subtitle-motion-header,
.publisher-header {
  margin-bottom: 20px;
}

.subtitle-motion-header h2,
.publisher-header h2,
.section-heading h3 {
  margin: 0;
  color: #172033;
  letter-spacing: 0;
}

.subtitle-motion-header h2,
.publisher-header h2 {
  margin-top: 4px;
  font-size: 24px;
}

.subtitle-motion-header p,
.publisher-header p,
.section-heading small {
  display: block;
  margin: 5px 0 0;
  color: #718096;
}

.workspace-kicker {
  color: #0e9f6e;
  font-size: 12px;
  font-weight: 800;
}

.subtitle-motion-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(440px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.subtitle-motion-order-hint {
  max-width: 520px;
  margin: 0;
  color: #7b8798;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  text-align: right;
}

.smart-editing-layout {
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.subtitle-motion-config-column,
.subtitle-motion-timeline-column,
.subtitle-motion-production-column {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-self: start;
}

.smart-editing-layout .subtitle-motion-config-column,
.smart-editing-layout .subtitle-motion-timeline-column,
.smart-editing-layout .subtitle-motion-production-column {
  min-height: 0;
}

.smart-editing-layout .subtitle-motion-config-column,
.smart-editing-layout .subtitle-motion-timeline-column,
.smart-editing-layout .subtitle-motion-production-column {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding-right: 2px;
}

.smart-editing-layout .subtitle-caption-generate-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.smart-editing-layout .subtitle-caption-generate-bar .primary-button {
  width: 100%;
  min-height: 50px;
  justify-content: center;
  border-radius: 14px;
  font-size: 15px;
}

.smart-editing-layout .subtitle-motion-assets-card,
.smart-editing-layout .subtitle-template-panel,
.smart-editing-layout .motion-module-field,
.smart-editing-layout .motion-option-row,
.smart-editing-layout .subtitle-caption-editor-card,
.smart-editing-layout .storyboard-binding-card,
.smart-editing-layout .subtitle-motion-output,
.smart-editing-layout .subtitle-motion-production-column > .av-field {
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
}

.subtitle-motion-assets-card {
  display: grid;
  gap: 12px;
}

.subtitle-motion-assets-grid {
  display: grid;
  gap: 12px;
}

.subtitle-motion-path-field {
  display: none !important;
}

.smart-editing-layout .motion-module-field > span {
  color: #536274;
  font-size: 12px;
  font-weight: 900;
}

.smart-editing-layout .motion-module-grid {
  grid-template-columns: minmax(0, 1fr);
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.smart-editing-layout .motion-module-card {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
}

.smart-editing-layout .motion-module-grid label {
  min-width: 0;
}

.smart-editing-layout .motion-module-grid label span {
  min-width: 0;
  white-space: normal;
}

.smart-editing-layout .motion-module-choice-card label > span {
  white-space: normal;
}

.smart-editing-layout .motion-option-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.smart-editing-layout .subtitle-caption-editor-card {
  min-height: 440px;
  padding: 0;
  overflow: hidden;
}

.smart-editing-layout .subtitle-caption-editor-card header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.smart-editing-layout .subtitle-caption-editor {
  max-height: calc(100vh - 330px);
  overflow: auto;
  padding: 0 8px 12px;
}

.smart-editing-layout .subtitle-caption-row {
  border-inline: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

.smart-editing-layout .subtitle-motion-output {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.smart-editing-layout .subtitle-motion-stage {
  min-height: 360px;
}

.smart-editing-layout .subtitle-motion-artifacts {
  max-height: 150px;
  overflow: auto;
}

.semantic-director-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(9, 22, 42, 0.96), rgba(16, 17, 48, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.semantic-director-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.semantic-director-title h3,
.semantic-director-title small,
.semantic-director-panel p {
  margin: 0;
}

.semantic-director-title h3 {
  color: #f8fafc;
  font-size: 15px;
}

.semantic-director-title small,
.semantic-director-panel p {
  color: #91a8c4;
  font-size: 11px;
  line-height: 1.55;
}

.semantic-director-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 12px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.13);
  font-size: 18px;
}

.semantic-director-badge {
  padding: 5px 9px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 999px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.semantic-director-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.38);
  color: #dbeafe;
  font-size: 10px;
  font-weight: 800;
}

.semantic-director-flow i {
  color: #22d3ee;
}

@media (max-width: 620px) {
  .semantic-director-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .semantic-director-flow i {
    display: none;
  }

  .semantic-director-flow span {
    padding: 7px 6px;
    border-radius: 8px;
    text-align: center;
    background: rgba(34, 211, 238, 0.07);
  }
}

@media (max-width: 1180px) {
  .smart-editing-layout,
  .sci-fi-shell .smart-editing-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .smart-editing-layout .subtitle-motion-config-column,
  .smart-editing-layout .subtitle-motion-timeline-column,
  .smart-editing-layout .subtitle-motion-production-column {
    grid-column: 1;
    position: static;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .smart-editing-layout .subtitle-caption-editor {
    max-height: none;
  }

  .smart-editing-layout .subtitle-motion-stage {
    min-height: 320px;
  }
}

.publisher-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.publisher-settings,
.publisher-jobs {
  min-width: 0;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.publisher-settings {
  display: grid;
  gap: 16px;
}

.publisher-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.publisher-targets {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.publisher-targets legend {
  margin-bottom: 8px;
  color: #536274;
  font-size: 12px;
  font-weight: 800;
}

.publisher-platform-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.publisher-platform {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.publisher-platform > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
}

.publisher-platform b {
  min-width: 0;
  overflow: hidden;
  color: #243044;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-readiness,
.publisher-job-summary {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf2f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.publisher-readiness.ready,
.publisher-job-summary.published {
  background: #e8f8f1;
  color: #087f5b;
}

.publisher-job-summary.preparing,
.publisher-job-summary.waiting_confirmation,
.publisher-job-summary.publishing {
  background: #e8f1ff;
  color: #2563eb;
}

.publisher-job-summary.waiting_login,
.publisher-job-summary.needs_attention,
.publisher-job-summary.completed_with_errors {
  background: #fff7df;
  color: #a16207;
}

.publisher-job-summary.failed {
  background: #fff0f0;
  color: #d64545;
}

#publisherDescription {
  min-height: 170px;
  resize: vertical;
  line-height: 1.65;
}

.publisher-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid #2563eb;
  padding: 12px 14px;
  background: #f1f6ff;
  color: #52647b;
  font-size: 13px;
  line-height: 1.6;
}

.publisher-safety-note i {
  margin-top: 2px;
  color: #2563eb;
  font-size: 18px;
}

.publisher-job-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.publisher-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbd5e1;
  color: #8291a5;
  text-align: center;
}

.publisher-empty i {
  color: #2563eb;
  font-size: 32px;
}

.publisher-empty b {
  color: #405168;
}

.publisher-empty span {
  max-width: 280px;
  font-size: 12px;
  line-height: 1.5;
}

.publisher-job {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fbfcfe;
}

.publisher-job > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  font-size: 18px;
}

.publisher-job-copy {
  min-width: 0;
}

.publisher-job-copy b,
.publisher-job-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-job-copy b {
  color: #243044;
  font-size: 13px;
}

.publisher-job-copy span {
  margin-top: 3px;
  color: #75849a;
  font-size: 11px;
}

.publisher-job-actions {
  display: flex;
  gap: 6px;
}

.publisher-job-actions button {
  min-height: 30px;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  color: #42526a;
  font-size: 11px;
  font-weight: 800;
}

.publisher-job-actions button.primary {
  border-color: #0e9f6e;
  background: #0e9f6e;
  color: #fff;
}

.subtitle-motion-source,
.subtitle-motion-output {
  min-width: 0;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.subtitle-motion-source {
  display: grid;
  gap: 16px;
}

.source-readiness,
.render-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf2f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.source-readiness.ready,
.render-status.succeeded {
  background: #e8f8f1;
  color: #087f5b;
}

.render-status.running {
  background: #e8f1ff;
  color: #2563eb;
}

.render-status.failed {
  background: #fff0f0;
  color: #d64545;
}

#subtitleMotionScript {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.subtitle-template-panel,
.subtitle-caption-editor-card,
.storyboard-binding-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
}

.section-heading.compact {
  margin: 0;
}

.subtitle-template-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  border: 1px solid rgba(0, 127, 143, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 127, 143, 0.08), rgba(139, 92, 246, 0.08));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.subtitle-template-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  width: 70px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1020;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.subtitle-template-preview b {
  color: #fde047;
  font-size: 12px;
  text-shadow: 0 1px 0 #111827, 0 0 10px rgba(250, 204, 21, 0.42);
}

.subtitle-template-preview {
  position: relative;
  isolation: isolate;
  justify-items: stretch;
  align-items: stretch;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.18) 44%, rgba(2, 6, 23, 0.84) 100%),
    var(--template-image, radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.16), transparent 24%)),
    #07101f;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--template-position, center center);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.subtitle-template-cover-bg,
.subtitle-template-cover-figure,
.subtitle-template-cover-text,
.subtitle-template-cover-badge {
  position: absolute;
  z-index: 1;
}

.subtitle-template-cover-bg {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02) 28%, rgba(2,6,23,0.18) 56%, rgba(2,6,23,0.82) 100%),
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.14), transparent 28%);
}

.subtitle-template-cover-badge {
  top: calc(28px * var(--preview-scale, 0.22));
  right: calc(28px * var(--preview-scale, 0.22));
  border-radius: 999px;
  padding: calc(9px * var(--preview-scale, 0.22)) calc(22px * var(--preview-scale, 0.22));
  background: rgba(3, 7, 18, 0.58);
  color: #fff;
  font-size: calc(25px * var(--preview-scale, 0.22));
  font-weight: 900;
  letter-spacing: 0.02em;
}

.subtitle-template-cover-figure {
  display: none;
  left: 50%;
  bottom: 34%;
  width: 44%;
  height: 37%;
  transform: translateX(-50%);
  border-radius: 999px 999px 20% 20%;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(148, 163, 184, 0.58));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.subtitle-template-cover-figure::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -18%;
  width: 38%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #f6c9a6;
}

.subtitle-template-cover-figure i {
  position: absolute;
  inset: 42% 30% 14%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.subtitle-template-cover-text {
  inset: 0;
  display: block;
}

.subtitle-template-cover-line {
  position: absolute;
  left: var(--cover-line-x, 50%);
  top: var(--cover-line-y, 70%);
  z-index: 2;
  width: 84%;
  transform: translate(-50%, -50%);
  border-radius: calc(12px * var(--preview-scale, 0.32));
  padding: calc(4px * var(--preview-scale, 0.32)) calc(8px * var(--preview-scale, 0.32));
  background: var(--cover-line-bg, transparent);
  color: var(--cover-line-color, #fff);
  font-family: var(--cover-line-font, "Microsoft YaHei", "Noto Sans SC", sans-serif);
  font-size: calc(var(--cover-line-size, 32) * 1px * var(--preview-scale, 0.32));
  font-style: var(--cover-line-style, normal);
  font-weight: var(--cover-line-weight, 900);
  line-height: 1.08;
  text-align: var(--cover-line-align, center);
  text-decoration: var(--cover-line-decoration, none);
  text-shadow: var(--cover-line-shadow, 0 2px 8px rgba(0,0,0,0.92));
  -webkit-text-stroke: calc(var(--cover-line-stroke-width, 0) * 1px * var(--preview-scale, 0.32)) var(--cover-line-stroke-color, #000);
  paint-order: stroke fill;
}

.subtitle-template-preview {
  --preview-scale: 0.22;
}

.subtitle-template-preview-large {
  --preview-scale: 1;
}

.subtitle-template-cover-line.is-gradient {
  background: transparent;
  color: transparent;
  background-image: linear-gradient(90deg, #fff7ad, var(--template-accent, #fde047), #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle-template-cover-line.is-neon {
  text-shadow:
    0 0 calc(6px * var(--preview-scale, 0.32)) var(--cover-line-color, #fff),
    0 0 calc(18px * var(--preview-scale, 0.32)) var(--template-accent, #22d3ee),
    0 2px calc(8px * var(--preview-scale, 0.32)) rgba(0,0,0,0.88);
}

.template-bold-yellow {
  --template-image: url("assets/subtitle-templates/template-bold-yellow.jpg?v=20260702-3");
  --template-position: center center;
}

.template-clean-white {
  --template-image: url("assets/subtitle-templates/template-clean-white.jpg?v=20260702-3");
  --template-position: center center;
}

.template-news-blue {
  --template-image: url("assets/subtitle-templates/template-news-blue.jpg?v=20260702-3");
  --template-position: center center;
}

.template-pop-purple {
  --template-image: url("assets/subtitle-templates/template-pop-purple.jpg?v=20260702-3");
  --template-position: center center;
}

.template-black-gold {
  --template-image: url("assets/subtitle-templates/template-black-gold.jpg?v=20260702-3");
  --template-position: center center;
}

.template-reference-locked-tech {
  --template-image: url("assets/subtitle-templates/template-mentor-cyan.jpg?v=20260702-3");
  --template-position: center center;
  --template-accent: #42e68b;
}

.template-lifestyle-cafe {
  --template-image: url("assets/subtitle-templates/template-lifestyle-cafe.jpg?v=20260702-3");
  --template-position: center center;
}

.template-study-green {
  --template-image: url("assets/subtitle-templates/template-study-green.jpg?v=20260702-3");
  --template-position: center center;
}

.template-interview-white {
  --template-image: url("assets/subtitle-templates/template-interview-white.jpg?v=20260702-3");
  --template-position: center center;
}

.template-mentor-cyan {
  --template-image: url("assets/subtitle-templates/template-mentor-cyan.jpg?v=20260702-3");
  --template-position: center center;
}

.template-fresh-flower {
  --template-image: url("assets/subtitle-templates/template-fresh-flower.jpg?v=20260702-3");
  --template-position: center center;
}

.figure-business { background: linear-gradient(180deg, #1f2937, #020617); }
.figure-cafe { background: linear-gradient(180deg, #92400e, #451a03); }
.figure-student { background: linear-gradient(180deg, #ecfdf5, #22c55e); }
.figure-interview { background: linear-gradient(180deg, #ffffff, #cbd5e1); }
.figure-mentor { background: linear-gradient(180deg, #111827, #0891b2); }
.figure-fresh { background: linear-gradient(180deg, #ffffff, #86efac); }

.subtitle-template-actions {
  position: absolute;
  inset: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  place-content: center;
  gap: 8px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.subtitle-template-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 12px;
  padding: 9px 8px;
  background: rgba(255,255,255,0.94);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.subtitle-template-option:hover .subtitle-template-actions,
.subtitle-template-option:focus-within .subtitle-template-actions {
  opacity: 1;
  pointer-events: auto;
}

.subtitle-template-preview-large {
  width: min(320px, 72vw);
  min-height: 520px;
  border-radius: 28px;
}

.subtitle-template-preview-stage {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(560px, calc(100vh - 220px));
  max-height: calc(100vh - 220px);
  overflow: hidden;
}

.subtitle-template-inspect-body,
.subtitle-template-editor-body {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  overflow: auto;
}

.subtitle-template-editor-body {
  align-items: stretch;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}

.subtitle-template-editor-body .subtitle-template-preview-large {
  width: min(320px, 100%, calc((100vh - 260px) * 9 / 16));
  height: min(568px, calc(100vh - 260px));
  min-height: 0;
  background-size: cover, contain, cover;
  background-position: center center, var(--template-position, center center), center center;
}

.subtitle-template-inspect-copy,
.subtitle-template-editor-fields {
  display: grid;
  gap: 14px;
}

.subtitle-template-editor-fields {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  max-height: calc(100vh - 220px);
  overflow: hidden;
  overscroll-behavior: contain;
  align-content: stretch;
}

.subtitle-template-inspect-copy b {
  font-size: 24px;
  font-weight: 1000;
}

.subtitle-template-inspect-copy small,
.subtitle-template-inspect-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.subtitle-template-editor-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subtitle-template-editor-fields input,
.subtitle-template-editor-fields select {
  width: 100%;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 46px;
  height: auto;
  line-height: 1.45;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.subtitle-template-editor-fields select {
  padding-block: 10px;
  overflow: visible;
}

.template-editor-name-field {
  margin-bottom: -2px;
}

.template-editor-name-field input[readonly] {
  cursor: default;
  background: rgba(248, 251, 255, 0.82);
  color: var(--text);
}

.template-editor-module-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 44px;
  padding: 2px 0 10px;
  border-bottom: 1px solid rgba(130, 156, 255, 0.14);
  scrollbar-width: thin;
}

.template-editor-module-tab {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.template-editor-module-tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.template-editor-module-tab:hover {
  transform: translateY(-1px);
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
}

.template-editor-module-tab.is-active {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
}

.template-editor-module-tab.is-active::after {
  background: linear-gradient(90deg, #a855f7, #22d3ee);
}

.template-editor-module-tab:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.cover-editor-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scroll-padding-bottom: 56px;
  overscroll-behavior: contain;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 20px;
  padding: 16px 16px 56px;
  background: rgba(248, 251, 255, 0.72);
}

.cover-editor-panel[hidden],
.caption-editor-panel[hidden] {
  display: none;
}

.caption-editor-panel {
  align-content: start;
}

.caption-editor-sample {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 116px;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(34, 211, 238, 0.18), transparent 32%),
    radial-gradient(circle at 78% 12%, rgba(168, 85, 247, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(5, 9, 21, 0.94));
}

.caption-editor-sample::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
}

.caption-editor-sample span {
  position: relative;
  z-index: 1;
  display: inline-block;
  box-sizing: border-box;
  width: max-content;
  max-width: min(96%, calc(100% - 16px));
  padding: 10px 16px;
  border-radius: 16px;
  color: var(--caption-sample-color, #fff);
  background: var(--caption-sample-bg, transparent);
  font-family: var(--caption-sample-font, "Microsoft YaHei", "Noto Sans SC", sans-serif);
  font-size: calc(var(--caption-sample-size, 20) * 0.38px);
  font-style: var(--caption-sample-style, normal);
  font-weight: var(--caption-sample-weight, 900);
  line-height: var(--caption-sample-line-height, 1.18);
  text-align: var(--caption-sample-align, center);
  text-shadow: var(--caption-sample-shadow, 0 3px 12px rgba(0,0,0,.45));
  -webkit-text-stroke: calc(var(--caption-sample-stroke-width, 0) * 0.35px) var(--caption-sample-stroke-color, #000);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.caption-editor-sample span.is-none {
  padding: 0;
  border-radius: 0;
}

.caption-editor-sample span.is-gradient {
  background-image: linear-gradient(92deg, var(--caption-sample-keyword-color, #facc15), var(--caption-sample-color, #fff), #22d3ee);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle-template-caption-preview.is-gradient {
  background-image: linear-gradient(92deg, var(--caption-keyword-color, #facc15), var(--caption-color, #fff), #22d3ee);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.caption-editor-sample span.is-neon,
.subtitle-template-caption-preview.is-neon {
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.62), 0 0 22px rgba(168, 85, 247, 0.42);
}

.caption-editor-sample b {
  color: var(--caption-sample-keyword-color, #facc15);
  font-size: calc(var(--caption-sample-keyword-size, 20) * 0.38px);
  -webkit-text-stroke: calc(var(--caption-sample-keyword-stroke-width, 0) * 0.35px) var(--caption-sample-keyword-stroke-color, #000);
}

.subtitle-template-preview.is-caption-editing .subtitle-template-cover-text {
  opacity: 0.28;
}

.subtitle-template-caption-preview {
  position: absolute;
  left: clamp(8px, var(--caption-x, 50%), calc(100% - 8px));
  top: var(--caption-y, 76%);
  z-index: 8;
  box-sizing: border-box;
  width: max-content;
  max-width: min(96%, calc(100% - 16px));
  padding: 10px 16px;
  border-radius: 16px;
  color: var(--caption-color, #fff);
  background: var(--caption-bg, transparent);
  font-family: var(--caption-font, "Microsoft YaHei", "Noto Sans SC", sans-serif);
  font-size: calc(var(--caption-size, 20) * 1px);
  font-style: var(--caption-font-style, normal);
  font-weight: var(--caption-weight, 900);
  line-height: var(--caption-line-height, 1.18);
  text-align: var(--caption-align, center);
  text-shadow: var(--caption-shadow, 0 3px 12px rgba(0,0,0,.45));
  -webkit-text-stroke: calc(var(--caption-stroke-width, 0) * 1px) var(--caption-stroke-color, #000);
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.subtitle-template-caption-preview.is-none {
  padding: 0;
  border-radius: 0;
}

.subtitle-template-caption-preview.is-highlight {
  box-shadow: inset 0 -0.38em 0 rgba(250, 204, 21, 0.28);
}

.subtitle-template-caption-keyword {
  color: var(--caption-keyword-color, #facc15);
  font-size: calc(var(--caption-keyword-size, 20) * 1px);
  -webkit-text-stroke: calc(var(--caption-keyword-stroke-width, 0) * 1px) var(--caption-keyword-stroke-color, #000);
}

.cover-editor-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 18px;
  padding: 6px;
  background: rgba(248, 251, 255, 0.58);
}

.cover-editor-mode-button {
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cover-editor-mode-button span {
  font-size: 14px;
  font-weight: 1000;
}

.cover-editor-mode-button small {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.72;
}

.cover-editor-mode-button:hover {
  transform: translateY(-1px);
}

.cover-editor-mode-button.is-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(34, 211, 238, 0.9));
  color: #fff;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.16);
}

.cover-editor-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.cover-editor-panel header div {
  display: grid;
  gap: 4px;
}

.cover-editor-panel header b {
  color: var(--text);
  font-size: 16px;
  font-weight: 1000;
}

.cover-editor-panel header small {
  color: var(--muted);
  font-size: 12px;
}

.cover-editor-panel header > span {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(34, 211, 238, 0.12);
  color: #0891b2;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.cover-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cover-editor-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.cover-editor-field.is-wide {
  grid-column: 1 / -1;
}

.cover-editor-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cover-editor-field input[type="color"] {
  min-height: 42px;
  padding: 5px;
}

.cover-editor-field input[type="range"] {
  height: 42px;
  min-height: 42px;
  padding: 0;
  accent-color: #22d3ee;
}

.cover-editor-toggle {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(255,255,255,0.64);
}

.cover-editor-toggle input {
  width: 18px;
  height: 18px;
}

.subtitle-template-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.subtitle-template-copy b,
.subtitle-caption-editor-card header span,
.storyboard-binding-card header span {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.subtitle-template-copy small,
.subtitle-caption-editor-card header small,
.storyboard-binding-card header small {
  color: var(--muted);
  font-size: 12px;
}

.subtitle-caption-editor-card header,
.storyboard-binding-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.subtitle-caption-editor,
.storyboard-binding-list {
  display: grid;
  gap: 8px;
  min-height: 86px;
}

.subtitle-caption-row,
.storyboard-binding-row {
  display: grid;
  gap: 8px;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.88);
  padding: 10px;
}

.subtitle-caption-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
}

.subtitle-caption-index {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.subtitle-caption-actions,
.storyboard-binding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.subtitle-caption-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(0, 127, 143, 0.16);
  border-radius: 999px;
  background: rgba(236, 254, 255, 0.7);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.subtitle-caption-card select {
  min-width: 96px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.subtitle-keyword-chip {
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(139, 92, 246, 0.08);
  color: #6d28d9;
  font-size: 11px;
  font-weight: 800;
}

.storyboard-binding-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.subtitle-template-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.72);
}

.subtitle-template-picker-overlay[hidden] {
  display: none;
}

.subtitle-template-picker-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid #dfe6ef;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.subtitle-template-picker-dialog header,
.subtitle-template-picker-dialog footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5edf7;
}

.subtitle-template-picker-dialog footer {
  border-top: 1px solid #e5edf7;
  border-bottom: 0;
  justify-content: flex-end;
}

.subtitle-template-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
  padding: 22px;
  overflow: auto;
}

.subtitle-template-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.subtitle-template-option .subtitle-template-preview {
  width: min(118px, 100%);
  --preview-scale: 0.37;
}

.subtitle-template-option b {
  font-size: 13px;
  font-weight: 900;
}

.subtitle-template-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.subtitle-template-option.is-selected {
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.subtitle-template-option > i {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
}

.subtitle-caption-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.subtitle-caption-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  align-items: center;
}

.subtitle-keyword-empty {
  color: #94a3b8;
  font-size: 11px;
}

.subtitle-caption-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.storyboard-binding-fields {
  display: grid;
  grid-template-columns: 86px 86px minmax(0, 1fr);
  gap: 8px;
}

.storyboard-binding-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.storyboard-binding-fields input {
  min-height: 36px;
}

.alignment-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-left: 3px solid #10b981;
  background: #f0fbf7;
  padding: 12px 14px;
  color: #476257;
  font-size: 13px;
  line-height: 1.6;
}

.alignment-note i {
  margin-top: 2px;
  color: #0e9f6e;
  font-size: 18px;
}

.subtitle-motion-preview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 128px;
  margin-top: 18px;
}

.subtitle-motion-preview-strip img,
.preview-placeholder {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  border: 1px solid #dfe6ef;
  background: #050914;
  object-fit: contain;
}

.preview-placeholder {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  display: grid;
  min-height: 128px;
  place-items: center;
  color: #94a3b8;
  font-size: 13px;
}

.subtitle-motion-stage {
  display: grid;
  place-items: center;
  padding: 18px;
  margin-top: 14px;
  min-height: 380px;
  border-radius: 8px;
  background: #101722;
  overflow: hidden;
}

.subtitle-motion-stage video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: #080c12;
  object-fit: contain;
}

.subtitle-motion-stage .phone-preview {
  width: min(258px, 92%);
}

.subtitle-motion-stage .phone-preview.has-landscape-media {
  background:
    linear-gradient(180deg, #08101f 0%, #030712 100%);
}

.motion-empty {
  min-height: 380px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #d5dee9;
}

.motion-empty i {
  color: #34d399;
  font-size: 34px;
}

.motion-empty span {
  color: #8190a5;
  font-size: 12px;
}

.subtitle-motion-artifacts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.subtitle-motion-artifacts:empty {
  display: none;
}

.motion-module-field {
  gap: 10px;
}

.motion-combination-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 127, 143, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.72);
}

.motion-combination-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.motion-combination-summary b {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.motion-module-group-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.motion-module-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 127, 143, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.motion-module-section-required {
  border-color: rgba(0, 127, 143, 0.24);
  background:
    radial-gradient(circle at 8% 12%, rgba(34, 211, 238, 0.11), transparent 38%),
    rgba(255, 255, 255, 0.74);
}

.motion-module-section header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.motion-module-section header div {
  display: grid;
  gap: 3px;
}

.motion-module-section strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 1000;
}

.motion-module-section small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.motion-module-rule-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(0, 127, 143, 0.2);
  border-radius: 999px;
  background: rgba(0, 127, 143, 0.08);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.motion-module-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
}

.motion-module-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.motion-module-choice-card {
  min-height: 58px;
  padding: 8px 10px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.motion-module-choice-card.is-selected {
  border-color: rgba(0, 127, 143, 0.7);
  background:
    radial-gradient(circle at 10% 16%, rgba(34, 211, 238, 0.18), transparent 38%),
    rgba(236, 254, 255, 0.88);
  box-shadow: 0 14px 34px rgba(0, 127, 143, 0.12);
}

.motion-module-choice-card:hover {
  border-color: rgba(0, 127, 143, 0.38);
  transform: translateY(-1px);
}

.motion-module-none-card {
  background: rgba(248, 251, 255, 0.58);
}

.motion-module-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  color: var(--text);
}

.motion-module-choice-card label {
  min-height: 100%;
  align-items: center;
  cursor: pointer;
}

.motion-module-choice-card label > span {
  flex: 1 1 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.motion-module-choice-card label > span i {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 127, 143, 0.1);
  color: var(--teal-dark);
  font-size: 16px;
}

.motion-module-choice-card label > span b {
  color: var(--text);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.2;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.motion-module-grid input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.motion-preview-button {
  min-width: 46px;
  height: 28px;
  border: 1px solid rgba(0, 127, 143, 0.24);
  border-radius: 999px;
  background: rgba(0, 127, 143, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.smart-card-system {
  border-color: rgba(139, 92, 246, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.7);
}

.smart-card-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 1000;
}

.smart-card-settings {
  display: grid;
  gap: 10px;
}

.smart-card-type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.smart-card-type-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(0, 127, 143, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.smart-card-type-list label.is-selected {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(236, 254, 255, 0.82);
}

.smart-card-type-list label.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.smart-card-type-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 1000;
}

.auto-data-blocks-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(0, 127, 143, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.auto-data-blocks-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.auto-data-blocks-panel header span {
  font-size: 12px;
  font-weight: 1000;
  color: var(--ink);
}

.auto-data-blocks-panel header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.auto-data-block-list {
  display: grid;
  gap: 8px;
}

.auto-data-block-empty,
.auto-data-block-card {
  border: 1px solid rgba(0, 127, 143, 0.12);
  border-radius: 12px;
  background: rgba(248, 252, 255, 0.72);
}

.auto-data-block-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
}

.auto-data-block-card {
  padding: 9px;
}

.auto-data-block-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.auto-data-block-card header b {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 1000;
}

.auto-data-block-card header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.auto-data-block-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.auto-data-block-table span,
.auto-data-block-table strong {
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
}

.auto-data-block-table span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-data-block-table strong {
  color: var(--ink);
}

.motion-preview-button:hover {
  border-color: rgba(0, 127, 143, 0.56);
  background: rgba(0, 127, 143, 0.14);
}

.motion-module-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.motion-module-header > span {
  color: #536274;
  font-size: 12px;
  font-weight: 900;
}

.motion-overall-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0, 127, 143, 0.24);
  border-radius: 11px;
  background: rgba(0, 127, 143, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.motion-overall-preview-button:hover {
  border-color: rgba(0, 127, 143, 0.56);
  background: rgba(0, 127, 143, 0.14);
}

.motion-option-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.motion-artifact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 9px;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  padding: 8px 0;
  color: #667085;
  font-size: 12px;
}

.motion-artifact i {
  grid-row: 1 / 3;
  color: #0e9f6e;
  font-size: 18px;
}

.motion-artifact b {
  overflow-wrap: anywhere;
  color: #2e3a4d;
  font-weight: 600;
}

.phone-status {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 74px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111827;
  z-index: 2;
}

.human-figure {
  position: absolute;
  left: 50%;
  bottom: 92px;
  width: 134px;
  height: 210px;
  transform: translateX(-50%);
}

.human-head,
.human-body,
.human-mic {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.human-head {
  top: 0;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f7d7bd, #e8b58f);
  box-shadow: inset 0 -6px 0 rgba(126, 74, 45, 0.12);
}

.human-body {
  bottom: 0;
  width: 130px;
  height: 148px;
  border-radius: 48px 48px 18px 18px;
  background: linear-gradient(180deg, var(--teal), #104e5d);
}

.human-mic {
  top: 92px;
  width: 20px;
  height: 54px;
  border-radius: 999px;
  background: #111827;
}

.stage-caption,
.stage-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 3;
}

.stage-caption {
  bottom: 46px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.stage-meta {
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.stage-meta span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-preview.is-generated .human-head {
  animation: avTalk 1.2s ease-in-out infinite;
}

@keyframes avTalk {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(3px);
  }
}

.title-topic-panel {
  min-height: 438px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.title-topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.title-topic-header h2 {
  margin: 0;
  color: #17242e;
  font-size: 18px;
  font-weight: 900;
}

.title-topic-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.title-topic-fields {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin-top: 18px;
}

.title-topic-field {
  display: grid;
  gap: 8px;
  color: #26343f;
  font-size: 13px;
  font-weight: 800;
}

.copy-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 438px;
  padding: 14px;
}

.copy-panel header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 12px;
}

.extract-panel header {
  grid-template-columns: 34px minmax(0, 1fr);
}

.copy-step {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.copy-panel h3 {
  margin: 0;
  color: #1c2a35;
  font-size: 15px;
  font-weight: 800;
}

.copy-panel small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.copy-field {
  display: grid;
  gap: 7px;
  color: #27343f;
  font-size: 12px;
  font-weight: 800;
}

.copy-action {
  justify-content: center;
  width: 100%;
  margin-top: 12px;
}

.extract-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfe5e7;
  border-radius: 8px;
  background: #f7fcfc;
}

.extract-progress[hidden] {
  display: none;
}

.extract-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #31414c;
  font-size: 12px;
  font-weight: 800;
}

.extract-progress-meta b {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.extract-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3eef0;
}

.extract-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #16a34a);
  transition: width 0.35s ease;
}

.extract-progress.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.extract-progress.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.extract-progress.is-error .extract-progress-fill {
  background: var(--red);
}

.extract-progress.is-error .extract-progress-meta b {
  color: var(--red);
}

.rewrite-header-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.rewrite-template-control {
  display: grid;
  gap: 4px;
  min-width: 154px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.rewrite-template-control select {
  min-height: 34px;
  padding: 0 32px 0 10px;
  font-size: 12px;
}

.rewrite-template-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.05);
  color: #8fa1bf;
  font-size: 11px;
  line-height: 1.45;
}

.rewrite-template-hint i {
  color: #67e8f9;
  font-size: 15px;
}

@media (max-width: 760px) {
  .editor-panel header {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .rewrite-header-actions {
    grid-column: 1 / -1;
    align-items: stretch;
    justify-content: stretch;
  }

  .rewrite-template-control,
  .rewrite-header-actions .primary-button {
    flex: 1 1 0;
  }
}

.generation-progress {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid #cfe5e7;
  border-radius: 10px;
  background: #f7fcfc;
}

.generation-progress[hidden] {
  display: none;
}

.generation-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #31414c;
  font-size: 12px;
  font-weight: 800;
}

.generation-progress-meta b {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.generation-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3eef0;
}

.generation-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #16a34a);
  transition: width 0.35s ease;
}

.generation-progress.is-running .generation-progress-fill {
  min-width: 8%;
}

.generation-progress.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.generation-progress.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.generation-progress.is-error .generation-progress-fill {
  background: var(--red);
}

.generation-progress.is-error .generation-progress-meta b {
  color: var(--red);
}

.copy-editor {
  flex: 1;
  min-height: 360px;
  resize: vertical;
  color: #1f2d38;
  font-size: 14px;
  line-height: 1.65;
}

.editor-panel .compact {
  white-space: nowrap;
}

.stage-config {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: 156px;
}

.account-box,
.settings-box {
  padding: 14px 16px;
}

.account-box {
  border-right: 1px solid var(--line);
}

.box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #24323d;
  font-size: 13px;
  font-weight: 800;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 9px;
}

.account img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.account b,
.form-field label,
.metric-label {
  display: block;
  color: #27343f;
  font-size: 12px;
  font-weight: 800;
}

.account span {
  color: var(--muted);
  font-size: 12px;
}

.add-account {
  border: 1px dashed var(--line-strong);
  background: transparent;
  border-radius: 8px;
  min-height: 40px;
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-grid .wide {
  grid-column: span 2;
}

.form-field {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 34px;
  padding: 0 10px;
}

textarea {
  resize: none;
  padding: 10px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 127, 143, 0.12);
}

.queue-card {
  margin: 12px 14px 0;
  overflow: hidden;
}

.queue-metrics {
  display: grid;
  grid-template-columns: 78px 78px 78px 78px 78px 1fr 110px 110px;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.metric strong.green { color: var(--green); }
.metric strong.blue { color: var(--blue); }
.metric strong.amber { color: var(--amber); }
.metric strong.red { color: var(--red); }

.progress-metric {
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: #33404a;
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 5px;
  margin: 9px 0 5px;
  border-radius: 999px;
  background: #e2e8ee;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.queue-table {
  font-size: 12px;
}

.table-head,
.queue-row {
  display: grid;
  grid-template-columns: 2fr 1.6fr 1.4fr 1fr 1fr 1fr 80px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.table-head {
  color: var(--muted);
  font-weight: 800;
}

.queue-row:hover {
  background: #fbfcfd;
}

.task-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.task-name i {
  color: var(--teal);
  font-size: 16px;
}

.mini-progress {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions button {
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.row-actions button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.table-more {
  width: 100%;
  min-height: 34px;
  border-width: 0;
  border-radius: 0;
  color: var(--blue);
  font-weight: 700;
}

.backend-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.backend-panel {
  min-width: 0;
  padding: 10px;
}

.backend-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
}

.backend-panel h3 {
  margin: 0;
  color: #23313c;
  font-size: 15px;
  font-weight: 800;
}

.log-list,
.artifact-list {
  display: grid;
  gap: 6px;
  min-height: 78px;
  max-height: 158px;
  margin-top: 9px;
  overflow: auto;
}

.log-line,
.artifact-line {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  color: #33404a;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.log-line b,
.artifact-line b {
  color: var(--teal-dark);
  font-weight: 800;
}

.work-panels {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr 1.05fr 0.98fr 1.18fr 0.98fr;
  gap: 8px;
  padding: 12px 14px 14px;
}

.work-panel {
  min-width: 0;
  min-height: 252px;
  padding: 10px;
}

.work-panel header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 26px;
}

.work-panel h3 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.work-panel header span {
  color: var(--muted);
  font-size: 11px;
}

.success-pill {
  margin-left: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background: #111;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
}

.work-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mini-button,
.full-button {
  min-height: 30px;
  padding: 0 10px;
  font-weight: 700;
}

.full-button {
  width: 100%;
  margin-top: 9px;
}

.transcript-list {
  display: grid;
  gap: 8px;
  margin-top: 11px;
  color: #33404a;
}

.transcript-line time {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  margin-bottom: 3px;
}

.transcript-line p {
  margin: 0;
  line-height: 1.42;
}

.field-label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slider-row {
  display: grid;
  grid-template-columns: 34px 1fr 48px;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: #34424d;
  font-size: 12px;
}

input[type="range"] {
  height: 4px;
  padding: 0;
  accent-color: var(--teal);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.chip.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.voice-card {
  position: relative;
  min-height: 82px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.voice-card img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
}

.round-play {
  position: absolute;
  left: 10px;
  top: 25px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  z-index: 1;
}

.voice-card span {
  position: absolute;
  right: 8px;
  top: 30px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 800;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-top: 9px;
  border-radius: 7px;
  background: #111;
}

.video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 35px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.caption b {
  color: #facc15;
}

.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 11px;
}

.video-controls i:nth-last-child(2) {
  margin-left: auto;
}

.platform-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.platform {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
}

.platform span {
  flex: 1;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 34px;
  height: 19px;
  border: 0;
  border-radius: 999px;
  background: #cbd5df;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch.on {
  background: var(--teal);
}

.switch.on::after {
  transform: translateX(15px);
}

.toast {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
}

.toast-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(460px, calc(100vw - 36px));
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(8, 143, 157, 0.22);
  border-radius: 12px;
  background: #fff;
  color: #17212b;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.toast-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #e8fbfd;
  color: var(--teal);
  font-size: 18px;
}

.toast-message {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.toast-dismiss {
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.35);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(520px, calc(100vw - 32px));
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal h2 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 16px;
  color: #33404a;
  line-height: 1.6;
}

.modal-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.motion-preview-dialog {
  display: grid;
  gap: 16px;
}

.motion-preview-stage {
  --motion-enter-y-factor: 1;
  --motion-card-scale: 1;
  --motion-card-pop-scale: 1.04;
  --motion-keyword-pop-scale: 1.2;
  --motion-background-opacity: 1;
  --motion-background-scale: 1.08;
  position: relative;
  width: min(100%, var(--motion-preview-stage-max-width, 560px));
  aspect-ratio: var(--motion-preview-aspect-width, 16) / var(--motion-preview-aspect-height, 9);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.32) 52%, rgba(2, 6, 23, 0.78) 100%),
    radial-gradient(circle at 18% 14%, rgba(168, 85, 247, 0.2), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(34, 211, 238, 0.14), transparent 28%),
    var(--template-image, linear-gradient(135deg, #06101e, #0b1025 55%, #061421)),
    linear-gradient(135deg, #06101e, #0b1025 55%, #061421);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--template-position, center center);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 26px 80px rgba(0, 0, 0, 0.26);
}

.motion-preview-intensity-light {
  --motion-enter-y-factor: 0.58;
  --motion-card-scale: 0.94;
  --motion-card-pop-scale: 1.015;
  --motion-keyword-pop-scale: 1.06;
  --motion-background-opacity: 0.55;
  --motion-background-scale: 1.03;
}

.motion-preview-intensity-standard {
  --motion-enter-y-factor: 1;
  --motion-card-scale: 1;
  --motion-card-pop-scale: 1.04;
  --motion-keyword-pop-scale: 1.2;
  --motion-background-opacity: 1;
  --motion-background-scale: 1.08;
}

.motion-preview-intensity-rich {
  --motion-enter-y-factor: 1.35;
  --motion-card-scale: 1.08;
  --motion-card-pop-scale: 1.12;
  --motion-keyword-pop-scale: 1.36;
  --motion-background-opacity: 1.35;
  --motion-background-scale: 1.14;
}

.motion-preview-background,
.motion-preview-background::before,
.motion-preview-background::after,
.motion-preview-transition-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.motion-preview-background::before,
.motion-preview-background::after {
  content: "";
  opacity: 0;
}

.motion-preview-person {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: 118px;
  height: 156px;
  transform: translateX(-50%);
  border-radius: 48px 48px 30px 30px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.88), rgba(15, 23, 42, 0.92));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.motion-preview-person span {
  position: absolute;
  left: 50%;
  top: -42px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f7caa8, #e6a77d);
}

.motion-preview-subtitle,
.motion-preview-card,
.motion-preview-compare,
.motion-preview-steps,
.motion-preview-ending {
  position: absolute;
  opacity: 0;
  z-index: 2;
}

.motion-preview-subtitle {
  left: clamp(18px, var(--motion-caption-x, 50%), calc(100% - 18px));
  right: auto;
  top: var(--motion-caption-y, 76%);
  bottom: auto;
  width: min(88%, 330px);
  text-align: var(--motion-caption-align, center);
  transform: translate(-50%, -50%);
}

.motion-preview-subtitle > span {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 15px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--motion-caption-bg, transparent);
  color: var(--motion-caption-color, #f8fbff);
  font-family: var(--motion-caption-font, "Microsoft YaHei", "Noto Sans SC", sans-serif);
  font-size: calc(var(--motion-caption-size, 20) * 1px);
  font-style: var(--motion-caption-font-style, normal);
  font-weight: var(--motion-caption-weight, 900);
  line-height: var(--motion-caption-line-height, 1.18);
  text-align: var(--motion-caption-align, center);
  text-shadow: var(--motion-caption-shadow, 0 3px 12px rgba(0, 0, 0, 0.45));
  -webkit-text-stroke: calc(var(--motion-caption-stroke-width, 0) * 1px) var(--motion-caption-stroke-color, #000);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}

.motion-preview-subtitle > span.is-none {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.motion-preview-subtitle > span.is-gradient {
  background-image: linear-gradient(92deg, var(--motion-caption-keyword-color, #facc15), var(--motion-caption-color, #fff), #22d3ee);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.motion-preview-subtitle > span.is-neon {
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.62), 0 0 22px rgba(168, 85, 247, 0.42);
}

.motion-preview-subtitle > span.is-highlight {
  box-shadow: inset 0 -0.38em 0 rgba(250, 204, 21, 0.28), 0 12px 34px rgba(0, 0, 0, 0.12);
}

.motion-preview-caption-keyword {
  color: var(--motion-caption-keyword-color, #facc15);
  font-size: calc(var(--motion-caption-keyword-size, 20) * 1px);
  -webkit-text-stroke: calc(var(--motion-caption-keyword-stroke-width, 0) * 1px) var(--motion-caption-keyword-stroke-color, #000);
}

.motion-preview-card-main {
  left: 8%;
  right: 8%;
  bottom: 58px;
  padding: 18px;
  border: 1px solid rgba(196, 181, 253, 0.34);
  border-radius: 22px;
  background: rgba(5, 11, 23, 0.84);
  color: #f8fbff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
}

.motion-preview-card-main b,
.motion-preview-steps b {
  display: block;
  margin-bottom: 8px;
  color: #c4b5fd;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.motion-preview-card-main span,
.motion-preview-steps span {
  display: block;
  color: #eef6ff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.42;
}

.motion-preview-steps {
  left: 9%;
  right: 9%;
  bottom: 48px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(5, 11, 23, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.motion-preview-steps span {
  margin-top: 7px;
  color: #d9ffff;
  font-size: 15px;
}

.motion-preview-compare {
  left: 8%;
  right: 8%;
  bottom: 68px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.motion-preview-compare span {
  padding: 14px;
  border-radius: 18px;
  color: #f8fbff;
  font-size: 15px;
  font-weight: 900;
  background: rgba(5, 11, 23, 0.84);
  border: 1px solid rgba(196, 181, 253, 0.28);
}

.motion-preview-ending {
  right: 8%;
  bottom: 54px;
  padding: 12px 16px;
  border: 1px solid rgba(196, 181, 253, 0.36);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  color: #f8fbff;
  font-size: 14px;
  font-weight: 900;
}

.motion-preview-subtitle-clean .motion-preview-subtitle {
  opacity: 1;
  animation: motionPreviewSubtitleHold 3s ease-in-out infinite;
}

.motion-preview-subtitle-keyword-pop .motion-preview-subtitle,
.motion-preview-subtitle-typewriter .motion-preview-subtitle,
.motion-preview-subtitle-marker-sweep .motion-preview-subtitle {
  opacity: 1;
  animation: motionPreviewSubtitleHold 3s ease-in-out infinite;
}

.motion-preview-subtitle-keyword-pop .motion-preview-caption-keyword {
  display: inline-block;
  transform-origin: center bottom;
  animation: motionPreviewKeywordPop 3s ease-in-out infinite;
}

.motion-preview-subtitle-typewriter .motion-preview-subtitle > span {
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  clip-path: inset(0 100% 0 0);
  animation: motionPreviewTypewriter 3s steps(12, end) infinite;
}

.motion-preview-subtitle-marker-sweep .motion-preview-subtitle > span {
  position: relative;
  isolation: isolate;
}

.motion-preview-subtitle-marker-sweep .motion-preview-subtitle > span::before {
  content: "";
  position: absolute;
  inset: -4px -12px;
  z-index: 0;
  border-radius: 18px;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.06) 36%, rgba(250, 204, 21, 0.28) 48%, rgba(34, 211, 238, 0.18) 58%, transparent 72%);
  transform: translateX(-120%);
  animation: motionPreviewMarkerSweep 3s ease-in-out infinite;
  pointer-events: none;
}

.motion-preview-subtitle-marker-sweep .motion-preview-subtitle > span::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.45), rgba(34, 211, 238, 0.34));
  transform-origin: left center;
  animation: motionPreviewMarker 3s ease-in-out infinite;
}

.motion-preview-card-steps .motion-preview-steps,
.motion-preview-card-quote .motion-preview-card-main,
.motion-preview-card-notification .motion-preview-card-main,
.motion-preview-card-compare .motion-preview-compare {
  opacity: 1;
}

.motion-preview-card-steps .motion-preview-steps {
  animation: motionPreviewStepsCard 3s ease-in-out infinite;
}

.motion-preview-card-steps .motion-preview-steps span {
  transform-origin: left center;
  animation: motionPreviewStepLine 3s ease-in-out infinite;
}

.motion-preview-card-steps .motion-preview-steps span:nth-of-type(2) {
  animation-delay: 0.08s;
}

.motion-preview-card-steps .motion-preview-steps span:nth-of-type(3) {
  animation-delay: 0.16s;
}

.motion-preview-card-quote .motion-preview-card-main {
  bottom: 96px;
  text-align: center;
  animation: motionPreviewQuoteCard 3s ease-in-out infinite;
}

.motion-preview-card-quote .motion-preview-card-main::before {
  content: "“";
  display: block;
  color: #c4b5fd;
  font-size: 44px;
  line-height: 0.7;
}

.motion-preview-card-notification .motion-preview-card-main {
  top: 28px;
  bottom: auto;
  animation: motionPreviewNotificationCard 3s ease-in-out infinite;
}

.motion-preview-card-compare .motion-preview-compare {
  animation: motionPreviewCompareCard 3s ease-in-out infinite;
}

.motion-preview-card-compare .motion-preview-compare span:first-child {
  animation: motionPreviewCompareLeft 3s ease-in-out infinite;
}

.motion-preview-card-compare .motion-preview-compare span:last-child {
  animation: motionPreviewCompareRight 3s ease-in-out infinite;
}

.motion-preview-background-gradient-soft .motion-preview-background::before {
  opacity: var(--motion-background-opacity, 1);
  background:
    radial-gradient(circle at 18% 12%, rgba(168, 85, 247, 0.32), transparent 36%),
    radial-gradient(circle at 78% 24%, rgba(34, 211, 238, 0.2), transparent 34%);
  animation: motionPreviewGlow 3s ease-in-out infinite;
}

.motion-preview-background-grid-pulse .motion-preview-background::after {
  opacity: calc(0.38 * var(--motion-background-opacity, 1));
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.25) 1px, transparent 1px);
  background-size: 34px 34px;
  animation: motionPreviewGrid 3s ease-in-out infinite;
}

.motion-preview-transition-slide-soft .motion-preview-transition-sweep {
  opacity: 1;
  background: linear-gradient(100deg, transparent 0%, rgba(147, 197, 253, 0.18) 43%, rgba(196, 181, 253, 0.22) 52%, transparent 68%);
  animation: motionPreviewSweep 3s ease-in-out infinite;
}

.motion-preview-ending-comment-cta .motion-preview-ending {
  opacity: 1;
  animation: motionPreviewCta 3s ease-in-out infinite;
}

.motion-preview-overall .motion-preview-subtitle {
  opacity: 1;
  left: 50%;
  text-align: center;
}

.motion-preview-overall .motion-preview-subtitle > span {
  text-align: center;
}

.motion-preview-overall .motion-preview-person {
  display: none;
}

.motion-preview-style-business-clean .motion-preview-stage,
.motion-preview-style-business-clean {
  background:
    radial-gradient(circle at 14% 16%, rgba(14, 165, 233, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.24) 54%, rgba(2, 6, 23, 0.72) 100%),
    var(--template-image, linear-gradient(135deg, #0a1526, #0f1b32 56%, #07111f)),
    linear-gradient(135deg, #0a1526, #0f1b32 56%, #07111f);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--template-position, center center);
}

.motion-preview-style-business-clean .motion-preview-card-main {
  bottom: 86px;
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(8, 18, 34, 0.86);
}

.motion-preview-style-business-clean .motion-preview-subtitle > span {
  background: var(--motion-caption-bg, rgba(15, 23, 42, 0.78));
  color: var(--motion-caption-color, #f8fafc);
}

.motion-preview-style-creator-pop .motion-preview-background::before {
  opacity: 1;
  background:
    radial-gradient(circle at 16% 22%, rgba(236, 72, 153, 0.36), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.22), transparent 28%);
  animation: motionPreviewGlow 3s ease-in-out infinite;
}

.motion-preview-style-creator-pop .motion-preview-subtitle > span {
  color: var(--motion-caption-color, #fef3c7);
  background: var(--motion-caption-bg, linear-gradient(135deg, rgba(126, 34, 206, 0.92), rgba(14, 165, 233, 0.86)));
}

.motion-preview-style-tech-dark .motion-preview-stage,
.motion-preview-style-tech-dark {
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.08) 0%, rgba(3, 7, 18, 0.3) 58%, rgba(3, 7, 18, 0.78) 100%),
    radial-gradient(circle at 50% 12%, rgba(34, 211, 238, 0.18), transparent 36%),
    var(--template-image, linear-gradient(135deg, #020617, #0f172a 58%, #082f49)),
    linear-gradient(135deg, #020617, #0f172a 58%, #082f49);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--template-position, center center);
}

.motion-preview-style-tech-dark .motion-preview-transition-sweep {
  background: linear-gradient(100deg, transparent 0%, rgba(34, 211, 238, 0.18) 42%, rgba(168, 85, 247, 0.24) 52%, transparent 68%);
  animation: motionPreviewSweep 3s ease-in-out infinite;
}

.motion-preview-style-tech-dark .motion-preview-steps {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(3, 7, 18, 0.78);
}

.motion-preview-copy {
  display: grid;
  gap: 6px;
  padding: 2px 2px 0;
}

.motion-preview-copy b {
  color: var(--text);
  font-size: 16px;
}

.motion-preview-copy p,
.motion-preview-copy small {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@keyframes motionPreviewRise {
  0% { transform: translate(-50%, calc(-50% + (16px * var(--motion-enter-y-factor, 1)))); opacity: 0; }
  18%, 82% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(-50%, calc(-50% - (6px * var(--motion-enter-y-factor, 1)))); opacity: 0; }
}

@keyframes motionPreviewSubtitleHold {
  0%, 8% { transform: translate(-50%, calc(-50% + (4px * var(--motion-enter-y-factor, 1)))); opacity: 0; }
  18%, 86% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(-50%, -50%); opacity: 0; }
}

@keyframes motionPreviewPop {
  0% { transform: scale(calc(0.94 * var(--motion-card-scale, 1))); }
  20% { transform: scale(var(--motion-card-pop-scale, 1.04)); }
  42%, 100% { transform: scale(1); }
}

@keyframes motionPreviewKeywordPop {
  0%, 16% { transform: translateY(0) scale(1); filter: brightness(1); }
  25% { transform: translateY(calc(-4px * var(--motion-enter-y-factor, 1))) scale(var(--motion-keyword-pop-scale, 1.2)); filter: brightness(1.35); }
  36% { transform: translateY(1px) scale(0.98); }
  52%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes motionPreviewTypewriter {
  0%, 12% { clip-path: inset(0 100% 0 0); }
  72%, 100% { clip-path: inset(0 0 0 0); }
}

@keyframes motionPreviewMarker {
  0% { transform: scaleX(0); }
  42%, 100% { transform: scaleX(1); }
}

@keyframes motionPreviewMarkerSweep {
  0%, 12% { transform: translateX(-120%); opacity: 0; }
  32% { opacity: 1; }
  62%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes motionPreviewCard {
  0% { transform: translateY(calc(24px * var(--motion-enter-y-factor, 1))) scale(calc(0.96 * var(--motion-card-scale, 1))); opacity: 0; }
  20%, 82% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-10px * var(--motion-enter-y-factor, 1))) scale(calc(0.99 * var(--motion-card-scale, 1))); opacity: 0; }
}

@keyframes motionPreviewStepsCard {
  0% { transform: translateY(calc(22px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
  16%, 86% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-6px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
}

@keyframes motionPreviewStepLine {
  0%, 18% { transform: translateX(calc(-10px * var(--motion-enter-y-factor, 1))); opacity: 0; }
  34%, 88% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes motionPreviewCompareCard {
  0% { transform: translateY(calc(18px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
  18%, 84% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-6px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
}

@keyframes motionPreviewCompareLeft {
  0%, 18% { transform: translateX(calc(-18px * var(--motion-enter-y-factor, 1))); opacity: 0; }
  34%, 86% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes motionPreviewCompareRight {
  0%, 18% { transform: translateX(calc(18px * var(--motion-enter-y-factor, 1))); opacity: 0; }
  34%, 86% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes motionPreviewQuoteCard {
  0% { transform: translateY(calc(20px * var(--motion-enter-y-factor, 1))) scale(calc(0.9 * var(--motion-card-scale, 1))); opacity: 0; }
  20% { transform: translateY(0) scale(var(--motion-card-pop-scale, 1.04)); opacity: 1; }
  36%, 84% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-8px * var(--motion-enter-y-factor, 1))) scale(calc(0.98 * var(--motion-card-scale, 1))); opacity: 0; }
}

@keyframes motionPreviewNotificationCard {
  0% { transform: translateY(calc(-26px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
  18% { transform: translateY(calc(4px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 1; }
  30%, 84% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-10px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
}

@keyframes motionPreviewGlow {
  0%, 100% { transform: scale(1); opacity: calc(0.62 * var(--motion-background-opacity, 1)); }
  50% { transform: scale(var(--motion-background-scale, 1.08)); opacity: var(--motion-background-opacity, 1); }
}

@keyframes motionPreviewGrid {
  0% { transform: scale(1); opacity: calc(0.18 * var(--motion-background-opacity, 1)); background-position: 0 0, 0 0; }
  50% { transform: scale(var(--motion-background-scale, 1.08)); opacity: calc(0.42 * var(--motion-background-opacity, 1)); background-position: 12px 12px, 12px 12px; }
  100% { transform: scale(1); opacity: calc(0.18 * var(--motion-background-opacity, 1)); background-position: 24px 24px, 24px 24px; }
}

@keyframes motionPreviewSweep {
  0% { transform: translateX(calc(-42% * var(--motion-enter-y-factor, 1))); opacity: 0; }
  18%, 72% { opacity: var(--motion-background-opacity, 1); }
  100% { transform: translateX(calc(42% * var(--motion-enter-y-factor, 1))); opacity: 0; }
}

@keyframes motionPreviewCta {
  0% { transform: translateY(calc(18px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
  24%, 84% { transform: translateY(0) scale(var(--motion-card-scale, 1)); opacity: 1; }
  100% { transform: translateY(calc(-8px * var(--motion-enter-y-factor, 1))) scale(var(--motion-card-scale, 1)); opacity: 0; }
}

@media (max-width: 1390px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand {
    grid-template-columns: 34px;
    justify-content: center;
  }

  .brand div,
  .collapse-button,
  .module-button span,
  .module-button b,
  .plain-nav span,
  .profile div {
    display: none;
  }

  .module-button,
  .plain-nav {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .profile {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .work-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .copywriting-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digital-human-manager-grid,
  .voice-manager-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  }

  .extract-panel {
    grid-column: 1 / -1;
    min-height: 188px;
  }
}

@media (max-width: 860px) {
  body {
    overflow-x: hidden;
  }

  body.sidebar-drawer-open {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    display: flex;
    width: min(304px, 86vw);
    max-width: calc(100vw - 36px);
    height: 100dvh;
    overflow-y: auto;
    border-width: 0 1px 0 0;
    box-shadow: 24px 0 70px rgba(15, 23, 42, 0.24);
    transform: translateX(-106%);
    transition: transform 0.22s ease;
  }

  body.sidebar-drawer-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: block;
    width: 100%;
    border: 0;
    background: rgba(15, 23, 42, 0.36);
  }

  .mobile-sidebar-backdrop[hidden] {
    display: none !important;
  }

  .mobile-sidebar-toggle {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .brand {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    justify-content: stretch;
    padding-inline: 14px;
  }

  .brand div,
  .module-button span,
  .module-button b,
  .plain-nav span,
  .profile div {
    display: block;
  }

  .collapse-button {
    display: inline-grid;
  }

  .module-button,
  .plain-nav {
    grid-template-columns: 27px minmax(0, 1fr);
    justify-items: stretch;
  }

  .profile {
    grid-template-columns: 42px minmax(0, 1fr);
    justify-items: stretch;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .top-section-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .top-section-nav::-webkit-scrollbar {
    display: none;
  }

  .top-section-button {
    flex: 0 0 auto;
    min-width: 118px;
    padding: 0 12px;
  }

  .remote-session-summary {
    min-width: 0;
    margin-left: auto;
  }

  .account-menu {
    margin-left: auto;
  }

  .account-menu-toggle {
    grid-template-columns: 32px 16px;
    max-width: 64px;
    padding-right: 7px;
  }

  .account-menu-toggle .account-menu-copy {
    display: none;
  }

  .account-menu-panel {
    right: 0;
  }

  .remote-api-status {
    max-width: 150px;
  }

  .remote-session-summary .ghost-button {
    min-height: 34px;
    padding-inline: 9px;
  }

  .resource-library-workspace,
  .publish-account-workspace,
  .title-topic-workspace,
  .audio-video-workspace,
  .copywriting-workspace {
    padding: 12px;
  }

  .resource-library-header,
  .publish-account-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-library-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .resource-filter {
    flex: 0 0 auto;
  }

  .pipeline {
    overflow-x: auto;
    grid-template-columns: repeat(5, 150px);
    padding-inline: 16px;
  }

  .stage-config,
  .settings-grid,
  .real-run-grid,
  .backend-panels,
  .work-panels,
  .copywriting-workspace,
    .title-topic-fields,
    .audio-video-grid,
    .publish-account-layout,
    .digital-human-manager-grid,
    .voice-manager-grid,
    .subtitle-motion-grid,
  .video-config-grid,
  .loop-mode-field {
    grid-template-columns: 1fr;
  }

  .motion-module-grid,
  .motion-option-row {
    grid-template-columns: 1fr;
  }

  .digital-human-manager-header,
  .voice-manager-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .digital-human-manager-workspace,
  .voice-manager-workspace {
    padding: 14px 12px 22px;
  }

  .digital-human-constraints,
  .voice-constraints {
    grid-template-columns: 1fr;
  }

  .copywriting-titlebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-panel,
  .extract-panel {
    grid-column: auto;
    min-height: 0;
  }

  .copy-editor {
    min-height: 280px;
  }

  .av-panel {
    min-height: 0;
    padding: 14px;
  }

  .digital-human-stage {
    min-height: 340px;
  }

  .title-topic-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .subtitle-motion-header,
  .publisher-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .subtitle-motion-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .publisher-grid,
  .publisher-field-grid,
  .publisher-platform-list {
    grid-template-columns: 1fr;
  }

  .real-run-panel header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-box {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .queue-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-head,
  .queue-row {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .table-head span:nth-child(n + 4),
  .queue-row > span:nth-child(n + 4),
  .queue-row > div:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 520px) {
  .login-screen,
  .password-change-screen {
    padding: 18px 12px;
  }

  .login-card {
    width: min(100%, 368px);
    max-width: calc(100vw - 24px);
  }

  .login-card-header {
    padding: 24px 22px 16px;
  }

  .login-form {
    padding-inline: 22px;
  }

  .top-section-button {
    min-width: 106px;
    min-height: 36px;
    font-size: 13px;
  }

  .remote-api-status {
    max-width: 118px;
  }

  .resource-library-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-library-card,
  .digital-human-card,
  .voice-library-card {
    grid-template-columns: 1fr;
  }

  .resource-library-card-icon {
    width: 38px;
    height: 38px;
  }

  .digital-human-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digital-human-resolution-options {
    grid-template-columns: 1fr;
  }

  .resource-preview-dialog,
  .toast-card {
    width: calc(100vw - 24px);
  }

  .resource-preview-body {
    padding: 12px;
  }
}

/* 2026-06-27 futuristic creator-studio skin */
:root {
  --bg: #050713;
  --surface: rgba(12, 18, 35, 0.9);
  --surface-soft: rgba(18, 27, 50, 0.82);
  --surface-strong: rgba(8, 13, 27, 0.96);
  --line: rgba(130, 156, 255, 0.18);
  --line-strong: rgba(118, 199, 255, 0.32);
  --text: #edf4ff;
  --muted: #93a4bf;
  --muted-2: #65738f;
  --teal: #22d3ee;
  --teal-dark: #67e8f9;
  --teal-soft: rgba(34, 211, 238, 0.12);
  --blue: #60a5fa;
  --green: #67e88d;
  --amber: #fbbf24;
  --red: #fb7185;
  --purple: #a855f7;
  --pink: #d946ef;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 16% 4%, rgba(107, 70, 255, 0.28), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(217, 70, 239, 0.15), transparent 38%),
    #050713;
  color: var(--text);
}

.login-screen,
.password-change-screen {
  background:
    radial-gradient(circle at 18% 18%, rgba(217, 70, 239, 0.28), transparent 31%),
    radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(135deg, #050713 0%, #091226 58%, #060816 100%);
}

.login-card {
  border-color: rgba(130, 156, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(18, 27, 50, 0.92), rgba(8, 13, 27, 0.96)),
    rgba(10, 15, 30, 0.95);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(120, 130, 255, 0.05);
}

.login-card-header h1,
.resource-library-header h2,
.publish-account-header h2,
.digital-human-manager-header h2,
.voice-manager-header h2,
.subtitle-motion-header h2,
.publisher-header h2 {
  color: #f8fbff;
}

.login-brand-copy strong {
  background: linear-gradient(135deg, #f0abfc 0%, #60a5fa 52%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-brand-copy small {
  color: #8ea1c1;
}

.login-policy {
  border-top-color: rgba(130, 156, 255, 0.18);
  background: rgba(8, 13, 27, 0.72);
  color: #a9b7d0;
}

.login-policy i,
.workspace-kicker {
  color: var(--teal);
}

.app-shell.sci-fi-shell {
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 14, 28, 0.98), rgba(6, 9, 20, 0.8)),
    radial-gradient(circle at 58% 0%, rgba(123, 97, 255, 0.16), transparent 35%),
    #050713;
}

.sci-fi-shell .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(130, 156, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(9, 15, 32, 0.98), rgba(5, 8, 19, 0.96)),
    rgba(7, 11, 24, 0.96);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.26);
}

.sci-fi-shell .brand {
  grid-template-columns: 36px 1fr 24px;
  min-height: 72px;
  border-bottom-color: rgba(130, 156, 255, 0.16);
}

.sci-fi-shell .brand-mark.product-logo-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 13px;
}

.sci-fi-shell .brand-mark,
.sci-fi-shell .login-brand-mark {
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
}

.sci-fi-shell .brand strong {
  max-width: 112px;
  background: linear-gradient(135deg, #d946ef 0%, #60a5fa 48%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
}

.sci-fi-shell .brand span {
  color: #8392ad;
}

.sci-fi-shell .workspace {
  min-width: 0;
  background:
    radial-gradient(circle at 36% 0%, rgba(79, 70, 229, 0.18), transparent 34%),
    radial-gradient(circle at 84% 52%, rgba(14, 165, 233, 0.12), transparent 35%);
}

.sci-fi-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(130, 156, 255, 0.18);
  background: rgba(6, 10, 22, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.sci-fi-shell .top-section-nav {
  gap: 20px;
}

.sci-fi-shell .top-section-button {
  position: relative;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 0;
  color: #b7c2d7;
  background: transparent;
}

.sci-fi-shell .top-section-button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -11px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d946ef, #22d3ee);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.9);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sci-fi-shell .top-section-button i {
  color: #99a8c2;
  font-size: 20px;
}

.sci-fi-shell .top-section-button:hover {
  border-color: transparent;
  background: rgba(130, 156, 255, 0.07);
  color: #eef5ff;
}

.sci-fi-shell .top-section-button.active {
  border-color: transparent;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.16), rgba(34, 211, 238, 0.06));
  color: #f8fbff;
  box-shadow: none;
}

.sci-fi-shell .top-section-button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.sci-fi-shell .top-section-button.active i {
  color: #90d8ff;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.65));
}

.sci-fi-shell .module-nav {
  gap: 8px;
  padding: 18px 9px;
}

.sci-fi-shell .module-button,
.sci-fi-shell .plain-nav {
  border-radius: 14px;
  color: #aab7cf;
}

.sci-fi-shell .module-button i,
.sci-fi-shell .plain-nav i {
  color: #b7c8e5;
}

.sci-fi-shell .module-button:hover,
.sci-fi-shell .plain-nav:hover {
  border-color: rgba(130, 156, 255, 0.24);
  background: rgba(130, 156, 255, 0.08);
  color: #f8fbff;
}

.sci-fi-shell .module-button.active,
.sci-fi-shell .plain-nav.active-soft {
  border-color: rgba(34, 211, 238, 0.42);
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.26), rgba(37, 99, 235, 0.28), rgba(34, 211, 238, 0.14));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 22px rgba(34, 211, 238, 0.16);
}

.sci-fi-shell .module-button.active span span,
.sci-fi-shell .module-button span span {
  color: #8392ad;
}

.sci-fi-shell .account-menu-toggle {
  min-height: 48px;
  border: 1px solid rgba(130, 156, 255, 0.22);
  border-radius: 999px;
  background: rgba(16, 24, 45, 0.72);
  color: #f7fbff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.sci-fi-shell .account-avatar-frame {
  border: 2px solid rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.45);
}

.sci-fi-shell .account-menu-toggle small {
  color: #c084fc;
}

.sci-fi-shell .account-menu-panel,
.modal,
.toast-card,
.resource-preview-dialog {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(9, 15, 32, 0.96);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.sci-fi-shell .account-menu-panel {
  border-color: rgba(103, 232, 249, 0.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.1), transparent 48%),
    rgba(7, 12, 28, 0.98);
}

.sci-fi-shell .account-menu-card {
  border: 1px solid rgba(130, 156, 255, 0.2);
  background: rgba(12, 20, 39, 0.92);
  color: #f7fbff;
}

.sci-fi-shell .account-menu-card b {
  color: #f7fbff;
}

.sci-fi-shell .account-logout {
  border-color: rgba(130, 156, 255, 0.24);
  background: rgba(5, 9, 21, 0.72);
  color: #dce8ff;
}

.sci-fi-shell .account-logout:hover {
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(17, 29, 54, 0.92);
  color: #f7fbff;
}

.sci-fi-shell .resource-preview-header {
  border-bottom-color: rgba(103, 232, 249, 0.16);
  background:
    linear-gradient(90deg, rgba(17, 25, 51, 0.92), rgba(9, 15, 32, 0.72)),
    rgba(7, 12, 28, 0.94);
}

.sci-fi-shell .resource-preview-body {
  color: #edf4ff;
}

.workspace-shell-grid {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 72px);
  padding: 14px;
}

.workspace-shell-grid > [hidden],
.content-command-deck[hidden] {
  display: none !important;
}

.sci-fi-shell [hidden] {
  display: none !important;
}

.content-command-deck {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
}

.workflow-orbit-strip {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 22px;
  padding: 18px 24px 24px;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 52% 72%, rgba(217, 70, 239, 0.18), transparent 31%),
    radial-gradient(circle at 14% 56%, rgba(37, 99, 235, 0.28), transparent 27%),
    radial-gradient(circle at 86% 50%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(13, 22, 44, 0.94), rgba(8, 13, 27, 0.94));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.workflow-orbit-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 156, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 156, 255, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

.workflow-orbit-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workflow-orbit-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
  color: #f9fbff;
}

.workflow-orbit-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 900;
}

.workflow-orbit-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  align-items: start;
  gap: 0;
}

.workflow-orbit-track::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 56px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(217, 70, 239, 0.7), rgba(34, 211, 238, 0.75));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.38);
}

.workflow-orbit-step {
  position: relative;
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: #aebbd1;
  text-align: center;
}

.workflow-orb {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(96, 165, 250, 0.28) 0 28%, rgba(11, 18, 38, 0.96) 30% 100%);
  box-shadow:
    0 0 0 8px rgba(96, 165, 250, 0.06),
    0 0 34px rgba(96, 165, 250, 0.42),
    inset 0 0 18px rgba(96, 165, 250, 0.4);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.workflow-orb::before,
.workflow-orb::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 50%;
}

.workflow-orb::after {
  inset: 18px;
  border-color: rgba(34, 211, 238, 0.32);
}

.workflow-orb i {
  position: relative;
  z-index: 1;
  color: #9edcff;
  font-size: 34px;
  filter: drop-shadow(0 0 14px rgba(96, 165, 250, 0.8));
}

.workflow-orbit-step b {
  color: #f6fbff;
  font-size: 14px;
}

.workflow-orbit-step small {
  color: #8291ae;
  font-size: 11px;
  font-weight: 800;
}

.workflow-orbit-step.is-active .workflow-orb,
.workflow-orbit-step.is-running .workflow-orb {
  border-color: rgba(217, 70, 239, 0.78);
  background:
    radial-gradient(circle, rgba(217, 70, 239, 0.36) 0 28%, rgba(14, 18, 39, 0.98) 30% 100%);
  box-shadow:
    0 0 0 10px rgba(217, 70, 239, 0.09),
    0 0 46px rgba(217, 70, 239, 0.58),
    inset 0 0 22px rgba(217, 70, 239, 0.46);
}

.workflow-orbit-step.is-completed .workflow-orb {
  border-color: rgba(103, 232, 141, 0.55);
  background:
    radial-gradient(circle, rgba(34, 197, 94, 0.22) 0 28%, rgba(11, 18, 38, 0.96) 30% 100%);
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.06), 0 0 30px rgba(34, 197, 94, 0.26);
}

.workflow-orbit-step:hover .workflow-orb {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.7);
}

.workflow-orbit-step:active .workflow-orb {
  transform: translateY(-1px) scale(0.98);
}

.workflow-orbit-step:focus-visible {
  outline: none;
}

.workflow-orbit-step:focus-visible .workflow-orb {
  box-shadow:
    0 0 0 3px rgba(103, 232, 249, 0.28),
    0 0 38px rgba(34, 211, 238, 0.48),
    inset 0 0 18px rgba(96, 165, 250, 0.4);
}

.workflow-step-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 24px;
  align-items: center;
  align-self: start;
  min-height: 0;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(92, 119, 185, 0.28);
  border-radius: 16px;
  background: rgba(10, 18, 41, 0.92);
}

.workflow-step-progress-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  color: #8093bd;
  font-size: 12px;
}

.workflow-step-progress-copy b {
  justify-self: start;
  color: #c6a5ff;
}

.workflow-step-progress-track {
  grid-column: 1 / -1;
  width: min(240px, 100%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 112, 164, 0.22);
}

.workflow-step-progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: #8f66ff;
  box-shadow: 0 0 12px rgba(143, 102, 255, 0.45);
  transition: width 180ms ease;
}

.workflow-step-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.workflow-step-button {
  min-width: 116px;
  min-height: 44px;
  justify-content: center;
}

@media (max-width: 760px) {
  .workflow-step-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .workflow-step-progress-track {
    width: 100%;
  }

  .workflow-step-footer-actions {
    width: 100%;
  }

  .workflow-step-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
  }
}

/* 2026-07-01 audio video three-column workspace */
.sci-fi-shell .spoken-script-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 680px;
}

.audio-video-script-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #8296be;
  font-size: 11px;
  line-height: 1.45;
}

.audio-video-script-toolbar b {
  flex: 0 0 auto;
  color: #c8d7f5;
}

.audio-video-script-editor {
  max-height: 590px;
  overflow-y: auto;
  border: 1px solid rgba(74, 101, 157, 0.34);
  border-radius: 12px;
  background: rgba(4, 10, 25, 0.72);
  scrollbar-color: rgba(96, 165, 250, 0.42) transparent;
}

.audio-video-script-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(70, 92, 141, 0.22);
}

.audio-video-script-row:last-child {
  border-bottom: 0;
}

.audio-video-script-row > span {
  padding-top: 5px;
  color: #7185b1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.audio-video-script-row textarea {
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 2px 0;
  overflow: hidden;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f8ff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.65;
}

.audio-video-script-row:focus-within {
  background: rgba(79, 70, 229, 0.12);
  box-shadow: inset 3px 0 0 #a855f7;
}

.audio-video-script-row:focus-within > span {
  color: #67e8f9;
}

.audio-video-script-empty {
  display: grid;
  min-height: 260px;
  margin: 0;
  place-items: center;
  border: 1px dashed rgba(74, 101, 157, 0.36);
  border-radius: 12px;
  color: #8296be;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.audio-video-script-empty[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .sci-fi-shell .audio-video-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr);
  }

  .sci-fi-shell .spoken-script-panel {
    grid-column: 1 / -1;
    min-height: 420px;
  }

  .audio-video-script-editor {
    max-height: 340px;
  }
}

@media (max-width: 760px) {
  .sci-fi-shell .audio-video-grid {
    grid-template-columns: 1fr;
  }

  .sci-fi-shell .spoken-script-panel {
    grid-column: auto;
    min-height: 0;
  }

  .audio-video-script-editor {
    max-height: 420px;
  }

  .audio-video-script-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Subtitle motion console: focused configuration + result workflow */
.subtitle-motion-header-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.subtitle-motion-header-flow span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  color: #9fb1cd;
  background: rgba(7, 15, 31, 0.66);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.subtitle-motion-header-flow i {
  color: #67e8f9;
  font-size: 14px;
}

.smart-editing-layout,
.sci-fi-shell .smart-editing-layout {
  grid-template-columns: minmax(360px, 0.82fr) minmax(540px, 1.18fr);
  grid-template-areas:
    "config production"
    "storyboard production";
  column-gap: 18px;
  row-gap: 16px;
  align-items: start;
}

.smart-editing-layout .subtitle-motion-config-column,
.smart-editing-layout .subtitle-motion-timeline-column,
.smart-editing-layout .subtitle-motion-production-column {
  position: static;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.smart-editing-layout .subtitle-motion-config-column {
  grid-area: config;
}

.smart-editing-layout .subtitle-motion-timeline-column {
  grid-area: storyboard;
}

.smart-editing-layout .subtitle-motion-production-column {
  grid-area: production;
  position: sticky;
  top: 86px;
}

.smart-editing-layout .subtitle-motion-assets-card,
.smart-editing-layout .storyboard-binding-card,
.smart-editing-layout .subtitle-motion-output {
  border-radius: 18px;
  padding: 18px;
}

.smart-editing-layout .subtitle-motion-assets-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.smart-editing-layout .subtitle-motion-output-preset {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(130, 156, 255, 0.14);
}

.smart-editing-layout .subtitle-motion-output {
  min-height: 0;
}

.smart-editing-layout .subtitle-motion-stage {
  min-height: clamp(380px, 48vh, 620px);
}

.smart-editing-layout .subtitle-caption-generate-bar {
  position: static;
  padding: 14px;
  border-radius: 18px;
}

.smart-editing-layout .storyboard-binding-card header {
  align-items: center;
}

.smart-editing-layout .alignment-note {
  border-radius: 14px;
}

@media (max-width: 1180px) {
  .smart-editing-layout,
  .sci-fi-shell .smart-editing-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "config"
      "production"
      "storyboard";
  }

  .smart-editing-layout .subtitle-motion-production-column {
    position: static;
  }
}

@media (max-width: 720px) {
  .subtitle-motion-workspace {
    padding: 16px 12px 28px;
  }

  .subtitle-motion-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .subtitle-motion-header-flow {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .smart-editing-layout .subtitle-motion-assets-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .smart-editing-layout .subtitle-motion-assets-card,
  .smart-editing-layout .storyboard-binding-card,
  .smart-editing-layout .subtitle-motion-output {
    border-radius: 16px;
    padding: 14px;
  }

  .smart-editing-layout .subtitle-motion-stage {
    min-height: 320px;
  }
}

/* 2026-07-01 premium digital-human settings card */
.digital-human-setting-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dce8ff;
  font-size: 13px;
  font-weight: 900;
}

.digital-human-setting-title i {
  color: #60a5fa;
  font-size: 18px;
}

.digital-human-selection-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 16px;
  background: rgba(7, 12, 27, 0.58);
}

.selected-human-picker {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 22px;
  align-items: center;
  width: 100%;
  gap: 14px;
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 12%, rgba(34, 211, 238, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(21, 32, 59, 0.95), rgba(7, 14, 30, 0.98));
  color: #edf6ff;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.selected-human-picker:hover,
.selected-human-picker:focus-visible {
  border-color: rgba(34, 211, 238, 0.62);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08), 0 18px 42px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.selected-human-cover {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(13, 34, 61, 0.96), rgba(5, 12, 27, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 22px rgba(34, 211, 238, 0.14);
}

.selected-human-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.selected-human-cover.is-landscape video {
  object-fit: contain;
}

.selected-human-cover .human-figure.compact {
  width: 56px;
  height: 60px;
  transform: scale(0.72);
  transform-origin: center;
}

.selected-human-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.selected-human-copy b {
  overflow: hidden;
  color: #f8fbff;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-human-copy small {
  overflow: hidden;
  color: #91a9ca;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-human-picker > i {
  color: #90a4ca;
  font-size: 26px;
}

.digital-human-preview-card {
  display: grid;
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(130, 156, 255, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(34, 211, 238, 0.09), transparent 38%),
    linear-gradient(180deg, rgba(12, 21, 43, 0.92), rgba(5, 10, 23, 0.96));
}

.digital-human-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(130, 156, 255, 0.16);
}

.digital-human-preview-header > div {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.digital-human-preview-header i {
  color: #dbeafe;
  font-size: 21px;
}

.digital-human-preview-header h4 {
  margin: 0;
  color: #f8fbff;
  font-size: 16px;
  font-weight: 900;
}

.digital-human-preview-header > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(130, 156, 255, 0.22);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.72);
  color: #b8c7e2;
  font-size: 12px;
  font-weight: 800;
}

.digital-human-preview-arena {
  position: relative;
  min-height: 390px;
  margin-top: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(34, 211, 238, 0.28), transparent 34%),
    linear-gradient(rgba(34, 211, 238, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 18, 42, 0.94), rgba(2, 7, 18, 0.98));
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.digital-human-preview-arena::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: min(520px, 92%);
  height: 150px;
  pointer-events: none;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, rgba(34, 211, 238, 0.3) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at center, rgba(96, 165, 250, 0.22), transparent 62%);
  opacity: 0.72;
}

.digital-human-preview-arena .phone-preview {
  z-index: 1;
  width: min(220px, 64%);
  border-width: 7px;
  border-radius: 28px;
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.56), 0 0 36px rgba(96, 165, 250, 0.24);
}

.digital-human-preview-arena .phone-preview.has-landscape-media .generated-video {
  inset: 50% 0 auto;
  height: auto;
  max-height: 62%;
  transform: translateY(-50%);
  object-fit: contain;
}

.selected-template-cover-video {
  opacity: 0.92;
}

.sci-fi-shell .digital-human-settings-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(96, 165, 250, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 14% 4%, rgba(168, 85, 247, 0.16), transparent 38%),
    radial-gradient(circle at 92% 16%, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 25, 51, 0.92), rgba(6, 12, 28, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sci-fi-shell .digital-human-settings-panel .engine-strip {
  margin-bottom: 18px;
}

.sci-fi-shell .video-panel .video-config-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.sci-fi-shell .video-config-grid > .av-field {
  align-content: start;
  min-height: 0;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(96, 165, 250, 0.08), transparent 44%),
    rgba(7, 12, 27, 0.58);
}

.sci-fi-shell .video-config-grid > .av-field input {
  min-height: 42px;
}

.sci-fi-shell .video-config-grid > .video-name-field {
  min-height: 138px;
}

.sci-fi-shell .video-config-grid > .video-name-field,
.sci-fi-shell .video-config-grid > .digital-human-selection-card {
  box-sizing: border-box;
  align-content: start;
}

.sci-fi-shell .video-name-control {
  display: grid;
  gap: 7px;
}

.sci-fi-shell .video-name-field .loop-mode-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.sci-fi-shell .video-name-field .loop-option {
  min-height: 30px;
  padding-inline: 8px;
}

.sci-fi-shell .digital-human-selection-card {
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border-color: rgba(130, 156, 255, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.08), transparent 42%),
    rgba(7, 12, 27, 0.62);
}

.sci-fi-shell .selected-human-cover {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 26px rgba(34, 211, 238, 0.18);
}

.sci-fi-shell .digital-human-selection-card .selected-human-picker {
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  gap: 8px;
  min-height: 68px;
  padding: 6px 8px;
  border-radius: 13px;
}

.sci-fi-shell .digital-human-selection-card .selected-human-cover {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.sci-fi-shell .digital-human-selection-card .selected-human-copy b {
  font-size: 16px;
}

.sci-fi-shell .digital-human-preview-arena {
  min-height: 430px;
}

@media (max-width: 1180px) {
  .sci-fi-shell .digital-human-preview-arena {
    min-height: 400px;
  }
}

@media (max-width: 760px) {
  .sci-fi-shell .video-config-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sci-fi-shell .video-config-grid > .video-name-field {
    min-height: 0;
  }

  .selected-human-picker {
    grid-template-columns: 64px minmax(0, 1fr) 20px;
    min-height: 86px;
  }

  .selected-human-cover {
    width: 64px;
    height: 64px;
  }

  .digital-human-preview-arena {
    min-height: 360px;
  }

}

.sci-fi-shell .copywriting-workspace,
.sci-fi-shell .audio-video-workspace,
.sci-fi-shell .title-topic-workspace,
.sci-fi-shell .subtitle-motion-workspace,
.sci-fi-shell .publisher-workspace,
.sci-fi-shell .resource-library-workspace,
.sci-fi-shell .publish-account-workspace,
.sci-fi-shell .digital-human-manager-workspace,
.sci-fi-shell .voice-manager-workspace {
  padding: 0;
}

.sci-fi-shell .copy-panel,
.sci-fi-shell .title-topic-panel,
.sci-fi-shell .av-panel,
.sci-fi-shell .subtitle-motion-source,
.sci-fi-shell .subtitle-motion-output,
.sci-fi-shell .publisher-settings,
.sci-fi-shell .publisher-jobs,
.sci-fi-shell .publish-account-list-panel,
.sci-fi-shell .publish-account-form-panel,
.sci-fi-shell .digital-human-library-panel,
.sci-fi-shell .digital-human-upload-panel,
.sci-fi-shell .voice-library-panel,
.sci-fi-shell .voice-upload-panel,
.sci-fi-shell .resource-library-card,
.sci-fi-shell .resource-library-empty,
.sci-fi-shell .digital-human-card,
.sci-fi-shell .voice-library-card {
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 24, 46, 0.9), rgba(9, 15, 31, 0.94)),
    rgba(10, 16, 32, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sci-fi-shell .copywriting-workspace {
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.1fr) minmax(360px, 1.1fr);
  gap: 14px;
}

.sci-fi-shell .audio-video-grid,
.sci-fi-shell .subtitle-motion-grid,
.sci-fi-shell .publisher-grid,
.sci-fi-shell .digital-human-manager-grid,
.sci-fi-shell .voice-manager-grid,
.sci-fi-shell .publish-account-layout {
  gap: 14px;
}

.sci-fi-shell .smart-editing-layout {
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
}

.sci-fi-shell .subtitle-motion-order-hint {
  color: #8fa1bf;
}

.sci-fi-shell .smart-editing-layout .subtitle-motion-assets-card,
.sci-fi-shell .smart-editing-layout .subtitle-template-panel,
.sci-fi-shell .smart-editing-layout .motion-module-field,
.sci-fi-shell .smart-editing-layout .motion-option-row,
.sci-fi-shell .smart-editing-layout .subtitle-caption-editor-card,
.sci-fi-shell .smart-editing-layout .storyboard-binding-card,
.sci-fi-shell .smart-editing-layout .subtitle-motion-output,
.sci-fi-shell .smart-editing-layout .subtitle-motion-production-column > .av-field,
.sci-fi-shell .smart-editing-layout .subtitle-caption-generate-bar {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(12, 20, 39, 0.82), rgba(6, 11, 24, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sci-fi-shell .smart-editing-layout .motion-module-field > span {
  color: #8fa1bf;
}

.sci-fi-shell .smart-editing-layout .subtitle-caption-editor-card header {
  border-color: rgba(130, 156, 255, 0.16);
}

.sci-fi-shell .copy-panel,
.sci-fi-shell .av-panel {
  min-height: 410px;
  padding: 16px;
}

.sci-fi-shell .copy-panel header,
.sci-fi-shell .av-panel-header,
.sci-fi-shell .section-heading,
.sci-fi-shell .resource-library-header,
.sci-fi-shell .publish-account-header,
.sci-fi-shell .digital-human-manager-header,
.sci-fi-shell .voice-manager-header,
.sci-fi-shell .subtitle-motion-header,
.sci-fi-shell .publisher-header {
  color: #f8fbff;
}

.sci-fi-shell .copy-panel h3,
.sci-fi-shell .av-panel h3,
.sci-fi-shell .section-heading h3,
.sci-fi-shell .title-topic-header h2 {
  color: #f8fbff;
}

.sci-fi-shell .copy-panel small,
.sci-fi-shell .av-panel small,
.sci-fi-shell .section-heading small,
.sci-fi-shell .resource-library-header p,
.sci-fi-shell .publish-account-header p,
.sci-fi-shell .digital-human-manager-header p,
.sci-fi-shell .voice-manager-header p,
.sci-fi-shell .subtitle-motion-header p,
.sci-fi-shell .publisher-header p {
  color: #8fa1bf;
}

.sci-fi-shell .copy-step {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(168, 85, 247, 0.18));
  color: #a5f3fc;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.16);
}

.sci-fi-shell input:not([type="checkbox"]):not([type="radio"]),
.sci-fi-shell select,
.sci-fi-shell textarea,
.login-screen input,
.password-change-screen input,
.resource-preview-json {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(5, 9, 21, 0.82);
  color: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.sci-fi-shell input::placeholder,
.sci-fi-shell textarea::placeholder,
.login-screen input::placeholder,
.password-change-screen input::placeholder {
  color: #5f708e;
}

.sci-fi-shell input:focus,
.sci-fi-shell select:focus,
.sci-fi-shell textarea:focus,
.login-screen input:focus,
.password-change-screen input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 22px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .copy-field,
.sci-fi-shell .av-field,
.sci-fi-shell .field-label {
  color: #dce8ff;
}

.sci-fi-shell .copy-editor {
  min-height: 320px;
}

.sci-fi-shell .title-topic-field input {
  height: 42px;
  min-height: 42px;
}

.sci-fi-shell .primary-button,
.sci-fi-shell .primary,
.login-submit.primary-button {
  border: 0;
  background: linear-gradient(135deg, #d946ef 0%, #4f46e5 52%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.28), 0 0 22px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .primary-button:hover,
.sci-fi-shell .primary:hover,
.login-submit.primary-button:hover {
  filter: brightness(1.08);
  box-shadow: 0 18px 44px rgba(79, 70, 229, 0.36), 0 0 32px rgba(217, 70, 239, 0.22);
}

.sci-fi-shell .ghost-button,
.sci-fi-shell .mini-button,
.sci-fi-shell .full-button,
.sci-fi-shell .chip,
.sci-fi-shell .resource-filter {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(12, 20, 39, 0.7);
  color: #d9e6ff;
}

.sci-fi-shell .ghost-button:hover,
.sci-fi-shell .mini-button:hover,
.sci-fi-shell .full-button:hover,
.sci-fi-shell .chip:hover,
.sci-fi-shell .resource-filter:hover,
.sci-fi-shell .resource-filter.active {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
}

.sci-fi-shell .ghost-button.danger {
  border-color: rgba(251, 113, 133, 0.42);
  color: #fda4af;
}

.sci-fi-shell .ghost-button.danger:hover {
  background: rgba(251, 113, 133, 0.12);
}

.sci-fi-shell .engine-strip span,
.sci-fi-shell .voice-constraints span,
.sci-fi-shell .digital-human-constraints span,
.sci-fi-shell .resource-library-card-meta span,
.sci-fi-shell .publisher-safety-note,
.sci-fi-shell .alignment-note,
.sci-fi-shell .form-hint {
  border-color: rgba(130, 156, 255, 0.16);
  background: rgba(34, 211, 238, 0.08);
  color: #a9bbd6;
}

.sci-fi-shell .extract-progress-track,
.sci-fi-shell .generation-progress-track {
  background: rgba(7, 12, 27, 0.86);
  box-shadow: inset 0 0 0 1px rgba(130, 156, 255, 0.14);
}

.sci-fi-shell .extract-progress-fill,
.sci-fi-shell .generation-progress-fill {
  background: linear-gradient(90deg, #d946ef, #60a5fa, #22d3ee);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.55);
}

.sci-fi-shell .audio-preview,
.sci-fi-shell .digital-human-stage,
.sci-fi-shell .subtitle-motion-stage,
.sci-fi-shell .subtitle-motion-preview-strip,
.sci-fi-shell .publish-account-list,
.sci-fi-shell .digital-human-list,
.sci-fi-shell .voice-list {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.08), transparent 38%),
    rgba(5, 9, 20, 0.72);
}

.sci-fi-shell .audio-empty,
.sci-fi-shell .motion-empty,
.sci-fi-shell .publisher-empty,
.sci-fi-shell .digital-human-empty,
.sci-fi-shell .voice-empty,
.sci-fi-shell .resource-library-empty {
  color: #9aacca;
}

.sci-fi-shell .audio-empty i,
.sci-fi-shell .motion-empty i,
.sci-fi-shell .publisher-empty i,
.sci-fi-shell .resource-library-empty i,
.sci-fi-shell .resource-library-card-icon {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .phone-preview {
  border-color: rgba(130, 156, 255, 0.22);
  background:
    radial-gradient(circle at 50% 18%, rgba(34, 211, 238, 0.13), transparent 26%),
    linear-gradient(180deg, rgba(12, 20, 39, 0.96), rgba(7, 12, 27, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 26px rgba(96, 165, 250, 0.16);
}

.sci-fi-shell .stage-caption {
  background: rgba(15, 23, 42, 0.86);
  color: #f8fbff;
}

.sci-fi-shell .human-head {
  background: linear-gradient(180deg, #f4c7a1, #d9a17d);
}

.sci-fi-shell .human-body {
  background: linear-gradient(180deg, #0e8794, #0f5f6c);
}

.sci-fi-shell .resource-library-workspace.sci-fi-resource-panel {
  gap: 16px;
  padding: 0;
}

.sci-fi-shell .resource-library-list {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.sci-fi-shell .resource-library-card {
  border-radius: 16px;
}

.sci-fi-shell .resource-library-card.is-selected {
  border-color: rgba(34, 211, 238, 0.68);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.13), rgba(12, 20, 39, 0.92));
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.1), 0 0 30px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .resource-library-card-title b,
.sci-fi-shell .digital-human-card b,
.sci-fi-shell .voice-library-card b {
  color: #f8fbff;
}

.sci-fi-shell .resource-library-card-title span,
.sci-fi-shell .resource-library-card-select,
.sci-fi-shell .remote-api-status {
  color: #7dd3fc;
}

.sci-fi-shell .digital-human-segmented label span,
.sci-fi-shell .digital-human-resolution-options label span,
.sci-fi-shell .motion-module-grid label span,
.sci-fi-shell .loop-option span,
.sci-fi-shell .publisher-target {
  border-color: rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.68);
  color: #dce8ff;
}

.sci-fi-shell .motion-combination-summary,
.sci-fi-shell .motion-module-section {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.08), transparent 34%),
    rgba(5, 9, 21, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sci-fi-shell .motion-combination-summary span,
.sci-fi-shell .motion-module-section small {
  color: #92a5c5;
}

.sci-fi-shell .motion-combination-summary b,
.sci-fi-shell .motion-module-section strong {
  color: #f8fbff;
}

.sci-fi-shell .motion-module-rule-badge {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
}

.sci-fi-shell .motion-module-card {
  border-color: rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sci-fi-shell .motion-module-choice-card.is-selected {
  border-color: rgba(34, 211, 238, 0.68);
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 70, 239, 0.14), transparent 34%),
    radial-gradient(circle at 88% 50%, rgba(34, 211, 238, 0.12), transparent 38%),
    rgba(7, 12, 27, 0.76);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sci-fi-shell .motion-module-card label {
  background: transparent;
}

.sci-fi-shell .motion-module-choice-card label > span {
  border: 0;
  background: transparent;
  white-space: normal;
}

.sci-fi-shell .motion-module-choice-card label > span i {
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.sci-fi-shell .motion-module-choice-card label > span b {
  color: #f8fbff;
}

.sci-fi-shell .motion-preview-button {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
}

.sci-fi-shell .smart-card-system,
.sci-fi-shell .smart-card-type-list label,
.sci-fi-shell .subtitle-caption-card {
  border-color: rgba(130, 156, 255, 0.2);
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.16), transparent 36%),
    rgba(5, 9, 21, 0.62);
  color: #dce8ff;
}

.sci-fi-shell .smart-card-switch,
.sci-fi-shell .smart-card-type-list label.is-selected {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.sci-fi-shell .auto-data-blocks-panel,
.sci-fi-shell .auto-data-block-empty,
.sci-fi-shell .auto-data-block-card {
  border-color: rgba(130, 156, 255, 0.2);
  background: rgba(5, 9, 21, 0.58);
  color: #dce8ff;
}

.sci-fi-shell .auto-data-blocks-panel header span,
.sci-fi-shell .auto-data-block-card header b,
.sci-fi-shell .auto-data-block-table strong {
  color: #f8fbff;
}

.sci-fi-shell .auto-data-blocks-panel header small,
.sci-fi-shell .auto-data-block-card header span,
.sci-fi-shell .auto-data-block-empty,
.sci-fi-shell .auto-data-block-table span {
  color: #93a4bf;
}

.sci-fi-shell .subtitle-caption-card select {
  border: 1px solid rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.8);
  color: #f8fbff;
}

.sci-fi-shell .motion-overall-preview-button {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sci-fi-shell .motion-preview-button:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.14);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .motion-overall-preview-button:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.14);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .subtitle-template-panel,
.sci-fi-shell .subtitle-caption-editor-card,
.sci-fi-shell .storyboard-binding-card {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(12, 20, 39, 0.82), rgba(6, 11, 24, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sci-fi-shell .subtitle-template-card {
  border-color: rgba(34, 211, 238, 0.24);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.13)),
    rgba(5, 9, 21, 0.72);
  color: #f8fbff;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
}

.sci-fi-shell .subtitle-template-card:hover {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08), 0 18px 42px rgba(0, 0, 0, 0.22);
}

.sci-fi-shell .subtitle-template-preview {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.88) 100%),
    var(--template-image, radial-gradient(circle at 50% 18%, rgba(250, 204, 21, 0.2), transparent 32%)),
    linear-gradient(180deg, #111827, #030712);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--template-position, center center);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.16), 0 0 24px rgba(250, 204, 21, 0.08);
}

.sci-fi-shell .subtitle-template-copy b,
.sci-fi-shell .subtitle-caption-editor-card header span,
.sci-fi-shell .storyboard-binding-card header span {
  color: #f8fbff;
}

.sci-fi-shell .subtitle-template-copy small,
.sci-fi-shell .subtitle-caption-editor-card header small,
.sci-fi-shell .storyboard-binding-card header small {
  color: #8fa1bf;
}

.sci-fi-shell .subtitle-caption-row,
.sci-fi-shell .storyboard-binding-row {
  border-color: rgba(130, 156, 255, 0.16);
  background: rgba(5, 9, 21, 0.62);
}

.sci-fi-shell .subtitle-caption-index {
  color: #7dd3fc;
}

.sci-fi-shell .subtitle-keyword-chip {
  border-color: rgba(250, 204, 21, 0.28);
  background: rgba(250, 204, 21, 0.1);
  color: #fde68a;
}

.sci-fi-shell .subtitle-template-picker-overlay {
  background: rgba(3, 7, 18, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.sci-fi-shell .subtitle-template-picker-dialog {
  border-color: rgba(130, 156, 255, 0.2);
  background:
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(12, 20, 39, 0.98), rgba(5, 9, 21, 0.98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 0 42px rgba(34, 211, 238, 0.1);
}

.sci-fi-shell .subtitle-template-picker-dialog header,
.sci-fi-shell .subtitle-template-picker-dialog footer {
  border-color: rgba(130, 156, 255, 0.16);
}

.sci-fi-shell .subtitle-template-option {
  border-color: rgba(130, 156, 255, 0.16);
  background: rgba(5, 9, 21, 0.62);
  color: #f8fbff;
}

.sci-fi-shell .subtitle-template-option:hover,
.sci-fi-shell .subtitle-template-option.is-selected {
  border-color: rgba(34, 211, 238, 0.68);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.12), rgba(5, 9, 21, 0.72));
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08), 0 0 30px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .subtitle-template-option small,
.sci-fi-shell .subtitle-keyword-empty,
.sci-fi-shell .storyboard-binding-fields label {
  color: #8fa1bf;
}

.sci-fi-shell .subtitle-template-preview.template-bold-yellow {
  --template-image: url("assets/subtitle-templates/template-bold-yellow.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-clean-white {
  --template-image: url("assets/subtitle-templates/template-clean-white.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-news-blue {
  --template-image: url("assets/subtitle-templates/template-news-blue.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-pop-purple {
  --template-image: url("assets/subtitle-templates/template-pop-purple.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-black-gold {
  --template-image: url("assets/subtitle-templates/template-black-gold.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-lifestyle-cafe {
  --template-image: url("assets/subtitle-templates/template-lifestyle-cafe.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-study-green {
  --template-image: url("assets/subtitle-templates/template-study-green.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-interview-white {
  --template-image: url("assets/subtitle-templates/template-interview-white.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-mentor-cyan {
  --template-image: url("assets/subtitle-templates/template-mentor-cyan.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-fresh-flower {
  --template-image: url("assets/subtitle-templates/template-fresh-flower.jpg?v=20260702-3");
  --template-position: center center;
}

.sci-fi-shell .subtitle-template-preview.template-reference-locked-tech {
  --template-image: url("assets/subtitle-templates/template-mentor-cyan.jpg?v=20260702-3");
  --template-position: center center;
  --template-accent: #42e68b;
}

.sci-fi-shell .subtitle-template-action {
  background: rgba(248, 251, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(0,0,0,0.24);
}

.sci-fi-shell .subtitle-template-inspect-copy b {
  color: #f8fbff;
}

.sci-fi-shell .subtitle-template-inspect-copy small,
.sci-fi-shell .subtitle-template-inspect-copy p,
.sci-fi-shell .subtitle-template-editor-fields label {
  color: #8fa1bf;
}

.sci-fi-shell .subtitle-template-editor-fields input {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(5, 9, 21, 0.74);
  color: #f8fbff;
}

.sci-fi-shell .subtitle-template-editor-fields select {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(5, 9, 21, 0.74);
  color: #f8fbff;
}

.sci-fi-shell .template-editor-name-field input[readonly] {
  background: rgba(5, 9, 21, 0.64);
  color: #dce8ff;
}

.sci-fi-shell .template-editor-module-tabs {
  border-bottom-color: rgba(130, 156, 255, 0.16);
}

.sci-fi-shell .template-editor-module-tab {
  color: #8fa1bf;
}

.sci-fi-shell .template-editor-module-tab:hover {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
}

.sci-fi-shell .template-editor-module-tab.is-active {
  color: #f8fbff;
  background: rgba(139, 92, 246, 0.14);
}

.sci-fi-shell .cover-editor-panel {
  border-color: rgba(130, 156, 255, 0.18);
  background: linear-gradient(180deg, rgba(12, 20, 39, 0.88), rgba(5, 9, 21, 0.72));
}

.sci-fi-shell .caption-editor-sample {
  border-color: rgba(34, 211, 238, 0.18);
  box-shadow: inset 0 0 32px rgba(34, 211, 238, 0.08);
}

.sci-fi-shell .cover-editor-mode-switch {
  border-color: rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.58);
}

.sci-fi-shell .cover-editor-mode-button {
  color: #8fa1bf;
}

.sci-fi-shell .cover-editor-mode-button.is-active {
  color: #f8fbff;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.2), transparent 35%),
    linear-gradient(135deg, rgba(168, 85, 247, 0.86), rgba(14, 165, 233, 0.86));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2), 0 16px 34px rgba(34, 211, 238, 0.14);
}

.sci-fi-shell .cover-editor-panel header b {
  color: #f8fbff;
}

.sci-fi-shell .cover-editor-panel header small,
.sci-fi-shell .cover-editor-field span {
  color: #8fa1bf;
}

.sci-fi-shell .cover-editor-panel header > span {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
}

.sci-fi-shell .cover-editor-toggle {
  border-color: rgba(130, 156, 255, 0.16);
  background: rgba(5, 9, 21, 0.58);
}

.sci-fi-shell .subtitle-caption-toggle {
  border-color: rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.48);
  color: #dce8ff;
}

.sci-fi-shell .motion-preview-copy b {
  color: #f8fbff;
}

.sci-fi-shell .motion-preview-copy p,
.sci-fi-shell .motion-preview-copy small {
  color: #9fb3d8;
}

.sci-fi-shell .digital-human-segmented input:checked + span,
.sci-fi-shell .digital-human-resolution-options input:checked + span,
.sci-fi-shell .motion-module-grid input:checked + span,
.sci-fi-shell .loop-option input:checked + span,
.sci-fi-shell .publisher-target input:checked + span {
  border-color: rgba(34, 211, 238, 0.68);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.14);
}

.sci-fi-shell .voice-file-field,
.sci-fi-shell .digital-human-file-field {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
  color: #c8e7ff;
}

.sci-fi-shell .voice-file-field:hover,
.sci-fi-shell .digital-human-file-field:hover {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(34, 211, 238, 0.1);
}

.sci-fi-shell .render-status,
.sci-fi-shell .source-readiness,
.sci-fi-shell .publisher-readiness,
.sci-fi-shell .publisher-job-summary,
.sci-fi-shell .voice-library-summary,
.sci-fi-shell .digital-human-library-summary {
  border: 1px solid rgba(168, 85, 247, 0.32);
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.66);
}

.toast.show {
  color: #f8fbff;
}

@media (max-width: 1390px) {
  .sci-fi-shell .copywriting-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-orbit-track {
    overflow-x: auto;
    grid-template-columns: repeat(5, 132px);
    padding-bottom: 8px;
  }

  .workflow-orbit-track::before {
    left: 56px;
    right: 56px;
  }
}

@media (max-width: 1024px) {
  .app-shell.sci-fi-shell {
    grid-template-columns: 1fr;
  }

  .sci-fi-shell .sidebar {
    position: fixed;
    height: 100vh;
  }

  .workspace-shell-grid {
    padding: 12px;
  }

  .sci-fi-shell .topbar {
    padding: 0 12px;
  }

  .sci-fi-shell .top-section-nav {
    overflow-x: auto;
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .workflow-orbit-strip {
    padding: 14px;
    border-radius: 14px;
  }

  .workflow-orbit-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-orb {
    width: 88px;
    height: 88px;
  }

  .workflow-orbit-track::before {
    top: 44px;
  }

  .sci-fi-shell .copy-panel,
  .sci-fi-shell .av-panel {
    min-height: auto;
  }
}

/* 2026-06-30 audio and digital-human media picker */
.media-picker-entry {
  min-width: 0;
}

.media-picker-trigger {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(21, 32, 59, 0.94), rgba(8, 17, 35, 0.96));
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.media-picker-trigger:hover,
.media-picker-trigger:focus-visible {
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08), 0 12px 28px rgba(0, 0, 0, 0.24);
  outline: 0;
  transform: translateY(-1px);
}

.media-picker-trigger > i:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 11px;
  background: rgba(34, 211, 238, 0.09);
  color: #67e8f9;
  font-size: 20px;
}

.media-picker-trigger > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.media-picker-trigger b {
  color: #f7fbff;
  font-size: 13px;
}

.media-picker-trigger small,
.media-picker-selection-summary {
  overflow: hidden;
  color: #8293af;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker-trigger > i:last-child {
  color: #6f84a9;
  font-size: 20px;
}

.media-picker-selection-summary {
  min-height: 18px;
  padding: 2px 2px 0;
}

.media-picker-selection-summary.is-selected {
  color: #67e8f9;
}

.media-picker-overlay {
  position: fixed;
  z-index: 2400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 13, 0.76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.media-picker-overlay[hidden] {
  display: none;
}

.media-picker-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, calc(100vw - 48px));
  max-height: min(86dvh, 820px);
  overflow: hidden;
  border: 1px solid rgba(120, 150, 255, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(168, 85, 247, 0.13), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.11), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 45, 0.99), rgba(6, 11, 25, 0.99));
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.62), 0 0 50px rgba(34, 211, 238, 0.06);
}

.media-picker-header,
.media-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.media-picker-header {
  border-bottom: 1px solid rgba(130, 156, 255, 0.16);
}

.media-picker-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.media-picker-icon {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.18), rgba(34, 211, 238, 0.12));
  color: #67e8f9;
  font-size: 21px;
}

.media-picker-heading > div {
  min-width: 0;
}

.media-picker-eyebrow {
  color: #22d3ee;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.media-picker-heading h2 {
  margin: 3px 0 2px;
  color: #f8fbff;
  font-size: 20px;
}

.media-picker-heading p {
  margin: 0;
  color: #91a1bd;
  font-size: 12px;
}

.media-picker-close {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 11px;
  background: rgba(10, 18, 37, 0.88);
  color: #c7d4ea;
  font-size: 20px;
}

.media-picker-close:hover,
.media-picker-close:focus-visible {
  border-color: rgba(34, 211, 238, 0.5);
  color: #67e8f9;
  outline: 0;
}

.media-picker-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px;
}

.media-picker-group + .media-picker-group {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(130, 156, 255, 0.14);
}

.media-picker-group > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.media-picker-group h3,
.media-picker-group p {
  margin: 0;
}

.media-picker-group h3 {
  color: #edf5ff;
  font-size: 15px;
}

.media-picker-group p {
  margin-top: 4px;
  color: #7f91af;
  font-size: 11px;
}

.media-picker-group > header > span {
  padding: 4px 9px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.07);
  color: #67e8f9;
  font-size: 10px;
  white-space: nowrap;
}

.media-picker-voice-source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid rgba(110, 139, 210, 0.2);
  border-radius: 14px;
  background: rgba(5, 12, 27, 0.72);
}

.media-picker-voice-source-tabs button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #8fa1bf;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.media-picker-voice-source-tabs button > i {
  color: #6f83a5;
  font-size: 17px;
}

.media-picker-voice-source-tabs button > em {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(120, 150, 205, 0.1);
  color: #7f91af;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.media-picker-voice-source-tabs button:hover,
.media-picker-voice-source-tabs button:focus-visible {
  border-color: rgba(34, 211, 238, 0.3);
  color: #dbeafe;
  outline: 0;
}

.media-picker-voice-source-tabs button.is-active {
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.14));
  color: #f5fbff;
  box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.06);
}

.media-picker-voice-source-tabs button.is-active > i,
.media-picker-voice-source-tabs button.is-active > em {
  color: #67e8f9;
}

.media-picker-voice-source-tabs button.is-active > em {
  background: rgba(34, 211, 238, 0.12);
}

.media-picker-voice-grid {
  align-content: start;
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.media-picker-human-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.media-picker-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(110, 139, 210, 0.2);
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(18, 28, 53, 0.95), rgba(7, 14, 30, 0.96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.media-picker-card.is-selected {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.1), 0 15px 34px rgba(0, 0, 0, 0.3);
}

.media-picker-card-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 58px;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #dbe8fb;
  text-align: left;
}

.media-picker-card-select:hover,
.media-picker-card-select:focus-visible {
  background: rgba(34, 211, 238, 0.055);
  outline: 0;
}

.media-picker-card-select > span:not(.media-picker-card-icon) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.media-picker-card-select b,
.media-picker-card-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker-card-select b {
  color: #f5f9ff;
  font-size: 13px;
}

.media-picker-card-select small {
  color: #8294b2;
  font-size: 10px;
}

.media-picker-card-select > i {
  color: #607392;
  font-size: 19px;
}

.media-picker-card.is-selected .media-picker-card-select > i {
  color: #22d3ee;
}

.media-picker-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.1);
  color: #7dd3fc;
  font-size: 17px;
}

.media-picker-card-meta {
  margin: 0 12px 9px;
  color: #71829f;
  font-size: 10px;
}

.media-picker-audio-card audio,
.media-picker-lazy-preview {
  width: calc(100% - 24px);
  min-height: 40px;
  margin: 0 12px 12px;
}

.media-picker-audio-card audio {
  height: 40px;
}

.media-picker-lazy-preview {
  display: flex;
  align-items: center;
}

.media-picker-lazy-preview .ghost-button {
  min-height: 34px;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
}

.media-picker-lazy-preview .ghost-button:hover,
.media-picker-lazy-preview .ghost-button:focus-visible {
  border-color: rgba(34, 211, 238, 0.54);
  background: rgba(34, 211, 238, 0.13);
  outline: 0;
}

.media-picker-preview-error {
  color: #fda4af;
  font-size: 11px;
}

.media-picker-human-preview {
  position: relative;
  display: grid;
  min-height: 148px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(130, 156, 255, 0.16);
  background: #030713;
}

.media-picker-human-preview video {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #02050d;
}

.media-picker-human-preview > span {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(5, 10, 22, 0.78);
  color: #9beaf4;
  font-size: 9px;
  pointer-events: none;
}

.media-picker-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(130, 156, 255, 0.2);
  border-radius: 14px;
  background: rgba(7, 13, 28, 0.5);
  color: #7e90ad;
  font-size: 12px;
}

.media-picker-footer {
  border-top: 1px solid rgba(130, 156, 255, 0.16);
  background: rgba(5, 10, 22, 0.88);
}

.media-picker-footer > span {
  min-width: 0;
  overflow: hidden;
  color: #91a4c2;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.media-picker-footer button {
  min-width: 96px;
}

.media-picker-confirm:disabled {
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.5;
}

@media (max-width: 640px) {
  .media-picker-overlay {
    align-items: end;
    padding: 0;
  }

  .media-picker-dialog {
    width: 100%;
    max-height: min(92dvh, 820px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .media-picker-header,
  .media-picker-footer {
    padding: 14px;
  }

  .media-picker-heading p {
    display: none;
  }

  .media-picker-body {
    padding: 14px;
  }

  .media-picker-grid,
  .media-picker-human-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-picker-voice-source-tabs button {
    min-height: 42px;
    padding-inline: 10px;
  }

  .media-picker-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .media-picker-footer > div {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .media-picker-footer button {
    width: 100%;
    min-height: 44px;
  }
}

/* Dark-shell cleanup for native controls and legacy light cards */
.sci-fi-shell .digital-human-audio-upload {
  border-color: rgba(34, 211, 238, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.12), transparent 38%),
    rgba(5, 9, 21, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sci-fi-shell .digital-human-audio-upload small {
  color: #91a4c4;
}

.sci-fi-shell input[type="file"] {
  min-height: 36px;
  padding: 4px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 9px;
  background: rgba(5, 9, 21, 0.74);
  color: #dce8ff;
}

.sci-fi-shell input[type="file"]::file-selector-button,
.sci-fi-shell input[type="file"]::-webkit-file-upload-button {
  min-height: 28px;
  margin-right: 10px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(34, 211, 238, 0.16));
  color: #f8fbff;
  font-weight: 900;
  cursor: pointer;
}

.sci-fi-shell .preview-placeholder,
.sci-fi-shell .subtitle-motion-preview-strip img {
  border-color: rgba(130, 156, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(14, 20, 39, 0.96), rgba(7, 12, 27, 0.96)),
    rgba(5, 9, 21, 0.9);
  color: #92a5c5;
}

.sci-fi-shell .preview-placeholder {
  box-shadow: inset 0 0 40px rgba(34, 211, 238, 0.05);
}

.sci-fi-shell .motion-module-grid label {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 24, 46, 0.82), rgba(8, 13, 27, 0.88)),
    rgba(5, 9, 21, 0.74);
  color: #dce8ff;
}

.sci-fi-shell .motion-module-choice-card label {
  border: 0;
  background: transparent;
}

.sci-fi-shell .motion-module-grid input {
  accent-color: #22d3ee;
}

.sci-fi-shell .artifact-path {
  border-color: rgba(130, 156, 255, 0.18);
  background: rgba(5, 9, 21, 0.72);
  color: #b9c9e6;
}

.sci-fi-shell .publisher-platform,
.sci-fi-shell .publisher-job {
  border-color: rgba(130, 156, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 24, 46, 0.88), rgba(8, 13, 27, 0.92)),
    rgba(5, 9, 21, 0.78);
  color: #dce8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sci-fi-shell .publisher-platform:hover,
.sci-fi-shell .publisher-job:hover {
  border-color: rgba(34, 211, 238, 0.38);
  background:
    linear-gradient(180deg, rgba(20, 32, 60, 0.92), rgba(9, 16, 32, 0.94)),
    rgba(5, 9, 21, 0.84);
}

.sci-fi-shell .publisher-platform b,
.sci-fi-shell .publisher-job-copy b,
.sci-fi-shell .publisher-empty b {
  color: #f8fbff;
}

.sci-fi-shell .publisher-job-copy span,
.sci-fi-shell .publisher-empty span {
  color: #8fa1bf;
}

.sci-fi-shell .publisher-empty {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(5, 9, 21, 0.52);
}

.sci-fi-shell .publisher-job-actions button {
  border-color: rgba(130, 156, 255, 0.22);
  background: rgba(12, 20, 39, 0.76);
  color: #d9e6ff;
}

.sci-fi-shell .publisher-job-actions button:hover {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
}

.sci-fi-shell .publisher-job-actions button.primary {
  border-color: rgba(34, 211, 238, 0.52);
  background: linear-gradient(135deg, #d946ef 0%, #4f46e5 52%, #06b6d4 100%);
  color: #ffffff;
}

.sci-fi-shell .switch {
  background: rgba(130, 156, 255, 0.22);
}

.sci-fi-shell .switch::after {
  background: #dce8ff;
}

.sci-fi-shell .switch.on {
  background: linear-gradient(90deg, #d946ef, #22d3ee);
}

/* 2026-06-27 management page visual cleanup */
.sci-fi-shell .resource-library-workspace,
.sci-fi-shell .publish-account-workspace,
.sci-fi-shell .digital-human-manager-workspace,
.sci-fi-shell .voice-manager-workspace {
  align-content: start;
  gap: 16px;
  width: 100%;
  min-height: 0;
  padding: 0;
}

.sci-fi-shell .management-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 0;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(168, 85, 247, 0.18), transparent 34%),
    radial-gradient(circle at 82% 40%, rgba(34, 211, 238, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(14, 23, 47, 0.88), rgba(7, 12, 27, 0.78));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sci-fi-shell .management-page-header h2 {
  margin: 5px 0 0;
  color: #f8fbff;
  font-size: 22px;
  line-height: 1.2;
}

.sci-fi-shell .management-page-header p {
  max-width: 760px;
  margin: 6px 0 0;
  color: #91a4c4;
  line-height: 1.55;
}

.sci-fi-shell .workspace-kicker {
  color: #22d3ee;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sci-fi-shell .digital-human-manager-grid,
.sci-fi-shell .voice-manager-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  align-items: start;
  gap: 16px;
}

.sci-fi-shell .publish-account-layout {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  align-items: start;
  gap: 16px;
}

.sci-fi-shell .voice-library-panel,
.sci-fi-shell .voice-upload-panel,
.sci-fi-shell .digital-human-library-panel,
.sci-fi-shell .digital-human-upload-panel,
.sci-fi-shell .publish-account-list-panel,
.sci-fi-shell .publish-account-form-panel {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border-radius: 18px;
}

.sci-fi-shell .voice-library-panel,
.sci-fi-shell .digital-human-library-panel,
.sci-fi-shell .publish-account-list-panel {
  min-height: 270px;
}

.sci-fi-shell .voice-upload-panel,
.sci-fi-shell .digital-human-upload-panel,
.sci-fi-shell .publish-account-form-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sci-fi-shell .resource-library-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 24, 46, 0.76), rgba(8, 13, 27, 0.82)),
    rgba(5, 9, 21, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  scrollbar-width: none;
}

.sci-fi-shell .resource-library-toolbar::-webkit-scrollbar {
  display: none;
}

.sci-fi-shell .resource-filter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 999px;
  background: rgba(5, 9, 21, 0.72);
  color: #c8d8f4;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.sci-fi-shell .resource-filter:hover,
.sci-fi-shell .resource-filter.active {
  border-color: rgba(34, 211, 238, 0.62);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.24), rgba(34, 211, 238, 0.13));
  color: #a5f3fc;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.13);
}

.sci-fi-shell .resource-library-list {
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.sci-fi-shell .resource-library-card,
.sci-fi-shell .voice-library-card,
.sci-fi-shell .digital-human-card,
.sci-fi-shell .publish-account-card {
  border-color: rgba(130, 156, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(15, 24, 46, 0.86), rgba(8, 13, 27, 0.92)),
    rgba(5, 9, 21, 0.82);
  color: #dce8ff;
}

.sci-fi-shell .voice-library-card,
.sci-fi-shell .digital-human-card {
  border-radius: 16px;
}

.sci-fi-shell .voice-library-card.is-selected,
.sci-fi-shell .digital-human-card.is-selected {
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08), 0 0 26px rgba(34, 211, 238, 0.12);
}

.sci-fi-shell .digital-human-card-preview {
  background:
    radial-gradient(circle at 50% 12%, rgba(34, 211, 238, 0.14), transparent 38%),
    rgba(6, 12, 26, 0.94);
}

.sci-fi-shell .digital-human-card-title span {
  color: #67e8f9;
}

.sci-fi-shell .voice-library-card-meta span,
.sci-fi-shell .digital-human-card-meta span,
.sci-fi-shell .publish-account-meta span,
.sci-fi-shell .publish-account-links span,
.sci-fi-shell .publish-account-links a {
  border: 1px solid rgba(130, 156, 255, 0.14);
  background: rgba(34, 211, 238, 0.08);
  color: #a9bbd6;
}

.sci-fi-shell .voice-library-card audio {
  width: 100%;
  border-radius: 999px;
  opacity: 0.88;
}

.sci-fi-shell .voice-source-tabs {
  border-color: rgba(130, 156, 255, 0.2);
  background: rgba(3, 8, 21, 0.72);
}

.sci-fi-shell .voice-source-tabs button {
  color: #8295b3;
}

.sci-fi-shell .voice-source-tabs button.is-active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(34, 211, 238, 0.18));
  color: #e8f5ff;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28), 0 8px 22px rgba(4, 12, 30, 0.34);
}

.sci-fi-shell .voice-status.is-official {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.sci-fi-shell .voice-file-field,
.sci-fi-shell .digital-human-file-field {
  min-height: 132px;
  border-radius: 16px;
  border-color: rgba(34, 211, 238, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.16), transparent 42%),
    rgba(7, 16, 34, 0.72);
}

.sci-fi-shell .voice-file-field i,
.sci-fi-shell .digital-human-file-field i {
  color: #67e8f9;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.42));
}

.sci-fi-shell .digital-human-profile-picker {
  gap: 12px;
}

.sci-fi-shell .digital-human-profile-picker > div > span {
  color: #9fb2cf;
}

.sci-fi-shell .digital-human-segmented,
.sci-fi-shell .digital-human-resolution-options {
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 14px;
  background: rgba(5, 9, 21, 0.72);
}

.sci-fi-shell .digital-human-segmented label span,
.sci-fi-shell .digital-human-resolution-options label span {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c8d8f4;
}

.sci-fi-shell .digital-human-resolution-options label span {
  min-height: 38px;
}

.sci-fi-shell .digital-human-segmented input:checked + span,
.sci-fi-shell .digital-human-resolution-options input:checked + span {
  border-color: rgba(34, 211, 238, 0.66);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(34, 211, 238, 0.16));
  color: #e8fbff;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sci-fi-shell .digital-human-constraints,
.sci-fi-shell .voice-constraints {
  gap: 8px;
}

.sci-fi-shell .digital-human-constraints span,
.sci-fi-shell .voice-constraints span {
  min-height: 30px;
  align-items: center;
  border-radius: 10px;
}

.sci-fi-shell .publish-account-default {
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 9, 21, 0.58);
  color: #dce8ff;
}

.sci-fi-shell .publish-account-default input {
  width: 16px;
  height: 16px;
  accent-color: #22d3ee;
}

.sci-fi-shell .publish-account-default span {
  min-width: 0;
}

.sci-fi-shell .publish-account-card {
  border-radius: 16px;
}

.sci-fi-shell .publish-account-card.is-default {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.11);
}

@media (max-width: 1200px) {
  .sci-fi-shell .digital-human-manager-grid,
  .sci-fi-shell .voice-manager-grid,
  .sci-fi-shell .publish-account-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sci-fi-shell .management-page-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .sci-fi-shell .resource-library-toolbar {
    width: 100%;
  }

  .sci-fi-shell .resource-library-workspace,
  .sci-fi-shell .publish-account-workspace,
  .sci-fi-shell .digital-human-manager-workspace,
  .sci-fi-shell .voice-manager-workspace {
    padding: 0;
  }
}

/* 2026-06-27 progress visual cleanup */
.sci-fi-shell .extract-progress,
.sci-fi-shell .generation-progress {
  position: relative;
  overflow: hidden;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(130, 156, 255, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 70, 239, 0.16), transparent 35%),
    radial-gradient(circle at 92% 70%, rgba(34, 211, 238, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 24, 46, 0.88), rgba(7, 12, 27, 0.92));
  color: #dce8ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sci-fi-shell .extract-progress::before,
.sci-fi-shell .generation-progress::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d946ef, #60a5fa, #22d3ee);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

.sci-fi-shell .extract-progress-meta,
.sci-fi-shell .generation-progress-meta {
  position: relative;
  z-index: 1;
  color: #dce8ff;
}

.sci-fi-shell .extract-progress-meta span,
.sci-fi-shell .generation-progress-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #dce8ff;
  line-height: 1.35;
}

.sci-fi-shell .extract-progress-meta span::before,
.sci-fi-shell .generation-progress-meta span::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.72);
}

.sci-fi-shell .extract-progress-meta b,
.sci-fi-shell .generation-progress-meta b {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.08);
}

.sci-fi-shell .extract-progress-track,
.sci-fi-shell .generation-progress-track {
  position: relative;
  z-index: 1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(12, 20, 39, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(130, 156, 255, 0.16),
    inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.sci-fi-shell .extract-progress-track::after,
.sci-fi-shell .generation-progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.35;
  transform: translateX(-100%);
  animation: progress-sheen 2.4s ease-in-out infinite;
}

.sci-fi-shell .extract-progress-fill,
.sci-fi-shell .generation-progress-fill {
  position: relative;
  z-index: 1;
  min-width: 2px;
  background: linear-gradient(90deg, #d946ef 0%, #60a5fa 48%, #22d3ee 100%);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.62), 0 0 30px rgba(217, 70, 239, 0.22);
}

.sci-fi-shell .extract-progress:not(.is-complete):not(.is-error) .extract-progress-fill,
.sci-fi-shell .generation-progress.is-running .generation-progress-fill {
  animation: neon-progress-pulse 1.8s ease-in-out infinite;
}

.sci-fi-shell .extract-progress.is-complete,
.sci-fi-shell .generation-progress.is-complete {
  border-color: rgba(103, 232, 141, 0.36);
  background:
    radial-gradient(circle at 12% 0%, rgba(103, 232, 141, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(12, 42, 34, 0.72), rgba(7, 12, 27, 0.9));
}

.sci-fi-shell .extract-progress.is-complete::before,
.sci-fi-shell .generation-progress.is-complete::before,
.sci-fi-shell .extract-progress.is-complete .extract-progress-fill,
.sci-fi-shell .generation-progress.is-complete .generation-progress-fill {
  background: linear-gradient(90deg, #67e88d, #22d3ee);
}

.sci-fi-shell .extract-progress.is-complete .extract-progress-meta b,
.sci-fi-shell .generation-progress.is-complete .generation-progress-meta b {
  border-color: rgba(103, 232, 141, 0.24);
  background: rgba(103, 232, 141, 0.1);
  color: #86efac;
}

.sci-fi-shell .extract-progress.is-error,
.sci-fi-shell .generation-progress.is-error {
  border-color: rgba(251, 113, 133, 0.38);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 113, 133, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(45, 18, 30, 0.78), rgba(7, 12, 27, 0.92));
}

.sci-fi-shell .extract-progress.is-error::before,
.sci-fi-shell .generation-progress.is-error::before,
.sci-fi-shell .extract-progress.is-error .extract-progress-fill,
.sci-fi-shell .generation-progress.is-error .generation-progress-fill {
  background: linear-gradient(90deg, #fb7185, #f97316);
}

.sci-fi-shell .extract-progress.is-error .extract-progress-meta b,
.sci-fi-shell .generation-progress.is-error .generation-progress-meta b {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.11);
  color: #fda4af;
}

@keyframes progress-sheen {
  0% { transform: translateX(-100%); }
  45%, 100% { transform: translateX(100%); }
}

@keyframes neon-progress-pulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.22);
  }
}

/* 2026-06-27 prominent popup toast cleanup */
.toast {
  z-index: 120;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.11), transparent 36%),
    radial-gradient(circle at 50% 40%, rgba(217, 70, 239, 0.12), transparent 28%),
    rgba(2, 6, 23, 0.64);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  width: min(560px, calc(100vw - 36px));
  min-height: 92px;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 70, 239, 0.24), transparent 36%),
    radial-gradient(circle at 92% 84%, rgba(34, 211, 238, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(14, 23, 47, 0.98), rgba(6, 11, 25, 0.98));
  color: #f8fbff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 28px 100px rgba(0, 0, 0, 0.62),
    0 0 46px rgba(34, 211, 238, 0.2),
    0 0 70px rgba(168, 85, 247, 0.16);
  transform: translateY(8px) scale(0.98);
}

.toast.show .toast-card {
  animation: toast-pop-in 0.2s ease forwards;
}

.toast-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d946ef, #60a5fa, #22d3ee);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.72);
}

.toast-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 156, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 156, 255, 0.055) 1px, transparent 1px),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  background-size: 28px 28px, 28px 28px, 160% 100%;
  background-position: 0 0, 0 0, -80% 0;
  opacity: 0.7;
}

.toast-icon,
.toast-message,
.toast-card .toast-dismiss {
  position: relative;
  z-index: 1;
}

.toast-icon {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(96, 165, 250, 0.72), rgba(168, 85, 247, 0.66));
  color: #ffffff;
  font-size: 24px;
  box-shadow:
    0 0 0 7px rgba(34, 211, 238, 0.08),
    0 0 28px rgba(34, 211, 238, 0.36);
}

.toast-message {
  color: #f8fbff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.13);
}

.toast-card .toast-dismiss {
  min-height: 38px;
  padding-inline: 16px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.34), rgba(34, 211, 238, 0.18));
  color: #e8fbff;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}

.toast-card .toast-dismiss:hover {
  border-color: rgba(34, 211, 238, 0.62);
  background: linear-gradient(135deg, #d946ef, #4f46e5 52%, #06b6d4);
  color: #ffffff;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
}

@keyframes toast-pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .toast-card {
    grid-template-columns: 44px minmax(0, 1fr);
    width: min(100%, calc(100vw - 24px));
    padding: 16px;
  }

  .toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .toast-card .toast-dismiss {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }
}

/* 2026-06-29 mobile responsive creator shell */
@media (max-width: 760px) {
  body {
    min-width: 0;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -8%, rgba(79, 70, 229, 0.22), transparent 34%),
      radial-gradient(circle at 94% 16%, rgba(34, 211, 238, 0.12), transparent 28%),
      var(--bg);
  }

  .app-shell.sci-fi-shell {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .sci-fi-shell .workspace {
    min-width: 0;
  }

  .workspace-shell-grid {
    gap: 12px;
    min-height: auto;
    padding: 12px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .sci-fi-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    min-height: 58px;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(130, 156, 255, 0.18);
    background:
      linear-gradient(180deg, rgba(7, 12, 27, 0.96), rgba(7, 12, 27, 0.84)),
      rgba(5, 9, 21, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .sci-fi-shell .mobile-sidebar-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.08);
  }

  .sci-fi-shell .top-section-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 0;
    z-index: 82;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    width: auto;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border: 1px solid rgba(130, 156, 255, 0.24);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background:
      radial-gradient(circle at 22% 0%, rgba(217, 70, 239, 0.18), transparent 36%),
      radial-gradient(circle at 86% 100%, rgba(34, 211, 238, 0.14), transparent 40%),
      linear-gradient(180deg, rgba(14, 23, 47, 0.98), rgba(5, 9, 21, 0.98));
    box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: visible;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .sci-fi-shell .top-section-button {
    flex: none;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 6px 3px;
    border-radius: 16px;
    color: #9fb2d2;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }

  .sci-fi-shell .top-section-button i {
    margin: 0;
    font-size: 19px;
  }

  .sci-fi-shell .top-section-button span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sci-fi-shell .top-section-button.active {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.3), rgba(34, 211, 238, 0.14));
    color: #e8fbff;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.15);
  }

  .sci-fi-shell .account-menu {
    margin-left: auto;
  }

  .sci-fi-shell .account-menu-toggle {
    grid-template-columns: 32px 16px;
    max-width: 58px;
    min-height: 42px;
    padding: 4px 7px 4px 5px;
    border-color: rgba(130, 156, 255, 0.28);
    background: rgba(12, 20, 39, 0.72);
    color: #dce8ff;
  }

  .sci-fi-shell .account-menu-toggle .account-menu-copy {
    display: none;
  }

  .sci-fi-shell .account-menu-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    width: min(308px, calc(100vw - 24px));
  }

  .content-command-deck,
  .sci-fi-shell .copywriting-workspace,
  .sci-fi-shell .title-topic-fields,
  .sci-fi-shell .audio-video-grid,
  .sci-fi-shell .subtitle-motion-grid,
  .sci-fi-shell .publisher-grid,
  .sci-fi-shell .publisher-field-grid,
  .sci-fi-shell .publisher-platform-list,
  .sci-fi-shell .digital-human-manager-grid,
  .sci-fi-shell .voice-manager-grid,
  .sci-fi-shell .publish-account-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-orbit-strip {
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .workflow-orbit-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .workflow-orbit-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .workflow-orbit-track::-webkit-scrollbar {
    display: none;
  }

  .workflow-orbit-track::before {
    display: none;
  }

  .workflow-orbit-step {
    scroll-snap-align: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1px solid rgba(130, 156, 255, 0.14);
    border-radius: 16px;
    background: rgba(5, 9, 21, 0.44);
  }

  .workflow-orb {
    width: 54px;
    height: 54px;
    box-shadow:
      0 0 0 5px rgba(96, 165, 250, 0.05),
      0 0 22px rgba(96, 165, 250, 0.24),
      inset 0 0 14px rgba(96, 165, 250, 0.28);
  }

  .workflow-orb::before {
    inset: 6px;
  }

  .workflow-orb::after {
    inset: 12px;
  }

  .workflow-orb i {
    font-size: 22px;
  }

  .workflow-orbit-step b {
    font-size: 12px;
  }

  .workflow-orbit-step small {
    font-size: 10px;
  }

  .sci-fi-shell .copy-panel,
  .sci-fi-shell .title-topic-panel,
  .sci-fi-shell .av-panel,
  .sci-fi-shell .subtitle-motion-source,
  .sci-fi-shell .subtitle-motion-output,
  .sci-fi-shell .publisher-settings,
  .sci-fi-shell .publisher-jobs,
  .sci-fi-shell .publish-account-list-panel,
  .sci-fi-shell .publish-account-form-panel,
  .sci-fi-shell .digital-human-library-panel,
  .sci-fi-shell .digital-human-upload-panel,
  .sci-fi-shell .voice-library-panel,
  .sci-fi-shell .voice-upload-panel {
    min-height: 0;
    padding: 14px;
    border-radius: 18px;
  }

  .sci-fi-shell .copy-editor {
    min-height: 220px;
  }

  .sci-fi-shell .title-topic-field input,
  .sci-fi-shell input:not([type="checkbox"]):not([type="radio"]),
  .sci-fi-shell select {
    min-height: 44px;
    font-size: 14px;
  }

  .sci-fi-shell .primary-button,
  .sci-fi-shell .primary,
  .sci-fi-shell .full-button {
    min-height: 46px;
    border-radius: 14px;
  }

  .sci-fi-shell .extract-progress,
  .sci-fi-shell .generation-progress {
    padding: 10px 10px 10px 13px;
    border-radius: 14px;
  }

  .sci-fi-shell .audio-preview,
  .sci-fi-shell .digital-human-stage,
  .sci-fi-shell .subtitle-motion-stage {
    min-height: 280px;
    border-radius: 16px;
  }

  .sci-fi-shell .phone-preview {
    width: min(240px, 74vw);
    max-width: 100%;
    aspect-ratio: 9 / 16;
    margin-inline: auto;
  }

  .sci-fi-shell .phone-preview.has-landscape-media {
    aspect-ratio: 9 / 16;
    background:
      linear-gradient(180deg, rgba(1, 5, 14, 0.98), rgba(5, 9, 21, 0.98)),
      #020617;
  }

  .sci-fi-shell .phone-preview .generated-video,
  .sci-fi-shell .phone-preview.has-landscape-media .generated-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
  }

  .sci-fi-shell .subtitle-motion-preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sci-fi-shell .resource-library-header,
  .sci-fi-shell .publish-account-header,
  .sci-fi-shell .digital-human-manager-header,
  .sci-fi-shell .voice-manager-header,
  .sci-fi-shell .subtitle-motion-header,
  .sci-fi-shell .publisher-header,
  .sci-fi-shell .section-heading,
  .sci-fi-shell .copywriting-titlebar,
  .sci-fi-shell .title-topic-header,
  .sci-fi-shell .av-panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .sci-fi-shell .management-page-header {
    padding: 14px;
    border-radius: 18px;
    background:
      radial-gradient(circle at 16% 0%, rgba(217, 70, 239, 0.14), transparent 34%),
      radial-gradient(circle at 88% 50%, rgba(34, 211, 238, 0.1), transparent 38%),
      rgba(7, 12, 27, 0.54);
  }

  .sci-fi-shell .resource-library-toolbar {
    width: 100%;
    max-width: 100%;
    padding: 6px;
    overflow-x: auto;
  }

  .sci-fi-shell .resource-filter {
    min-height: 34px;
    padding-inline: 12px;
  }

  .sci-fi-shell .resource-library-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .sci-fi-shell .resource-library-card,
  .sci-fi-shell .voice-library-card,
  .sci-fi-shell .digital-human-card,
  .sci-fi-shell .publish-account-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .sci-fi-shell .resource-library-card-actions,
  .sci-fi-shell .voice-card-actions,
  .sci-fi-shell .digital-human-card-actions,
  .sci-fi-shell .publish-account-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sci-fi-shell .resource-library-card-actions button,
  .sci-fi-shell .voice-card-actions button,
  .sci-fi-shell .digital-human-card-actions button,
  .sci-fi-shell .publish-account-actions button {
    flex: 1 1 calc(50% - 4px);
    min-height: 38px;
  }

  .sci-fi-shell .voice-library-card audio {
    grid-column: 1 / -1;
  }

  .sci-fi-shell .digital-human-card-preview {
    width: 42px;
    min-height: 72px;
    border-radius: 12px;
  }

  .sci-fi-shell .voice-file-field,
  .sci-fi-shell .digital-human-file-field {
    min-height: 112px;
  }

  .sci-fi-shell .digital-human-segmented,
  .sci-fi-shell .digital-human-resolution-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sci-fi-shell .digital-human-constraints,
  .sci-fi-shell .voice-constraints {
    grid-template-columns: minmax(0, 1fr);
  }

  .sci-fi-shell .publisher-platform,
  .sci-fi-shell .publisher-job {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .sci-fi-shell .publisher-job-actions {
    grid-column: 1 / -1;
  }

  .resource-preview-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .sci-fi-shell .resource-preview-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border-inline: 0;
  }

  .sci-fi-shell .resource-preview-header {
    padding: 14px;
  }

  .sci-fi-shell .resource-preview-header h2 {
    max-width: calc(100vw - 96px);
    font-size: 16px;
  }

  .sci-fi-shell .resource-preview-body {
    max-height: none;
    padding: 12px;
  }

  .resource-preview-json {
    min-height: calc(100dvh - 140px);
    font-size: 13px;
    line-height: 1.7;
  }
}

@media (max-width: 520px) {
  .sci-fi-shell .top-section-nav {
    left: 6px;
    right: 6px;
    gap: 2px;
    padding-inline: 6px;
  }

  .sci-fi-shell .top-section-button {
    min-height: 52px;
    padding-inline: 2px;
    font-size: 10px;
  }

  .workspace-shell-grid {
    padding: 10px;
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .workflow-orbit-track {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
  }

  .sci-fi-shell .motion-module-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sci-fi-shell .motion-module-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sci-fi-shell .motion-module-card {
    gap: 7px;
    padding: 8px;
  }

  .sci-fi-shell .motion-module-card label {
    min-height: 42px;
  }

  .sci-fi-shell .motion-preview-button {
    min-height: 34px;
    padding-inline: 8px;
  }

  .subtitle-template-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 84px;
    padding: 10px;
  }

  .subtitle-template-preview {
    width: 52px;
    border-radius: 10px;
  }

  .subtitle-template-card .subtitle-template-preview {
    --preview-scale: 0.16;
  }

  .subtitle-template-actions {
    position: static;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subtitle-template-action {
    border: 1px solid rgba(130, 156, 255, 0.22);
    padding: 8px 6px;
    font-size: 11px;
  }

  .subtitle-template-inspect-body,
  .subtitle-template-editor-body {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 16px;
  }

  .subtitle-template-editor-body {
    max-height: none;
    overflow: auto;
  }

  .subtitle-template-editor-fields {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .cover-editor-panel {
    max-height: none;
    overflow-y: visible;
  }

  .subtitle-template-preview-stage {
    position: static;
    top: auto;
    width: 100%;
    min-height: auto;
    max-height: none;
  }

  .subtitle-template-preview-large {
    width: min(240px, 72vw);
    min-height: 390px;
  }

  .subtitle-template-editor-body .subtitle-template-preview-large {
    width: min(260px, 76vw);
    height: min(462px, calc(100vh - 240px));
    min-height: 0;
  }

  .subtitle-caption-row,
  .storyboard-binding-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .storyboard-binding-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .subtitle-caption-actions,
  .storyboard-binding-actions {
    justify-content: flex-start;
  }

  .subtitle-template-picker-overlay {
    padding: 0;
    align-items: end;
  }

  .subtitle-template-picker-dialog {
    width: 100%;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
  }

  .sci-fi-shell .digital-human-segmented,
  .sci-fi-shell .digital-human-resolution-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sci-fi-shell .resource-library-card,
  .sci-fi-shell .voice-library-card,
  .sci-fi-shell .digital-human-card,
  .sci-fi-shell .publish-account-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .sci-fi-shell .resource-library-card-actions button,
  .sci-fi-shell .voice-card-actions button,
  .sci-fi-shell .digital-human-card-actions button,
  .sci-fi-shell .publish-account-actions button {
    flex-basis: 100%;
  }
}

/* 2026-06-29 persistent mobile workflow drawer */
@media (max-width: 1024px) {
  body.sidebar-drawer-open {
    overflow: hidden;
  }

  .sci-fi-shell .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 96;
    display: flex;
    width: min(304px, 86vw);
    max-width: calc(100vw - 36px);
    height: 100dvh;
    overflow-y: auto;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.52);
    transform: translateX(-106%);
    transition: transform 0.22s ease;
  }

  body.sidebar-drawer-open .sci-fi-shell .sidebar {
    transform: translateX(0);
  }

  .sci-fi-shell .mobile-sidebar-toggle {
    display: inline-grid !important;
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(217, 70, 239, 0.28), rgba(34, 211, 238, 0.16)),
      rgba(7, 12, 27, 0.96);
    color: #e8fbff;
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.38),
      0 0 24px rgba(34, 211, 238, 0.2);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body.sidebar-drawer-open .mobile-sidebar-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .sci-fi-shell .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 94;
    display: block;
    width: 100%;
    border: 0;
    background: rgba(2, 6, 23, 0.68);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  .sci-fi-shell .topbar {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    min-height: calc(70px + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }

  .sci-fi-shell .mobile-topbar-brand {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-self: center;
    gap: 9px;
    min-width: 0;
  }

  .sci-fi-shell .mobile-topbar-brand img {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.2);
  }

  .sci-fi-shell .mobile-topbar-brand span {
    display: grid;
    min-width: 0;
  }

  .sci-fi-shell .mobile-topbar-brand strong {
    overflow: hidden;
    background: linear-gradient(135deg, #f0abfc 0%, #60a5fa 52%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sci-fi-shell .mobile-topbar-brand small {
    color: #8ea1c1;
    font-size: 10px;
    line-height: 1.3;
  }

  .sci-fi-shell .topbar > .account-menu {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
  }

  .sci-fi-shell .account-menu-toggle {
    grid-template-columns: 34px;
    justify-items: center;
    width: 42px;
    max-width: 42px;
    min-height: 42px;
    padding: 3px;
    border-radius: 50%;
  }

  .sci-fi-shell .account-menu-toggle .account-menu-copy,
  .sci-fi-shell .account-menu-toggle > i {
    display: none;
  }

  .sci-fi-shell .account-menu-toggle .account-avatar-frame {
    display: block;
  }

  .sci-fi-shell .top-section-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
}

/* 2026-06-29 commercial mobile two-tier header */
@media (max-width: 760px) {
  .sci-fi-shell .topbar {
    grid-template-rows: auto;
    min-height: calc(62px + env(safe-area-inset-top));
    background: rgba(6, 10, 22, 0.98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .sci-fi-shell .top-section-nav {
    grid-row: auto;
    width: auto;
  }
}

/* 2026-06-29 commercial mobile library cards */
@media (max-width: 760px) {
  .sci-fi-shell .voice-list,
  .sci-fi-shell .digital-human-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .sci-fi-shell .voice-library-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .sci-fi-shell .voice-library-card-title {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sci-fi-shell .voice-library-card-title b {
    flex: 1 1 160px;
    line-height: 1.45;
  }

  .sci-fi-shell .voice-card-actions,
  .sci-fi-shell .digital-human-card-actions {
    grid-column: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .sci-fi-shell .voice-card-actions button,
  .sci-fi-shell .digital-human-card-actions button {
    flex: 0 0 auto;
    min-height: 32px;
  }

  .sci-fi-shell .voice-library-card-meta {
    gap: 6px;
  }

  .sci-fi-shell .voice-library-card audio,
  .sci-fi-shell .voice-select {
    grid-column: 1;
  }

  .sci-fi-shell .voice-library-card audio {
    height: 40px;
  }

  .sci-fi-shell .voice-select {
    min-height: 40px;
  }

  .sci-fi-shell .digital-human-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0;
    min-height: 164px;
    padding: 0;
  }

  .sci-fi-shell .digital-human-card-preview {
    width: auto;
    min-height: 164px;
    border-radius: 0;
  }

  .sci-fi-shell .digital-human-card-body {
    gap: 10px;
    padding: 12px;
  }

  .sci-fi-shell .digital-human-card-title {
    gap: 8px;
  }

  .sci-fi-shell .digital-human-select {
    width: 100%;
    min-height: 38px;
  }

  .sci-fi-shell .resource-library-card,
  .sci-fi-shell .resource-library-card.is-selectable {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .sci-fi-shell .resource-library-card.is-selectable {
    padding-top: 52px;
  }

  .sci-fi-shell .resource-library-card-select {
    position: absolute;
    top: 12px;
    left: 12px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
  }

  .sci-fi-shell .resource-library-card-body {
    min-width: 0;
  }

  .sci-fi-shell .resource-library-card-title {
    align-items: flex-start;
  }

  .sci-fi-shell .resource-library-card-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .sci-fi-shell .resource-library-card-actions button {
    width: 100%;
    min-height: 36px;
  }

  .sci-fi-shell .resource-library-card-actions .resource-reuse {
    grid-column: 1 / -1;
  }
}

/* 2026-06-29 orientation-aware digital human previews */
@media (max-width: 760px) {
  .sci-fi-shell .digital-human-card.is-landscape {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .sci-fi-shell .digital-human-card.is-landscape .digital-human-card-preview {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .sci-fi-shell .digital-human-card.is-portrait {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 184px;
  }

  .sci-fi-shell .digital-human-card.is-portrait .digital-human-card-preview {
    width: 104px;
    min-height: 184px;
    aspect-ratio: 9 / 16;
  }

  .sci-fi-shell .digital-human-card.is-square {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 150px;
  }

  .sci-fi-shell .digital-human-card.is-square .digital-human-card-preview {
    width: 112px;
    min-height: 150px;
    aspect-ratio: 1 / 1;
  }

  .sci-fi-shell .digital-human-card.is-landscape .digital-human-card-body {
    min-height: 158px;
  }

  .sci-fi-shell .digital-human-orientation-badge {
    max-width: calc(100% - 50px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sci-fi-shell .digital-human-preview-player {
    min-height: calc(100dvh - 122px);
    border: 0;
    border-radius: 14px;
  }

  .sci-fi-shell .digital-human-preview-player video,
  .sci-fi-shell .digital-human-preview-player.is-portrait video {
    width: 100%;
    height: 100%;
    max-height: calc(100dvh - 122px);
    object-fit: contain;
  }
}

/* 2026-07-01 audio video workspace precedence */
.sci-fi-shell .spoken-script-panel {
  min-height: 680px;
}

@media (max-width: 1180px) {
  .sci-fi-shell .audio-video-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr);
  }

  .sci-fi-shell .spoken-script-panel {
    grid-column: 1 / -1;
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .sci-fi-shell .audio-video-grid {
    grid-template-columns: 1fr;
  }

  .sci-fi-shell .spoken-script-panel {
    grid-column: auto;
    min-height: 0;
  }

  .sci-fi-shell .digital-human-audio-upload .ghost-button {
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }
}

/* Keep the subtitle console layout above the legacy sci-fi grid precedence. */
.sci-fi-shell .smart-editing-layout {
  grid-template-columns: minmax(360px, 0.82fr) minmax(540px, 1.18fr);
  grid-template-areas:
    "config production"
    "storyboard production";
}

@media (max-width: 1180px) {
  .sci-fi-shell .smart-editing-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "config"
      "production"
      "storyboard";
  }

  .sci-fi-shell .smart-editing-layout .subtitle-motion-production-column {
    position: static;
  }
}

/* 2026-07-23 material-first smart montage workspace */
.sci-fi-shell .smart-montage-workspace {
  display: grid;
  align-content: start;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.sci-fi-shell .smart-montage-header {
  align-items: center;
}

.smart-montage-header-badge,
.montage-template-selected-label,
.montage-source-count,
.montage-analysis-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.smart-montage-intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 16px;
  min-width: 0;
}

.sci-fi-shell .smart-montage-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(130, 156, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.09), transparent 35%),
    linear-gradient(180deg, rgba(14, 23, 47, 0.88), rgba(7, 12, 27, 0.9));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sci-fi-shell .smart-montage-panel .section-heading {
  align-items: center;
  margin-bottom: 14px;
}

.sci-fi-shell .smart-montage-panel .section-heading > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 10px;
}

.sci-fi-shell .smart-montage-panel .section-heading h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 16px;
}

.sci-fi-shell .smart-montage-panel .section-heading small {
  grid-column: 2;
  margin-top: 3px;
  color: #8295b7;
  line-height: 1.45;
}

.smart-montage-step {
  grid-row: 1 / span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(34, 211, 238, 0.18));
  color: #8befff;
  font-size: 11px;
  font-weight: 900;
}

.montage-source-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 12px;
  background: rgba(3, 8, 21, 0.58);
  scrollbar-width: none;
}

.montage-source-tabs::-webkit-scrollbar {
  display: none;
}

.montage-source-tabs button {
  flex: 1 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #8194b6;
  font-size: 12px;
  font-weight: 800;
}

.montage-source-tabs button:hover,
.montage-source-tabs button.is-active {
  border-color: rgba(34, 211, 238, 0.25);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.12));
  color: #effaff;
}

/* MoneyPrinterTurbo workbench */
.sci-fi-shell .mpt-workspace {
  padding: 14px;
}

.sci-fi-shell .mpt-header {
  min-height: 104px;
  margin-bottom: 12px;
  padding: 20px 24px;
  background:
    radial-gradient(circle at 84% 20%, rgba(24, 199, 229, 0.15), transparent 30%),
    linear-gradient(115deg, rgba(22, 29, 65, 0.97), rgba(7, 22, 42, 0.98));
}

.mpt-stage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid rgba(106, 146, 204, 0.2);
  border-radius: 15px;
  background: rgba(6, 15, 34, 0.78);
}

.mpt-stage-strip span {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #70869f;
  border-radius: 10px;
  font-size: 12px;
}

.mpt-stage-strip span.is-active {
  color: #dffcff;
  background: linear-gradient(110deg, rgba(132, 58, 220, 0.22), rgba(21, 187, 221, 0.16));
  box-shadow: inset 0 0 0 1px rgba(80, 214, 242, 0.16);
}

.mpt-stage-strip i {
  color: #4bdcf1;
  font-size: 16px;
}

.mpt-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(320px, 1.35fr) minmax(250px, 0.9fr) minmax(270px, 0.95fr);
  gap: 12px;
  align-items: stretch;
}

.mpt-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(109, 147, 201, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 25, 52, 0.98), rgba(5, 14, 32, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 12px 28px rgba(0, 0, 0, 0.15);
}

.mpt-panel-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(121, 156, 208, 0.13);
}

.mpt-panel-heading > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #59e4f6;
  border: 1px solid rgba(61, 217, 243, 0.24);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(122, 63, 214, 0.28), rgba(21, 170, 202, 0.2));
  font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mpt-panel-heading > div {
  min-width: 0;
  flex: 1;
}

.mpt-panel-heading h3 {
  margin: 0;
  color: #f6fbff;
  font-size: 16px;
}

.mpt-panel-heading p {
  margin: 2px 0 0;
  color: #748ba5;
  font-size: 11px;
}

.mpt-panel-heading em {
  padding: 5px 8px;
  color: #59deef;
  border: 1px solid rgba(64, 208, 238, 0.22);
  border-radius: 999px;
  background: rgba(6, 26, 42, 0.66);
  font-size: 11px;
  font-style: normal;
}

.mpt-panel .montage-field {
  margin-bottom: 12px;
}

.mpt-panel .montage-field input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
.mpt-panel .montage-field select,
.mpt-panel .montage-field textarea {
  box-sizing: border-box;
  width: 100%;
  color: #eaf7ff;
  border: 1px solid rgba(97, 139, 197, 0.24);
  border-radius: 10px;
  outline: 0;
  background: rgba(3, 11, 27, 0.78);
}

.mpt-panel .montage-field input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
.mpt-panel .montage-field select {
  min-height: 42px;
  padding: 0 11px;
}

.mpt-panel .montage-field textarea {
  padding: 11px;
}

.mpt-panel .montage-field input:focus,
.mpt-panel .montage-field select:focus,
.mpt-panel .montage-field textarea:focus {
  border-color: rgba(55, 218, 243, 0.68);
  box-shadow: 0 0 0 3px rgba(51, 211, 242, 0.07);
}

.mpt-panel .montage-field > small {
  color: #657c94;
  font-size: 10px;
}

.mpt-script-field textarea {
  min-height: 192px;
  line-height: 1.7;
}

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

.mpt-secondary-action {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #eafcff;
  border: 1px solid rgba(53, 211, 242, 0.36);
  border-radius: 10px;
  background: linear-gradient(105deg, rgba(123, 55, 217, 0.28), rgba(18, 183, 216, 0.24));
  font-weight: 750;
  cursor: pointer;
}

.mpt-secondary-action:hover {
  border-color: rgba(72, 226, 249, 0.66);
  transform: translateY(-1px);
}

.mpt-secondary-action:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.mpt-source-tabs {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
}

.mpt-dropzone {
  min-height: 82px;
}

.mpt-source-list {
  max-height: 150px;
  margin: 10px 0 12px;
  overflow: auto;
}

.mpt-compact-switch {
  margin: 0 0 12px;
  padding: 10px 11px;
  border: 1px solid rgba(98, 137, 190, 0.17);
  border-radius: 10px;
  background: rgba(4, 13, 30, 0.5);
}

.mpt-stock-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 14px;
  padding: 9px 11px;
  color: #a8bbcf;
  border: 1px solid rgba(98, 137, 190, 0.17);
  border-radius: 10px;
  background: rgba(4, 13, 30, 0.5);
  font-size: 11px;
}

.mpt-stock-row > span {
  margin-right: auto;
  color: #d4e2ef;
  font-weight: 700;
}

.mpt-stock-row label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mpt-range-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.mpt-range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b9c8d8;
  font-size: 12px;
}

.mpt-range-field output {
  color: #5ce4f5;
  font-weight: 700;
}

.mpt-range-field input {
  width: 100%;
  accent-color: #2fd7ef;
}

.mpt-info-note {
  display: flex;
  gap: 9px;
  padding: 11px;
  color: #8197ad;
  border-left: 2px solid #38d8ef;
  border-radius: 0 9px 9px 0;
  background: rgba(20, 185, 217, 0.07);
  font-size: 11px;
  line-height: 1.55;
}

.mpt-info-note i {
  color: #55dff2;
  font-size: 16px;
}

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

.mpt-generate-bar {
  position: sticky;
  z-index: 12;
  bottom: 10px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 0.7fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(18px);
  background: rgba(7, 16, 37, 0.93);
}

.mpt-generate-bar > button {
  width: 100%;
  min-height: 48px;
}

.mpt-generate-bar .montage-generate-progress {
  grid-column: 1 / -1;
}

.mpt-results {
  margin-top: 12px;
}

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

.mpt-results .montage-variant-card {
  min-height: 176px;
}

.mpt-results .montage-variant-card.is-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #70869f;
}

.mpt-results .montage-variant-card.is-empty > i {
  color: #45dff3;
  font-size: 26px;
}

.mpt-results .montage-variant-actions button[data-montage-action="risk"] {
  display: none;
}

@media (max-width: 1480px) {
  .mpt-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sci-fi-shell .mpt-workspace {
    padding: 10px;
  }

  .sci-fi-shell .mpt-header {
    align-items: flex-start;
  }

  .mpt-stage-strip {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
  }

  .mpt-workbench,
  .mpt-results .montage-variant-grid {
    grid-template-columns: 1fr;
  }

  .mpt-generate-bar {
    position: static;
    grid-template-columns: 1fr;
  }

  .mpt-generate-bar .montage-generate-progress {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .sci-fi-shell .mpt-header {
    min-height: auto;
    padding: 16px;
  }

  .mpt-stage-strip {
    margin-inline: -2px;
  }

  .mpt-stage-strip span {
    min-height: 38px;
  }

  .mpt-panel {
    padding: 14px;
  }

  .mpt-two-fields,
  .mpt-color-grid {
    grid-template-columns: 1fr;
  }

  .mpt-stock-row {
    flex-wrap: wrap;
  }

  .mpt-stock-row > span {
    width: 100%;
  }
}

.montage-source-tabs button {
  gap: 6px;
}

.montage-source-tabs button > span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-size: 9px;
}

.montage-source-pane[hidden] {
  display: none !important;
}

.montage-library-pane {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(103, 132, 186, 0.17);
  border-radius: 12px;
  background: rgba(4, 11, 24, 0.62);
}

.montage-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.montage-library-toolbar > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.montage-library-toolbar b {
  color: #dce7f7;
  font-size: 11px;
}

.montage-library-toolbar small {
  color: #7184a3;
  font-size: 9px;
}

.montage-library-list {
  display: grid;
  gap: 7px;
  max-height: 218px;
  overflow-y: auto;
  scrollbar-color: rgba(91, 121, 171, 0.65) transparent;
  scrollbar-width: thin;
}

.montage-library-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(103, 132, 186, 0.18);
  border-radius: 10px;
  background: rgba(6, 15, 31, 0.8);
}

.montage-library-item-icon {
  display: grid;
  width: 38px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(34, 211, 238, 0.12));
  color: #67e8f9;
}

.montage-library-item > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.montage-library-item b,
.montage-library-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-library-item b {
  color: #e6edf8;
  font-size: 10px;
}

.montage-library-item small {
  color: #7386a6;
  font-size: 9px;
}

.sci-fi-shell .montage-library-item button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  color: #8befff;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.sci-fi-shell .montage-library-item button:disabled {
  cursor: default;
  border-color: rgba(103, 132, 186, 0.16);
  background: rgba(9, 18, 34, 0.66);
  color: #667895;
}

.montage-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 15px;
  border: 1px dashed rgba(34, 211, 238, 0.34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 50%, rgba(34, 211, 238, 0.11), transparent 28%),
    rgba(4, 10, 24, 0.62);
  color: #dce8ff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.montage-dropzone:hover,
.montage-dropzone:focus-within {
  border-color: rgba(34, 211, 238, 0.68);
  background:
    radial-gradient(circle at 8% 50%, rgba(34, 211, 238, 0.17), transparent 30%),
    rgba(6, 14, 32, 0.8);
  transform: translateY(-1px);
}

.montage-dropzone-icon {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(34, 211, 238, 0.2));
  color: #a5f3fc;
  font-size: 22px;
}

.montage-dropzone > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.montage-dropzone b {
  color: #f8fbff;
  font-size: 13px;
}

.montage-dropzone small {
  color: #8295b7;
  font-size: 11px;
}

.montage-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.montage-source-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.montage-source-strip article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 12px;
  background: rgba(6, 12, 27, 0.78);
}

.montage-source-strip img {
  width: 54px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.montage-source-strip article > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.montage-source-strip b,
.montage-source-strip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-source-strip b {
  color: #dce8ff;
  font-size: 11px;
}

.montage-source-strip small {
  color: #7184a5;
  font-size: 9px;
}

.sci-fi-shell .montage-source-cancel {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  color: #fda4af;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.sci-fi-shell .montage-source-cancel:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.14);
}

.sci-fi-shell .montage-source-cancel:disabled {
  cursor: default;
  opacity: 0.45;
}

.montage-understanding-panel {
  display: flex;
  flex-direction: column;
}

.montage-analysis-status {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: #f8c96b;
}

.montage-analysis-status[data-state="analyzing"] {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.montage-analysis-status[data-state="ready"] {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.montage-understanding-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 8, 21, 0.58);
}

.montage-understanding-flow > span {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.montage-understanding-flow > span i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(34, 211, 238, 0.14));
  color: #8befff;
  font-size: 17px;
}

.montage-understanding-flow > span b {
  color: #e8f2ff;
  font-size: 10px;
}

.montage-understanding-flow > span small {
  color: #7184a5;
  font-size: 8px;
  white-space: nowrap;
}

.montage-understanding-flow > i {
  color: #516b95;
}

.montage-insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.montage-insight-list span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 1px 6px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(130, 156, 255, 0.14);
  border-radius: 11px;
  background: rgba(9, 16, 34, 0.7);
}

.montage-insight-list i {
  grid-row: 1 / span 2;
  color: #67e8f9;
  font-size: 15px;
}

.montage-insight-list b {
  color: #f8fbff;
  font-size: 14px;
}

.montage-insight-list small {
  color: #7083a4;
  font-size: 8px;
}

.montage-analyze-button {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
}

.montage-template-heading {
  align-items: center;
}

.montage-template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.montage-template-card {
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(130, 156, 255, 0.17);
  border-radius: 15px;
  background: rgba(5, 10, 23, 0.78);
  color: #dce8ff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.montage-template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.44);
}

.montage-template-card.is-selected {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08), 0 16px 36px rgba(0, 0, 0, 0.22), 0 0 24px rgba(34, 211, 238, 0.1);
}

.montage-template-preview {
  position: relative;
  display: block;
  height: 138px;
  overflow: hidden;
  background: #050a17;
}

.montage-template-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(1, 4, 13, 0.06), rgba(1, 4, 13, 0.72));
}

.montage-template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04);
  transition: transform 220ms ease;
}

.montage-template-card:hover .montage-template-preview img {
  transform: scale(1.035);
}

.montage-template-overlay {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  display: grid;
  gap: 5px;
  max-width: calc(100% - 28px);
}

.montage-template-overlay.align-bottom {
  top: auto;
  bottom: 13px;
}

.montage-template-overlay.product {
  top: 50%;
  transform: translateY(-50%);
}

.montage-template-overlay.tutorial {
  top: 12px;
  padding-left: 9px;
  border-left: 3px solid #22d3ee;
}

.montage-template-overlay.mood {
  top: auto;
  bottom: 14px;
  left: 50%;
  width: calc(100% - 28px);
  transform: translateX(-50%);
  text-align: center;
}

.montage-template-overlay b {
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.76);
}

.montage-template-overlay small {
  color: #86f5ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.montage-template-copy {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 12px 12px 8px;
}

.montage-template-copy b {
  color: #f5f9ff;
  font-size: 13px;
}

.montage-template-copy small {
  color: #7f92b2;
  font-size: 10px;
  line-height: 1.5;
}

.montage-template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 11px;
}

.montage-template-meta em {
  color: #6f83a4;
  font-size: 9px;
  font-style: normal;
}

.montage-template-meta i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 50%;
  color: transparent;
}

.montage-template-card.is-selected .montage-template-meta i {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
}

.montage-script-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
}

.montage-script-settings {
  min-width: 0;
}

.montage-setting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.montage-setting-grid label {
  display: grid;
  gap: 7px;
}

.montage-setting-grid label > span {
  color: #91a4c4;
  font-size: 11px;
  font-weight: 700;
}

.montage-setting-grid select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding-inline: 11px 32px;
  border: 1px solid rgba(130, 156, 255, 0.2);
  border-radius: 10px;
  background-color: rgba(5, 10, 23, 0.82);
  color: #e6efff;
}

.montage-fact-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.055);
}

.montage-fact-switch input {
  accent-color: #34d399;
}

.montage-fact-switch > span {
  display: grid;
  gap: 3px;
}

.montage-fact-switch b {
  color: #dffcf2;
  font-size: 11px;
}

.montage-fact-switch small {
  color: #789c91;
  font-size: 9px;
  line-height: 1.45;
}

.montage-script-preview {
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 206px;
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.12), transparent 38%),
    rgba(4, 10, 24, 0.72);
}

.montage-preview-kicker {
  color: #67e8f9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.montage-script-preview h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 17px;
}

.montage-script-preview p {
  min-height: 44px;
  margin: 0;
  color: #9aacc9;
  font-size: 11px;
  line-height: 1.65;
}

.montage-preview-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.montage-preview-evidence span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(130, 156, 255, 0.16);
  border-radius: 999px;
  background: rgba(130, 156, 255, 0.06);
  color: #8498b9;
  font-size: 9px;
}

.montage-script-preview .primary-button {
  width: fit-content;
  min-width: 164px;
  min-height: 40px;
  margin-top: 3px;
}

@media (max-width: 1280px) {
  .montage-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .smart-montage-intake-grid,
  .montage-script-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .sci-fi-shell .smart-montage-panel {
    padding: 14px;
    border-radius: 15px;
  }

  .sci-fi-shell .smart-montage-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .montage-source-strip,
  .montage-setting-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-template-preview {
    height: 176px;
  }

  .montage-understanding-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-understanding-flow > i {
    transform: rotate(90deg);
  }
}

/* 2026-07-23 MoneyPrinterTurbo-inspired smart montage control console */
.sci-fi-shell .smart-montage-workspace {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding-bottom: 12px;
}

.sci-fi-shell .smart-montage-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 17px 20px;
  overflow: hidden;
  border: 1px solid rgba(102, 126, 180, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.11), transparent 34%),
    radial-gradient(circle at 22% 0%, rgba(217, 70, 239, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(23, 30, 61, 0.96), rgba(9, 19, 38, 0.98));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.sci-fi-shell .smart-montage-header::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: -44px;
  width: 180px;
  height: 90px;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.08);
  filter: blur(28px);
}

.sci-fi-shell .smart-montage-header h2 {
  margin: 4px 0 3px;
  color: #f8fbff;
  font-size: clamp(20px, 1.65vw, 27px);
  line-height: 1.15;
}

.sci-fi-shell .smart-montage-header p {
  max-width: 760px;
  margin: 0;
  color: #8fa2c4;
  font-size: 12px;
  line-height: 1.55;
}

.montage-header-status {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.montage-header-status span,
.montage-source-count,
.montage-template-selected-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 24, 43, 0.72);
  color: #7ddff2;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.montage-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.sci-fi-shell .montage-console-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  overflow: visible;
  border: 1px solid rgba(103, 132, 186, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 25, 50, 0.96), rgba(8, 15, 31, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.montage-panel-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(104, 128, 172, 0.15);
}

.montage-panel-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(217, 70, 239, 0.18), rgba(34, 211, 238, 0.16));
  color: #78e7f7;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 0 16px rgba(34, 211, 238, 0.06);
}

.montage-panel-heading h3 {
  margin: 0;
  color: #f5f8ff;
  font-size: 16px;
  line-height: 1.25;
}

.montage-panel-heading p {
  margin: 3px 0 0;
  color: #778aaa;
  font-size: 10px;
  line-height: 1.35;
}

.montage-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.montage-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #c8d3e8;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.montage-field-label em {
  color: #66dff3;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.sci-fi-shell .montage-field select,
.sci-fi-shell .montage-field input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid rgba(99, 125, 173, 0.18);
  border-radius: 11px;
  outline: none;
  background-color: rgba(5, 12, 27, 0.86);
  color: #dfe8f8;
  font: inherit;
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.sci-fi-shell .montage-field select:hover,
.sci-fi-shell .montage-field input[type="text"]:hover {
  border-color: rgba(34, 211, 238, 0.34);
  background-color: rgba(8, 17, 35, 0.96);
}

.sci-fi-shell .montage-field select:focus-visible,
.sci-fi-shell .montage-field input[type="text"]:focus-visible,
.montage-template-trigger:focus-visible,
.montage-segmented button:focus-visible,
.montage-generate-bar > button:focus-visible {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.montage-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(99, 125, 173, 0.18);
  border-radius: 12px;
  background: rgba(5, 12, 27, 0.88);
}

.sci-fi-shell .montage-segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 38px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #7e90ae;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.sci-fi-shell .montage-segmented button:hover {
  color: #cfe9f4;
  background: rgba(34, 211, 238, 0.05);
}

.sci-fi-shell .montage-segmented button.is-active {
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.13), rgba(34, 211, 238, 0.15));
  color: #9aebfa;
}

.montage-compact-dropzone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  cursor: pointer;
  border: 1px dashed rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  background: rgba(5, 18, 34, 0.7);
  transition: border-color 160ms ease, background 160ms ease;
}

.montage-compact-dropzone:hover {
  border-color: rgba(34, 211, 238, 0.64);
  background: rgba(8, 29, 48, 0.86);
}

.montage-compact-dropzone > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.1);
  color: #68dff2;
  font-size: 18px;
}

.montage-compact-dropzone span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.montage-compact-dropzone b {
  overflow: hidden;
  color: #dce7f7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-compact-dropzone small {
  color: #7184a3;
  font-size: 9px;
}

.montage-compact-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.montage-source-list {
  display: grid;
  gap: 7px;
}

.montage-source-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(103, 132, 186, 0.17);
  border-radius: 10px;
  background: rgba(4, 11, 24, 0.65);
}

.montage-source-list img {
  width: 48px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
}

.montage-source-list article > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.montage-source-list article b {
  overflow: hidden;
  color: #d5deed;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-source-list article small {
  color: #667997;
  font-size: 9px;
}

.montage-source-list article > i {
  color: #27d9ad;
  font-size: 14px;
}

.montage-analysis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(103, 132, 186, 0.17);
  border-radius: 11px;
  background: rgba(5, 12, 26, 0.68);
}

.montage-analysis-row > span {
  display: grid;
  gap: 2px;
}

.montage-analysis-row b {
  color: #dbe5f5;
  font-size: 11px;
}

.montage-analysis-row small {
  color: #ddae54;
  font-size: 9px;
}

.montage-analysis-row small[data-state="analyzing"] {
  color: #67dff4;
}

.montage-analysis-row small[data-state="ready"] {
  color: #33dfae;
}

.sci-fi-shell .montage-analysis-row button,
.sci-fi-shell #generateMontageScriptPreview {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.09);
  color: #83e8f7;
  font-size: 10px;
  font-weight: 700;
}

.sci-fi-shell .montage-analysis-row button:hover,
.sci-fi-shell #generateMontageScriptPreview:hover {
  background: rgba(34, 211, 238, 0.16);
}

.sci-fi-shell .montage-analysis-row button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.sci-fi-shell .montage-insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sci-fi-shell .montage-insight-list span {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 5px;
  border: 1px solid rgba(103, 132, 186, 0.16);
  border-radius: 10px;
  background: rgba(5, 12, 26, 0.58);
}

.sci-fi-shell .montage-insight-list b {
  color: #e6f7fb;
  font-size: 14px;
}

.sci-fi-shell .montage-insight-list small {
  color: #6c7f9d;
  font-size: 8px;
}

.montage-switch-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(103, 132, 186, 0.16);
  border-radius: 11px;
  background: rgba(5, 12, 26, 0.6);
}

.montage-switch-row > input[type="checkbox"],
.montage-caption-master input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #22d3ee;
}

.montage-switch-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.montage-switch-row b {
  color: #d8e2f2;
  font-size: 11px;
}

.montage-switch-row small {
  color: #6f82a0;
  font-size: 9px;
  line-height: 1.35;
}

.montage-inline-check {
  margin-top: -3px;
}

.montage-copy-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(217, 70, 239, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(217, 70, 239, 0.07), rgba(34, 211, 238, 0.05)),
    rgba(5, 12, 26, 0.72);
}

.montage-copy-summary h4 {
  margin: 0;
  color: #f4f7ff;
  font-size: 13px;
  line-height: 1.35;
}

.montage-copy-summary p {
  margin: 0;
  color: #91a2bd;
  font-size: 10px;
  line-height: 1.55;
}

.montage-copy-summary #montagePreviewEvidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.montage-copy-summary #montagePreviewEvidence span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #78d9e8;
  font-size: 9px;
}

.montage-template-picker {
  position: relative;
  z-index: 8;
}

.montage-template-trigger {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 6px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  background: rgba(5, 13, 28, 0.92);
  color: inherit;
  text-align: left;
}

.montage-template-trigger:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(7, 20, 38, 0.98);
}

.montage-template-trigger img {
  width: 60px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.montage-template-trigger span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.montage-template-trigger b {
  color: #e9f7fb;
  font-size: 12px;
}

.montage-template-trigger small {
  overflow: hidden;
  color: #7085a3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-template-trigger > i {
  color: #6bddec;
  font-size: 18px;
  transition: transform 160ms ease;
}

.montage-template-trigger[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.montage-template-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  gap: 5px;
  max-height: 340px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 13px;
  background: rgba(5, 12, 27, 0.99);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.48), 0 0 28px rgba(34, 211, 238, 0.08);
}

.montage-template-menu[hidden] {
  display: none;
}

.montage-template-menu button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.montage-template-menu button:hover,
.montage-template-menu button.is-selected {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}

.montage-template-menu img {
  width: 54px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
}

.montage-template-menu button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.montage-template-menu b {
  color: #dae6f6;
  font-size: 11px;
}

.montage-template-menu small {
  overflow: hidden;
  color: #7284a0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-template-menu button > i {
  visibility: hidden;
  color: #38ddb2;
}

.montage-template-menu button.is-selected > i {
  visibility: visible;
}

.montage-field-grid,
.montage-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.montage-edit-note,
.montage-audio-tip,
.montage-no-voice-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 11px;
  background: rgba(34, 211, 238, 0.045);
}

.montage-edit-note > i,
.montage-audio-tip > i,
.montage-no-voice-note > i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.1);
  color: #6ce2f2;
  font-size: 15px;
}

.montage-edit-note span,
.montage-audio-tip span {
  display: grid;
  gap: 2px;
}

.montage-edit-note b,
.montage-audio-tip b {
  color: #cfdbea;
  font-size: 10px;
}

.montage-edit-note small,
.montage-audio-tip small,
.montage-no-voice-note {
  color: #7084a2;
  font-size: 9px;
  line-height: 1.4;
}

.montage-voice-auto,
.montage-voice-upload {
  display: grid;
  gap: 14px;
}

.montage-voice-auto[hidden],
.montage-voice-upload[hidden],
.montage-no-voice-note[hidden] {
  display: none;
}

.montage-panel-divider {
  height: 1px;
  margin: 3px 0;
  background: rgba(103, 132, 186, 0.16);
}

.sci-fi-shell .montage-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(103, 132, 186, 0.28);
  border-radius: 10px;
  background: rgba(7, 15, 31, 0.76);
  color: #b8c8de;
  font-size: 11px;
  font-weight: 650;
}

.sci-fi-shell .montage-secondary-button:hover {
  border-color: rgba(34, 211, 238, 0.36);
  color: #def7fb;
  background: rgba(34, 211, 238, 0.07);
}

.sci-fi-shell input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  cursor: pointer;
  accent-color: #22d3ee;
}

.montage-caption-master {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #85e6f4;
  font-size: 10px;
}

#montageCaptionFields {
  display: grid;
  gap: 14px;
  transition: opacity 160ms ease;
}

#montageCaptionFields.is-disabled {
  opacity: 0.46;
}

.montage-caption-control-grid {
  display: grid;
  grid-template-columns: minmax(84px, 0.45fr) minmax(0, 1fr);
  gap: 12px 14px;
  align-items: end;
}

.montage-color-field {
  display: grid;
  gap: 7px;
  color: #c8d3e8;
  font-size: 12px;
  font-weight: 650;
}

.montage-color-field input[type="color"],
.montage-switch-row input[type="color"] {
  width: 46px;
  height: 42px;
  padding: 3px;
  cursor: pointer;
  border: 1px solid rgba(103, 132, 186, 0.25);
  border-radius: 10px;
  background: rgba(5, 12, 27, 0.88);
}

.montage-switch-row input[type="color"] {
  width: 36px;
  height: 32px;
  border-radius: 8px;
}

.montage-reset-button {
  width: 100%;
}

.montage-generate-bar {
  position: sticky;
  z-index: 18;
  bottom: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(360px, 1.35fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(92, 119, 172, 0.28);
  border-radius: 16px;
  background: rgba(6, 12, 27, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 0 28px rgba(34, 211, 238, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.montage-generate-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 6px;
}

.montage-generate-summary > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  color: #71e0f0;
  font-size: 17px;
}

.montage-generate-summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.montage-generate-summary b {
  overflow: hidden;
  color: #dbe6f5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-generate-summary small {
  overflow: hidden;
  color: #6f82a0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sci-fi-shell .montage-generate-bar > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #d946ef 0%, #7c3aed 44%, #16c7e8 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.25);
}

.sci-fi-shell .montage-generate-bar > button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.sci-fi-shell .montage-generate-bar > button:disabled {
  cursor: wait;
  transform: none;
  filter: saturate(0.65);
  opacity: 0.82;
}

.montage-generate-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 2px 6px 4px;
}

.montage-generate-progress[hidden] {
  display: none;
}

.montage-generate-progress > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9aacca;
  font-size: 9px;
}

.montage-generate-progress > span b {
  color: #d9eef5;
  font-size: 10px;
}

.montage-generate-progress > i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(103, 132, 186, 0.16);
}

.montage-generate-progress > i > b {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d946ef, #7c3aed, #22d3ee);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.3);
  transition: width 420ms ease;
}

@media (min-width: 1600px) {
  .montage-console-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) and (max-width: 1599px) {
  .montage-console-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .montage-console-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-generate-bar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .sci-fi-shell .smart-montage-workspace {
    gap: 10px;
  }

  .sci-fi-shell .smart-montage-header {
    align-items: flex-start;
    min-height: 0;
    padding: 15px;
    border-radius: 15px;
  }

  .montage-header-status {
    justify-content: flex-start;
  }

  .sci-fi-shell .montage-console-panel {
    gap: 12px;
    padding: 14px;
    border-radius: 15px;
  }

  .montage-panel-heading {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .montage-panel-heading > :last-child:not(div) {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .montage-field-grid,
  .montage-range-grid,
  .montage-caption-control-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-template-menu {
    position: static;
    margin-top: 7px;
  }

  .montage-generate-bar {
    gap: 10px;
    padding: 9px;
    border-radius: 14px;
  }

  .montage-generate-summary small {
    white-space: normal;
  }
}

/* 2026-07-23 six-route mobile navigation */
@media (max-width: 760px) {
  .sci-fi-shell .top-section-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Smart montage batch console */
.montage-batch-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}

.montage-batch-workspace[hidden] {
  display: none;
}

.montage-batch-header {
  min-height: 118px;
  padding: 22px 24px;
  border: 1px solid rgba(88, 128, 198, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 86% 15%, rgba(34, 211, 238, 0.09), transparent 32%),
    linear-gradient(135deg, rgba(18, 29, 55, 0.98), rgba(8, 16, 34, 0.98));
}

.montage-batch-console {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(380px, 1.12fr) minmax(330px, 0.96fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.montage-batch-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(91, 127, 190, 0.3);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(17, 28, 52, 0.98), rgba(7, 14, 30, 0.99));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.montage-batch-panel-heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.montage-batch-panel-heading > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(42, 213, 239, 0.27);
  border-radius: 11px;
  color: #72e8ff;
  font-weight: 900;
  background: linear-gradient(145deg, rgba(68, 87, 237, 0.26), rgba(20, 211, 229, 0.13));
}

.montage-batch-panel-heading h3,
.montage-inline-heading h4,
.montage-visual-card h4,
.montage-task-summary h4 {
  margin: 0;
  color: #f5f8ff;
  font-size: 16px;
  line-height: 1.25;
}

.montage-batch-panel-heading p,
.montage-inline-heading p,
.montage-visual-card p,
.montage-task-summary p {
  margin: 4px 0 0;
  color: #8297bd;
  font-size: 12px;
  line-height: 1.45;
}

.montage-batch-keyword-row,
.montage-mini-grid,
.montage-output-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.montage-material-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.montage-material-duration-hint {
  margin: -2px 0 0;
  padding: 9px 11px;
  border-left: 2px solid rgba(37, 211, 235, 0.72);
  color: #91a8cc;
  font-size: 12px;
  line-height: 1.55;
  background: rgba(10, 113, 143, 0.1);
}

.montage-count-field {
  max-width: 138px;
}

.montage-batch-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 111, 176, 0.44), transparent);
}

.montage-inline-heading,
.montage-task-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.montage-inline-heading em {
  padding: 5px 9px;
  border: 1px solid rgba(35, 210, 231, 0.25);
  border-radius: 999px;
  color: #5ceaff;
  font-size: 11px;
  font-style: normal;
  background: rgba(17, 151, 178, 0.11);
}

.montage-stock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(84, 119, 181, 0.24);
  border-radius: 12px;
  color: #9aadd0;
  font-size: 12px;
  background: rgba(6, 13, 29, 0.55);
}

.montage-stock-row > span {
  margin-right: auto;
}

.montage-stock-row label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #dce7ff;
}

.montage-primary-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(105deg, #c53ee9, #6559ef 53%, #11c5df);
  box-shadow: 0 10px 28px rgba(76, 91, 238, 0.22);
  cursor: pointer;
}

.montage-primary-action:disabled {
  opacity: 0.44;
  box-shadow: none;
  cursor: not-allowed;
}

.montage-script-review {
  min-height: 666px;
}

.montage-script-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 3px 1px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.montage-script-tab {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(78, 112, 174, 0.32);
  border-radius: 9px;
  background: rgba(8, 15, 31, 0.8);
}

.montage-script-tab.is-active {
  border-color: rgba(48, 222, 239, 0.8);
  background: linear-gradient(135deg, rgba(26, 114, 139, 0.28), rgba(84, 51, 163, 0.25));
  box-shadow: inset 0 0 0 1px rgba(46, 206, 239, 0.12);
}

.montage-script-tab button {
  min-height: 36px;
  border: 0;
  color: #dce7fb;
  background: transparent;
  cursor: pointer;
}

.montage-script-tab button:first-child {
  padding: 0 7px 0 12px;
  font-weight: 800;
}

.montage-script-tab button:last-child {
  width: 30px;
  color: #7589ac;
  font-size: 17px;
}

.montage-script-tab em {
  color: #49e5df;
  font-size: 10px;
  font-style: normal;
}

.montage-script-empty {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: #6f84aa;
  font-size: 12px;
}

.montage-script-editor-shell {
  display: grid;
  gap: 9px;
  min-height: 520px;
}

.montage-script-editor-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: #c8d6ef;
  font-size: 12px;
}

.montage-script-editor-meta small {
  color: #64dfe8;
}

#montageScriptEditor {
  width: 100%;
  min-height: 480px;
  resize: vertical;
  padding: 16px;
  border: 1px solid rgba(75, 111, 177, 0.34);
  border-radius: 13px;
  color: #eef4ff;
  font-size: 14px;
  line-height: 1.82;
  background: rgba(4, 10, 23, 0.75);
}

#montageScriptEditor:focus {
  border-color: rgba(48, 220, 238, 0.72);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(27, 191, 219, 0.09);
}

.montage-visual-controls,
.montage-task-console {
  display: grid;
  gap: 14px;
}

.montage-visual-controls[hidden],
.montage-task-console[hidden] {
  display: none;
}

.montage-visual-card {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(78, 116, 183, 0.3);
  border-radius: 14px;
  background: rgba(5, 12, 27, 0.62);
}

.montage-visual-card > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.montage-toggle {
  position: relative;
  display: inline-flex;
}

.montage-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.montage-toggle span {
  position: relative;
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #34415d;
  cursor: pointer;
  transition: 160ms ease;
}

.montage-toggle span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d9e3f5;
  content: "";
  transition: 160ms ease;
}

.montage-toggle input:checked + span {
  background: linear-gradient(90deg, #1bbacb, #50e4d7);
}

.montage-toggle input:checked + span::after {
  left: 21px;
  background: #fff;
}

.montage-range-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: center;
  color: #a9bbd9;
  font-size: 12px;
}

.montage-range-row output {
  color: #72e6f2;
  text-align: right;
}

.montage-output-settings {
  padding: 14px;
  border: 1px solid rgba(78, 116, 183, 0.3);
  border-radius: 14px;
  background: rgba(5, 12, 27, 0.62);
}

.montage-output-settings .montage-switch-row {
  grid-column: 1 / -1;
}

.montage-volume-field output {
  float: right;
  color: #67e5ec;
}

.montage-validation-message {
  min-height: 18px;
  margin: 0;
  color: #ff9caa;
  font-size: 12px;
}

.montage-script-generation-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(239, 88, 112, 0.4);
  border-radius: 12px;
  color: #ffd6dd;
  font-size: 12px;
  line-height: 1.55;
  background: rgba(122, 28, 55, 0.18);
}

.montage-script-generation-error[hidden] {
  display: none;
}

.montage-script-generation-error i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #ff91a5;
  font-size: 15px;
}

.montage-batch-task-list {
  display: grid;
  gap: 9px;
  max-height: 590px;
  overflow-y: auto;
}

.montage-task-preparation {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(66, 214, 236, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(22, 91, 151, 0.18), rgba(116, 55, 191, 0.13)),
    rgba(5, 12, 27, 0.72);
  box-shadow: inset 0 0 28px rgba(34, 184, 218, 0.05);
}

.montage-task-preparation > i {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #6ee8f2;
  font-size: 20px;
  background: rgba(24, 176, 207, 0.14);
}

.montage-task-preparation span {
  display: grid;
  gap: 6px;
}

.montage-task-preparation b {
  color: #edf6ff;
  font-size: 14px;
}

.montage-task-preparation small {
  color: #93a9cb;
  font-size: 12px;
  line-height: 1.65;
}

.montage-task-preparation.is-error {
  border-color: rgba(239, 88, 112, 0.38);
  background:
    linear-gradient(135deg, rgba(144, 31, 65, 0.18), rgba(76, 38, 109, 0.12)),
    rgba(5, 12, 27, 0.72);
}

.montage-task-preparation.is-error > i {
  color: #ff9cad;
  background: rgba(239, 88, 112, 0.14);
}

.montage-batch-task {
  display: grid;
  grid-template-columns: 38px minmax(120px, 1fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(75, 111, 177, 0.3);
  border-radius: 12px;
  background: rgba(5, 12, 27, 0.68);
}

.montage-batch-task.is-completed {
  border-color: rgba(57, 205, 142, 0.32);
}

.montage-batch-task.is-failed {
  border-color: rgba(239, 88, 112, 0.36);
}

.montage-task-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #63e3f0;
  font-size: 11px;
  font-weight: 900;
  background: rgba(24, 155, 186, 0.15);
}

.montage-task-copy,
.montage-task-progress {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.montage-task-copy b,
.montage-task-progress em {
  color: #eaf1ff;
  font-size: 12px;
  font-style: normal;
}

.montage-task-copy small {
  overflow: hidden;
  color: #8397bc;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.montage-task-progress {
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
}

.montage-task-progress em {
  grid-column: 1 / -1;
}

.montage-task-progress i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #1e2a42;
}

.montage-task-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b93ae8, #24d4e5);
}

.montage-task-progress small {
  color: #66deec;
  font-size: 10px;
  text-align: right;
}

.montage-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.montage-task-actions button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid rgba(79, 126, 194, 0.42);
  border-radius: 8px;
  color: #c9d9f3;
  font-size: 11px;
  background: rgba(9, 19, 40, 0.84);
}

.montage-task-actions button.is-primary {
  border-color: rgba(42, 214, 231, 0.56);
  color: #67e9f2;
}

.montage-task-error {
  grid-column: 2 / -1;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: #ffadba;
  font-size: 11px;
  background: rgba(145, 32, 55, 0.13);
}

@media (max-width: 1460px) {
  .montage-batch-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .montage-batch-control {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .montage-batch-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-batch-control {
    grid-column: auto;
  }

  .montage-script-review {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .montage-batch-workspace {
    gap: 10px;
    padding: 10px;
  }

  .montage-batch-header,
  .montage-batch-panel {
    padding: 14px;
    border-radius: 15px;
  }

  .montage-batch-panel-heading {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .montage-batch-panel-heading > :last-child:not(div) {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .montage-batch-keyword-row,
  .montage-material-settings,
  .montage-mini-grid,
  .montage-output-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .montage-count-field {
    max-width: none;
  }

  #montageScriptEditor {
    min-height: 360px;
  }

  .montage-script-editor-shell {
    min-height: 400px;
  }

  .montage-batch-task {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .montage-task-progress,
  .montage-task-actions,
  .montage-task-error {
    grid-column: 2;
  }

  .montage-task-actions {
    justify-content: flex-start;
  }
}
