:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: #101312;
  --panel-soft: #171b19;
  --panel-muted: #202622;
  --line: rgba(164, 255, 145, 0.14);
  --line-bright: rgba(164, 255, 145, 0.38);
  --text: #f3f7f3;
  --muted: #9aa39d;
  --dim: #68726c;
  --green: #41ff87;
  --green-soft: #c9ff7a;
  --green-deep: #0d2a17;
  --gold: #e9c27b;
  --danger: #ff8178;
  --radius: 8px;
  --sidebar: 358px;
  --surface-0: #070908;
  --surface-1: #0d100f;
  --surface-2: #141917;
  --surface-3: #1b211e;
  --glass: rgba(16, 20, 18, 0.82);
  --glow: rgba(65, 255, 135, 0.3);
  --glow-strong: rgba(65, 255, 135, 0.46);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.48);
  --shadow-md: 0 16px 42px rgba(0, 0, 0, 0.34);
  --focus-ring: 0 0 0 3px rgba(65, 255, 135, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

button:disabled,
.is-disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 48%, rgba(58, 103, 40, 0.38), transparent 20rem),
    #000;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 22px;
  border-bottom: 1px solid #171a1a;
  background: #030403;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 132px;
  color: var(--green);
  font-size: 24px;
  font-weight: 700;
}

.brand-mark,
.avatar,
.bot-mark {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #29f079, #0da84d);
}

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

.brand-mark::before {
  width: 14px;
  height: 14px;
  content: "";
  border: 5px solid #eaffee;
  border-right-color: transparent;
  border-radius: 999px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #838687;
  font-size: 16px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #31f182, #0cb950);
  color: #021509;
  font-size: 12px;
  font-weight: 800;
}

.ai-badge {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, #28ef77, #128743);
  color: #06150c;
  font-size: 13px;
  font-weight: 900;
}

.nav-spacer {
  flex: 1;
}

.vip {
  position: relative;
  height: 35px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #15110a;
  color: #f3d79e;
  font-weight: 700;
}

.vip::after {
  position: absolute;
  top: -7px;
  right: -6px;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 2px 9px 2px 9px;
  background: #d99e61;
  transform: rotate(28deg);
}

.avatar {
  width: 34px;
  height: 34px;
  margin-left: 30px;
}

.avatar::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #eaffee;
  box-shadow: 0 11px 0 3px #eaffee;
}

.layout {
  display: grid;
  min-height: calc(100vh - 70px);
  grid-template-columns: var(--sidebar) 1fr;
}

.sidebar {
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  background: #1d1f25;
  border-right: 1px solid #151719;
  color: #989b9d;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px 22px;
  font-size: 20px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-icon {
  width: 13px;
  height: 13px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
}

.collapse {
  width: 26px;
  height: 24px;
  position: relative;
}

.collapse:hover,
.back:hover {
  color: #e6ebe8;
}

.collapse::before,
.collapse::after {
  position: absolute;
  right: 0;
  content: "";
  height: 3px;
  border-radius: 99px;
  background: #b9bdc0;
}

.collapse::before {
  top: 4px;
  width: 20px;
}

.collapse::after {
  bottom: 5px;
  width: 26px;
}

.collapse span {
  position: absolute;
  right: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  border-left: 3px solid #b9bdc0;
  border-bottom: 3px solid #b9bdc0;
  transform: rotate(45deg);
}

.new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 62px);
  height: 56px;
  margin: 0 31px 18px;
  border: 2px solid #d5d6da;
  border-radius: 6px;
  background: transparent;
  color: #ebedef;
  font-size: 17px;
}

.new-chat::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.side-section {
  border-top: 1px solid #31343a;
  padding: 18px 30px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px - 154px);
  min-height: 0;
}

.side-label {
  margin-bottom: 14px;
  color: #9da0a5;
  font-size: 15px;
}

.empty-history {
  text-align: center;
  line-height: 2.1;
  color: #878a8f;
}

.workspace {
  min-width: 0;
  padding: 0 0 100px;
}

.workspace {
  min-height: calc(100vh - 70px);
  padding: 0;
}

.quick-actions {
  position: absolute;
  top: 28px;
  right: 38px;
  z-index: 5;
  display: flex;
  gap: 22px;
}

.quick-actions button,
.back-home {
  border: 0;
  background: transparent;
  color: #d9dddd;
  font-size: 15px;
}

.back-home {
  position: absolute;
  top: 28px;
  left: 36px;
  z-index: 5;
}

.hero-empty {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 34px;
}

.prompt-center {
  width: min(1004px, 100%);
  transform: translateY(-18px);
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 40px;
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 600;
}

.bot-mark {
  width: 52px;
  height: 52px;
  background: #1d1f25;
  box-shadow: inset 0 0 0 11px #16181c;
}

.bot-face {
  width: 30px;
  height: 20px;
  border: 3px solid #b4d5ff;
  border-radius: 11px;
  background: #f2fff6;
  position: relative;
}

.bot-face::before,
.bot-face::after {
  position: absolute;
  top: 6px;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 99px;
  background: #446cff;
}

.bot-face::before {
  left: 6px;
}

.bot-face::after {
  right: 6px;
}

.prompt-box {
  position: relative;
  overflow: hidden;
  border: 1px solid #454948;
  border-radius: 21px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.05), rgba(75, 165, 75, 0.1)),
    rgba(21, 24, 21, 0.83);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.prompt-box textarea {
  display: block;
  width: 100%;
  height: 168px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 30px 26px 16px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}

.prompt-box textarea::placeholder {
  color: #969b9b;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 0 16px 16px 18px;
}

.chip,
.stage-button,
.ghost-button,
.primary-button,
.dark-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  white-space: nowrap;
}

.chip {
  min-height: 40px;
  gap: 8px;
  padding: 0 14px;
  background: #2b2f2e;
  color: #c4c7c8;
  border: 1px solid #343938;
  font-size: 14px;
}

.chip:hover {
  border-color: #5f6965;
  background: #333837;
  color: #f0f4f1;
}

.chip select {
  max-width: 138px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  appearance: none;
}

.chip.is-disabled {
  color: #7d8182;
}

.watermark-chip {
  background: transparent;
  color: #d3d6d4;
  gap: 6px;
}

.send-button {
  height: 44px;
  margin-left: auto;
  padding: 0 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #caff65, #61f4a2);
  color: #103010;
  font-size: 17px;
  font-weight: 700;
}

.timeline {
  width: min(938px, calc(100% - 64px));
  margin: 18px auto 0;
  padding-top: 42px;
}

.user-bubble-row,
.agent-row,
.timeline-agent-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
}

.user-bubble-row,
.timeline-user-row {
  display: grid;
  grid-template-columns: minmax(0, max-content) 42px;
  align-items: start;
  justify-content: end;
  margin-left: 0;
  margin-bottom: 26px;
  gap: 16px;
}

.user-bubble {
  width: fit-content;
  max-width: min(680px, 72vw);
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #384f28, #173e24);
  color: #e8f3e7;
  font-size: 15px;
  line-height: 1.65;
}

.small-avatar {
  width: 22px;
  height: 22px;
  margin-top: 6px;
}

.agent-avatar {
  width: 34px;
  height: 34px;
  margin-top: 16px;
  border: 1px solid #818b99;
}

.agent-message {
  margin-bottom: 42px;
}

.agent-intro {
  margin: 15px 0 12px;
  color: #cfd3d1;
  font-size: 15px;
  line-height: 1.65;
}

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

.info-card {
  overflow: hidden;
  height: 360px;
  border-radius: 8px;
  border: 1px solid #242827;
  background: #1c1f1d;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 18px 0 22px;
  color: #eef3ef;
  font-size: 15px;
  border-bottom: 1px solid #242726;
}

