/* v32 premium workbench overrides */
:root {
  --brand-navy: #070b3f;
  --brand-navy-soft: #101657;
  --brand-cream: #efd3b5;
  --brand-cream-soft: #fbf1e6;
  --brand-ink: #101426;
  --color-primary: #070b3f;
  --color-secondary: #c79d73;
  --color-gradient: linear-gradient(135deg, #070b3f 0%, #1c225f 100%);
  --color-text: #101426;
  --color-text-secondary: #566070;
  --color-bg: #f7f3ed;
  --color-border: #e7d7c7;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(239, 211, 181, .44), transparent 34%),
    linear-gradient(180deg, #fbf7f1 0%, #f1f5f8 100%) !important;
  color: var(--brand-ink);
  letter-spacing: 0;
}

.container.app-shell {
  max-width: 1280px;
  padding: 18px 22px 48px;
  background: transparent;
  box-shadow: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  padding: 12px 16px;
  background: rgba(7, 11, 63, 0.96) !important;
  border: 1px solid rgba(239, 211, 181, .22);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(7, 11, 63, .18);
  backdrop-filter: blur(14px);
}

.nav-brand {
  gap: 12px;
}

.brand-logo {
  display: block;
  width: 172px;
  height: 42px;
  object-fit: contain;
  padding: 4px 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.nav-brand h1 {
  margin: 0;
  color: #fff8ef;
  font-size: 20px;
  letter-spacing: 0;
}

.nav-brand p {
  margin-top: 4px;
  color: rgba(239, 211, 181, .76);
  font-size: 12px;
}

.nav-user,
.btn-ghost,
.btn-secondary {
  border: 1px solid #e4d2bf;
  background: rgba(255, 255, 255, .96);
  color: var(--brand-navy);
}

.nav-credits {
  color: #0f766e;
  font-weight: 800;
}

.btn,
.generate-btn,
.panel,
.card,
.section,
.upload-area,
.form-control,
.option-card,
.model-info-item,
.progress-content,
.result-content,
.video-preview {
  border-radius: 8px !important;
  letter-spacing: 0;
}

.form-group.is-disabled {
  opacity: .48;
}

.form-group.is-disabled label {
  color: #8a94a6;
}

.form-control:disabled {
  cursor: not-allowed;
  border-color: #e5e7eb !important;
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  box-shadow: none !important;
}

.btn-primary,
.generate-btn {
  background: var(--brand-navy) !important;
  border-color: var(--brand-navy) !important;
  color: #fff8ef !important;
  box-shadow: 0 12px 22px rgba(7, 11, 63, 0.18);
}

.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 18px;
  min-height: 260px;
  margin: 18px 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='360' viewBox='0 0 900 360'%3E%3Crect width='900' height='360' fill='%23f8fafc'/%3E%3Cpath d='M0 270 C160 210 260 300 410 236 C560 170 645 230 900 120 L900 360 L0 360 Z' fill='%23111827' fill-opacity='.08'/%3E%3Cpath d='M80 65h220M80 105h310M80 145h170' fill='none' stroke='%23111827' stroke-opacity='.10'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow-md);
}

.eyebrow,
.modal-kicker,
.step-badge {
  color: #9d6f45;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h2 {
  max-width: 680px;
  margin: 10px 0;
  color: #111827;
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  color: #475467;
  font-size: 16px;
  line-height: 1.7;
}

.hero-preview {
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  background: #111827;
  box-shadow: var(--shadow-md);
}

.preview-frame {
  position: relative;
  height: 100%;
  min-height: 224px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(31,79,216,.18), rgba(15,118,110,.18)), #172033;
}