.card-tools {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #e5ebe8;
}

.card-body {
  height: calc(100% - 48px);
  overflow-y: auto;
  padding: 16px 22px 20px;
  color: #bdc2be;
  font-size: 14px;
  line-height: 1.78;
}

.card-body::-webkit-scrollbar,
.history-list::-webkit-scrollbar {
  width: 6px;
}

.card-body::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #3c423f;
}

.card-title-icon {
  display: inline-block;
  margin-right: 8px;
  color: #ba91ff;
}

.card-icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #e8eeeb;
  font-size: 20px;
  line-height: 1;
}

.card-icon-button:hover {
  border-color: #4c5550;
  background: #282d2b;
}

.material-item {
  margin-bottom: 8px;
}

.material-item strong {
  color: #9bdc64;
}

.material-copy-item {
  margin: 0 0 18px;
  color: #ecefed;
}

.material-copy-item strong {
  color: #b8ff6d;
  font-weight: 700;
}

.material-copy-item span {
  color: #e4e7e4;
}

.shot-script-body {
  display: grid;
  gap: 12px;
  padding-right: 14px;
}

.shot-copy-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.shot-copy-index {
  color: #e6ebe8;
  font-size: 15px;
  line-height: 1.7;
}

.shot-copy-content {
  padding: 10px 14px;
  border-radius: 6px;
  background: #282b29;
  color: #e8ece9;
}

.shot-copy-content p {
  margin: 0 0 8px;
}

.shot-copy-content p:last-child {
  margin-bottom: 0;
}

.shot-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  padding: 0 0 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid #2b2e2d;
}

.shot-row:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.shot-index {
  color: #b7bab8;
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.primary-button {
  min-height: 35px;
  padding: 0 16px;
  border: 1px solid #edf0ec;
  border-radius: 6px;
  background: #eef0ed;
  color: #191b1b;
}

.dark-button,
.ghost-button {
  min-height: 35px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #333938;
  border-radius: 6px;
  background: #1e211f;
  color: #d5d8d6;
}

.dark-button:hover,
.ghost-button:hover {
  border-color: #5a625f;
  background: #292e2c;
}

.ghost-button {
  border: 1px solid #353938;
  background: transparent;
}

.right-confirm {
  justify-content: flex-end;
  margin-top: 0;
  margin-bottom: 30px;
}

.right-confirm .primary-button {
  background: #234525;
  color: #d9f5d8;
}

.asset-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 15px;
  margin-top: 10px;
}

.asset-card,
.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background:
    radial-gradient(circle at 52% 22%, #f4d6bc 0 7%, transparent 8%),
    linear-gradient(90deg, #1b1714 0 18%, #5c4634 18% 48%, #1f211c 48% 100%);
  text-align: left;
}

.asset-card.is-active,
.video-card.is-active {
  border-color: #9fff78;
}

.asset-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(86deg, transparent 0 34%, #161615 35% 44%, transparent 45%),
    radial-gradient(ellipse at 49% 25%, #f5ded1 0 10%, transparent 11%),
    linear-gradient(110deg, transparent 0 48%, #7a1317 49% 70%, #231817 70%);
  opacity: 0.9;
}

.asset-card::after {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  content: attr(data-caption);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.36);
  color: #f5f5f0;
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.asset-card:hover::after,
.asset-card.is-active:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.asset-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.asset-card:hover .asset-tools,
.video-card:hover .asset-tools {
  opacity: 1;
  transform: translateY(0);
}

.icon-button {
  width: 24px;
  height: 24px;
  background: transparent;
  color: #eef2ef;
}

.result-note {
  margin: 14px 0 10px;
  color: #d0d4d1;
  font-size: 14px;
  line-height: 1.65;
}

.video-card {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(115deg, #9d6d63 0 8%, #294f6f 22%, #11184a 52%, #33364a 100%);
}

.video-card strong {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #f3f6f1;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(3, 23, 29, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.video-card.is-ready {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent),
    radial-gradient(circle at 50% 50%, rgba(202, 255, 101, 0.24), transparent 18%),
    linear-gradient(115deg, #62463f, #136474 24%, #1a225d 58%, #201d2c);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play-mark span {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
}

.play-mark span::before {
  content: "";
  margin-left: 4px;
  border-left: 14px solid #eaf8e8;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.final-player.is-playing .play-mark span::before {
  width: 14px;
  height: 18px;
  margin-left: 0;
  border: 0;
  border-left: 5px solid #eaf8e8;
  border-right: 5px solid #eaf8e8;
}

.progress-card {
  min-height: 132px;
  padding: 22px;
  border: 1px solid #323837;
  border-radius: 7px;
  background: #151817;
}

.progress-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #eef2ef;
}

.bar {
  overflow: hidden;
  height: 8px;
  border-radius: 99px;
  background: #272b2a;
}

.bar-fill {
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77f38f, #caff65);
  transition: width 0.28s ease;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.step-item.is-active {
  color: #dffadc;
}

.footer-input {
  position: sticky;
  bottom: 0;
  z-index: 10;
  width: min(938px, calc(100% - 64px));
  margin: 0 auto;
  padding: 12px 0 18px;
  background: linear-gradient(180deg, transparent, #000 28%);
}

.mini-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid #333837;
  border-radius: 8px;
  background: #151817;
}

.mini-composer input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 8px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 6px;
  background: #1f3322;
  color: #dffadc;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

.agent-workspace {
  position: relative;
  min-height: calc(100vh - 70px);
  padding: 0 32px 150px;
  background: #030303;
}

.agent-workspace.is-timeline {
  padding-top: 18px;
}

.mvp-grid {
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr) 31%;
  gap: 24px;
  min-height: calc(100vh - 164px);
}

.mvp-left-panel,
.right-panel,
.script-main {
  min-width: 0;
}

.mvp-left-panel {
  display: flex;
  flex-direction: column;
  padding: 12px 0 110px;
  border-right: 1px solid #202225;
}

.user-summary {
  width: min(480px, calc(100% - 30px));
  margin: 0 auto 16px;
  padding: 13px 18px;
  border-radius: 8px;
  background: #314f3e;
  color: #eff8ed;
  font-size: 13px;
  line-height: 1.7;
}

.mvp-left-panel h3,
.prompt-panel h3 {
  margin: 12px 0 12px;
  color: #dcdfdc;
  font-size: 15px;
}

.mvp-left-panel > h3,
.mvp-left-panel .stage-copy,
.mvp-left-panel .quote-card,
.mvp-left-panel .stage-actions,
.mvp-left-panel .asset-thumbs,
.mvp-left-panel .shot-list {
  width: min(500px, calc(100% - 30px));
  margin-left: auto;
  margin-right: auto;
}

.stage-copy {
  color: #cfd4d0;
  font-size: 13px;
  line-height: 1.8;
}

.quote-card {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(124, 143, 132, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    #151719;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.quote-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #eef4ee;
  font-size: 15px;
  font-weight: 650;
}

.quote-card-title small {
  color: #8e9992;
  font-size: 12px;
  font-weight: 500;
}

.quote-table {
  padding: 8px;
}

.quote-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 64px 64px 72px;
  gap: 10px;
  min-height: 46px;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: #d1d7d3;
  font-size: 14px;
}

.quote-table .quote-row:not(.quote-head):nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.quote-table .quote-row:not(.quote-head):hover {
  background: rgba(140, 190, 150, 0.07);
}

.quote-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.quote-name i {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: rgba(151, 215, 141, 0.1);
  color: #b8e58f;
  font-style: normal;
  font-size: 12px;
}

.quote-name em {
  overflow: hidden;
  color: #eef3ee;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-row b {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(80, 184, 119, 0.15);
  color: #9ee6a2;
  font-size: 11px;
  font-weight: 650;
}

.quote-head {
  min-height: 34px;
  color: #8f9a94;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.quote-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px;
  padding: 15px 12px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8eee8;
}

.quote-total strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f7f9f1;
  font-size: 20px;
}

.quote-total i {
  font-style: normal;
  font-size: 17px;
}

.quote-card p {
  margin: 0;
  padding: 0 20px 12px;
  color: #929b95;
  font-size: 12px;
  line-height: 1.6;
}

.quote-mode {
  margin: 0 16px 16px;
  padding: 10px 12px;
  border: 1px solid rgba(118, 171, 115, 0.22);
  border-radius: 6px;
  background: rgba(98, 141, 94, 0.12);
  color: #c7e8c1;
  font-size: 13px;
}

.script-main,
.right-panel {
  padding-top: 32px;
}

.right-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.tall-card {
  min-height: 236px;
}

.asset-layout {
  grid-template-columns: 34% minmax(420px, 1fr) 25%;
}

.asset-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.asset-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  border-radius: 5px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent),
    linear-gradient(135deg, #1b6383, #172157 50%, #65606c);
  color: #f6f7f4;
}

.asset-thumb span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 12px;
}

.asset-thumb.is-active {
  border-color: #9fff78;
}

.asset-preview-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 32px 0 64px;
}

.asset-preview,
.video-preview {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: calc(100vh - 220px);
  border-radius: 5px;
  background:
    radial-gradient(circle at 60% 42%, rgba(255, 193, 150, 0.18), transparent 18%),
    linear-gradient(125deg, #63849d, #152565 42%, #686477);
  color: rgba(255, 255, 255, 0.92);
  font-size: 26px;
  font-weight: 700;
}

.preview-next {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(19, 24, 45, 0.82);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.prompt-panel {
  padding: 48px 0 100px;
  color: #e5e9e5;
}

.prompt-panel h3 {
  color: #9fff78;
}

.prompt-panel p {
  margin: 0 0 22px;
  color: #e8ece8;
  font-size: 14px;
  line-height: 1.8;
}

.bottom-actions {
  position: absolute;
  right: 32px;
  bottom: 40px;
  display: flex;
  gap: 28px;
}

.green-button {
  min-width: 160px;
  background: linear-gradient(135deg, #bfff61, #65f0a2);
  color: #102b12;
}

.shot-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.shot-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #2d3032;
  border-radius: 5px;
  background: #202226;
  color: #d9ddda;
  text-align: left;
}

.shot-list-item.is-active {
  border-color: #9fff78;
  background: #243128;
}

.shot-list-item b {
  color: #9fff78;
  font-size: 12px;
  font-weight: 600;
}

.video-preview {
  aspect-ratio: 16 / 9;
  max-height: none;
  background:
    radial-gradient(circle at 52% 42%, rgba(202, 255, 101, 0.26), transparent 18%),
    linear-gradient(115deg, #6a4c43, #146274 25%, #1b2460 58%, #25222f);
}

.video-preview strong {
  position: absolute;
  left: 24px;
  bottom: 22px;
  font-size: 18px;
}

.video-preview.is-final {
  box-shadow: 0 0 0 1px rgba(159, 255, 120, 0.35);
}

.center-actions {
  justify-content: center;
}

.floating-progress {
  margin-bottom: 16px;
}

.floating-composer {
  position: fixed;
  left: 40px;
  bottom: 22px;
  z-index: 15;
  width: min(520px, calc(34vw - 20px));
  min-height: 72px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(91, 164, 75, 0.12)),
    #171a1a;
}

.chat-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-top: 4px;
  border-radius: 999px;
  background: #1e2227;
  box-shadow: inset 0 0 0 6px #171a1f;
}

.chat-avatar .bot-face {
  width: 18px;
  height: 13px;
  border-width: 2px;
}

.chat-avatar .bot-face::before,
.chat-avatar .bot-face::after {
  top: 4px;
  width: 3px;
  height: 3px;
}

.chat-avatar .bot-face::before {
  left: 4px;
}

.chat-avatar .bot-face::after {
  right: 4px;
}

.chat-config {
  margin-top: 8px;
  color: #d8f4d4;
  font-size: 13px;
  line-height: 1.55;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  min-height: 31px;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  background: #171a1d;
}

.meta-list dt {
  color: #89908d;
}

.meta-list dd {
  margin: 0;
  color: #eef3ee;
}

.inspector-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.inspector-actions .primary-button,
.inspector-actions .dark-button {
  min-height: 44px;
}

.api-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.api-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #2b3030;
  border-radius: 5px;
  background: #171a1d;
}

.api-list b {
  color: #9fff78;
  font-size: 12px;
}

.api-list span {
  overflow-wrap: anywhere;
  color: #eef3ee;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.api-list em {
  color: #8f9692;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.timeline-agent-row .agent-avatar {
  margin-top: 0;
}

.timeline-agent-row .agent-message {
  min-width: 0;
  max-width: 100%;
}

.timeline-agent-row .bar {
  width: min(520px, 100%);
}

.timeline-quote {
  width: min(640px, 100%);
  margin-top: 14px;
}

.final-result-block {
  width: min(720px, 100%);
}

.final-result-block .video-card {
  width: 100%;
}