.preview-silhouette {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 118px;
  height: 168px;
  transform: translateX(-50%);
  border-radius: 58px 58px 20px 20px;
  background: linear-gradient(180deg, #fff, #ccd6e6);
  box-shadow: 0 22px 50px rgba(0,0,0,.25);
}

.preview-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 12px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.workspace-primary {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid #eadccc;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.section {
  margin-bottom: 0;
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  white-space: nowrap;
}

.section-heading > div {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
}

.section-heading p {
  flex: 1 1 auto;
  max-width: none;
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
}

.section-title {
  margin: 0;
  color: var(--brand-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.upload-area {
  min-height: 238px;
  border: 1px dashed #d7b996;
  background: linear-gradient(180deg, #fffdf9, #f8efe6);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  background: var(--brand-navy);
  color: var(--brand-cream);
  font-size: 28px;
}

.upload-text {
  color: #111827;
  font-size: 17px;
  font-weight: 800;
}

.form-control {
  min-height: 42px;
  border: 1px solid #d8e1ed;
  background: #fff;
  color: #111827;
}

.form-control:focus {
  border-color: #1f4fd8;
  box-shadow: 0 0 0 4px rgba(31,79,216,.09);
}

.option-cards {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
}

.option-card {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #344054;
  font-size: 13px;
}

.option-card.selected {
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  color: var(--brand-cream);
}

.template-mode {
  padding: 14px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf4;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dfcfbd;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-navy);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.template-card:hover {
  transform: translateY(-1px);
  border-color: #c79d73;
}

.template-card.selected {
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  color: #fff8ef;
}

.template-card strong {
  font-size: 14px;
}

.template-card span {
  color: inherit;
  opacity: .78;
  font-size: 12px;
  line-height: 1.55;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.intent-summary {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #f7fbff;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

.video-plan-box {
  margin-top: 14px;
  border: 1px solid #e7d7c7;
  border-radius: 8px;
  background: #fffaf4;
  overflow: hidden;
}

.video-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}

.video-plan-head strong {
  display: block;
  color: var(--brand-navy);
  font-size: 15px;
}

.video-plan-head span,
.advanced-prompt-box p {
  display: block;
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.video-plan-preview {
  margin: 0 16px 14px;
  padding: 14px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}


.intent-grid .span-2 {
  grid-column: 1 / -1;
}

.advanced-prompt-box {
  border-top: 1px solid #eadccc;
  background: #fff;
}

.advanced-prompt-box summary {
  cursor: pointer;
  padding: 13px 16px;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 800;
}

.advanced-prompt-box p {
  padding: 0 16px 10px;
}

.seedance-prompt-editor {
  min-height: 260px;
  margin: 0 16px 10px;
  width: calc(100% - 32px);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.seedance-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 16px;
  color: #667085;
  font-size: 12px;
}

.debug-prompt-field {
  display: block;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.prompt-mode-select {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d6c0aa;
  border-radius: 8px;
  background: #fffaf4;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 800;
}

.prompt-mode-btn {
  border-color: #d6c0aa !important;
  background: #fffaf4 !important;
}

.prompt-mode-btn.btn-primary {
  background: var(--brand-navy) !important;
  color: #fff8ef !important;
}

.ai-creative-storyboard-btn {
  min-height: 44px;
  padding: 0 28px !important;
  border-color: #070b3f !important;
  background: linear-gradient(135deg, #070b3f 0%, #1f4fd8 62%, #0f766e 100%) !important;
  color: #fff8ef !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(7, 11, 63, .22);
}

.ai-creative-storyboard-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(7, 11, 63, .28);
}

.main-prompt-textarea {
  min-height: 210px;
  background: #fff !important;
  color: #111827 !important;
  font-size: 14px;
  line-height: 1.75;
}

.ai-optimize-menu {
  position: relative;
  display: inline-flex;
}

.ai-optimize-menu summary {
  list-style: none;
  cursor: pointer;
}

.ai-optimize-menu summary::-webkit-details-marker {
  display: none;
}

.ai-optimize-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 6px;
  min-width: 128px;
  padding: 8px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(12, 17, 70, .16);
}

.ai-optimize-menu:not([open]) .ai-optimize-list {
  display: none;
}

.advanced-prompt-controls,
.final-prompt-details {
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf4;
}

.advanced-prompt-controls {
  padding: 0 14px 8px;
}

.advanced-prompt-controls summary,
.final-prompt-details summary {
  cursor: pointer;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.advanced-prompt-controls summary {
  padding: 12px 0;
}

.advanced-prompt-controls .option-group {
  margin-top: 10px;
}

.final-prompt-details {
  margin-top: 10px;
  padding: 11px;
}

.final-prompt-details textarea {
  margin-top: 10px;
}

.prompt-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d7dce7;
  background: #f3f5f8;
  color: #6b7280;
  font-weight: 900;
  text-decoration: none;
  line-height: 1;
}

.prompt-help:hover {
  background: #eef1f6;
  color: var(--brand-navy);
  border-color: #c7ccd8;
}

.prompt-help-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(360px, 82vw);
  padding: 14px 15px;
  border-radius: 8px;
  border: 1px solid rgba(12, 17, 70, .12);
  background: #fffaf4;
  color: #334155;
  box-shadow: 0 18px 40px rgba(12, 17, 70, .18);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 30;
}

.prompt-help:hover .prompt-help-popover,
.prompt-help:focus-visible .prompt-help-popover {
  opacity: 1;
  transform: translateY(0);
}

.director-board {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(214, 192, 170, .9);
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: 0 14px 34px rgba(12, 17, 70, .06);
}

.director-board-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.director-eyebrow {
  color: #9a6a3a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.director-board h3 {
  margin: 3px 0 5px;
  color: var(--brand-navy);
  font-size: 18px;
  line-height: 1.2;
}

.director-board p {
  margin: 0;
  color: #5b6475;
  font-size: 13px;
  line-height: 1.5;
}

.director-board-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.director-provider {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5f2;
  color: #067647;
  font-size: 12px;
  font-weight: 900;
}

.director-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.director-board.is-editing .director-board-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.director-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fff;
}

.director-summary-card {
  min-height: 132px;
  align-content: start;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.director-summary-text {
  margin: 0;
  color: #26324a !important;
  font-size: 13px !important;
  font-weight: 650;
  line-height: 1.65 !important;
}

.director-card-head {
  display: grid;
  gap: 3px;
}

.director-card-head strong {
  color: var(--brand-navy);
  font-size: 14px;
  line-height: 1.25;
}

.director-card-head span {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.director-card-input {
  width: 100%;
  min-height: 86px;
  padding: 9px 10px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfdff;
  color: #111827;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.director-card-input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(12, 17, 70, .08);
}

.director-board.is-collapsed .director-board-grid {
  display: none;
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.params-grid {
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.model-info-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.model-info-item {
  padding: 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
}

.model-info-item.highlight {
  border-color: rgba(15,118,110,.35);
  background: #f1fbf8;
}

.generate-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 800;
}

.generate-btn:disabled {
  opacity: .62;
  cursor: not-allowed;
  box-shadow: none;
}

.progress-modal,
.result-modal {
  backdrop-filter: blur(10px);
}

.progress-fill {
  background: linear-gradient(90deg, #1f4fd8, #0f766e);
}

.progress-content {
  background: #ffffff !important;
  color: #111827 !important;
}

.progress-content h3,
.progress-percent,
.progress-text,
.progress-detail {
  color: #111827 !important;
}

.modal-kicker {
  color: #0f766e !important;
}

.progress-percent {
  font-weight: 900;
}

.progress-detail {
  color: #475467 !important;
  line-height: 1.6;
}

.progress-bar {
  background: #e5eaf2 !important;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .studio-hero,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview,
  .generate-section {
    display: none;
  }

  .sticky-panel {
    position: static;
  }

  .section-heading {
    display: block;
    white-space: normal;
  }

  .section-heading p {
    margin-top: 8px;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .container.app-shell {
    padding: 12px 12px 32px;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-copy h2 {
    font-size: 27px;
  }

  .panel {
    padding: 16px;
  }

  .model-info-card {
    grid-template-columns: 1fr;
  }
}

/* v33 vertical beginner-friendly workflow */
.flow-shell {
  max-width: 1060px;
}

.flow-main {
  display: grid;
  gap: 18px;
}

.flow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: center;
  margin: 18px 0 0;
  padding: 30px;
  border: 1px solid #e9d7c3;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255,251,245,.98), rgba(255,255,255,.80)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='300' viewBox='0 0 900 300'%3E%3Crect width='900' height='300' fill='%23fbf1e6'/%3E%3Cpath d='M0 230 C160 170 260 250 410 190 C560 130 650 175 900 78 L900 300 L0 300 Z' fill='%23070b3f' fill-opacity='.09'/%3E%3Cpath d='M612 52h210v196H612z' fill='%23efd3b5' fill-opacity='.34'/%3E%3Cpath d='M650 92h130M650 132h170M650 172h96' stroke='%23070b3f' stroke-opacity='.16' stroke-width='12'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow-md);
}

.flow-hero h2 {
  margin: 8px 0 10px;
  color: var(--brand-navy);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.flow-hero p {
  max-width: 680px;
  margin: 0;
  color: #475467;
  font-size: 15px;
  line-height: 1.75;
}

.flow-hints {
  display: grid;
  gap: 8px;
}

.flow-hints span {
  display: block;
  padding: 12px 14px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  color: var(--brand-navy);
  font-weight: 800;
}

.flow-step {
  scroll-margin-top: 96px;
}

.flow-step .section-heading {
  align-items: baseline;
}

.flow-params {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.flow-info-card {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.generate-panel {
  border-color: rgba(199, 157, 115, .38);
  background: linear-gradient(180deg, #ffffff, #fff8ef);
}

.generate-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-board {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fff;
}

.task-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.task-board-head h3 {
  margin: 2px 0 0;
  color: var(--brand-navy);
  font-size: 16px;
}

.task-board-stats {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f9efe5;
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 900;
}

.task-board-list {
  display: grid;
  gap: 8px;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf4;
}

.task-card-main {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.task-card-main strong {
  color: var(--brand-ink);
}

.task-card-main span,
.task-meta,
.task-empty {
  color: #667085;
  font-size: 12px;
}

.task-progress {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe4d8;
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-navy), #c79d73);
}

.task-card.status-succeeded {
  border-color: rgba(15, 118, 110, .35);
}

.task-card.status-failed {
  border-color: rgba(220, 38, 38, .35);
}

.creative-cards .option-card {
  border-color: #c7d7e8;
  background: #fbfdff;
}

.creative-cards .option-card.selected {
  border-color: #070b3f;
  background: #070b3f;
  color: #f5d7b8;
}

.creative-hint {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.history-action-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-storage-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef8f5;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.works-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf4;
  color: #566070;
  font-size: 13px;
  line-height: 1.6;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.history-filter-btn {
  padding: 8px 12px;
  border: 1px solid #dfcfbd;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-navy);
  font-weight: 800;
  cursor: pointer;
}

.history-filter-btn.active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff8ef;
}

.reference-video-box {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(12, 17, 70, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 240, 230, 0.72));
  border-radius: 8px;
}

.reference-video-box.is-locked {
  background: #f2f4f7;
  border-color: #d8dde8;
  color: #667085;
}

.reference-video-box.is-locked input,
.reference-video-box.is-locked button {
  cursor: not-allowed;
}

.reference-video-box.is-locked .reference-video-grid,
.reference-video-box.is-locked .reference-upload-row,
.reference-video-box.is-locked .reference-video-title,
.reference-video-box.is-locked .reference-video-desc {
  opacity: .48;
}

.reference-vip-notice {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #f2d6b8;
  color: #8a4b14;
  font-weight: 800;
  line-height: 1.55;
}

.reference-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.reference-video-title {
  font-weight: 800;
  color: var(--brand-navy);
  font-size: 17px;
}

.reference-video-desc {
  margin-top: 4px;
  color: #5c6785;
  line-height: 1.6;
  font-size: 14px;
}

.reference-video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.reference-video-result {
  display: none;
  margin-top: 14px;
}

.reference-video-result.show {
  display: block;
}

.reference-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: #53617e;
  font-size: 13px;
  line-height: 1.5;
}

.reference-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.reference-analysis-grid > div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(12, 17, 70, 0.1);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 8px;
}

.reference-analysis-grid b {
  display: block;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.reference-analysis-grid span,
.reference-risk {
  color: #53617e;
  line-height: 1.55;
  font-size: 13px;
}

.reference-risk {
  margin: 0 0 12px;
}

.reference-prompt-preview {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf4;
}

.reference-prompt-preview b {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-navy);
}

.reference-prompt-preview p {
  margin: 0;
  color: #344054;
  line-height: 1.65;
}

.reference-result-actions,
.membership-rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.membership-rules {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(12, 17, 70, .1);
  color: #53617e;
  font-size: 12px;
}

.membership-rules strong {
  color: var(--brand-navy);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.work-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.work-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.work-thumb {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: #070b3f;
}

.work-thumb video,
.work-thumb img,
.work-thumb-empty {
  width: 100%;
  height: 100%;
}

.work-thumb video,
.work-thumb img {
  display: block;
  object-fit: cover;
}

.work-image-thumb {
  background: #f7f3ed;
}

.work-thumb-empty {
  display: grid;
  place-items: center;
  color: #efd3b5;
  font-weight: 900;
}

.work-body {
  min-width: 0;
}

.work-head,
.work-meta,
.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.work-head {
  justify-content: space-between;
}

.work-head strong {
  color: #0f766e;
}

.work-head span,
.work-meta {
  color: #667085;
  font-size: 12px;
}

.work-prompt {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.work-error {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #b42318;
  font-size: 12px;
  line-height: 1.5;
}

.work-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f7f3ed;
}

.work-actions {
  margin-top: 10px;
}

.work-actions .btn {
  min-width: 72px;
}

.feedback-box {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf5;
}

.feedback-title {
  margin-bottom: 8px;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
}

.feedback-score-row,
.feedback-tags,
.feedback-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.feedback-score-row {
  margin-bottom: 4px;
}

.feedback-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.feedback-star-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d0a98a;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.feedback-star-btn.active {
  color: #f59e0b;
}

.feedback-star-btn:hover {
  border-color: #f5c56f;
  background: #fff8e1;
}

.feedback-zero-btn {
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid #dbc5b1;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 800;
  cursor: pointer;
}

.feedback-zero-btn.active {
  border-color: #0b1a5b;
  background: #0b1a5b;
  color: #fff;
}

.feedback-score-label {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.feedback-tags {
  margin-top: 8px;
}

.feedback-tag {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #ead8c8;
  border-radius: 999px;
  background: #fff;
  color: #53617e;
  font-size: 12px;
}

.feedback-comment {
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  color: #24304f;
  resize: vertical;
}

.feedback-submit-row {
  justify-content: flex-end;
  margin-top: 8px;
}

.preference-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(8, 12, 34, .48);
}

.preference-modal.show {
  display: flex;
}

.preference-card {
  width: min(920px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}

.preference-head,
.preference-actions,
.preference-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.preference-head h3 {
  margin: 2px 0 0;
  color: var(--brand-navy);
}

.preference-close {
  width: 34px;
  height: 34px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf5;
  color: var(--brand-navy);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.preference-help {
  margin: 12px 0;
  color: #53617e;
  line-height: 1.6;
}

.preference-status {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.preference-status span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f7f3ed;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.preference-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: #24304f;
  font-weight: 800;
}

.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preference-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
}

.preference-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 9px 10px;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  color: #24304f;
  line-height: 1.5;
  resize: vertical;
}

.preference-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.advanced-table-title {
  margin: 18px 0 10px;
  color: var(--brand-navy);
  font-weight: 900;
}

.history-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  background: #ffffff !important;
  color: #111827 !important;
}

.history-table thead th {
  background: #f9efe5 !important;
  color: var(--brand-navy) !important;
  border-bottom: 1px solid #ead8c8 !important;
  font-weight: 900;
}

.history-table tbody tr,
.history-table tbody td {
  background: #ffffff !important;
  color: #111827 !important;
}

.history-table tbody tr:nth-child(even) td {
  background: #fffaf4 !important;
}

.history-table tbody tr:hover td {
  background: #eef2ff !important;
  color: var(--brand-ink) !important;
}

.history-table .text-muted {
  color: #667085 !important;
}

.history-table .btn {
  min-width: 72px;
  color: var(--brand-navy) !important;
}

.history-table .history-download-btn {
  background: var(--brand-navy) !important;
  border-color: var(--brand-navy) !important;
  color: #fff8ef !important;
  box-shadow: 0 14px 28px rgba(7, 11, 63, .18);
}

.history-table .history-play-btn {
  background: #fff !important;
  border-color: #d9c6b2 !important;
  color: var(--brand-navy) !important;
}

@media (max-width: 900px) {
  .flow-hero,
  .flow-params,
  .flow-info-card {
    grid-template-columns: 1fr !important;
  }

  .flow-hero h2 {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .flow-hero {
    padding: 22px;
  }

  .flow-hero h2 {
    font-size: 27px;
  }

  .brand-logo {
    width: 148px;
  }

  .generate-toolbar,
  .task-card,
  .work-card {
    grid-template-columns: 1fr;
  }

  .template-grid,
  .intent-grid,
  .works-grid,
  .preference-grid,
  .reference-video-grid,
  .reference-analysis-grid,
  .director-board-grid {
    grid-template-columns: 1fr;
  }

  .director-board-head {
    display: grid;
  }

  .director-board-actions {
    justify-content: flex-start;
  }

  .reference-video-head {
    flex-direction: column;
    align-items: stretch;
  }

  .reference-upload-row {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Mobile assistant phase 1: single workbench, no forked frontend. */
.mobile-only {
  display: none;
}

.mobile-assistant-panel {
  display: none;
}

.mobile-upload-actions,
.mobile-voice-actions,
.mobile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mobile-voice-primary {
  margin: 14px 0;
}

.mobile-talk-button {
  width: 100%;
  border: 0;
  border-radius: 28px;
  padding: 22px 20px;
  background: linear-gradient(135deg, #081252 0%, #1835a6 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(8, 18, 82, 0.28);
  cursor: pointer;
  display: grid;
  gap: 8px;
  place-items: center;
  text-align: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-talk-button.is-recording {
  background: linear-gradient(135deg, #bd2222 0%, #f06a2d 100%);
  box-shadow: 0 18px 44px rgba(189, 34, 34, 0.34);
  transform: scale(0.99);
}

.mobile-talk-icon {
  font-size: 34px;
  line-height: 1;
}

.mobile-talk-main {
  font-size: clamp(26px, 8vw, 38px);
  font-weight: 950;
  letter-spacing: 0.04em;
}

.mobile-talk-sub {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  opacity: 0.9;
}

.mobile-talk-tip,
.mobile-auto-fill-note {
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 10px;
}

.mobile-auto-fill-note {
  background: rgba(8, 18, 82, 0.04);
  border: 1px dashed rgba(8, 18, 82, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
}

.mobile-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.mobile-steps span {
  border: 1px solid rgba(8, 18, 82, 0.16);
  border-radius: 999px;
  color: #081252;
  font-weight: 800;
  padding: 8px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.mobile-intent-text {
  margin-top: 12px;
  min-height: 112px;
  resize: vertical;
}

.mobile-intent-card {
  margin-top: 14px;
  border: 1px solid rgba(8, 18, 82, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 16px;
}

.mobile-card-title {
  color: #081252;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.mobile-card-meta {
  color: #667085;
  font-weight: 700;
  margin-bottom: 8px;
}

.mobile-card-warn {
  color: #9a5b00;
  background: #fff7e6;
  border: 1px dashed #e4b067;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.mobile-intent-card pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #111827;
  background: rgba(8, 18, 82, 0.04);
  border-radius: 12px;
  padding: 12px;
  line-height: 1.65;
  margin: 0;
}

.mobile-edit-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-edit-grid label {
  color: #667085;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.mobile-edit-grid input,
.mobile-edit-grid textarea {
  border: 1px solid rgba(8, 18, 82, 0.14);
  border-radius: 12px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  padding: 10px 12px;
  width: 100%;
}

.mobile-toggle-intent {
  border: 1px solid rgba(8, 18, 82, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #081252;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 16px;
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  body {
    overflow-x: hidden;
  }

  body.preference-open {
    overflow: hidden;
  }

  .mobile-only,
  .mobile-assistant-panel {
    display: block;
  }

  .flow-hero {
    display: none;
  }

  .flow-main {
    gap: 14px;
  }

  .nav {
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 14px;
  }

  .nav-brand {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    align-items: center;
  }

  .nav-brand .brand-logo {
    width: 72px;
    max-width: 72px;
  }

  .nav-brand h1 {
    font-size: 20px;
    line-height: 1.2;
    margin: 0;
  }

  .nav-brand p {
    display: none;
  }

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

  .nav-actions > .btn,
  .nav-actions > a.btn,
  .nav-actions button,
  .nav-actions a {
    width: 100%;
    min-height: 42px;
  }

  .nav-user {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 8px;
  }

  #userName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-credits {
    white-space: nowrap;
    font-size: 13px;
  }

  .mobile-upload-actions,
  .mobile-voice-actions,
  .mobile-card-actions {
    display: flex;
    flex-direction: column;
  }

  .mobile-upload-actions .btn {
    background: #081252;
    color: #fff;
    border-color: #081252;
    font-size: 17px;
    font-weight: 900;
  }

  .mobile-talk-button {
    min-height: 154px;
    border-radius: 24px;
    position: relative;
  }

  .mobile-talk-button::after {
    content: "松手自动填写方案";
    position: absolute;
    right: 14px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-talk-button.is-recording::after {
    content: "正在听，松手结束";
  }

  .app-shell,
  .container,
  main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .main-content,
  .content-grid,
  .intent-grid,
  .params-grid,
  .template-grid,
  .model-grid {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .nav,
  .site-header,
  .hero,
  .section-heading,
  .flex-between,
  .generate-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .section,
  .panel,
  .history-section {
    border-radius: 20px;
    padding: 16px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .section-title,
  .hero-title {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-subtitle,
  .section-heading p,
  .form-group label,
  .form-control,
  .info-bar,
  .works-note,
  .intent-summary,
  .model-desc,
  .model-prompt-tip {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .brand,
  .nav-actions,
  .nav-user {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .nav-user {
    display: flex;
    gap: 8px;
  }

  .nav-user span,
  .nav-user a,
  .nav-user button,
  .nav-actions a,
  .nav-actions button {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .user-pill,
  .credit-pill,
  .recharge-link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .upload-area {
    min-height: 150px;
    max-width: 100%;
    overflow: hidden;
  }

  .upload-icon {
    width: 58px;
    height: 58px;
    font-size: 30px;
  }

  .upload-text,
  .upload-hint,
  .info-bar,
  .works-note {
    font-size: 13px;
    line-height: 1.65;
  }

  .mobile-upload-actions .btn,
  .mobile-voice-actions .btn,
  .mobile-card-actions .btn,
  .generate-toolbar .btn,
  .generate-btn {
    min-height: 46px;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mobile-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    gap: 6px;
  }

  .mobile-steps span:last-child {
    grid-column: auto;
  }

  .mobile-steps span {
    font-size: 12px;
    padding: 7px 6px;
  }

  .intent-form-section.mobile-collapsed .intent-form-body,
  .intent-form-section.mobile-collapsed > .form-group,
  .intent-form-section.mobile-collapsed > .intent-grid,
  .intent-form-section.mobile-collapsed > .prompt-preview-card,
  .intent-form-section.mobile-collapsed > .reference-video-box,
  .intent-form-section.mobile-collapsed #advancedPromptDetails {
    display: none !important;
  }

  .intent-form-section.mobile-collapsed {
    padding-bottom: 12px;
  }

  .intent-form-section.mobile-collapsed .section-heading {
    margin-bottom: 0;
  }

  .intent-form-section.mobile-collapsed .section-heading p {
    display: none;
  }

  .mobile-collapsible-heading {
    gap: 10px;
  }

  .mobile-toggle-intent {
    width: 100%;
  }

  .mobile-intent-card {
    padding: 14px;
  }

  .mobile-edit-grid {
    gap: 8px;
  }

  .mobile-edit-grid input,
  .mobile-edit-grid textarea {
    min-height: 42px;
    font-size: 14px;
  }

  .mobile-edit-grid textarea {
    min-height: 72px;
  }

  .mobile-steps span,
  .mobile-intent-card,
  .mobile-intent-card pre,
  .mobile-intent-text {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .form-control,
  input,
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .upload-image-grid,
  .task-board,
  .task-board-list,
  .history-filters,
  .work-card,
  .template-card,
  .option-card,
  .model-card {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .advanced-only,
  .reference-video-box {
    display: none !important;
  }

  .advanced-prompt-box,
  #advancedPromptDetails {
    display: none;
  }

  #historyList,
  .history-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .flow-shell {
    padding: 12px 10px 72px;
  }

  .nav {
    display: block;
    border: 1px solid rgba(250, 229, 202, .22);
    border-radius: 22px;
    padding: 13px;
    background:
      radial-gradient(circle at 0 0, rgba(231, 190, 143, .18), transparent 34%),
      linear-gradient(145deg, #090d48 0%, #11175f 56%, #070b38 100%);
    box-shadow: 0 18px 46px rgba(8, 12, 56, .22);
  }

  .nav-brand {
    grid-template-columns: 76px 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .nav-brand .brand-logo {
    width: 76px;
    max-width: 76px;
  }

  .nav-brand h1 {
    font-size: 21px;
    letter-spacing: .02em;
  }

  .nav-brand p {
    display: none;
  }

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

  .nav-user {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(233, 219, 204, .78);
    border-radius: 20px;
    background:
      linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,250,244,.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .74), 0 12px 24px rgba(8, 13, 73, .1);
    font-size: 13px;
  }

  .nav-user #userName {
    color: #081252;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
  }

  .nav-user .nav-credits {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f1fbf8;
    color: #0f766e;
    font-size: 14px;
    font-weight: 950;
  }

  .nav-user .recharge-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 74px;
    min-height: 34px;
    padding: 5px 14px;
    border-radius: 13px;
    background: linear-gradient(135deg, #081252, #17206d);
    color: #fff8ef !important;
    font-weight: 900;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(8, 18, 82, .16);
  }

  .nav-actions > .btn,
  .nav-actions > a.btn,
  .nav-actions button,
  .nav-actions a {
    min-height: 38px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
  }

  #oneClickBtn {
    grid-column: 1 / -1;
  }

  .flow-step {
    margin-bottom: 10px;
  }

  .flow-step .section-heading {
    gap: 4px;
    margin-bottom: 10px;
  }

  .flow-step .section-heading > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .flow-step .section-title {
    font-size: clamp(23px, 7vw, 30px);
  }

  .flow-step .section-heading p {
    font-size: 13px;
    line-height: 1.45;
  }

  .upload-area {
    min-height: 112px;
    padding: 13px 10px;
    border-radius: 18px;
  }

  .upload-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 8px;
    border-radius: 13px;
  }

  .upload-text {
    font-size: 14px;
  }

  .upload-hint {
    max-width: 260px;
    margin: 6px auto 0;
    font-size: 12px;
    line-height: 1.55;
  }

  .mobile-upload-actions .btn {
    min-height: 46px;
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(8, 18, 82, .18);
  }

  .mobile-assistant-panel {
    padding-top: 12px;
  }

  .mobile-assistant-panel .section-heading p,
  .mobile-auto-fill-note {
    display: none;
  }

  .mobile-steps {
    display: none;
  }

  .mobile-steps span {
    padding: 7px 3px;
    border-radius: 999px;
    font-size: 10px;
    white-space: nowrap;
  }

  .mobile-voice-box {
    gap: 10px;
  }

  .mobile-talk-button {
    min-height: 96px;
    border-radius: 18px;
  }

  .mobile-talk-icon {
    font-size: 22px;
  }

  .mobile-talk-main {
    font-size: 23px;
  }

  .mobile-talk-sub {
    font-size: 11px;
  }

  .mobile-talk-tip {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
  }

  .mobile-voice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mobile-intent-text {
    min-height: 74px;
  }

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

  .flow-params .param-group {
    margin: 0;
  }

  .flow-params .param-group:first-child {
    grid-column: 1 / -1;
  }

  .flow-params label {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .flow-params .form-control {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 15px;
  }

  .flow-info-card {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
    margin-top: 10px;
  }

  .flow-info-card .model-info-item {
    min-height: 66px;
    padding: 8px 6px;
    border-radius: 14px;
  }

  .flow-info-card .model-info-item:first-child {
    grid-column: auto;
  }

  .flow-info-card .model-info-item:not(.highlight) {
    display: none;
  }

  .flow-info-card .model-info-item.highlight {
    grid-column: 1 / -1;
    min-height: 58px;
  }

  .flow-info-card .model-info-value {
    font-size: 14px;
    line-height: 1.35;
  }

  .flow-info-card .model-info-label {
    margin-top: 3px;
    font-size: 11px;
  }

  .model-desc,
  .model-tip {
    display: none;
  }

  .spec-panel .section-heading {
    margin-bottom: 8px;
  }

  .spec-panel .section-heading p {
    display: none;
  }

  .preference-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .preference-card {
    width: 100%;
    max-height: 88vh;
    padding: 16px;
    border-radius: 22px 22px 14px 14px;
  }

  .preference-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .preference-field textarea {
    min-height: 58px;
  }

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

  .preference-actions .btn-primary {
    grid-column: 1 / -1;
  }
}