@media (max-width: 980px) {
  :root {
    --sidebar: 228px;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

  .brand {
    min-width: auto;
    font-size: 20px;
  }

  .cards-two,
  .asset-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .user-bubble-row {
    margin-left: 0;
  }

  .agent-workspace {
    padding: 86px 18px 120px;
  }

  .quick-actions {
    right: 18px;
  }

  .mvp-grid,
  .asset-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mvp-left-panel {
    padding-bottom: 20px;
    border-right: 0;
    border-bottom: 1px solid #202225;
  }

  .mvp-left-panel > h3,
  .mvp-left-panel .stage-copy,
  .mvp-left-panel .quote-card,
  .mvp-left-panel .stage-actions,
  .mvp-left-panel .asset-thumbs,
  .mvp-left-panel .shot-list,
  .user-summary {
    width: 100%;
  }

  .asset-preview,
  .video-preview {
    max-height: none;
  }

  .prompt-panel {
    padding: 10px 0 80px;
  }

  .bottom-actions {
    position: static;
    margin-top: 20px;
  }

  .floating-composer {
    left: 18px;
    width: calc(100% - 36px);
  }

  .timeline {
    width: calc(100% - 36px);
  }

  .timeline-user-row {
    margin-left: 0;
  }

  .cards-two,
  .asset-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-nav {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-label,
  .empty-history {
    display: none;
  }

  .hero-empty {
    min-height: 72vh;
  }

  .config-row {
    flex-wrap: wrap;
  }

  .send-button {
    width: 100%;
  }

  .timeline,
  .footer-input {
    width: calc(100% - 28px);
  }

  .quote-row {
    grid-template-columns: minmax(120px, 1fr) 42px 42px 52px;
    gap: 6px;
    padding: 0 10px;
    font-size: 12px;
  }

  .quote-name {
    gap: 6px;
  }

  .quote-name i {
    width: 20px;
    height: 20px;
  }

  .quote-total strong {
    font-size: 17px;
  }

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

.layout.sidebar-collapsed {
  grid-template-columns: 58px 1fr;
}

.sidebar.is-collapsed {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 28px;
}

.sidebar.is-collapsed .restore {
  width: 34px;
  height: 34px;
  border: 1px solid #34383a;
  border-radius: 6px;
  background: #24272d;
}

.back,
.collapse {
  border: 0;
  background: transparent;
  color: inherit;
}

.side-foot {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 24px;
  color: #777c80;
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.history-item {
  position: relative;
  display: block;
  min-height: 64px;
  padding: 12px 96px 12px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #22252a;
  text-align: left;
  cursor: pointer;
}

.history-item:hover,
.history-item.is-active {
  border-color: rgba(159, 255, 120, 0.46);
  background: #26302b;
}

.history-main {
  min-width: 0;
}

.history-main strong,
.history-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-main strong {
  color: #eef2ef;
  font-size: 13px;
}

.history-main span {
  margin-top: 5px;
  color: #8e9496;
  font-size: 12px;
}

.history-actions {
  display: none;
  gap: 6px;
  position: absolute;
  right: 10px;
  top: 50%;
  align-items: center;
  transform: translateY(-50%);
  padding-left: 8px;
  background: linear-gradient(90deg, transparent, #22252a 18%);
}

.history-item:hover .history-actions {
  display: flex;
}

.history-item.is-active .history-actions {
  background: linear-gradient(90deg, transparent, #26302b 18%);
}

.history-actions button,
.card-tools button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9cecb;
  font-size: 12px;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  padding: 0 24px 8px;
  color: #7f8585;
  font-size: 12px;
}

.prompt-box.has-error {
  border-color: var(--danger);
}

.parameter-popover {
  position: fixed;
  left: var(--popover-left);
  top: var(--popover-top);
  z-index: 80;
  transform: translateY(var(--popover-translate-y));
  min-width: 220px;
  width: min(var(--popover-width), calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(520px, calc(100vh - 96px));
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #3d4240;
  border-radius: 8px;
  background: #181b1b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.style-popover {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 9px;
}

.mode-popover,
.duration-popover {
  display: grid;
  gap: 8px;
}

.size-popover {
  display: grid;
  gap: 10px;
}

.popover-title {
  color: #929997;
  font-size: 12px;
}

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

.option-button,
.style-option {
  min-height: 34px;
  border: 1px solid #333837;
  border-radius: 6px;
  background: #242827;
  color: #d5dad7;
}

.option-button {
  padding: 0 12px;
}

.option-button.is-active,
.style-option.is-active {
  border-color: #9fff78;
  color: #efffec;
}

.style-option {
  display: grid;
  gap: 7px;
  padding: 8px;
  text-align: left;
}

.style-preview {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, rgba(202, 255, 101, 0.34), transparent 18%),
    linear-gradient(115deg, #254d5d, #1b2037 54%, #644c3f);
}

.style-option strong {
  font-size: 12px;
  font-weight: 500;
}

.upload-box {
  display: grid;
  gap: 5px;
  margin: 16px 18px 0;
  padding: 13px 16px;
  border: 1px dashed #4c5350;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #cfd5d1;
  font-size: 13px;
}

.upload-box input {
  display: none;
}

.upload-box small {
  color: #848b89;
}

.upload-box.has-image {
  grid-template-columns: 1fr auto;
  align-items: center;
  border-style: solid;
}

.upload-box.has-image button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  background: #2e3331;
  color: #e5e9e5;
}

.upload-thumb {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preline {
  white-space: pre-line;
}

.info-card.is-editing {
  padding-bottom: 12px;
}

.card-editor {
  width: calc(100% - 24px);
  min-height: 250px;
  margin: 12px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #3a403e;
  border-radius: 6px;
  outline: 0;
  background: #121514;
  color: #eef2ef;
  line-height: 1.7;
}

.edit-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px;
}

.asset-card.is-loading,
.video-card.is-loading {
  border-color: #262b2a;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent),
    #1a1d1c;
  background-size:
    180% 100%,
    auto;
  animation: skeleton-shimmer 1.25s linear infinite;
}

.asset-card.is-loading::after,
.video-card.is-loading::after {
  position: absolute;
  inset: auto 12px 12px;
  content: "生成中...";
  padding: 7px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.38);
  color: #e8ece8;
  font-size: 12px;
  opacity: 1;
  transform: none;
}

.asset-card.is-loading::before {
  display: none;
}

.asset-card.is-loading .asset-tools,
.video-card.is-loading .asset-tools {
  display: none;
}

@keyframes skeleton-shimmer {
  from {
    background-position:
      180% 0,
      0 0;
  }
  to {
    background-position:
      -180% 0,
      0 0;
  }
}

.asset-tools span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  color: #eef2ef;
  font-size: 15px;
}

.asset-tools span:hover {
  background: rgba(255, 255, 255, 0.14);
}

.final-player {
  width: 100%;
}

.final-video-subtitle {
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: 48px;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.85),
    0 0 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.final-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
  color: #fff;
  opacity: 0;
  pointer-events: auto;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  transform: translateY(8px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.final-player:hover .final-video-controls,
.final-player:focus-visible .final-video-controls {
  opacity: 1;
  transform: translateY(0);
}

.final-video-progress {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.final-video-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55ed8d, #c9ff77);
}

.final-player:hover .final-video-progress span,
.final-player:focus-visible .final-video-progress span,
.final-player.is-playing .final-video-progress span {
  width: 18%;
}

.final-video-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  color: #eef4ef;
  font-size: 13px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

.final-video-play,
.final-video-fullscreen {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 15px;
}

.final-video-fullscreen {
  cursor: pointer;
}

.final-video-fullscreen:hover {
  color: #b6ff6f;
}

.final-video-time,
.final-video-speed {
  font-weight: 600;
}

.final-video-spacer {
  flex: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.68);
}

.preview-modal {
  position: relative;
  width: min(760px, 100%);
  padding: 18px;
  border: 1px solid #3a403f;
  border-radius: 8px;
  background: #171a1a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 20px;
}

.preview-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  pointer-events: none;
}

.preview-modal h3 {
  margin: 0 0 8px;
  color: #eef2ef;
}

.preview-modal p {
  margin: 0;
  color: #bfc5c1;
  line-height: 1.7;
}

.shot-preview-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.shot-preview-modal {
  position: relative;
  width: min(1196px, calc(100vw - 60px));
  padding: 30px 42px 44px;
  border-radius: 22px;
  background: #353335;
  color: #f5f5f5;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.shot-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.shot-preview-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.shot-preview-modal .modal-close {
  position: static;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.13);
}

.shot-preview-stage {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px 4px 0 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(202, 255, 101, 0.18), transparent 16%),
    linear-gradient(110deg, #62584b, #273d45 32%, #17191e 68%, #506b55);
  color: #fff;
}

.shot-preview-index,
.shot-preview-title {
  position: absolute;
  left: 22px;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.shot-preview-index {
  top: 18px;
  font-size: 13px;
  color: #c8ff8e;
}

.shot-preview-title {
  bottom: 20px;
  font-size: 16px;
}

.shot-preview-stage .large-play {
  position: absolute;
  inset: 0;
}

.shot-preview-stage .large-play span {
  width: 92px;
  height: 92px;
  background: rgba(0, 0, 0, 0.72);
}

.shot-preview-stage .large-play span::before {
  border-left-width: 28px;
  border-top-width: 19px;
  border-bottom-width: 19px;
}

.shot-preview-stage .large-play.is-playing span::before {
  width: 24px;
  height: 30px;
  border: 0;
  border-left: 8px solid #eaf8e8;
  border-right: 8px solid #eaf8e8;
}

.shot-progress {
  display: grid;
  grid-template-columns: repeat(var(--shot-count, 4), minmax(0, 1fr));
  gap: 0;
  height: 12px;
  border-radius: 0 0 999px 999px;
  background: #050505;
}

.shot-progress-segment {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.shot-progress-segment:first-child {
  border-left: 0;
  border-bottom-left-radius: 999px;
}

.shot-progress-segment:last-child {
  border-bottom-right-radius: 999px;
}

.shot-progress-segment span {
  position: absolute;
  inset: 0;
  width: 0;
  background: #a8ff7a;
}

.shot-progress-segment.is-past span,
.shot-progress-segment.is-active span {
  width: 100%;
}

.shot-progress-segment.is-active span {
  background: linear-gradient(90deg, #b7ff79, #7df58e);
}

.bottom-composer {
  position: fixed;
  left: calc(var(--sidebar) + (100vw - var(--sidebar) - min(860px, calc(100vw - var(--sidebar) - 88px))) / 2);
  bottom: 20px;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(860px, calc(100vw - var(--sidebar) - 88px));
  padding: 8px;
  border: 1px solid #333837;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(91, 164, 75, 0.12)),
    #151817;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.sidebar-collapsed .bottom-composer {
  left: calc(58px + (100vw - 58px - min(860px, calc(100vw - 58px - 88px))) / 2);
  width: min(860px, calc(100vw - 58px - 88px));
}

.bottom-composer textarea {
  min-width: 0;
  height: 72px;
  max-height: 72px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  padding: 7px 10px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.bottom-composer .quote-hint {
  grid-column: 1 / -1;
  padding: 0 10px 2px;
  color: #b8ff6d;
  font-size: 12px;
}

.bottom-composer textarea::placeholder {
  color: #858b89;
}

.bottom-composer textarea::-webkit-scrollbar {
  width: 5px;
}

.bottom-composer textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #3c423f;
}

.bottom-composer .primary-button {
  align-self: end;
  min-height: 38px;
}

@media (max-width: 720px) {
  .layout.sidebar-collapsed {
    display: grid;
    grid-template-columns: 52px 1fr;
  }

  .style-popover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100vw - 64px);
  }

  .parameter-popover {
    max-width: calc(100vw - 48px);
  }
}

/* Minimal tech visual refresh */
body {
  background:
    linear-gradient(180deg, #070807 0%, #020303 52%, #050706 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
.chip:focus-visible,
.history-item:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.app-shell {
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.08), transparent 28%),
    linear-gradient(180deg, #070807 0%, #020303 54%, #060806 100%);
}

.top-nav {
  border-bottom: 1px solid rgba(164, 255, 145, 0.1);
  background: rgba(4, 6, 5, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}

.brand {
  color: var(--green);
  letter-spacing: 0;
}

.brand-mark,
.avatar,
.bot-mark {
  background: linear-gradient(145deg, var(--green), #11b95c);
  box-shadow:
    0 0 22px rgba(65, 255, 135, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-links {
  color: #8b958f;
}

.nav-item:hover,
.quick-actions button:hover,
.back-home:hover {
  color: #effff0;
}

.nav-badge {
  background: linear-gradient(135deg, var(--green-soft), var(--green));
  color: #06140b;
  box-shadow: 0 0 18px rgba(65, 255, 135, 0.28);
}

.sidebar {
  border-right: 1px solid rgba(164, 255, 145, 0.1);
  background:
    linear-gradient(180deg, rgba(65, 255, 135, 0.05), transparent 26%),
    #0b0e0d;
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.24);
}

.side-head,
.side-section {
  border-color: rgba(164, 255, 145, 0.1);
}

.back,
.collapse,
.side-label {
  color: #a6aea9;
}

.new-chat {
  height: 52px;
  border: 1px solid rgba(164, 255, 145, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(18, 22, 20, 0.72);
  color: #f3fff3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.new-chat:hover {
  border-color: rgba(65, 255, 135, 0.58);
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(22, 28, 24, 0.9);
}

.history-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.history-item:hover {
  border-color: rgba(164, 255, 145, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.history-item.is-active {
  border-color: rgba(65, 255, 135, 0.38);
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.16), rgba(255, 255, 255, 0.025));
  box-shadow: inset 3px 0 0 var(--green);
}

.history-actions button,
.card-tools button,
.card-icon-button,
.icon-button,
.modal-close {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #cdd6d0;
}

.history-actions button:hover,
.card-tools button:hover,
.card-icon-button:hover,
.icon-button:hover,
.modal-close:hover {
  border-color: rgba(65, 255, 135, 0.44);
  background: rgba(65, 255, 135, 0.12);
  color: #f1fff0;
}

.hero-title {
  color: #f4f8f4;
  text-shadow: 0 0 32px rgba(65, 255, 135, 0.1);
}

.bot-mark {
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.16), rgba(255, 255, 255, 0.04)),
    #111513;
}

.bot-face {
  border-color: rgba(201, 255, 122, 0.8);
  background: #f3fff4;
}

.bot-face::before,
.bot-face::after {
  background: #16c964;
}

.prompt-box,
.bottom-composer,
.mini-composer,
.parameter-popover,
.preview-modal,
.shot-preview-modal,
.progress-card,
.quote-card,
.info-card,
.prompt-panel,
.user-summary {
  border: 1px solid rgba(164, 255, 145, 0.14);
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.08), rgba(255, 255, 255, 0.025) 44%, rgba(255, 255, 255, 0.01)),
    rgba(15, 18, 17, 0.94);
  box-shadow: var(--shadow-md);
}

.prompt-box {
  border-radius: 18px;
}

.prompt-box:focus-within,
.bottom-composer:focus-within,
.mini-composer:focus-within {
  border-color: rgba(65, 255, 135, 0.52);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(65, 255, 135, 0.12),
    0 0 34px rgba(65, 255, 135, 0.12);
}

.prompt-box textarea,
.bottom-composer textarea,
.mini-composer input,
.card-editor {
  color: #f4f8f4;
}

.prompt-box textarea::placeholder,
.bottom-composer textarea::placeholder,
.mini-composer input::placeholder {
  color: #78827b;
}

.chip,
.option-button,
.style-option,
.dark-button,
.ghost-button {
  border: 1px solid rgba(164, 255, 145, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    #151a18;
  color: #d7dfd9;
}

.chip:hover,
.option-button:hover,
.style-option:hover,
.dark-button:hover,
.ghost-button:hover {
  border-color: rgba(65, 255, 135, 0.4);
  background:
    linear-gradient(180deg, rgba(65, 255, 135, 0.12), rgba(255, 255, 255, 0.025)),
    #19201c;
  color: #f3fff2;
}

.option-button.is-active,
.style-option.is-active,
.chip.is-active {
  border-color: rgba(65, 255, 135, 0.72);
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.22), rgba(201, 255, 122, 0.08)),
    #111813;
  color: #f3fff2;
  box-shadow: 0 0 0 1px rgba(65, 255, 135, 0.1);
}

.send-button,
.primary-button,
.green-button {
  border: 1px solid rgba(201, 255, 122, 0.72);
  background: linear-gradient(135deg, var(--green-soft), var(--green));
  color: #05150b;
  font-weight: 750;
  box-shadow:
    0 10px 26px rgba(65, 255, 135, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.send-button:hover,
.primary-button:hover,
.green-button:hover {
  filter: brightness(1.05);
  box-shadow:
    0 14px 34px rgba(65, 255, 135, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.user-bubble {
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.22), rgba(22, 74, 39, 0.9)),
    #17351f;
  color: #effff0;
  border: 1px solid rgba(164, 255, 145, 0.22);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.agent-intro,
.stage-copy,
.result-note,
.prompt-panel p,
.preview-modal p {
  color: #c4ccc6;
}

.agent-avatar {
  box-shadow: 0 0 24px rgba(65, 255, 135, 0.2);
}

.info-card {
  border-radius: 8px;
}

.card-head,
.quote-card-title {
  border-bottom: 1px solid rgba(164, 255, 145, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.card-head,
.prompt-panel h3,
.mvp-left-panel h3,
.quote-card-title,
.progress-title {
  color: #f0f7f1;
}

.card-body,
.shot-copy-content,
.quote-row {
  color: #c8d0ca;
}

.material-copy-item strong,
.material-item strong,
.quote-name i,
.quote-row b,
.bottom-composer .quote-hint,
.shot-preview-index {
  color: var(--green-soft);
}

.shot-copy-content,
.quote-table .quote-row:not(.quote-head):nth-child(odd) {
  background: rgba(255, 255, 255, 0.035);
}

.card-body::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.bottom-composer textarea::-webkit-scrollbar-thumb {
  background: rgba(65, 255, 135, 0.3);
}

.asset-card,
.video-card,
.asset-thumb,
.asset-preview,
.preview-media,
.shot-preview-stage {
  border: 1px solid rgba(164, 255, 145, 0.14);
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.16), transparent 34%),
    linear-gradient(155deg, #111614 0%, #18201c 42%, #2a302b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.asset-card::before {
  background:
    linear-gradient(120deg, transparent 0 28%, rgba(201, 255, 122, 0.18) 29% 32%, transparent 33%),
    linear-gradient(155deg, rgba(12, 18, 16, 0.2), rgba(65, 255, 135, 0.08));
}

.asset-card::after,
.asset-thumb span {
  background: rgba(4, 7, 6, 0.72);
  color: #eef7ef;
  backdrop-filter: blur(10px);
}

.asset-card.is-active,
.video-card.is-active,
.asset-thumb.is-active,
.shot-list-item.is-active {
  border-color: rgba(65, 255, 135, 0.78);
  box-shadow:
    0 0 0 1px rgba(65, 255, 135, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.26);
}

.asset-tools,
.asset-tools span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 7, 0.68);
  backdrop-filter: blur(12px);
}

.video-card strong,
.shot-preview-index {
  background: rgba(3, 8, 5, 0.68);
  border: 1px solid rgba(164, 255, 145, 0.16);
}

.play-mark span,
.shot-preview-stage .large-play span {
  background: rgba(3, 8, 5, 0.72);
  border: 1px solid rgba(164, 255, 145, 0.18);
  box-shadow: 0 0 34px rgba(65, 255, 135, 0.18);
  backdrop-filter: blur(10px);
}

.play-mark span::before,
.shot-preview-stage .large-play span::before {
  border-left-color: #ecfff0;
}

.bar {
  background: rgba(255, 255, 255, 0.07);
}

.bar-fill,
.shot-progress-segment.is-active span {
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  box-shadow: 0 0 20px rgba(65, 255, 135, 0.34);
}

.quote-card {
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.1), rgba(255, 255, 255, 0.025) 44%, rgba(0, 0, 0, 0.16)),
    #101412;
}

.quote-head {
  color: #9fa9a2;
  background: rgba(255, 255, 255, 0.035);
}

.quote-name i {
  background: rgba(65, 255, 135, 0.12);
}

.quote-total {
  border-top-color: rgba(164, 255, 145, 0.14);
}

.quote-total strong {
  color: #f6fff2;
  text-shadow: 0 0 24px rgba(65, 255, 135, 0.12);
}

.quote-mode {
  border-color: rgba(65, 255, 135, 0.22);
  background: rgba(65, 255, 135, 0.09);
  color: #d9ffd0;
}

.parameter-popover {
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(12, 15, 14, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.style-preview {
  background:
    linear-gradient(135deg, rgba(65, 255, 135, 0.26), transparent 40%),
    linear-gradient(155deg, #111614, #28322c);
}

.upload-box {
  border-color: rgba(164, 255, 145, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.modal-backdrop,
.shot-preview-backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(6px);
}

.preview-modal,
.shot-preview-modal {
  border-color: rgba(164, 255, 145, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.08), rgba(255, 255, 255, 0.025)),
    #101312;
}

.shot-preview-modal {
  border-radius: 18px;
}

.shot-progress {
  background: #050705;
}

.shot-progress-segment {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.bottom-composer {
  border-color: rgba(164, 255, 145, 0.18);
  background:
    linear-gradient(145deg, rgba(65, 255, 135, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(9, 12, 11, 0.94);
  backdrop-filter: blur(18px);
}

@media (max-width: 720px) {
  .prompt-box,
  .bottom-composer,
  .parameter-popover,
  .preview-modal,
  .shot-preview-modal {
    border-radius: 10px;
  }

  .hero-title {
    text-shadow: none;
  }
}

/* Consumer web polish v2: restrained neon accents */
:root {
  --bg: #070808;
  --panel: #111313;
  --panel-soft: #171a1a;
  --panel-muted: #202323;
  --line: rgba(255, 255, 255, 0.09);
  --line-bright: rgba(255, 255, 255, 0.16);
  --text: #f2f4f3;
  --muted: #a1a8a5;
  --dim: #6f7774;
  --green: #53f28b;
  --green-soft: #b6ff6f;
  --green-deep: #12351f;
  --glow: rgba(83, 242, 139, 0.16);
  --glow-strong: rgba(83, 242, 139, 0.26);
  --sidebar: 320px;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 3px rgba(83, 242, 139, 0.14);
}

body {
  background: #070808;
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 220px),
    #070808;
}

.top-nav {
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 9, 0.9);
  box-shadow: none;
}

.brand {
  min-width: 118px;
  font-size: 21px;
  color: #f1f5f2;
}

.brand-mark,
.avatar,
.bot-mark {
  background: linear-gradient(145deg, #3ef083, #1db965);
  box-shadow: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
}

.nav-links {
  gap: 24px;
  color: #8e9692;
  font-size: 14px;
}

.nav-badge {
  background: rgba(83, 242, 139, 0.14);
  color: #99f6bb;
  box-shadow: none;
}

.vip {
  background: linear-gradient(145deg, #f0cf86, #ad7d3d);
  box-shadow: none;
}

.layout {
  min-height: calc(100vh - 64px);
}

.sidebar {
  top: 64px;
  height: calc(100vh - 64px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #101212;
  box-shadow: none;
}

.side-head {
  padding: 24px 24px 18px;
  font-size: 17px;
}

.new-chat {
  width: calc(100% - 48px);
  height: 46px;
  margin: 0 24px 16px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #171a1a;
  color: #edf1ef;
  font-size: 15px;
  box-shadow: none;
}

.new-chat:hover {
  border-color: rgba(83, 242, 139, 0.45);
  background: #1b1f1d;
}

.side-section {
  height: calc(100vh - 64px - 142px);
  padding: 16px 20px;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.side-label {
  margin: 0 4px 12px;
  font-size: 13px;
}

.history-item {
  min-height: 62px;
  padding: 10px 38px 10px 12px;
  border-color: transparent;
  border-radius: 8px;
}

.history-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.history-item.is-active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 2px 0 0 var(--green);
}

.workspace {
  min-height: calc(100vh - 64px);
}

.hero-empty {
  align-items: flex-start;
  min-height: calc(100vh - 64px);
  padding: 92px 40px 120px;
}

.prompt-center {
  width: min(920px, 100%);
  transform: none;
}

.hero-title {
  gap: 18px;
  margin-bottom: 32px;
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 650;
  color: #f4f6f4;
  text-shadow: none;
}

.bot-mark {
  width: 46px;
  height: 46px;
  background: #161919;
  box-shadow: inset 0 0 0 8px #111313;
}

.prompt-box,
.bottom-composer,
.mini-composer,
.parameter-popover,
.preview-modal,
.shot-preview-modal,
.progress-card,
.quote-card,
.info-card,
.prompt-panel,
.user-summary {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    #111313;
  box-shadow: var(--shadow-md);
}

.prompt-box {
  border-radius: 14px;
}

.prompt-box:focus-within,
.bottom-composer:focus-within,
.mini-composer:focus-within {
  border-color: rgba(83, 242, 139, 0.5);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(83, 242, 139, 0.08);
}

.prompt-box textarea {
  height: 156px;
  padding: 26px 24px 14px;
  font-size: 15px;
}

.config-row {
  min-height: 56px;
  padding: 0 14px 14px;
}

.chip,
.option-button,
.style-option,
.dark-button,
.ghost-button {
  border-color: rgba(255, 255, 255, 0.1);
  background: #181b1b;
  color: #d5dbd7;
  box-shadow: none;
}

.chip:hover,
.option-button:hover,
.style-option:hover,
.dark-button:hover,
.ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #202424;
  color: #f0f3f1;
}

.option-button.is-active,
.style-option.is-active,
.chip.is-active {
  border-color: rgba(83, 242, 139, 0.55);
  background: rgba(83, 242, 139, 0.1);
  color: #eaffef;
  box-shadow: none;
}

.send-button,
.primary-button,
.green-button {
  border-color: rgba(83, 242, 139, 0.7);
  background: linear-gradient(135deg, #c9ff77, #55ed8d);
  color: #07140c;
  box-shadow: 0 10px 24px rgba(83, 242, 139, 0.16);
}

.send-button:hover,
.primary-button:hover,
.green-button:hover {
  box-shadow: 0 12px 28px rgba(83, 242, 139, 0.22);
}

.timeline {
  width: min(880px, calc(100% - 72px));
  margin-top: 10px;
  padding-top: 34px;
}

.user-bubble {
  max-width: min(620px, 68vw);
  border-color: rgba(83, 242, 139, 0.2);
  background: #183822;
  color: #f1fff3;
  box-shadow: none;
}

.agent-intro {
  margin-top: 8px;
}

.cards-two {
  gap: 14px;
}

.info-card {
  border-radius: 8px;
  background: #111313;
}

.card-head,
.quote-card-title {
  height: 46px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.card-body {
  color: #c4cbc6;
}

.card-title-icon {
  color: var(--green);
}

.material-copy-item strong,
.material-item strong,
.quote-name i,
.quote-row b,
.bottom-composer .quote-hint,
.shot-preview-index {
  color: #a8f5b9;
}

.shot-copy-content,
.quote-table .quote-row:not(.quote-head):nth-child(odd) {
  background: rgba(255, 255, 255, 0.035);
}

.asset-grid,
.video-grid {
  gap: 14px;
}

.asset-card,
.video-card,
.asset-thumb,
.asset-preview,
.preview-media,
.shot-preview-stage {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(145deg, #171a1a 0%, #202626 58%, #2c302d 100%);
  box-shadow: none;
}

.asset-card::before {
  background:
    linear-gradient(120deg, transparent 0 28%, rgba(255, 255, 255, 0.08) 29% 32%, transparent 33%),
    linear-gradient(155deg, rgba(10, 12, 12, 0.2), rgba(255, 255, 255, 0.04));
}

.asset-card.is-active,
.video-card.is-active,
.asset-thumb.is-active,
.shot-list-item.is-active {
  border-color: rgba(83, 242, 139, 0.58);
  box-shadow: 0 0 0 1px rgba(83, 242, 139, 0.08);
}

.asset-tools,
.asset-tools span {
  background: rgba(6, 8, 8, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
}

.asset-tools span:hover,
.history-actions button:hover,
.card-tools button:hover,
.card-icon-button:hover,
.icon-button:hover,
.modal-close:hover {
  border-color: rgba(83, 242, 139, 0.32);
  background: rgba(83, 242, 139, 0.1);
}

.progress-card {
  background: #111313;
}

.bar-fill,
.shot-progress-segment.is-active span {
  background: linear-gradient(90deg, #55ed8d, #c9ff77);
  box-shadow: none;
}

.quote-card {
  width: min(620px, 100%);
  background: #111313;
}

.quote-name i {
  background: rgba(83, 242, 139, 0.08);
}

.quote-total strong {
  color: #f3f6f3;
  text-shadow: none;
}

.quote-mode {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: #d8ded9;
}

.parameter-popover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(17, 19, 19, 0.97);
}

.style-preview {
  background:
    linear-gradient(135deg, rgba(83, 242, 139, 0.12), transparent 40%),
    linear-gradient(155deg, #171a1a, #2a302d);
}

.modal-backdrop,
.shot-preview-backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.preview-modal,
.shot-preview-modal {
  background: #111313;
}

.bottom-composer {
  width: min(780px, calc(100vw - var(--sidebar) - 96px));
  left: calc(var(--sidebar) + (100vw - var(--sidebar) - min(780px, calc(100vw - var(--sidebar) - 96px))) / 2);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(17, 19, 19, 0.96);
}

.sidebar-collapsed .bottom-composer {
  width: min(780px, calc(100vw - 58px - 96px));
  left: calc(58px + (100vw - 58px - min(780px, calc(100vw - 58px - 96px))) / 2);
}

@media (max-width: 980px) {
  :root {
    --sidebar: 240px;
  }

  .hero-empty {
    padding-top: 72px;
  }
}

@media (max-width: 720px) {
  .top-nav {
    height: 58px;
    padding: 0 16px;
  }

  .hero-empty {
    padding: 52px 18px 92px;
  }

  .prompt-center,
  .timeline {
    width: calc(100% - 28px);
  }

  .cards-two {
    gap: 12px;
  }

  .bottom-composer,
  .sidebar-collapsed .bottom-composer {
    left: 14px;
    right: 14px;
    width: auto;
  }
}

/* Flow polish: first-step config confirmation and quieter text focus */
.prompt-box:focus-within {
  border-color: rgba(83, 242, 139, 0.42);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(83, 242, 139, 0.08);
}

.prompt-box:focus-within .input-meta {
  border-top-color: transparent;
}

.input-meta {
  min-height: 26px;
  background: transparent !important;
  border: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

.input-meta::before,
.input-meta::after {
  display: none !important;
  content: none !important;
}

.basic-config-card {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    #2b2d2e;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.basic-config-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.085);
  color: #f1f3f2;
  text-align: left;
}

.basic-config-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
}

.basic-config-row span {
  overflow: hidden;
  color: #d7dcda;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basic-config-row strong {
  color: #f4f6f5;
  font-size: 14px;
  font-weight: 500;
}

.basic-config-row i {
  width: 0;
  height: 0;
  border-top: 6px solid #d8dcda;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.basic-config-row.is-switch i {
  width: 28px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(83, 242, 139, 0.28);
  box-shadow: inset 13px 0 0 #dfffc9;
}

.basic-config-row.is-switch strong {
  display: block;
  min-width: 22px;
  color: #dfffc9;
  text-align: right;
}

.basic-config-row.is-switch.is-off i {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset -13px 0 0 rgba(255, 255, 255, 0.64);
}

.basic-config-row.is-switch.is-off strong {
  color: #c5cbc7;
}

.basic-config-confirm {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  border-color: rgba(182, 255, 111, 0.68);
  background: transparent;
  color: #dfffc9;
  box-shadow: none;
}

.basic-config-confirm:hover {
  background: rgba(83, 242, 139, 0.1);
  box-shadow: none;
}

@media (max-width: 720px) {
  .basic-config-card {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }
}

/* Flow polish v2: aligned config card, quote entry, inline edit completion */
.basic-config-card {
  width: min(560px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.basic-config-row {
  grid-template-columns: minmax(92px, 1fr) auto 16px;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
}

.basic-config-row strong {
  min-width: 44px;
  text-align: right;
}

.basic-config-row.is-switch {
  grid-template-columns: minmax(92px, 1fr) 22px 36px;
  column-gap: 8px;
}

.basic-config-row.is-switch i {
  position: relative;
  width: 28px;
  height: 16px;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: rgba(83, 242, 139, 0.36);
  box-shadow: none;
}

.basic-config-row.is-switch i::before {
  position: absolute;
  top: 2px;
  left: 14px;
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 999px;
  background: #e9ffef;
}

.basic-config-row.is-switch.is-off i {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.basic-config-row.is-switch.is-off i::before {
  left: 2px;
  background: rgba(255, 255, 255, 0.68);
}

.basic-config-confirm {
  margin-top: 10px;
}

.quote-entry-button {
  min-height: 35px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #b6ff6f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quote-entry-button:hover {
  color: #dcffc1;
}

.quote-modal {
  width: min(680px, calc(100vw - 44px));
  padding: 18px;
}

.quote-modal .quote-card {
  width: 100%;
  margin: 0;
  box-shadow: none;
}

.info-card.is-editing {
  padding-bottom: 0;
}

.info-card.is-editing .card-head {
  height: 48px;
}

.card-icon-button.is-confirm {
  border-color: rgba(83, 242, 139, 0.28);
  background: rgba(83, 242, 139, 0.12);
  color: #eaffef;
  font-size: 18px;
}

.info-card.is-editing .card-editor {
  display: block;
  width: calc(100% - 24px);
  height: calc(100% - 72px);
  min-height: 0;
  margin: 12px;
  resize: none;
}

.info-card.is-editing .edit-actions {
  display: none;
}

.info-card.is-editing .edit-block-list {
  display: grid;
  gap: 12px;
  height: calc(100% - 48px);
  padding: 14px 18px 18px;
}

.material-edit-item,
.shot-edit-fields {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.material-edit-item strong {
  color: #b6ff6f;
  font-size: 14px;
}

.material-edit-item textarea,
.shot-edit-fields textarea,
.shot-edit-fields input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f2f5f3;
  font-size: 14px;
  line-height: 1.65;
}

.material-edit-item textarea,
.shot-edit-fields textarea {
  min-height: 62px;
  resize: vertical;
}

.shot-edit-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.shot-edit-fields label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  color: #d8ded9;
  font-size: 14px;
  line-height: 1.6;
}

.shot-edit-fields input {
  min-width: 0;
}

/* Video preview modal refresh */
.video-preview-backdrop {
  padding: 0;
  background: rgba(0, 0, 0, 0.74);
}

.video-preview-modal {
  position: relative;
  width: min(1128px, calc(100vw - 28px));
  height: auto;
  display: grid;
  grid-template-rows: 28px auto;
  padding: 22px 24px 24px;
  border-radius: 0;
  background: #343235;
  color: #f4f4f2;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
}

.video-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  margin-bottom: 0;
}

.video-preview-head h3 {
  margin: 0;
  color: #f5f5f3;
  font-size: 14px;
  font-weight: 650;
}

.video-preview-head .modal-close {
  position: static;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 16px;
}

.video-preview-body {
  display: grid;
  grid-template-columns: minmax(0, 810px) 1fr;
  gap: 0 20px;
  align-items: start;
  min-height: 0;
  padding-top: 6px;
}

.video-preview-player {
  display: grid;
  grid-template-rows: 455px 8px;
  min-width: 0;
}

.video-preview-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 455px;
  aspect-ratio: auto;
  border-radius: 3px 3px 0 0;
  background:
    radial-gradient(circle at 32% 30%, rgba(246, 230, 220, 0.36) 0 8%, transparent 9%),
    linear-gradient(90deg, #2e2922 0%, #595249 46%, #292a25 100%);
}

.video-preview-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0.1), transparent 52%),
    radial-gradient(circle at 34% 36%, rgba(255, 245, 233, 0.2), transparent 18%);
}

.video-preview-stage .large-play {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.video-preview-stage .large-play span {
  width: 76px;
  height: 76px;
  background: rgba(0, 0, 0, 0.72);
  border: 0;
  box-shadow: none;
}

.video-preview-stage .large-play span::before {
  border-left-width: 24px;
  border-top-width: 17px;
  border-bottom-width: 17px;
}

.video-preview-stage .large-play.is-playing span::before {
  width: 20px;
  height: 26px;
  border: 0;
  border-left: 7px solid #fff;
  border-right: 7px solid #fff;
}

.final-preview-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.final-preview-modal {
  width: calc(100vw - 72px);
  height: calc(100vh - 72px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 18px;
  border-radius: 10px;
  background: #171a1a;
}

.final-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.final-preview-head h3 {
  margin: 0;
  color: #f3f5f4;
  font-size: 16px;
  font-weight: 650;
}

.final-preview-head .modal-close {
  position: static;
}

.final-preview-stage {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 45%, rgba(83, 242, 139, 0.18), transparent 18%),
    linear-gradient(135deg, #17211d, #30342e 54%, #1a1d1b);
}

.final-preview-subtitle {
  bottom: 38px;
  font-size: 18px;
}

.final-preview-stage .large-play {
  position: absolute;
  inset: 0;
}

.final-preview-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.video-preview-caption {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 28px;
  z-index: 3;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.video-preview-side {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 24px;
  height: 463px;
  padding: 4px 0 0;
  font-size: 12px;
  line-height: 1.8;
}

.video-preview-side-text {
  display: grid;
  align-content: start;
  gap: 24px;
  min-height: 0;
}

.video-preview-copy {
  color: #f1f1ef;
}

.video-preview-copy strong {
  color: #bcff79;
}

.video-preview-copy span {
  white-space: pre-line;
}

.video-preview-copy button {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  color: #e7e7e7;
  background: transparent;
}

.video-preview-player .shot-progress {
  align-self: start;
  height: 8px;
  border-radius: 0 0 999px 999px;
}

.video-preview-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 28px;
  padding: 0 0 2px;
}

.subtitle-setting-button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 68px;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.subtitle-setting-button span {
  font-size: 20px;
}

.regenerate-video-button {
  min-width: 158px;
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .video-preview-modal {
    min-height: auto;
  }

  .video-preview-body {
    grid-template-columns: 1fr;
  }

  .video-preview-side {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .basic-config-card {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }
}

/* Quoted asset composer */
.quoted-composer {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  width: min(1060px, calc(100vw - var(--sidebar) - 72px));
  left: calc(var(--sidebar) + (100vw - var(--sidebar) - min(1060px, calc(100vw - var(--sidebar) - 72px))) / 2);
  min-height: 194px;
  padding: 16px 18px;
  border-radius: 24px;
  align-items: start;
}

.sidebar-collapsed .quoted-composer {
  width: min(1060px, calc(100vw - 58px - 72px));
  left: calc(58px + (100vw - 58px - min(1060px, calc(100vw - 58px - 72px))) / 2);
}

.quoted-thumb {
  position: relative;
  overflow: visible;
  width: 102px;
  height: 102px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 22%, #f3ded7 0 12%, transparent 13%),
    linear-gradient(105deg, #171615 0 28%, #5b2b28 29% 48%, #111418 49% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.quoted-thumb::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(200, 40, 42, 0.42) 43% 62%, transparent 63%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), transparent 45%);
}

.quoted-thumb button {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #4a4e54;
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.quoted-compose-main {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.quoted-prompt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #f1f3f2;
  font-size: 15px;
  line-height: 1.7;
}

.quoted-composer textarea {
  width: 100%;
  height: 42px;
  max-height: 42px;
  padding: 0;
  color: #f3f5f4;
  font-size: 15px;
  line-height: 1.6;
}

.quoted-composer textarea::placeholder {
  color: #7d8581;
}

.quoted-compose-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  margin-top: 2px;
}

.quoted-mode-button {
  min-width: 134px;
  height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #7f8783;
}

.quoted-compose-footer::before {
  display: none;
  content: none;
}

.quoted-compose-footer .primary-button {
  min-width: 116px;
  min-height: 46px;
  margin-left: auto;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .quoted-composer,
  .sidebar-collapsed .quoted-composer {
    left: 14px;
    right: 14px;
    width: auto;
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 170px;
    border-radius: 16px;
  }

  .quoted-thumb {
    width: 72px;
    height: 72px;
  }

  .quoted-compose-footer::before {
    display: none;
  }
}
