:root {
  --bg-deep: #000000;
  --bg: #001010;
  --bg-2: #020606;
  --green-glow: #005040;
  --panel: rgba(5, 16, 17, 0.86);
  --panel-strong: rgba(7, 17, 17, 0.94);
  --line: rgba(80, 224, 176, 0.18);
  --line-strong: rgba(80, 224, 176, 0.36);
  --ink: #ffffff;
  --body-ink: #d6efec;
  --muted: #9fcac4;
  --muted-weak: #7fafaa;
  --accent: #50e0b0;
  --accent-2: #30c0c0;
  --video-blue: #168fe8;
  --accent-cool: #168fe8;
  --accent-cool-ink: #8ccfff;
  --accent-cool-soft: rgba(22, 143, 232, 0.12);
  --accent-cool-line: rgba(22, 143, 232, 0.32);
  --ok: #50e0b0;
  --warning: #fbbf24;
  --danger: #fb7185;
  --brand-gradient: linear-gradient(135deg, #50e0b0 0%, #30c0c0 54%, #168fe8 100%);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
  --glow: 0 0 0 1px rgba(80, 224, 176, 0.16), 0 0 24px rgba(80, 224, 176, 0.12);
  --glass-panel: rgba(2, 14, 14, 0.60);
  --glass-composer: rgba(2, 14, 14, 0.50);
  --glass-secondary: rgba(3, 16, 15, 0.56);
  --glass-border: rgba(139, 242, 208, 0.11);
  --glass-highlight: rgba(255, 255, 255, 0.055);
  --home-prompt-height: 119px;
  --home-prompt-textarea-height: 101px;
  --home-first-screen-bottom-gap: 20px;
  --side-nav-width: 96px;
  --nav-content-gap: 24px;
  --radius-xs: 8px;
  --radius-input: 14px;
  --radius-card: 18px;
  --radius-preview: 24px;
  --radius-panel: 24px;
  --radius-pill: 999px;
  --radius: var(--radius-panel);
  --page-y: 28px;
  --page-x: 28px;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-2) rgba(255, 255, 255, 0.035);
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius-pill);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid #001010;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #50e0b0, #30c0c0 54%, #168fe8);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--brand-gradient);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--body-ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 134, 108, .34), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(0, 134, 108, .34), transparent 28%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(180deg, #000 0%, #001010 48%, #020606 100%);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

body.home-page-active {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.policy-page-active {
  height: 100vh;
  overflow: hidden;
}

body.asset-page-active {
  height: 100vh;
  overflow: hidden;
}

body.video-page-active {
  height: 100vh;
  overflow: hidden;
}

body.home-page-active .page-shell {
  min-height: 100vh;
  padding-bottom: 28px;
  overflow: visible;
}

body.policy-page-active .page-shell {
  height: 100vh;
  padding-bottom: 28px;
  overflow: hidden;
}

body.asset-page-active .page-shell {
  height: 100vh;
  padding-bottom: 28px;
  overflow: hidden;
}

body.video-page-active .page-shell {
  height: 100vh;
  padding-bottom: 28px;
  overflow: hidden;
}

body.home-page-active .app-frame,
body.home-page-active .workspace,
body.home-page-active #page-home,
body.policy-page-active .app-frame,
body.policy-page-active .workspace,
body.policy-page-active #page-policies,
body.policy-page-active #page-policies > .layout,
body.asset-page-active .app-frame,
body.asset-page-active .workspace,
body.asset-page-active #page-assets,
body.asset-page-active .assets-stack,
body.video-page-active .app-frame,
body.video-page-active .workspace,
body.video-page-active #page-videos,
body.video-page-active .videos-page-stack,
body.video-page-active .videos-layout {
  height: 100%;
  min-height: 0;
}

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1600;
  width: min(380px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}

.toast {
  --toast-tone: 92, 211, 178;
  display: flex;
  flex-shrink: 0;
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 13px;
  align-items: flex-start;
  gap: 11px;
  overflow: hidden;
  border: 1px solid rgba(var(--toast-tone), 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(var(--toast-tone), 0.075), transparent 46%),
    rgba(3, 20, 19, 0.96);
  color: var(--ink);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px) saturate(1.12);
  opacity: 0;
  pointer-events: auto;
  transform: translate3d(18px, -3px, 0) scale(0.985);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.toast::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  border-radius: 0 999px 999px 0;
  content: "";
  background: rgb(var(--toast-tone));
  box-shadow: 0 0 14px rgba(var(--toast-tone), 0.5);
}

.toast::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(var(--toast-tone), 0.68), rgba(var(--toast-tone), 0.06));
  transform: scaleX(0);
  transform-origin: left;
}

.toast.show::after {
  animation: toast-life var(--toast-duration, 3200ms) linear forwards;
}

.toast.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.toast-success {
  --toast-tone: 80, 224, 176;
}

.toast-error {
  --toast-tone: 255, 126, 135;
}

.toast-warning {
  --toast-tone: 245, 190, 90;
}

.toast-info {
  --toast-tone: 82, 200, 220;
}

.toast-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--toast-tone), 0.28);
  border-radius: 9px;
  color: rgb(var(--toast-tone));
  background: rgba(var(--toast-tone), 0.09);
}

.toast-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.toast-content {
  min-width: 0;
  padding-top: 1px;
}

.toast-title {
  display: block;
  margin-bottom: 3px;
  color: #e2f3ef;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.toast-message {
  display: block;
  overflow-wrap: anywhere;
  color: #9fc1bb;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-line;
}

.toast.is-duplicate {
  animation: toast-duplicate 240ms ease;
}

.toast.toast-sticky::after {
  display: none;
}

.toast-action {
  display: block;
  min-height: 36px;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(var(--toast-tone), 0.55);
  border-radius: 8px;
  background: rgba(var(--toast-tone), 0.12);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.toast-close {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.toast-action:focus-visible,
.toast-close:focus-visible {
  outline: 2px solid rgb(var(--toast-tone));
  outline-offset: 2px;
}

@keyframes toast-life {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes toast-duplicate {
  50% { border-color: rgba(var(--toast-tone), 0.52); }
}

@media (max-width: 640px) {
  .toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .toast {
    min-height: 62px;
    padding: 11px 38px 11px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.show::after,
  .toast.is-duplicate {
    animation: none !important;
    transition: none !important;
  }
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.prompt-video-modal.is-front {
  z-index: 2300;
}

#confirm-modal {
  z-index: 2500;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 16, 15, 0.62);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  box-shadow: var(--shadow), var(--glow);
  transform: translate(-50%, -48%);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.script-dialog {
  width: min(760px, calc(100vw - 32px));
}

.anchors-dialog {
  display: flex;
  flex-direction: column;
  width: clamp(320px, 86vw, 1040px);
  max-height: calc(100dvh - 40px);
  padding: clamp(16px, 2vw, 22px);
  overflow: hidden;
}

.script-modal-body {
  max-height: min(64vh, 720px);
  margin: 12px 0 0;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: var(--radius-card);
  border: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(5, 16, 17, 0.9);
  color: var(--body-ink);
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.script-inspection-section + .script-inspection-section {
  margin-top: 18px;
}

.script-inspection-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.script-inspection-pre {
  max-height: none;
  margin: 0;
  padding: 14px;
  overflow: visible;
  border: 1px solid rgba(80, 224, 176, 0.11);
  border-radius: 12px;
  background: rgba(4, 16, 15, 0.62);
  color: var(--body-ink);
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.script-inspection-pre.is-compact {
  max-height: none;
}

.script-warning-list {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: #ffd89a;
  font-size: 12px;
  line-height: 1.5;
}

.script-shot-card,
.script-constraint-item {
  padding: 12px;
  border: 1px solid rgba(80, 224, 176, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.script-shot-card + .script-shot-card,
.script-constraint-item + .script-constraint-item {
  margin-top: 10px;
}

.script-shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.script-shot-head strong,
.script-constraint-item strong {
  color: var(--ink);
  font-size: 13px;
}

.script-shot-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.script-shot-card p,
.script-constraint-item p {
  margin: 6px 0 0;
  color: var(--body-ink);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.script-shot-card b {
  color: var(--ink);
}

.script-constraint-list {
  display: grid;
  gap: 10px;
}

.script-asset-segment + .script-asset-segment {
  margin-top: 14px;
}

.script-asset-segment-head {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--body-ink);
}

.script-asset-segment-head strong {
  color: var(--ink);
  font-size: 13px;
}

.script-asset-segment-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.script-asset-thumb {
  min-width: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.script-asset-thumb img,
.script-asset-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  background: rgba(4, 16, 15, 0.9);
  object-fit: cover;
}

.script-asset-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.script-asset-thumb figcaption {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.script-asset-thumb figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-asset-thumb figcaption small,
.script-empty {
  color: var(--muted);
  font-size: 11px;
}

.prompt-video-dialog {
  width: min(920px, calc(100vw - 36px));
  padding: 18px;
  border-radius: var(--radius-panel);
}

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

.prompt-video-head .confirm-title {
  max-width: min(720px, calc(100vw - 140px));
  margin: 0;
  overflow-wrap: anywhere;
}

.prompt-video-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.prompt-video-close:hover {
  border-color: var(--accent);
  background: rgba(80, 224, 176, 0.14);
  transform: translateY(-1px);
}

.prompt-video-player {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  border: 1px solid rgba(80, 224, 176, 0.14);
  border-radius: var(--radius-preview);
  background: #071313;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.generated-video-detail-modal {
  z-index: 1800;
}

.generated-detail-video-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.generated-video-detail-dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 42px);
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius-panel);
}

.generated-video-detail-body {
  min-height: 0;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: var(--radius-card);
  background: rgba(5, 16, 17, 0.72);
}

.generated-detail-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 210px));
  gap: 12px;
  align-items: start;
}

.generated-detail-video-grid.is-single {
  grid-template-columns: minmax(180px, 260px);
  justify-content: center;
}

.generated-detail-video-card {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(80, 224, 176, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.generated-detail-video-card:hover {
  border-color: rgba(80, 224, 176, 0.34);
  background: rgba(80, 224, 176, 0.08);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.generated-detail-video-media {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(4, 16, 15, 0.9);
}

.generated-detail-video-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #001010;
}

.generated-detail-video-title {
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-detail-script {
  max-height: min(64vh, 680px);
  margin: 0;
  padding: 2px;
  overflow: auto;
  color: var(--body-ink);
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.generated-detail-empty {
  min-height: 180px;
}

.anchors-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 12px;
}

.anchors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  max-height: min(68dvh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.anchors-grid .field-wide {
  grid-column: 1 / -1;
}

.anchors-grid textarea,
.anchors-grid input {
  width: 100%;
}

.anchors-form .confirm-actions {
  flex: 0 0 auto;
  margin-top: 14px;
}

.confirm-modal.show .confirm-dialog {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.confirm-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.confirm-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.confirm-message {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.confirm-button {
  min-width: 96px;
}

.page-shell {
  width: 100%;
  margin: 0;
  padding: var(--page-y) var(--page-x) 42px;
}

.app-frame {
  display: block;
  min-height: 0;
}

.side-nav {
  position: fixed;
  top: var(--page-y);
  bottom: var(--page-y);
  left: var(--page-x);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 96px;
  min-height: 0;
  gap: 6px;
  padding: 10px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-panel);
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.side-nav::before {
  position: absolute;
  inset: 0 -30px 0 -22px;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 36% 22%, rgba(80, 224, 176, 0.09), transparent 42%),
    linear-gradient(90deg, rgba(2, 15, 15, 0.9) 0%, rgba(1, 12, 12, 0.62) 48%, rgba(0, 8, 8, 0.18) 76%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  filter: blur(8px);
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.side-nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  width: 58px;
  height: auto;
  min-height: 54px;
  margin-bottom: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
}

.side-nav-brand:focus-visible {
  border-radius: 14px;
  outline: 1px solid rgba(80, 224, 176, 0.5);
  outline-offset: 4px;
}

.brand-logo {
  width: auto;
  height: 38px;
  max-width: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 16px rgba(48, 192, 192, 0.18));
}

.side-nav-brand-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 13px;
  font-weight: 900;
  filter:
    drop-shadow(0 0 2px rgba(80, 224, 176, 0.22))
    drop-shadow(0 0 5px rgba(22, 143, 232, 0.1));
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.side-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 76px;
  height: 78px;
  min-height: 78px;
  padding: 8px 7px 7px;
  border: 0;
  border-radius: var(--radius-preview);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.side-nav-item.active {
  background: linear-gradient(145deg, rgba(80, 224, 176, 0.2), rgba(48, 192, 192, 0.14) 54%, rgba(80, 224, 176, 0.12));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.42), 0 0 24px rgba(80, 224, 176, 0.1);
}

.side-nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.side-nav-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.side-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.side-nav-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.side-nav-status {
  margin-top: auto;
  padding-top: 8px;
}

.side-nav-membership-promo {
  position: relative;
  display: flex;
  width: 76px;
  min-height: 152px;
  margin-top: auto;
  padding: 12px 8px 10px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  border: 1px solid rgba(234, 200, 127, .38);
  border-radius: 14px;
  color: var(--ink);
  background: radial-gradient(ellipse at 100% 0, rgba(224, 180, 89, .2), transparent 70%), linear-gradient(160deg, #16352e, #0b1e1c 82%);
  box-shadow: inset 0 1px 0 rgba(255, 232, 177, .12), 0 8px 24px rgba(0, 0, 0, .2);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.side-nav-membership-promo::after {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(234, 200, 127, .22);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.side-nav-membership-promo:hover,
.side-nav-membership-promo:focus-visible {
  border-color: rgba(234, 200, 127, .8);
  transform: translateY(-2px);
}

.side-nav-membership-promo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.side-nav-membership-promo-kicker {
  display: grid;
  gap: 7px;
  color: #e6c88d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.side-nav-membership-promo-kicker svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.side-nav-membership-promo strong {
  margin-top: 6px;
  color: #fff3d9;
  font-size: 13px;
  line-height: 1.5;
}

.side-nav-membership-promo > span:not(.side-nav-membership-promo-kicker) {
  margin-top: 6px;
  color: #afc2b8;
  font-size: 9px;
  line-height: 1.4;
}

.side-nav-membership-promo b {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid rgba(234, 200, 127, .18);
  margin-top: auto;
  color: #e6c88d;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.side-nav-membership-promo b i { font-style: normal; font-size: 13px; font-weight: 400; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding: 14px 6px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-copy-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.panel h2 {
  margin: 0;
  line-height: 1.02;
  color: var(--ink);
}

.panel h2 {
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 900;
  line-height: 1.12;
}

.hero h1 {
  font-size: clamp(22px, 2.5vw, 34px);
  letter-spacing: -0.03em;
}

.hero-accent {
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(48, 192, 192, 0.2);
}

.hero-copy {
  max-width: 760px;
  margin: 8px 0 0;
  line-height: 1.5;
  color: var(--muted);
  font-size: 72%;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  color: var(--muted);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(80, 224, 176, 0.12);
}

.status-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(52, 209, 161, 0.12);
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 320px;
  grid-template-areas: "submit detail list";
  gap: 20px;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  margin-left: 122px;
}

.page-screen {
  display: none;
}

.page-screen.active {
  display: block;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, var(--panel-strong), var(--panel)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(80, 224, 176, 0.06);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.submit-panel { grid-area: submit; }
.detail-panel { grid-area: detail; }
.list-panel { grid-area: list; }

.submit-panel-primary {
  position: relative;
  z-index: 30;
  width: 100%;
  padding: 18px 20px 16px;
  min-height: 0;
  overflow: visible;
  background:
    radial-gradient(circle at 18% 14%, rgba(80, 224, 176, 0.06), transparent 28%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
}

.submit-panel-primary:has(.reference-upload-tile:hover) {
  z-index: 1001;
}

.home-poster {
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-preview);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), 0 0 24px rgba(80, 224, 176, 0.08);
}

.home-poster img {
  display: block;
  width: 100%;
  height: auto;
}

.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "submit"
    "list";
  align-items: start;
  gap: 20px;
}

body.home-page-active #page-home.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--page-y) - var(--page-y));
}

body.home-page-active .home-poster {
  margin-bottom: 20px;
}

body.home-page-active .home-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  align-items: stretch;
  gap: 24px;
  overflow: visible;
}

.videos-page-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow: hidden;
}

.assets-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#page-assets {
  height: calc(100vh - 56px);
  overflow: hidden;
}

#page-assets .assets-stack {
  min-height: 0;
  overflow: hidden;
}

#page-assets [data-asset-section] {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#page-assets .assets-split-layout,
#page-assets .asset-reference-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#page-assets .sidebar-panel,
#page-assets .content-panel {
  min-height: 0;
  overflow: hidden;
}

#page-assets .content-panel {
  display: flex;
  flex-direction: column;
}

#page-assets .vehicle-assets-panel .assets-split-layout {
  overflow: visible;
}

#page-assets .shared-assets-panel .assets-split-layout {
  overflow: visible;
}

#page-assets .sidebar-panel {
  position: relative;
  z-index: 3;
  overflow: visible;
}

#page-assets .shared-assets-panel .select-panel {
  z-index: 160;
}

#page-assets .shared-assets-panel .select-panel.open {
  z-index: 180;
}

#page-assets .shared-assets-panel .select-panel.open .select-panel-options {
  max-height: min(320px, calc(100dvh - 220px));
  overflow-x: hidden;
  overflow-y: auto;
}

#page-assets .shared-assets-panel .asset-toolbar {
  position: relative;
  z-index: 30;
  overflow: visible;
}

#page-assets .shared-assets-panel .asset-toolbar:has(.select-panel.open) {
  z-index: 240;
}

#page-assets .shared-assets-panel .asset-upload-form-sidebar {
  position: relative;
  z-index: 20;
  overflow: visible;
}

#page-assets .vehicle-assets-panel .select-panel {
  z-index: 160;
}

#page-assets .vehicle-assets-panel .select-panel.open {
  z-index: 180;
}

#page-assets .vehicle-assets-panel .select-panel.open .select-panel-options {
  max-height: min(320px, calc(100dvh - 220px));
  overflow-x: hidden;
  overflow-y: auto;
}

#page-assets .vehicle-assets-panel .asset-toolbar,
#page-assets .vehicle-assets-panel .asset-upload-form-sidebar {
  position: relative;
  overflow: visible;
}

#page-assets .vehicle-assets-panel .asset-toolbar {
  z-index: 30;
}

#page-assets .vehicle-assets-panel .asset-toolbar:has(.select-panel.open) {
  z-index: 240;
}

#page-assets .vehicle-assets-panel .asset-upload-form-sidebar {
  z-index: 20;
}

#page-assets .vehicle-assets-panel .asset-upload-form-sidebar:has(.select-panel.open) {
  z-index: 230;
}

.asset-section-tabs {
  order: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  padding: 2px 2px 0;
}

.asset-section-tab {
  position: relative;
  min-height: 40px;
  padding: 8px 2px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.asset-section-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 3px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: left 0.22s ease, right 0.22s ease, opacity 0.18s ease;
}

.asset-section-tab:hover {
  color: var(--ink);
}

.asset-section-tab.active {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(80, 224, 176, 0.22);
}

.asset-section-tab.active::after {
  left: 0;
  right: 0;
  opacity: 1;
}

.home-content-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  padding: 4px 0 0;
}

.home-lower-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-content-tab {
  font-size: 16px;
}

[data-home-panel][hidden] {
  display: none !important;
}

[data-asset-section][hidden] {
  display: none !important;
}

.reference-videos-panel {
  order: 1;
  overflow: visible;
}

.reference-videos-panel #reference-videos-batch-script,
.reference-videos-panel #reference-selection-bar {
  display: none !important;
}

.shared-assets-panel {
  order: 2;
}

.vehicle-assets-panel {
  order: 3;
}

.videos-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.videos-layout .list-panel {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  max-height: 288px;
  overflow: hidden;
}

#page-videos .detail-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

#page-videos {
  overflow: hidden;
}

.videos-layout .list-panel,
.videos-layout .detail-panel,
.split-layout .sidebar-panel,
.split-layout .content-panel {
  grid-area: auto;
}

.split-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

#page-policies {
  height: calc(100vh - 70px);
  overflow: hidden;
}

#page-policies .split-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

#page-policies .sidebar-panel,
#page-policies .content-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#page-policies .content-panel {
  display: flex;
  flex-direction: column;
}

.policy-search-wrap {
  flex: 0 0 auto;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

#page-policies #policy-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#page-policies .policy-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.assets-split-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: none;
  padding: 0 20px 20px;
}

.assets-split-layout .sidebar-panel,
.assets-split-layout .content-panel {
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.detail-panel-header {
  position: relative;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shared-assets-panel .panel-refresh-button,
.vehicle-assets-panel .panel-refresh-button {
  order: 1;
}

.shared-assets-panel .panel-header-batch-tools,
.vehicle-assets-panel .panel-header-batch-tools {
  order: 2;
}

.detail-header-actions {
  margin-left: auto;
}

#page-videos .detail-header-actions {
  display: flex;
  margin-left: auto;
}

#page-videos .detail-header-actions .detail-export-button,
#page-videos .detail-header-actions .detail-meta-toggle {
  display: none;
}

/* Unified content-factory revision */
.home-quick-composer {
  width: min(1120px, calc(100% - 40px));
  margin: -34px auto 18px;
  padding: 18px;
  position: relative;
  z-index: 4;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(1, 15, 15, .94);
  box-shadow: var(--shadow), 0 0 34px rgba(80, 224, 176, .08);
}

#home-intent-input {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 14px 16px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.7;
}

#home-intent-input::placeholder { color: var(--muted-weak); }
.home-mode-selectors, .home-business-shortcuts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 模式行保持单行：三个入口（数字人口播/空镜卖点/路跑切片）不允许换行折行 */
.home-mode-selectors { padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: nowrap; }
.broll-progress-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 2px;
  padding: 11px 14px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(80, 224, 176, 0.06);
  font-size: 13px;
}
.broll-progress-banner[hidden] { display: none; }
.broll-progress-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: broll-progress-pulse 1.2s ease-in-out infinite;
}
@keyframes broll-progress-pulse { 50% { opacity: .35; } }
.home-mode-dropdown { position: relative; }
.home-mode-dropdown summary {
  min-width: 150px;
  padding: 10px 13px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--body-ink);
  background: rgba(255,255,255,.035);
}
.home-mode-dropdown summary::-webkit-details-marker { display: none; }
.home-mode-dropdown summary span { float: right; color: var(--accent); }
.home-mode-dropdown > button {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 12;
  width: 290px;
  padding: 13px;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: #05201e;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.home-mode-dropdown > button small { color: var(--muted); }
.home-composer-note { margin-left: auto; color: var(--muted-weak); font-size: 12px; }
.home-business-shortcuts { margin-top: 12px; }
.home-business-shortcuts button {
  padding: 7px 12px;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}
.home-quick-composer.is-configuring { margin-bottom: 12px; }
.home-final-condition { margin: 12px 0 0; color: var(--accent); font-size: 13px; }

.unified-assets-page, .unified-works-page {
  min-height: calc(100vh - 56px);
  padding: 30px clamp(22px, 4vw, 54px) 54px;
  color: var(--ink);
  background: radial-gradient(circle at 70% 0, rgba(0, 80, 64, .17), transparent 40%);
}
.unified-page-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.unified-page-header h1 { margin: 2px 0 5px; font-size: 34px; }
.unified-page-header p:last-child { margin: 0; color: var(--muted); }
.unified-primary-tabs, .unified-category-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.unified-primary-tabs { margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.unified-primary-tabs button, .unified-category-tabs button {
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.unified-primary-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.unified-category-tabs button { border-radius: 999px; background: rgba(255,255,255,.04); }
.unified-category-tabs button.active { color: #001411; background: var(--accent); font-weight: 700; }
.unified-category-tabs b { margin-left: 6px; font-size: 11px; opacity: .7; }
.unified-asset-toolbar, .unified-works-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.unified-asset-toolbar input, .unified-works-toolbar input {
  width: min(360px, 42vw);
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: rgba(255,255,255,.035);
}
.unified-asset-summary, .unified-work-summary { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.unified-asset-grid, .unified-work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.unified-asset-card, .unified-work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 20, 19, .86);
}
.unified-asset-preview { height: 146px; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.025); }
.unified-asset-preview img, .unified-asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.unified-asset-placeholder, .unified-asset-audio { color: var(--accent); font-size: 24px; letter-spacing: .16em; }
.unified-asset-card-meta { min-width: 0; padding: 13px 14px 7px; display: grid; gap: 5px; }
.unified-asset-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unified-asset-card span { color: var(--muted); font-size: 12px; }
.unified-asset-card > a { display: inline-block; margin: 0 14px 13px; color: var(--accent); font-size: 13px; }
.unified-short-drama-assets, #unified-short-drama-frame { width: 100%; height: calc(100vh - 190px); min-height: 650px; }
#unified-short-drama-frame { border: 1px solid var(--line); border-radius: 16px; background: #061311; }

.unified-work-cover { position: relative; width: 100%; height: 205px; padding: 0; border: 0; background: #020908; cursor: pointer; }
.unified-work-cover video { width: 100%; height: 100%; object-fit: cover; }
.unified-work-cover span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #00110e; background: rgba(80,224,176,.9); }
.unified-work-body { padding: 14px; }
.unified-work-badges { display: flex; gap: 7px; }
.unified-work-badges b, .unified-work-badges i { padding: 4px 7px; border-radius: 6px; color: var(--accent); background: rgba(80,224,176,.1); font-size: 11px; font-style: normal; }
.unified-work-body h3 { margin: 10px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.unified-work-body p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.unified-work-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.unified-work-actions button, .unified-work-actions a { padding: 6px 0; border: 0; color: var(--accent); background: transparent; font-size: 12px; cursor: pointer; text-decoration: none; }
.unified-work-actions .danger { margin-left: auto; color: var(--danger); }
.unified-short-drama-group { grid-column: 1 / -1; padding: 16px; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(3,17,16,.82); }
.unified-short-drama-group > header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.unified-short-drama-group h3 { margin: 5px 0 0; }
.unified-short-drama-group header span { color: var(--muted); }
.unified-short-drama-group > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.unified-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); }
.unified-work-dialog[open] { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 24px; border: 1px solid var(--line-strong); border-radius: 18px; color: var(--ink); background: #031514; display: flex; flex-direction: column; }
#unified-work-dialog-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.unified-work-dialog::backdrop { background: rgba(0,0,0,.72); }
.unified-dialog-close { position: absolute; right: 14px; top: 12px; border: 0; color: var(--ink); background: transparent; font-size: 26px; cursor: pointer; }
.unified-work-detail > video { width: 100%; max-height: 58vh; margin: 10px 0; border-radius: 12px; background: #000; }
.unified-work-detail dl { display: flex; gap: 24px; flex-wrap: wrap; }
.unified-work-detail dl div { display: grid; gap: 4px; }
.unified-work-detail dt { color: var(--muted); font-size: 11px; }
.unified-work-detail dd { margin: 0; }
.unified-originals { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.unified-originals video { width: min(300px, 100%); margin: 12px 10px 0 0; }

/* Commercial creation follows the existing dark product visual language. */
.commercial-page { --commercial-accent: var(--accent); --commercial-ink: var(--ink); background: transparent; color: var(--ink); }
.commercial-page-header h1 { color: var(--ink); }
.commercial-page-header p:last-child { color: var(--muted); }
.commercial-composer { border: 1px solid var(--line); color: var(--ink); background: rgba(4,20,19,.9); box-shadow: var(--shadow); }
.commercial-type-switch { background: rgba(255,255,255,.04); }
.commercial-type-switch button { color: var(--muted); }
.commercial-type-switch button.active { color: #00130f; background: var(--accent); box-shadow: none; }
.commercial-project-select, .commercial-parameters label { color: var(--muted); }
.commercial-project-select select, .commercial-parameters select { border-color: var(--line); color: var(--body-ink); background: rgba(255,255,255,.035); }
.commercial-script-shell { position: relative; }
#commercial-script { min-height: 260px; padding: 20px 64px 54px 20px; border-color: var(--line-strong); color: var(--ink); background: rgba(0,10,10,.72); }
#commercial-script:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(80,224,176,.09); }
.commercial-optimize-icon { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--accent); background: rgba(80,224,176,.08); cursor: pointer; }
.commercial-optimize-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.commercial-tool-button { border-color: var(--line); color: var(--body-ink); background: rgba(255,255,255,.035); }
#commercial-asset-limit, .commercial-submit-row p { color: var(--muted); }
.commercial-resolution { color: var(--muted); background: rgba(255,255,255,.05); }
.commercial-task-card { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.025); }
.commercial-task-card strong { color: var(--ink); }
.commercial-task-card span { color: var(--muted); }

@media (max-width: 760px) {
  .home-quick-composer { width: calc(100% - 20px); margin-top: -18px; }
  .home-composer-note { width: 100%; margin-left: 0; }
  .unified-asset-toolbar, .unified-works-toolbar, .unified-page-header { align-items: stretch; flex-direction: column; }
  .unified-asset-toolbar input, .unified-works-toolbar input { width: 100%; }
}

.video-source-nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  scrollbar-width: none;
}

.video-source-nav::-webkit-scrollbar {
  display: none;
}

.video-source-tab {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.video-source-tab::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
  content: "";
}

.video-source-tab:hover,
.video-source-tab:focus-visible {
  color: var(--ink);
  background: rgba(80, 224, 176, 0.035);
  outline: none;
}

.video-source-tab:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(80, 224, 176, 0.46);
}

.video-source-tab.active {
  color: var(--accent);
}

.video-source-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.video-source-tab b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(159, 202, 196, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-weak);
  font-size: 11px;
  line-height: 1;
}

.video-source-tab.active b {
  border-color: rgba(80, 224, 176, 0.28);
  background: rgba(80, 224, 176, 0.09);
  color: var(--accent);
}

.video-header-batch-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.video-date-batch-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.video-date-filter {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(260px, 0.56fr) minmax(360px, 1fr) max-content;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.date-range-fields {
  min-width: 0;
}

.date-range-shell {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 28px minmax(92px, 1fr) 36px;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.date-range-shell:hover,
.date-range-shell:focus-within {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, var(--panel-strong), var(--panel)),
    rgba(80, 224, 176, 0.04);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.08), 0 0 24px rgba(80, 224, 176, 0.08);
}

.date-range-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.date-range-input:hover,
.date-range-input.active {
  background: rgba(80, 224, 176, 0.08);
  box-shadow: none;
}

.date-range-arrow {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
  pointer-events: none;
}

.date-range-arrow::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 3px;
  top: 50%;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(159, 202, 196, 0.28), rgba(80, 224, 176, 0.88));
  transform: translateY(-50%);
}

.date-range-arrow::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(80, 224, 176, 0.9);
  border-right: 2px solid rgba(80, 224, 176, 0.9);
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: center;
}

.date-range-calendar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--accent);
  pointer-events: none;
}

.date-range-calendar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-quick-group {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-height: 46px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.date-quick-group.has-active {
  border-color: var(--accent);
}

.date-quick-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 5);
  border-radius: 11px;
  background: rgba(80, 224, 176, 0.12);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.22), 0 0 22px rgba(80, 224, 176, 0.12);
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none;
}

.date-quick-group.has-active .date-quick-indicator {
  opacity: 1;
}

.date-quick-button {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 8px 4px;
  white-space: nowrap;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.date-quick-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
}

.date-quick-button.active {
  color: var(--accent);
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 20px;
  z-index: 900;
  width: min(620px, calc(100vw - 72px));
  padding: 14px;
  border: 1px solid rgba(80, 224, 176, 0.16);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.98), rgba(5, 16, 17, 0.96)),
    var(--panel-strong);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(80, 224, 176, 0.06);
}

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

.date-picker-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.date-picker-nav {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
}

.date-picker-nav:hover {
  background: rgba(255, 255, 255, 0.06);
}

.date-picker-nav:focus-visible,
.calendar-day:focus-visible,
.file-picker:focus-visible,
.select-panel-option:focus-visible,
.reference-batch-start:focus-visible,
.reference-batch-apply:focus-visible,
.reference-batch-delete:focus-visible,
.reference-batch-cancel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.date-picker-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calendar-month-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

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

.calendar-weekday,
.calendar-day {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 9px;
  font-size: 11px;
}

.calendar-weekday {
  color: var(--muted);
  font-weight: 800;
}

.calendar-day {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.06);
}

.calendar-day.outside {
  opacity: 0.28;
}

.calendar-day.in-range {
  background: rgba(80, 224, 176, 0.1);
}

.calendar-day.range-edge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03121f;
  font-weight: 900;
}

.detail-meta-toggle {
  min-width: 126px;
}

.detail-meta-toggle.active {
  border-color: rgba(80, 224, 176, 0.22);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.12), 0 0 18px rgba(80, 224, 176, 0.1);
}

.detail-meta-popover {
  position: absolute;
  top: calc(100% - 6px);
  right: 24px;
  z-index: 20;
  width: min(420px, calc(100% - 48px));
  padding: 16px;
  border: 1px solid rgba(80, 224, 176, 0.14);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.96), rgba(5, 16, 17, 0.94)),
    var(--panel-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.detail-meta-popover.show {
  opacity: 1;
  transform: translateY(0);
}

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

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.filter-chip select {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.filter-chip .select-panel {
  width: auto;
  min-width: 112px;
}

.filter-chip .select-panel-title {
  min-height: 28px;
  padding: 3px 26px 3px 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.filter-chip .select-panel-title:hover {
  background: rgba(255, 255, 255, 0.04);
  padding-left: 7px;
}

.filter-chip .select-panel.open .select-panel-title {
  box-shadow: none;
}

.filter-chip .select-panel-title::after {
  right: 8px;
  width: 7px;
  height: 7px;
}

.filter-chip .select-panel-options {
  min-width: 160px;
}

.task-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 24px;
}

.composer-panel {
  display: block;
}

.composer-panel-pinned {
  padding-top: 6px;
}

.hero-composer-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 8px;
}

.hero-composer-head h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.hero-composer-copy {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.simple-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.composer-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 0;
  overflow-anchor: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prompt-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  min-height: 132px;
}

.prompt-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

#simple-prompt {
  min-height: 112px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  box-shadow: none;
  resize: vertical;
}

#simple-prompt::placeholder {
  color: rgba(159, 202, 196, 0.8);
}

#simple-prompt:focus {
  transform: none;
  box-shadow: none;
}

.prompt-input-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-height: 132px;
}

.reference-upload-stack {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  width: 76px;
  min-width: 76px;
  min-height: 96px;
  padding-top: 2px;
  isolation: isolate;
}

.reference-upload-stack:has(.reference-upload-tile:hover) {
  z-index: 10000;
}

.reference-upload-list {
  position: absolute;
  top: 2px;
  left: 0;
  display: flex;
  align-items: flex-start;
  width: 210px;
  min-width: 210px;
  height: 92px;
  pointer-events: none;
}

.reference-upload-tile {
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 82px;
  flex: 0 0 58px;
  margin-left: 0;
  overflow: visible;
  border: 1px solid rgba(80, 224, 176, 0.16);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  transform: rotate(-6deg);
  transform-origin: center bottom;
  pointer-events: auto;
  transition: left 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.reference-upload-tile:nth-child(1) {
  left: 0;
  transform: rotate(-8deg);
  z-index: 1;
}

.reference-upload-tile:nth-child(2) {
  left: 5px;
  transform: rotate(-2deg);
  z-index: 2;
}

.reference-upload-tile:nth-child(3) {
  left: 10px;
  transform: rotate(5deg);
  z-index: 3;
}

.reference-upload-tile:nth-child(4) {
  left: 15px;
  transform: rotate(-4deg);
  z-index: 4;
}

.reference-upload-tile:nth-child(5) {
  left: 20px;
  transform: rotate(4deg);
  z-index: 5;
}

.reference-upload-stack.has-items.is-expanded .reference-upload-list {
  width: 380px;
  pointer-events: auto;
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:nth-child(1) {
  left: 0;
  transform: rotate(-5deg) translateY(-3px);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:nth-child(2) {
  left: 62px;
  transform: rotate(-2deg) translateY(-2px);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:nth-child(3) {
  left: 124px;
  transform: rotate(3deg) translateY(-3px);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:nth-child(4) {
  left: 186px;
  transform: rotate(-2deg) translateY(-2px);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:nth-child(5) {
  left: 248px;
  transform: rotate(3deg) translateY(-3px);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-tile:hover {
  z-index: 30;
  transform: translateY(-7px) scale(1.08);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(80, 224, 176, 0.16);
}

.reference-upload-tile video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: rgba(5, 16, 17, 0.82);
}

.reference-upload-tile::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 10001;
  display: block;
  width: max-content;
  min-width: 0;
  max-width: min(280px, 72vw);
  padding: 8px 12px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.98), rgba(5, 16, 17, 0.96)),
    var(--panel-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(80, 224, 176, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(80, 224, 176, 0.12);
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: translate(-50%, 6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.reference-upload-tile:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reference-upload-tile span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.reference-upload-remove {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 50%;
  background: rgba(5, 16, 17, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.reference-upload-tile:hover .reference-upload-remove {
  opacity: 1;
  transform: scale(1);
}

.reference-upload-remove:hover {
  background: rgba(80, 224, 176, 0.22);
}

.reference-upload-button {
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 82px;
  flex: 0 0 58px;
  margin-left: 0;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: var(--radius-xs);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 17, 0.72);
  color: var(--muted);
  cursor: pointer;
  transform: rotate(-5deg);
  transform-origin: center bottom;
  transition:
    top 0.22s ease,
    left 0.22s ease,
    width 0.22s ease,
    height 0.22s ease,
    min-width 0.22s ease,
    border-radius 0.22s ease,
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.22s ease,
    box-shadow 0.16s ease;
}

.reference-upload-stack.has-items .reference-upload-button {
  top: 58px;
  left: 42px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  transform: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(5, 16, 17, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.reference-upload-stack.has-items .reference-upload-button span {
  font-size: 22px;
}

.reference-upload-stack.has-items.is-expanded .reference-upload-button {
  top: 0;
  width: 58px;
  height: 82px;
  min-width: 58px;
  border-radius: var(--radius-xs);
  transform: rotate(3deg) translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.reference-upload-stack.has-items.is-expanded:has(.reference-upload-tile:nth-child(1):last-child) .reference-upload-button {
  left: 62px;
}

.reference-upload-stack.has-items.is-expanded:has(.reference-upload-tile:nth-child(2):last-child) .reference-upload-button {
  left: 124px;
}

.reference-upload-stack.has-items.is-expanded:has(.reference-upload-tile:nth-child(3):last-child) .reference-upload-button {
  left: 186px;
}

.reference-upload-stack.has-items.is-expanded:has(.reference-upload-tile:nth-child(4):last-child) .reference-upload-button {
  left: 248px;
}

.reference-upload-stack.has-items.is-expanded:has(.reference-upload-tile:nth-child(5):last-child) .reference-upload-button {
  left: 310px;
}

.reference-upload-stack.has-items.is-expanded .reference-upload-button span {
  font-size: 28px;
}

.reference-upload-button span {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.reference-upload-button:hover {
  color: var(--ink);
  border-color: rgba(80, 224, 176, 0.26);
  background: rgba(80, 224, 176, 0.2);
  box-shadow: 0 12px 26px rgba(80, 224, 176, 0.1);
}

.reference-upload-stack:not(.has-items) .reference-upload-button:hover {
  transform: rotate(-5deg) translateY(-7px) scale(1.08);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(80, 224, 176, 0.16);
}

.reference-upload-stack.has-items.is-expanded .reference-upload-button:hover {
  transform: rotate(3deg) translateY(-7px) scale(1.08);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(80, 224, 176, 0.16);
}

.reference-upload-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 238px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: var(--radius-input);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.98), rgba(5, 16, 17, 0.96)),
    var(--panel-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(80, 224, 176, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.26),
    0 0 22px rgba(80, 224, 176, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.reference-upload-tip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(80, 224, 176, 0.14);
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
}

.reference-upload-tip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.prompt-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.composer-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.field > .field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: rgba(4, 16, 15, .94);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(80, 224, 176, 0.14), var(--glow);
  transform: translateY(-1px);
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.select-panel {
  position: relative;
  width: 100%;
}

.select-panel-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: rgba(4, 16, 15, .94);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.select-panel-title:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
}

.select-panel.open .select-panel-title {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(80, 224, 176, 0.1), 0 0 20px rgba(80, 224, 176, 0.1);
}

.select-panel-title:focus-visible,
.date-quick-button:focus-visible,
.advanced-summary:focus-visible,
.reference-card-details-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.select-panel-title::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.72;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 0.3s ease, opacity 0.18s ease;
}

.select-panel.open .select-panel-title::after {
  opacity: 0.95;
  transform: translateY(-28%) rotate(225deg);
}

.select-panel-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-panel-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 0;
  padding: 0 6px;
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0);
  border-radius: var(--radius-input);
  background:
    linear-gradient(180deg, var(--panel-strong), var(--panel)),
    var(--panel-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.select-panel.open .select-panel-options {
  max-height: 260px;
  padding: 6px;
  overflow: hidden;
  border-color: rgba(80, 224, 176, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.select-panel.floating .select-panel-options {
  position: fixed;
  right: auto;
  z-index: 1700;
}

.select-panel-search {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, var(--panel-strong), var(--panel)),
    var(--panel-strong);
  font-size: 12px;
}

.select-panel-option-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  max-height: 206px;
  overflow-y: auto;
}

.select-panel-group-title {
  padding: 8px 11px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  user-select: none;
}

.select-panel-group-title:first-child {
  padding-top: 2px;
}

/* 车型下拉两列联动：左列品牌，右列该品牌车型 */
.select-panel:has(.select-panel-cascade) .select-panel-options {
  min-width: 380px;
}

.select-panel-option-list:has(> .select-panel-cascade) {
  max-height: none;
  overflow: hidden;
}

.select-panel-cascade {
  display: flex;
  height: 272px;
  min-height: 0;
}

.select-panel-cascade-brands {
  display: flex;
  flex: 0 0 118px;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
  border-right: 1px solid rgba(120, 132, 148, 0.18);
}

.select-panel-cascade-options {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 4px 6px;
}

.select-panel-cascade-options .select-panel-option {
  flex: 0 0 auto;
}

.select-panel-brand-option {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-panel-brand-option:hover {
  color: var(--ink);
  background: rgba(120, 132, 148, 0.1);
}

.select-panel-brand-option.active {
  color: var(--ink);
  background: rgba(80, 224, 176, 0.16);
  font-weight: 600;
}

.select-panel-empty {
  padding: 10px 11px;
  color: var(--muted);
  font-size: 12px;
}

.select-panel-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.select-panel-option span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-panel-status-dot {
  display: none;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.7);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.select-panel-option.has-status .select-panel-status-dot {
  display: inline-block;
}

.select-panel-option.status-missing .select-panel-status-dot,
.select-panel-option.status-missing_asset .select-panel-status-dot {
  background: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.16);
}

.select-panel-option.status-covered .select-panel-status-dot,
.select-panel-option.status-complete .select-panel-status-dot {
  background: #34d1a1;
  box-shadow: 0 0 0 3px rgba(52, 209, 161, 0.16);
}

.select-panel-option.status-backend_unconfigured .select-panel-status-dot,
.select-panel-option.status-new_unconfigured .select-panel-status-dot {
  background: #ffd45a;
  box-shadow: 0 0 0 3px rgba(255, 212, 90, 0.18);
}

.select-panel-option.status-stale .select-panel-status-dot,
.select-panel-option.status-neutral .select-panel-status-dot {
  background: #8a97aa;
  box-shadow: 0 0 0 3px rgba(138, 151, 170, 0.14);
}

.select-panel-option:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.select-panel-option.selected {
  background: rgba(80, 224, 176, 0.12);
  color: var(--ink);
}

.select-panel-option:disabled,
.select-panel-option.disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.select-panel-option:disabled:hover,
.select-panel-option.disabled:hover {
  background: transparent;
  color: var(--muted);
}

textarea {
  resize: vertical;
  min-height: 94px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.primary-button,
.ghost-button {
  min-height: 44px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border: 1px solid var(--line-strong);
  padding: 13px 18px;
  font-weight: 800;
  color: #03121f;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.16), 0 14px 34px rgba(80, 224, 176, 0.22);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  border-color: var(--line-strong);
  transform: none;
}

.primary-button:hover {
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.18), 0 0 28px rgba(80, 224, 176, 0.28), 0 16px 32px rgba(80, 224, 176, 0.18);
}

.ghost-button {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(3, 45, 38, 0.72);
  border: 1px solid var(--line-strong);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  border-color: var(--line-strong);
  transform: none;
}

.feedback {
  min-height: 20px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.home-reference-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-showcase-panel {
  grid-area: auto;
  overflow: visible;
}

body.home-page-active .home-showcase-panel {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: visible;
}

body.home-page-active .home-showcase-panel:has(.home-generation-progress),
body.home-page-active .home-showcase-panel:has(.home-generation-results) {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.home-showcase-panel:has(.home-showcase-empty) {
  min-height: 0;
}

body.home-page-active .home-showcase-panel:has(.home-showcase-empty) {
  flex: 1 1 auto;
  min-height: 0;
}

.home-showcase-panel .video-wall {
  padding: 18px;
}

body.home-page-active .home-showcase-panel .video-wall {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

.home-showcase-panel .video-wall.home-generation-results {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  align-items: start;
  gap: 16px;
}

.home-generation-status-note {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-showcase-panel .video-wall.home-generation-progress {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.home-showcase-panel .home-generation-card {
  grid-column: 1 / -1;
}

.home-generation-video-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  aspect-ratio: 9 / 16;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.home-generation-video-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 10px;
  overflow: hidden;
  border-radius: var(--radius-input);
  background:
    radial-gradient(circle at 50% 24%, rgba(80, 224, 176, 0.12), transparent 34%),
    rgba(5, 16, 17, 0.72);
}

.home-generation-video-card.is-error {
  border-color: rgba(255, 143, 143, 0.28);
}

.home-generation-failed-title {
  color: #ffb4b4;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.home-generation-failure-summary {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 143, 143, 0.28);
  border-radius: 8px;
  background: rgba(48, 18, 18, 0.72);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.home-generation-failure-summary strong,
.home-generation-failure-summary p {
  min-width: 0;
  margin: 0;
}

.home-generation-failure-summary p {
  display: -webkit-box;
  overflow: hidden;
  color: #ffc4c4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-showcase-panel:has(.home-showcase-empty) .video-wall {
  flex: 1 1 auto;
  min-height: 0;
}

.home-showcase-panel:has(.home-showcase-empty) .home-showcase-empty {
  min-height: 100%;
  height: 100%;
}

.home-generation-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 420px;
  padding: 24px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: var(--radius-input);
  background:
    radial-gradient(circle at 10% 12%, rgba(80, 224, 176, 0.14), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(48, 192, 192, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(5, 16, 17, 0.9), rgba(5, 16, 17, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(80, 224, 176, 0.05),
    0 24px 54px rgba(0, 0, 0, 0.18);
}

.home-generation-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.home-generation-head-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  padding: 10px;
  border: 1px solid rgba(80, 224, 176, 0.16);
  background: rgba(5, 16, 17, 0.62);
  box-shadow: 0 0 28px rgba(80, 224, 176, 0.12);
  object-fit: contain;
}

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

.home-generation-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.35;
}

.home-generation-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-generation-stage {
  display: flex;
  flex: 1 1 auto;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 22px;
  border-radius: var(--radius-input);
  background:
    radial-gradient(circle at 50% 24%, rgba(80, 224, 176, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.035);
}

.home-generation-stage-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(80, 224, 176, 0.18));
}

.home-generation-video-card .home-generation-stage-logo {
  width: 58px;
  height: 58px;
}

.home-generation-progress-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(560px, 100%);
}

.home-generation-video-card .home-generation-progress-row {
  width: min(148px, 88%);
  flex-direction: column;
  gap: 8px;
}

.home-generation-spinner {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(80, 224, 176, 0.12);
  box-shadow: 0 0 22px rgba(80, 224, 176, 0.18);
  overflow: hidden;
}

.home-generation-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2) 42%, rgba(80, 224, 176, 0.12) 66%, rgba(80, 224, 176, 0.02) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: home-generation-spin 0.92s linear infinite;
  transform: rotate(0deg) translateZ(0);
  transform-origin: 50% 50%;
  will-change: transform;
}

.home-generation-video-card .home-generation-spinner {
  width: 36px;
  height: 36px;
}

@keyframes home-generation-spin {
  from {
    transform: rotate(0deg) translateZ(0);
  }

  to {
    transform: rotate(360deg) translateZ(0);
  }
}

.home-generation-progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(5, 16, 17, 0.72);
  box-shadow: inset 0 0 0 1px rgba(80, 224, 176, 0.1);
}

.home-generation-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(80, 224, 176, 0.28);
  transition: width 0.65s ease;
}

.home-generation-video-card .home-generation-progress-track {
  width: 100%;
  height: 8px;
  flex: 0 0 auto;
}

.home-generation-progress-row strong {
  min-width: 46px;
  color: var(--ink);
  font-size: 16px;
  text-align: left;
}

.home-generation-video-card .home-generation-progress-row strong {
  order: -1;
  min-width: 0;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.home-generation-stage p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.home-generation-video-card .home-generation-stage p {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.home-reference-batch-tools {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 14px;
}

.home-reference-batch-inner {
  justify-content: flex-end;
}

.home-reference-card {
  border-radius: var(--radius-input);
  padding-bottom: 42px;
}

.home-reference-card .reference-video-actions,
.home-reference-card .reference-card-details {
  display: none;
}

.home-reference-card .reference-card-footer {
  gap: 6px;
}

.home-reference-card .reference-card-visible-tags {
  bottom: 8px;
  min-height: 30px;
  max-height: 30px;
}

.home-reference-card .reference-select-button {
  align-self: flex-start;
  margin-top: 2px;
}

.advanced-summary {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 40px;
  list-style: none;
  cursor: pointer;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(80, 224, 176, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#advanced-toggle {
  display: none;
}

.advanced-summary:hover {
  border-color: rgba(80, 224, 176, 0.28);
  background: rgba(80, 224, 176, 0.08);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.08), 0 0 18px rgba(80, 224, 176, 0.08);
}

.advanced-summary::-webkit-details-marker {
  display: none;
}

.advanced-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  color: var(--accent);
  font-size: 20px;
  line-height: 18px;
}

.advanced-summary[aria-expanded="true"]::after {
  content: "-";
}

.advanced-panel-visible {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1px solid rgba(80, 224, 176, 0.08);
  margin-top: 16px;
}

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

.simple-submit-wrap {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  position: relative;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.simple-submit-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 50%;
}

.composer-controls {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding-top: 5px;
  border-top: 1px solid rgba(80, 224, 176, 0.12);
}

.simple-submit-fab:disabled {
  color: rgba(214, 239, 236, 0.46);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.simple-submit-fab:disabled:hover {
  box-shadow: none;
}

.simple-submit-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 9999;
  width: max-content;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.98), rgba(5, 16, 17, 0.96)),
    var(--panel-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(80, 224, 176, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(80, 224, 176, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  transition-delay: 0s;
}

.simple-submit-wrap[data-tooltip=""]::after {
  content: none;
}

.simple-submit-wrap:hover::after,
.simple-submit-wrap.is-tooltip-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 0.3s;
}

.simple-submit-wrap.is-tooltip-visible::after {
  transition-delay: 0s;
}

.submit-arrow-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: auto;
}

#page-videos #task-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  padding: 12px 18px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#page-videos .list-panel > .panel-header {
  flex: 0 0 auto;
  padding-bottom: 12px;
}

#page-videos .list-panel .panel-header p:not(.panel-kicker) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

#page-videos .task-library-summary {
  flex: 0 0 auto;
}

.task-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(80, 224, 176, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.task-group.is-batch-reference {
  border-color: rgba(48, 192, 192, 0.18);
  background: linear-gradient(180deg, rgba(48, 192, 192, 0.08), rgba(255, 255, 255, 0.02));
}

.task-group.is-reference {
  border-color: rgba(80, 224, 176, 0.16);
}

.task-group.is-hot-trend {
  border-color: rgba(244, 201, 107, 0.16);
}

.task-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.task-group-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.task-group-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.task-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#page-videos .task-group {
  min-height: 0;
  padding: 12px;
  border-radius: 8px;
}

#page-videos .task-group-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.video-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 18px;
}

.video-wall-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.home-showcase-empty {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: clamp(12px, 1.35vw, 15px);
}

.asset-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.asset-toolbar .asset-upload-button {
  width: 100%;
  min-height: 46px;
}

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

.vehicle-category-actions #create-vehicle-button {
  grid-column: 1 / -1;
}

.vehicle-category-actions .category-action-button {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.vehicle-category-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.vehicle-category-modal[hidden],
.vehicle-category-dialog [hidden] {
  display: none;
}

.vehicle-category-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 8, 9, 0.78);
  backdrop-filter: blur(14px);
}

.vehicle-category-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 540px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background:
    radial-gradient(circle at 76% 0%, rgba(80, 224, 176, 0.08), transparent 32%),
    var(--panel-strong);
  box-shadow: var(--shadow), 0 0 42px rgba(48, 192, 192, 0.08);
}

.vehicle-category-dialog-header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 108px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(3, 20, 18, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
}

.vehicle-category-dialog-header .panel-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.vehicle-category-dialog-header h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.vehicle-category-close {
  position: static;
  flex: 0 0 auto;
  margin: -2px 0 0 18px;
}

.vehicle-category-dialog-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 22px 24px 26px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.vehicle-category-dialog-body.has-select-anchor {
  overflow-y: scroll;
  scrollbar-color: var(--accent-2) rgba(255, 255, 255, 0.035);
}

.vehicle-category-dialog:has(.vehicle-category-dialog-body.has-select-anchor) {
  height: min(500px, calc(100dvh - 40px));
}

.vehicle-category-dialog .select-panel.open .select-panel-options {
  position: relative;
  inset: auto;
  max-height: none;
  margin-top: 8px;
  overflow: visible;
}

.vehicle-category-dialog .select-panel-option-list {
  max-height: none;
  overflow: visible;
}

.vehicle-category-brand-combobox {
  position: relative;
  width: 100%;
  z-index: 30;
}

.vehicle-category-brand-combobox input {
  min-height: 46px;
  padding-right: 52px;
}

.vehicle-category-brand-combobox input:focus {
  transform: none;
}

.vehicle-category-brand-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 48px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.vehicle-category-brand-toggle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.86;
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform 0.2s ease, opacity 0.18s ease;
}

.vehicle-category-brand-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.vehicle-category-brand-combobox.open .vehicle-category-brand-toggle::before {
  opacity: 1;
  transform: translate(-50%, -30%) rotate(225deg);
}

.vehicle-category-brand-listbox {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(80, 224, 176, 0.2);
  border-radius: var(--radius-input);
  background:
    linear-gradient(180deg, rgba(3, 20, 18, 0.99), rgba(2, 14, 14, 0.99)),
    var(--panel-strong);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 22px rgba(80, 224, 176, 0.06);
  overscroll-behavior: contain;
}

.vehicle-category-brand-combobox.open .vehicle-category-brand-listbox {
  border-color: rgba(80, 224, 176, 0.24);
}

.vehicle-category-brand-combobox.show-all .vehicle-category-brand-listbox {
  max-height: 260px;
}

.vehicle-category-brand-option {
  flex: 0 0 auto;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--body-ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.vehicle-category-brand-option:hover,
.vehicle-category-brand-option.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.vehicle-category-brand-option.selected {
  background: rgba(80, 224, 176, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.vehicle-category-brand-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.vehicle-category-brand-status {
  min-height: 18px;
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.vehicle-category-brand-status[data-state="existing"] {
  color: var(--body-ink);
}

.vehicle-category-brand-status[data-state="new"] {
  color: var(--accent);
}

.vehicle-category-dialog .file-picker {
  min-height: 54px;
}

.vehicle-category-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
}

.vehicle-category-dialog-actions > button {
  min-width: 104px;
  min-height: 46px;
}

.vehicle-category-dialog-footer {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 15px 24px;
  border-top: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(3, 20, 18, 0.96);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18px);
}

.vehicle-category-dialog-footer .feedback {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .vehicle-category-modal {
    align-items: end;
    padding: 12px;
  }

  .vehicle-category-dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  .vehicle-category-dialog-header,
  .vehicle-category-dialog-body,
  .vehicle-category-dialog-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .vehicle-category-dialog-footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vehicle-category-dialog-actions,
  .vehicle-category-dialog-actions > button {
    width: 100%;
  }
}

#page-assets .sidebar-panel {
  display: flex;
  flex-direction: column;
}

.asset-upload-form-sidebar {
  flex: 0 0 auto;
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--line);
}

#page-assets .asset-upload-form-sidebar {
  padding: 18px;
}

.asset-upload-form-sidebar .asset-upload-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.asset-upload-category-field {
  min-width: 0;
}

.asset-upload-category-hint {
  min-height: 34px;
  padding: 10px 12px;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.asset-upload-form-sidebar .asset-upload-button {
  width: 100%;
  min-height: 46px;
}

.asset-upload-form-sidebar .feedback:empty {
  display: none;
}

.task-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel-strong);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.task-card:hover,
.task-card.active {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

.task-card-top,
.task-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.task-card-top {
  margin-bottom: 8px;
}

.task-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.task-card-query {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.task-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.task-card-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: rgba(80, 224, 176, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.featured-panel {
  overflow: visible;
}

#page-videos .featured-panel,
#page-videos .featured-panel[hidden] {
  display: none !important;
}

.featured-video-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding: 18px;
  scroll-snap-type: x proximity;
}

.video-poster-card {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  break-inside: avoid;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.featured-video-grid .video-poster-card {
  flex: 0 0 calc((100% - 56px) / 5);
  width: calc((100% - 56px) / 5);
  margin: 0;
  scroll-snap-align: start;
}

.video-poster-card.featured {
  border-color: rgba(48, 192, 192, 0.24);
  box-shadow: 0 0 0 1px rgba(48, 192, 192, 0.1), 0 20px 40px rgba(0, 0, 0, 0.24);
}

.video-poster-card.selectable {
  cursor: pointer;
}

.video-poster-card.selected {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    var(--glow);
}

.video-poster-media {
  position: relative;
  background: #071313;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.video-select-check {
  position: absolute;
  display: none;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(4, 16, 15, 0.76);
  z-index: 4;
  pointer-events: none;
}

.video-poster-card.selectable .video-select-check {
  display: block;
}

.video-poster-card.selected .video-select-check {
  border-color: rgba(80, 224, 176, 0.9);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px rgba(80, 224, 176, 0.24);
}

.video-poster-card.selected .video-select-check::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  width: 7px;
  height: 12px;
  border: solid #03121f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.video-poster-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 16, 15, 0) 0%, rgba(4, 16, 15, 0.1) 50%, rgba(4, 16, 15, 0.46) 100%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.video-poster-media video,
.video-block video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  background: #001010;
  object-fit: cover;
  pointer-events: none;
}

.video-placeholder {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.video-poster-overlay {
  position: absolute;
  inset: auto 8px 8px 8px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(80, 224, 176, 0.1);
  border-radius: var(--radius-input);
  background: linear-gradient(180deg, rgba(5, 16, 17, 0.22), rgba(4, 16, 15, 0.52));
  backdrop-filter: blur(7px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.video-poster-card:hover .video-poster-overlay {
  opacity: 1;
  transform: translateY(0);
}

.video-poster-card.selectable .video-poster-overlay {
  pointer-events: none;
}

.video-poster-card.selectable .video-poster-detail-actions {
  display: none;
}

.video-poster-owner {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-poster-card:hover .video-poster-media::after {
  opacity: 1;
}

.video-poster-actions {
  display: none;
}

.video-poster-hover-detail {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 68px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(48, 192, 192, 0.28);
  border-radius: var(--radius-input);
  background: rgba(4, 16, 15, 0.92);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), var(--glow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.video-poster-card:hover .video-poster-hover-detail {
  opacity: 1;
  transform: translateY(0);
}

.video-poster-script {
  max-height: 112px;
  overflow: auto;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
}

.video-poster-reference-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.video-poster-reference-chip {
  flex: 0 0 44px;
  width: 44px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.video-poster-reference-chip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-poster-overlay-title {
  min-width: 0;
  margin: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88), 0 0 12px rgba(80, 224, 176, 0.18);
}

.video-poster-detail-actions {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  min-width: 0;
  pointer-events: auto;
}

.video-poster-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 2px;
  box-sizing: border-box;
  border: 1px solid rgba(80, 224, 176, 0.24);
  border-radius: 10px;
  background: rgba(4, 16, 15, 0.58);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.video-poster-detail-button:hover {
  border-color: rgba(80, 224, 176, 0.38);
  background: rgba(80, 224, 176, 0.16);
  color: var(--accent);
  box-shadow: var(--glow);
}

.video-poster-detail-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  background: rgba(45, 36, 24, 0.08);
}

.pill.succeeded {
  color: var(--ok);
  background: rgba(15, 123, 85, 0.12);
}

.pill.loading,
.pill.starting,
.pill.running {
  color: var(--warning);
  background: rgba(194, 123, 16, 0.12);
}

.pill.loading::before,
.pill.starting::before,
.pill.running::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.8px solid rgba(80, 224, 176, 0.22);
  border-top-color: currentColor;
  animation: pill-spin 0.85s linear infinite;
}

.pill.failed,
.pill.unknown {
  color: #a12525;
  background: rgba(161, 37, 37, 0.12);
}

@keyframes pill-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.task-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.task-detail.video-preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-items: start;
  padding: 20px;
}

.task-detail.video-preview-gallery .video-batch-toolbar,
.task-detail.video-preview-gallery .video-gallery-grid {
  grid-column: 1 / -1;
}

.video-batch-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.video-batch-toolbar.active {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.video-batch-download,
.video-batch-delete,
.video-batch-cancel {
  height: 36px;
  border-radius: var(--radius-pill);
  font-weight: 900;
  cursor: pointer;
}

.video-batch-download,
.video-batch-delete {
  padding: 0 18px;
  border: 1px solid rgba(48, 192, 192, 0.38);
  background: rgba(48, 192, 192, 0.08);
  color: var(--accent);
}

.video-batch-download:disabled,
.video-batch-delete:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.video-batch-cancel {
  width: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.video-header-batch-slot .video-batch-toolbar {
  min-height: 34px;
}

.video-date-batch-slot .video-batch-toolbar {
  min-height: 46px;
}

.video-date-batch-slot .video-batch-toolbar.active {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-items: start;
}

#page-videos .task-card {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
}

#page-videos .task-card-top,
#page-videos .task-card-meta {
  min-width: 0;
}

#page-videos .task-card-query {
  display: -webkit-box;
  min-height: 36px;
  margin: 6px 0 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#page-videos .task-library-summary {
  display: flex;
  gap: 8px;
  padding: 0 18px 8px;
  overflow-x: auto;
}

#page-videos .task-library-summary .reference-summary-chip {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 11px;
  white-space: nowrap;
}

#page-videos #task-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding-top: 8px;
}

#page-videos .task-group {
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

#page-videos .task-group-header {
  align-items: center;
  padding: 0 2px;
}

#page-videos .task-group-title {
  font-size: 12px;
}

#page-videos .task-group-meta {
  max-width: 58%;
  overflow: hidden;
  color: var(--body-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-videos .task-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 232px;
  overflow-x: hidden;
  overflow-y: auto;
}

#page-videos .task-preview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(5, 18, 18, 0.92);
  box-shadow: none;
}

#page-videos .task-preview-card:hover,
#page-videos .task-preview-card.active {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.task-preview-media {
  position: relative;
  width: 100%;
  min-height: 154px;
  aspect-ratio: 9 / 12;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 35, 34, 0.95), rgba(3, 14, 15, 0.98));
}

.task-preview-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #061313;
}

.task-preview-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(3, 10, 11, 0.04), rgba(3, 10, 11, 0.58));
  pointer-events: none;
}

.task-preview-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  place-items: center;
  color: rgba(226, 255, 247, 0.82);
}

.task-preview-placeholder b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(80, 224, 176, 0.24);
  border-radius: 50%;
  background: rgba(80, 224, 176, 0.08);
  font-size: 13px;
}

.task-preview-status,
.task-preview-count {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: rgba(2, 12, 13, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.task-preview-status {
  top: 8px;
  left: 8px;
}

.task-failure-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 130, 130, 0.34);
  border-radius: 50%;
  background: rgba(23, 7, 8, 0.82);
  color: #ffb0b0;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.task-failure-dismiss:hover {
  border-color: rgba(255, 150, 150, 0.7);
  background: rgba(78, 18, 21, 0.94);
  color: #fff;
}

.task-failure-dismiss:disabled {
  cursor: wait;
  opacity: 0.55;
}

.task-preview-count {
  right: 8px;
  bottom: 8px;
}

.task-preview-title-row {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-height: 28px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 7px;
  background: rgba(2, 12, 13, 0.78);
  backdrop-filter: blur(10px);
}

.task-preview-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-preview-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-preview-title-row .task-preview-count {
  position: static;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  backdrop-filter: none;
}

.task-preview-title-row.has-error {
  border-color: rgba(255, 112, 112, 0.28);
  background: rgba(20, 8, 8, 0.82);
}

.task-preview-error {
  display: grid;
  gap: 2px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 198, 198, 0.94);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.task-preview-error p,
.recent-task-error p,
.task-detail-error p {
  margin: 0;
}

.task-preview-error b {
  color: #ff8f8f;
}

.task-preview-card.is-succeeded .task-preview-status {
  color: var(--accent);
}

.task-preview-card.is-loading .task-preview-status {
  color: var(--warning);
}

.task-preview-card.is-failed .task-preview-status,
.task-preview-card.is-unknown .task-preview-status {
  color: #ff9f9f;
}

.task-preview-caption {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px;
}

.task-preview-caption strong {
  display: -webkit-box;
  min-height: 32px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-preview-caption span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transcript-dialog {
  width: min(680px, calc(100vw - 32px));
}

.transcript-form {
  margin-top: 16px;
}

.transcript-field textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
}

.transcript-raw-details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.transcript-raw-details pre {
  max-height: 160px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: var(--radius-card);
  background: rgba(5, 16, 17, 0.8);
}

.video-short-drama-project {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-preview);
  background: rgba(3, 17, 16, 0.82);
}

.video-short-drama-project > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.video-short-drama-project > header span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.video-short-drama-project > header h3 {
  margin: 5px 0 0;
  font-size: 17px;
}

.video-short-drama-project > header strong {
  color: var(--muted);
  font-size: 12px;
}

.video-short-drama-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.short-drama-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
}

#page-videos .task-detail.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.task-detail.video-preview-gallery .video-poster-card {
  width: 100%;
  margin: 0;
}

.task-detail.video-preview-gallery .empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
}

.empty-state {
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.detail-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-preview);
  background: rgba(5, 16, 17, 0.84);
  backdrop-filter: blur(16px);
}

.detail-section-soft {
  background: rgba(5, 16, 17, 0.52);
}

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

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

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.detail-disclosure {
  border: 1px solid rgba(80, 224, 176, 0.1);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.detail-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.detail-summary::-webkit-details-marker {
  display: none;
}

.detail-summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

.detail-disclosure[open] .detail-summary::after {
  content: "-";
}

.detail-disclosure-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(80, 224, 176, 0.08);
}

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

.policy-guide,
.policy-form,
.asset-upload-form {
  padding: 18px 20px 0;
}

.policy-guide h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.policy-guide p {
  margin: 0 0 14px;
  line-height: 1.6;
  color: var(--muted);
}

.guide-block {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--body-ink);
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.policy-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 24px;
}

#page-policies .panel-header {
  padding: 20px 22px 14px;
}

#page-policies .policy-list-header,
#page-policies .policy-editor-header {
  min-height: 74px;
  padding: 20px 22px;
}

#page-policies .policy-list-header h2,
#page-policies .policy-editor-header h2 {
  margin: 0;
}

#page-policies .policy-search-wrap {
  padding: 12px 18px 14px;
}

#page-policies .policy-editor-context {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

#page-policies .policy-current-id {
  color: var(--muted-weak);
  font-size: 11px;
  font-weight: 700;
}

#page-policies #policy-list {
  padding: 14px 16px 18px;
}

#page-policies .policy-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 16px 14px;
}

#page-policies .policy-card + .policy-card {
  margin-top: 12px;
}

#page-policies .policy-card-brand {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-policies .policy-card-model {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-policies .policy-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#page-policies .policy-card-status,
#page-policies .policy-card-id {
  color: var(--muted-weak);
  font-size: 10px;
  line-height: 1;
}

#page-policies .policy-card-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#page-policies .policy-card-status::before {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
}

#page-policies .policy-card-id {
  opacity: 0.72;
}

#page-policies .policy-form {
  grid-template-rows: auto minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.18fr) auto auto;
  gap: 9px 14px;
  padding: 14px 18px 8px;
}

#page-policies .policy-form .field {
  grid-column: 1 / -1;
  min-height: 0;
}

#page-policies .policy-form .field-wide {
  min-height: 0;
}

#page-policies .policy-form textarea {
  min-height: 0;
  height: 100%;
  resize: none;
}

#page-policies .policy-form input,
#page-policies .policy-form textarea {
  padding: 10px 12px;
}

#page-policies .policy-actions {
  align-items: center;
  margin-top: 0;
}

.policy-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#page-policies #policy-store-input {
  min-height: 0;
  height: 100%;
}

#page-policies #policy-feedback {
  min-height: 14px;
  margin: 0;
}

.policy-copy-automation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line, #dfe5e2);
  border-radius: 12px;
  background: var(--panel-soft, #f7f9f8);
}

.policy-copy-automation[hidden] { display: none; }
.policy-copy-automation > div { display: grid; gap: 3px; }
.policy-copy-automation small { color: var(--muted, #68736e); }
.policy-copy-automation[data-status="failed"] { border-color: rgba(190, 74, 74, .35); }
.policy-copy-automation[data-status="partially_available"] { border-color: rgba(173, 124, 35, .4); }

.danger-button {
  border: 1px solid rgba(255, 143, 143, 0.32);
  border-radius: var(--radius-input);
  background: rgba(255, 143, 143, 0.08);
  color: #ffb1b1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 12px 18px;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.danger-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 143, 143, 0.5);
  background: rgba(255, 143, 143, 0.13);
  box-shadow: 0 0 24px rgba(255, 143, 143, 0.1);
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.asset-upload-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}

.asset-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.asset-upload-field {
  grid-column: auto;
  min-width: 0;
}

.asset-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: 132px;
  min-height: 52px;
  padding: 0 20px;
  white-space: nowrap;
}

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid rgba(80, 224, 176, 0.14);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.92), rgba(5, 16, 17, 0.88)),
    var(--panel-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 30px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.file-picker-compact {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: var(--radius-card);
}

.file-picker:hover {
  border-color: rgba(80, 224, 176, 0.24);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.12), 0 0 24px rgba(80, 224, 176, 0.1);
  transform: translateY(-1px);
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 104px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.file-picker-compact .file-picker-button {
  min-width: 88px;
  padding: 8px 12px;
}

.file-picker-name {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 0 20px 24px;
}

#page-assets .content-panel > .asset-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  padding-top: 12px;
}

#page-assets #asset-grid {
  display: block;
}

.asset-coverage-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid rgba(80, 224, 176, 0.14);
  border-radius: var(--radius-card);
  background: rgba(5, 16, 17, 0.45);
}

.asset-coverage-summary:empty {
  display: none;
}

.coverage-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.coverage-meter span {
  color: var(--accent-2);
}

.coverage-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.14);
  font-size: 11px;
  font-weight: 900;
}

.coverage-chip.is-covered {
  color: #bffbea;
  border-color: rgba(52, 209, 161, 0.34);
  background: rgba(52, 209, 161, 0.12);
}

.coverage-chip.is-partial {
  color: #ffe5ad;
  border-color: rgba(245, 178, 65, 0.32);
  background: rgba(245, 178, 65, 0.1);
}

.coverage-chip.is-missing {
  color: #ffd2d2;
  border-color: rgba(255, 123, 123, 0.28);
  background: rgba(255, 123, 123, 0.1);
}

.coverage-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.asset-group {
  margin: 0 0 22px;
  border-radius: var(--radius-card);
}

.asset-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 0 2px;
}

.asset-group-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.asset-group-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.asset-group-header span {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.asset-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.asset-pending-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(255, 123, 123, 0.32);
  border-radius: var(--radius-card);
  background: rgba(255, 123, 123, 0.06);
  color: var(--muted);
}

.asset-pending-card strong {
  color: #ffd2d2;
  font-size: 18px;
  font-weight: 900;
}

.asset-pending-card span {
  font-size: 13px;
  line-height: 1.5;
}

.asset-reference-panel {
  overflow: visible;
  padding: 0 20px 20px;
}

#page-assets .asset-reference-panel {
  grid-template-columns: minmax(0, 1fr);
  padding: 0 20px 20px;
}

.asset-grid-actions {
  display: none;
}

.asset-batch-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 40px;
  padding: 12px 20px 10px;
}

.panel-header-batch-tools {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0;
}

.panel-refresh-button {
  min-width: 72px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  white-space: nowrap;
}

.panel-refresh-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.reference-header-tools {
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
  gap: 10px;
}

.reference-header-tools #reference-videos-summary {
  order: 1;
  align-self: center;
}

.reference-header-tools #reference-videos-refresh {
  order: 2;
  align-self: center;
}

.reference-header-tools #reference-batch-tools {
  order: 3;
  align-self: center;
}

.reference-header-tools #reference-videos-batch-script {
  order: 99;
}

.reference-videos-panel > .panel-header {
  padding-bottom: 14px;
}

.panel-header-summary {
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
  margin: 0;
  gap: 10px;
}

.asset-card-hidden {
  display: none;
}

.asset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.asset-card-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  max-width: calc(100% - 36px);
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.24);
  background: rgba(4, 16, 15, 0.72);
  color: var(--body-ink);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.batch-asset-card.is-selectable {
  cursor: pointer;
}

.batch-asset-card.is-batch-selected {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    var(--glow);
}

.batch-asset-card.is-selectable .reference-select-mark {
  display: block;
}

.batch-asset-card.is-batch-selected .reference-select-mark {
  border-color: rgba(80, 224, 176, 0.9);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.batch-asset-card.is-batch-selected .reference-select-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #03121f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.asset-card-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.asset-thumb-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-preview);
  background: #071313;
}

.asset-thumb-wrap-video {
  aspect-ratio: 9 / 16;
}

.asset-thumb-wrap-shared {
  aspect-ratio: 9 / 16;
}

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

.batch-asset-card[data-asset-kind="vehicle"] .asset-thumb {
  object-fit: contain;
}

.asset-thumb-preview-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

.asset-thumb-preview-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.batch-asset-card.is-selectable .asset-thumb-preview-button {
  cursor: pointer;
}

.asset-image-dialog {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius-panel);
}

.asset-image-frame {
  display: grid;
  place-items: center;
  width: 100%;
  max-height: min(76vh, 760px);
  overflow: auto;
  border: 1px solid rgba(80, 224, 176, 0.16);
  border-radius: var(--radius-preview);
  background:
    radial-gradient(circle at 20% 20%, rgba(80, 224, 176, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(5, 16, 17, 0.92), rgba(0, 16, 16, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.asset-image-preview {
  display: block;
  max-width: 100%;
  max-height: min(76vh, 760px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.asset-thumb-video {
  background: #001010;
}

.asset-caption {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card-actions {
  display: flex;
  gap: 8px;
}

.asset-card-exclusive-model .asset-card-actions {
  flex-wrap: wrap;
}

.asset-card-exclusive-model .asset-card-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
}

.asset-model-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.asset-action-button {
  padding: 7px 12px;
  font-size: 11px;
}

.reference-video-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

#reference-video-grid.reference-video-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.reference-video-card {
  position: relative;
  cursor: default;
  padding: 8px 8px 48px;
  overflow: visible;
}

.reference-video-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--glow);
}

.reference-video-card.is-selectable {
  cursor: pointer;
}

.reference-video-card.is-batch-selected {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    var(--glow);
}

.reference-video-card.is-generation-disabled {
  border-color: rgba(159, 202, 196, 0.14);
  background: linear-gradient(180deg, rgba(5, 16, 17, 0.92), rgba(3, 12, 13, 0.96));
}

.reference-video-card.is-generation-disabled .reference-video-media {
  opacity: 0.74;
  filter: saturate(0.72);
}

.reference-video-card.is-generation-disabled.home-reference-card {
  cursor: default;
}

.asset-card:not(.is-batch-selected):hover,
.reference-video-card:not(.is-selected):not(.is-batch-selected):hover,
.video-poster-card:not(.selected):hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

.batch-asset-card.is-batch-selected:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--glow);
}

.reference-video-card.is-selected:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--glow);
}

.reference-video-card.is-batch-selected:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--glow);
}

.video-poster-card.selected:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--glow);
}

.reference-select-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: none;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(214, 239, 236, 0.44);
  border-radius: 50%;
  background: rgba(4, 16, 15, 0.76);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.reference-video-card.is-selectable .reference-select-mark {
  display: block;
}

.reference-video-card.is-batch-selected .reference-select-mark {
  border-color: rgba(80, 224, 176, 0.9);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.reference-video-card.is-batch-selected .reference-select-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #03121f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.reference-video-media {
  position: relative;
  cursor: pointer;
}

.reference-video-time {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(4, 16, 15, 0.78);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.reference-card-footer {
  gap: 6px;
  padding-right: 0;
}

.reference-card-title {
  padding-right: 0;
  font-size: 10px;
  line-height: 1.35;
  width: 100%;
  max-width: 100%;
}

.reference-card-visible-tags {
  position: absolute;
  left: 10px;
  right: 66px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  max-height: 32px;
  overflow: hidden;
}

.reference-video-actions {
  margin-top: 2px;
  flex-wrap: wrap;
}

.reference-card-details {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
}

.reference-card-details[open] {
  z-index: 1002;
}

.reference-video-card:has(.reference-card-details[open]) {
  z-index: 1001;
}

.reference-card-details-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(80, 224, 176, 0.16);
  border-radius: var(--radius-input);
  background: rgba(5, 16, 17, 0.88);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.reference-card-details-toggle::-webkit-details-marker {
  display: none;
}

.reference-card-details-toggle:hover {
  border-color: rgba(80, 224, 176, 0.3);
  background: rgba(80, 224, 176, 0.11);
  transform: translateY(-1px);
}

.reference-card-details-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 1290;
  width: min(280px, calc(100vw - 54px));
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: var(--radius-input);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.98), rgba(5, 16, 17, 0.96)),
    var(--panel-strong);
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(80, 224, 176, 0.1);
  transform: translateX(var(--reference-detail-shift, 0px));
}

.reference-card-details[open] .reference-card-details-panel {
  max-height: var(--reference-detail-max-height, 300px);
}

.reference-video-meta-detail {
  margin-bottom: 10px;
}

.reference-script-button {
  min-width: 92px;
}

.reference-script-button.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.reference-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.reference-video-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

#reference-video-grid .reference-video-badge {
  padding: 4px 7px;
  font-size: 10px;
  min-height: 32px;
}

#reference-video-grid .reference-card-details-panel {
  width: min(240px, calc(100vw - 54px));
  max-height: 300px;
  padding: 10px;
  font-size: 11px;
}

#reference-video-grid .reference-card-details-panel .asset-card-actions {
  display: none;
}

#reference-video-grid .reference-video-note,
#reference-video-grid .reference-video-meta {
  font-size: 10px;
  line-height: 1.45;
}

.reference-video-badge.supported {
  color: var(--accent-2);
  border-color: rgba(48, 192, 192, 0.24);
  background: rgba(48, 192, 192, 0.1);
}

.reference-video-badge.manual_review {
  color: #f4c96b;
  border-color: rgba(244, 201, 107, 0.24);
  background: rgba(244, 201, 107, 0.08);
}

.reference-video-badge.generation-disabled {
  color: var(--muted);
  border-color: rgba(159, 202, 196, 0.2);
  background: rgba(159, 202, 196, 0.08);
}

.reference-video-badge.skip {
  color: #ff8f8f;
  border-color: rgba(255, 143, 143, 0.24);
  background: rgba(255, 143, 143, 0.08);
}

.reference-video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-video-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(80, 224, 176, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.reference-video-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reference-select-button {
  min-width: 116px;
}

.reference-select-button.is-active {
  color: var(--accent-2);
  border-color: rgba(48, 192, 192, 0.26);
  background: rgba(48, 192, 192, 0.1);
}

.reference-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(80, 224, 176, 0.14);
  background: linear-gradient(180deg, rgba(5, 16, 17, 0.94), rgba(5, 16, 17, 0.88));
  margin-bottom: 12px;
}

.reference-selection-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.reference-selection-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.reference-selection-value {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}

.reference-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#reference-videos-summary {
  width: 100%;
}

.panel-header-summary#reference-videos-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: 100%;
  min-height: 40px;
  gap: 12px;
}

.reference-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-header-summary .reference-summary-chips {
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.panel-header-summary .reference-summary-chip {
  min-height: 40px;
  padding: 0 14px;
}

.reference-batch-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  min-height: 40px;
}

.panel-header-summary .reference-batch-tools {
  margin-left: 0;
}

.reference-batch-start,
.reference-batch-apply,
.reference-batch-delete,
.reference-batch-cancel {
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.reference-batch-start {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  background: rgba(80, 224, 176, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.06);
}

.reference-batch-start:hover {
  transform: translateY(-1px);
  border-color: rgba(80, 224, 176, 0.38);
  background: rgba(80, 224, 176, 0.14);
  box-shadow: 0 0 24px rgba(80, 224, 176, 0.12);
}

.reference-batch-apply {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(48, 192, 192, 0.32);
  background: rgba(48, 192, 192, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(48, 192, 192, 0.08);
}

.reference-batch-apply:hover {
  transform: translateY(-1px);
  border-color: rgba(48, 192, 192, 0.5);
  background: rgba(48, 192, 192, 0.15);
  box-shadow: 0 0 24px rgba(48, 192, 192, 0.12);
}

.reference-batch-apply:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.reference-selected-count {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.reference-batch-delete {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 143, 143, 0.34);
  background: rgba(255, 143, 143, 0.08);
  color: #ffb1b1;
  font-size: 12px;
  font-weight: 900;
}

.reference-batch-delete:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 143, 143, 0.52);
  background: rgba(255, 143, 143, 0.13);
}

.reference-batch-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.reference-batch-cancel {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.reference-batch-cancel:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.reference-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(80, 224, 176, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.reference-summary-chip strong {
  color: var(--ink);
  font-size: 12px;
}

.reference-summary-chip.is-supported {
  color: var(--accent-2);
  border-color: rgba(48, 192, 192, 0.22);
  background: rgba(48, 192, 192, 0.08);
}

.reference-summary-chip.is-review {
  color: #f4c96b;
  border-color: rgba(244, 201, 107, 0.22);
  background: rgba(244, 201, 107, 0.08);
}

.reference-summary-chip.is-skip {
  color: #ff8f8f;
  border-color: rgba(255, 143, 143, 0.22);
  background: rgba(255, 143, 143, 0.08);
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kv-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kv-value {
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.run-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-preview);
  background:
    linear-gradient(180deg, rgba(5, 16, 17, 0.94), rgba(5, 16, 17, 0.9)),
    var(--panel-strong);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.script-run-card {
  gap: 12px;
}

.script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.script-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

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

.run-kicker {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.run-title-minimal {
  margin: 0;
  font-size: 16px;
  line-height: 1.24;
}

.run-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.28;
}

.run-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.run-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.run-disclosure {
  margin-top: 2px;
}

.run-detail-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.run-detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.run-detail-value {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.hot-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.video-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-block-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-block video {
  width: 100%;
  border-radius: 20px;
  background: #001010;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.video-block-primary {
  max-width: 100%;
}

.video-block-secondary {
  margin-top: -2px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

button.file-link {
  cursor: pointer;
}

.file-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

.file-link.is-active {
  color: var(--accent);
  border-color: rgba(80, 224, 176, 0.24);
  box-shadow: 0 0 0 1px rgba(80, 224, 176, 0.1);
}

.file-link.is-disabled,
.file-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.log-preview,
.transcript-preview {
  max-height: 220px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 16px;
  background: #231a12;
  color: #f7ead5;
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.side-nav-item,
.prompt-shell,
.file-picker,
.select-panel-option,
.detail-section,
.detail-disclosure,
.task-group,
.date-range-shell,
.date-range-input,
.date-range-calendar,
.date-quick-group,
.date-quick-indicator,
.date-picker-popover,
.date-picker-day,
.reference-selection-bar,
.reference-card-details-panel,
.log-preview,
.transcript-preview,
.asset-toolbar,
.run-card,
.reference-summary-chip,
.reference-video-tag,
.reference-video-time {
  border-radius: var(--radius-input);
}

.feedback.is-success,
.feedback.success {
  color: var(--accent);
}

.feedback.is-warning,
.feedback.warning {
  color: var(--warning);
}

.feedback.is-error,
.feedback.error {
  color: var(--danger);
}

@media (max-width: 1259px) {
  :root {
    --page-y: 18px;
    --page-x: 20px;
  }

  .app-frame {
    display: block;
  }

  body.home-page-active .page-shell {
    padding-bottom: 18px;
  }

  .side-nav {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    top: var(--page-y);
    bottom: var(--page-y);
    left: var(--page-x);
    width: 86px;
    padding: 10px 7px;
  }

  .side-nav-brand {
    display: flex;
    width: 52px;
    height: auto;
    min-height: 52px;
    margin: 0 0 18px;
  }

  .side-nav-brand .brand-logo {
    height: 36px;
    max-width: 40px;
  }

  .side-nav-brand-text {
    font-size: 12px;
  }

  .side-nav-item {
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    width: 70px;
    height: 78px;
    min-height: 78px;
  }

  .workspace {
    margin-left: 108px;
  }

  .layout,
  .videos-layout,
  .split-layout,
  .home-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "submit"
      "detail"
      "list";
  }

  #page-assets .assets-split-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas: none;
  }

  #page-assets .asset-reference-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }

  .video-wall-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    min-height: auto;
  }

  .featured-video-grid .video-poster-card {
    flex-basis: calc((100% - 42px) / 4);
    width: calc((100% - 42px) / 4);
  }
}

@media (max-width: 720px) {
  :root {
    --page-y: 12px;
    --page-x: 10px;
  }

  .page-shell {
    padding: 16px var(--page-x);
  }

  body.home-page-active .page-shell {
    padding-bottom: 12px;
  }

  .side-nav {
    top: var(--page-y);
    bottom: var(--page-y);
    left: var(--page-x);
    width: 66px;
    gap: 4px;
    padding: 6px 5px;
  }

  .side-nav-brand {
    width: 44px;
    height: auto;
    min-height: 54px;
    margin: 0 0 18px;
  }

  .side-nav-brand .brand-logo {
    height: 32px;
    max-width: 36px;
  }

  .side-nav-brand-text {
    font-size: 11px;
    letter-spacing: 0;
  }

  .side-nav-item {
    width: 54px;
    height: 78px;
    min-height: 78px;
    padding: 6px 5px;
    gap: 4px;
  }

  .side-nav-membership-promo {
    width: 54px;
    min-height: 78px;
    align-items: center;
    padding: 7px 4px;
    text-align: center;
  }

  .side-nav-membership-promo-kicker,
  .side-nav-membership-promo > span:not(.side-nav-membership-promo-kicker) {
    display: none;
  }

  .side-nav-membership-promo strong {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.3;
  }

  .side-nav-membership-promo b {
    margin-top: 5px;
    font-size: 8px;
  }

  .side-nav-text {
    font-size: 12px;
  }

  .workspace {
    margin-left: 74px;
  }

  #page-assets .assets-split-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  #page-assets .asset-reference-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-date-filter {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .video-date-batch-slot {
    justify-content: stretch;
    min-width: 0;
  }

  .video-date-batch-slot .video-batch-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .video-source-nav {
    padding: 0 12px;
  }

  .video-source-tab {
    min-height: 48px;
    padding: 0 11px;
    font-size: 13px;
  }

  .asset-upload-row {
    gap: 10px;
  }

  .asset-upload-button {
    min-width: 112px;
    padding: 0 14px;
    font-size: 12px;
  }

  .file-picker-compact .file-picker-button {
    min-width: 76px;
    padding: 8px 10px;
  }

  .date-picker-popover {
    left: 14px;
    width: calc(100vw - 60px);
  }

  .date-picker-months {
    grid-template-columns: 1fr;
  }

  .composer-shell {
    min-height: 0;
    padding: 0;
  }

  .prompt-shell {
    min-height: 126px;
  }

  .prompt-input-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .reference-upload-stack {
    min-height: 82px;
  }

  #simple-prompt {
    min-height: 108px;
    font-size: 17px;
  }

  .composer-controls {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    margin-top: 0;
    padding-top: 2px;
  }

  .advanced-summary {
    min-height: 38px;
    padding: 8px 9px 8px 13px;
    font-size: 12px;
  }

  .simple-submit-wrap,
  .simple-submit-fab {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .home-reference-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
  }

  .task-form,
  .run-grid-section,
  .detail-meta-grid,
  .detail-grid,
  .policy-form,
  .anchors-grid {
    grid-template-columns: 1fr;
  }

  .anchors-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .anchors-grid {
    max-height: calc(100dvh - 190px);
  }

  .featured-video-grid .video-poster-card {
    flex-basis: calc((100% - 14px) / 2);
    width: calc((100% - 14px) / 2);
  }

  .video-wall,
  .video-wall-compact {
    grid-template-columns: 1fr;
  }

  .video-poster-overlay {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .featured-video-grid .video-poster-card {
    flex-basis: 100%;
    width: 100%;
  }
}

/* Preserve the navigation scale in short windows and scroll the rail instead. */
@media (max-height: 560px) {
  .side-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 224, 176, 0.52) transparent;
    scroll-padding-block: 10px;
  }

  .side-nav::-webkit-scrollbar {
    display: block;
    width: 4px;
  }

  .side-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .side-nav::-webkit-scrollbar-thumb {
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(80, 224, 176, 0.52);
  }
}

/* Reserve a dedicated horizontal lane for the fixed navigation. */
.workspace {
  margin-left: calc(var(--side-nav-width) + var(--nav-content-gap));
}

@media (max-width: 1259px) {
  :root {
    --side-nav-width: 86px;
  }

  .workspace {
    margin-left: calc(var(--side-nav-width) + var(--nav-content-gap));
  }
}

@media (max-width: 720px) {
  :root {
    --side-nav-width: 66px;
    --nav-content-gap: 20px;
  }

  .workspace {
    margin-left: calc(var(--side-nav-width) + var(--nav-content-gap));
  }
}

/* Exact empty homepage state: fill the first screen without a scrollbar. */
body.home-page-active:has(#home-task-list:empty) {
  overflow-y: hidden;
}

body.home-page-active .app-frame,
body.home-page-active .workspace {
  height: auto;
}

body.home-page-active #page-home.active:has(#home-task-list:empty) {
  height: calc(100dvh - var(--page-y) - var(--home-first-screen-bottom-gap));
  min-height: 0;
}

body.home-page-active .home-layout:has(#home-task-list:empty) {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

body.home-page-active .home-showcase-panel:has(#home-task-list:empty) {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

body.home-page-active .home-showcase-panel:has(#home-task-list:empty) #home-task-list {
  flex: 1 1 auto;
  overflow: hidden;
}

/* VI cool-blue secondary accents; primary actions and hover states remain green. */
.home-generation-progress-track span {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 68%, var(--accent-cool) 100%);
  box-shadow: 0 0 18px rgba(80, 224, 176, 0.2), 0 0 12px rgba(22, 143, 232, 0.16);
}

.detail-section a:not(.primary-button),
.task-detail a:not(.primary-button) {
  text-decoration-color: rgba(22, 143, 232, 0.42);
}

/* Light-medium frosted glass surface system */
.panel {
  border-color: var(--glass-border);
  background: var(--glass-panel);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(80, 224, 176, 0.035),
    0 20px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.submit-panel-primary {
  width: 100%;
  border-color: rgba(139, 242, 208, 0.13);
  background: var(--glass-composer);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 32px rgba(80, 224, 176, 0.025),
    0 22px 52px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
}

.detail-section,
.detail-disclosure,
.task-group,
.asset-toolbar,
.run-card {
  border-color: rgba(139, 242, 208, 0.09);
  background: var(--glass-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.submit-panel-primary:focus-within {
  border-color: rgba(80, 224, 176, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 34px rgba(80, 224, 176, 0.035),
    0 22px 56px rgba(0, 0, 0, 0.24),
    0 0 26px rgba(80, 224, 176, 0.055);
}

/* Compact first screen and content-driven generation panel */
.prompt-shell,
.prompt-input-row {
  min-height: var(--home-prompt-height);
}

#simple-prompt {
  min-height: var(--home-prompt-textarea-height);
}

body.home-page-active .home-showcase-panel {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.home-page-active .home-showcase-panel:has(.home-showcase-empty) {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

body.home-page-active .page-shell {
  padding-bottom: var(--home-first-screen-bottom-gap);
}

body.home-page-active #page-home.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--page-y) - var(--home-first-screen-bottom-gap));
}

body.home-page-active .home-banner {
  flex: 0 0 auto;
}

body.home-page-active .home-layout:has(.video-wall:empty) {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

body.home-page-active .home-layout:has(.home-generation-progress),
body.home-page-active .home-layout:has(.home-generation-results) {
  flex: 0 0 auto;
  grid-template-rows: auto auto;
  align-items: start;
}

body.home-page-active .home-showcase-panel:has(.home-generation-progress),
body.home-page-active .home-showcase-panel:has(.home-generation-results) {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.home-page-active .home-showcase-panel .video-wall {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

body.home-page-active .home-showcase-panel:has(.video-wall:empty) .video-wall {
  flex: 1 1 auto;
  overflow: hidden;
}

@media (max-width: 720px) {
  :root {
    --home-prompt-height: 113px;
    --home-prompt-textarea-height: 97px;
  }
}

.submit-panel-primary {
  min-height: clamp(230px, 16vw, 258px);
  padding: 26px 28px 22px;
  border-radius: 24px;
  overflow: visible;
  background:
    radial-gradient(circle at 66% 15%, rgba(80, 224, 176, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(2, 18, 17, 0.72), rgba(0, 12, 11, 0.58));
}

.submit-panel-primary::before {
  position: absolute;
  inset: 1px;
  content: "";
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(80, 224, 176, 0.035), transparent 32%),
    radial-gradient(circle at 68% 22%, rgba(80, 224, 176, 0.13), transparent 26%);
  opacity: 0.9;
}

.submit-panel-primary .composer-shell {
  min-height: 204px;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding-bottom: 66px;
}

.submit-panel-primary .composer-panel-pinned,
.submit-panel-primary .simple-form,
.submit-panel-primary .prompt-shell {
  min-height: 100%;
}

.submit-panel-primary .composer-panel-pinned {
  padding-top: 0;
}

.submit-panel-primary .prompt-shell {
  gap: 0;
}

.submit-panel-primary .prompt-input-row {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-height: 146px;
}

.submit-panel-primary .reference-upload-stack {
  width: 76px;
  min-width: 76px;
  min-height: 96px;
  padding-top: 2px;
}

.submit-panel-primary .reference-upload-button {
  top: 2px;
  width: 58px;
  height: 82px;
  flex-basis: 58px;
  border-radius: var(--radius-xs);
  border-color: rgba(139, 242, 208, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(2, 18, 17, 0.72);
}

.submit-panel-primary #simple-prompt {
  min-height: 144px;
  padding: 10px 0 0;
  font-size: 16px;
  line-height: 1.7;
}

.submit-panel-primary #simple-prompt::placeholder {
  color: rgba(214, 239, 236, 0.68);
}

.submit-panel-primary .composer-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  grid-template-columns: minmax(0, 1fr) 58px;
  min-height: 66px;
  gap: 18px;
  padding-top: 0;
  border-top: 1px solid rgba(139, 242, 208, 0.14);
}

.submit-panel-primary .simple-submit-wrap,
.submit-panel-primary .simple-submit-fab {
  width: 58px;
  height: 58px;
  min-width: 58px;
}

.submit-panel-primary .simple-submit-fab {
  border: 1px solid rgba(139, 242, 208, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(214, 239, 236, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 0 1px rgba(80, 224, 176, 0.035);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.submit-panel-primary .simple-submit-fab.is-ready:not(:disabled) {
  border-color: rgba(94, 255, 203, 0.82);
  color: #effff9;
  background: linear-gradient(145deg, rgba(43, 220, 164, 0.9), rgba(20, 144, 116, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 0 1px rgba(80, 224, 176, 0.3),
    0 0 18px rgba(43, 220, 164, 0.34),
    0 8px 24px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.submit-panel-primary .simple-submit-wrap.is-ready {
  filter: drop-shadow(0 0 10px rgba(43, 220, 164, 0.2));
}

.submit-panel-primary .simple-submit-fab.is-ready:hover:not(:disabled) {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(66, 239, 184, 0.98), rgba(25, 164, 130, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(80, 224, 176, 0.42),
    0 0 26px rgba(43, 220, 164, 0.46),
    0 10px 28px rgba(0, 0, 0, 0.32);
  transform: translateY(-2px) scale(1.03);
}

@media (max-width: 720px) {
  .submit-panel-primary {
    min-height: 250px;
    padding: 22px 20px 18px;
    border-radius: 24px;
  }

  .submit-panel-primary .prompt-input-row {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 146px;
  }

  .submit-panel-primary .reference-upload-stack {
    min-height: 82px;
    padding-top: 0;
  }

  .submit-panel-primary .reference-upload-button {
    top: 0;
    width: 58px;
    height: 82px;
    flex-basis: 58px;
  }

  .submit-panel-primary #simple-prompt {
    min-height: 116px;
    padding-top: 0;
  }

  .submit-panel-primary .composer-controls {
    grid-template-columns: minmax(0, 1fr) 52px;
    min-height: 60px;
  }

  .submit-panel-primary .simple-submit-wrap,
  .submit-panel-primary .simple-submit-fab {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }
}

/* Homepage workflow entry: restrained AI cards using the existing green glass system. */
.home-workflow-selector {
  display: grid;
  width: 100%;
  margin-top: clamp(22px, 2.4vh, 30px);
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px 18px;
}

.home-workflow-selector::before {
  color: rgba(236, 249, 246, 0.9);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  content: "创作流程";
}

.home-workflow-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-workflow-card {
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 250px;
  padding: 22px 0 18px 24px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: 16px;
  border: 1px solid rgba(139, 242, 208, 0.14);
  border-radius: 17px;
  background:
    radial-gradient(circle at 8% 0%, rgba(80, 224, 176, 0.08), transparent 36%),
    linear-gradient(105deg, rgba(5, 25, 22, 0.98) 0 64%, rgba(2, 16, 14, 0.99) 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 16px 40px rgba(0, 0, 0, 0.18);
  animation: workflow-card-enter 0.72s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.home-workflow-card::before,
.home-workflow-card::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.home-workflow-card::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(138deg, rgba(255, 255, 255, 0.032), transparent 30%),
    radial-gradient(circle at 32% 46%, rgba(72, 220, 194, 0.03), transparent 48%);
  opacity: 0.62;
  transition: opacity 0.45s ease;
}

.home-workflow-card::after {
  top: -1px;
  right: calc(35% + 38px);
  left: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(80, 224, 176, 0.66) 42%, rgba(48, 168, 226, 0.34) 72%, transparent);
  opacity: 0.26;
  transition: opacity 0.45s ease;
}

.home-workflow-card:nth-child(1) { animation-delay: 0.04s; }
.home-workflow-card:nth-child(2) { animation-delay: 0.12s; }
.home-workflow-card:nth-child(3) { animation-delay: 0.2s; }
.home-workflow-card:nth-child(4) { animation-delay: 0.28s; }

button.home-workflow-card {
  cursor: pointer;
  transition: border-color 0.45s ease, transform 0.45s linear, box-shadow 0.45s ease, background 0.45s ease;
}

button.home-workflow-card:hover,
button.home-workflow-card:focus-visible {
  border-color: rgba(80, 224, 176, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 224, 176, 0.14), transparent 36%),
    radial-gradient(circle at 100% 70%, rgba(22, 143, 232, 0.07), transparent 44%),
    linear-gradient(180deg, rgba(3, 32, 27, 0.99) 0%, rgba(0, 20, 17, 0.99) 52%, rgba(1, 25, 21, 0.99) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 54px rgba(0, 0, 0, 0.23), 0 0 30px rgba(80, 224, 176, 0.065);
  transform: translateY(-5px);
  outline: none;
}

button.home-workflow-card:hover::before,
button.home-workflow-card:focus-visible::before,
.home-workflow-card.is-motion-active::before {
  opacity: 1;
}

button.home-workflow-card:hover::after,
button.home-workflow-card:focus-visible::after,
.home-workflow-card.is-motion-active::after {
  opacity: 0.94;
}

button.home-workflow-card:active {
  transform: translateY(-2px) scale(0.985);
  transition-duration: 0.12s;
}

.workflow-card-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 15px 10px;
}

.workflow-card-head::after {
  grid-column: 2;
  grid-row: 1;
  color: rgba(183, 214, 207, 0.48);
  font-size: 10px;
  font-weight: 500;
  content: "可立即使用";
}

.home-workflow-card.is-upcoming .workflow-card-head::after {
  content: "即将上线";
}

.workflow-card-head strong {
  grid-column: 1;
  grid-row: 1;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.025em;
  line-height: 1;
}

.workflow-card-head > span {
  display: none;
}

.workflow-card-head b {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  font-size: 19px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-card-copy {
  position: relative;
  z-index: 2;
  display: block;
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  margin-top: 7px;
  color: rgba(214, 239, 236, 0.66);
  font-size: 13px;
  line-height: 1.55;
}

.workflow-card-visual {
  position: relative;
  isolation: isolate;
  display: none;
  container-type: inline-size;
  width: 100%;
  height: calc(100% + 40px);
  min-height: 250px;
  margin: -22px 0 -18px;
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: stretch;
  border-left: 1px solid rgba(139, 242, 208, 0.055);
  contain: paint;
  background-color: rgba(0, 8, 7, 0.3);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 1;
  transform: none;
  will-change: auto;
  transition: opacity 0.25s ease;
}

.workflow-card-visual::before,
.workflow-card-visual::after,
.workflow-card-visual i {
  position: absolute;
  content: "";
}

.workflow-card-visual::before {
  z-index: 1;
  display: block;
  pointer-events: none;
}

.workflow-card-visual::after {
  z-index: 1;
  display: block;
  pointer-events: none;
}

.workflow-visual-human {
  background-image: url("/static/images/workflow-digital-human-v1.png");
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 52%, #000 0 48%, rgba(0, 0, 0, 0.88) 60%, transparent 84%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 52%, #000 0 48%, rgba(0, 0, 0, 0.88) 60%, transparent 84%);
  mix-blend-mode: screen;
  --workflow-idle-duration: 10.8s;
  --workflow-idle-delay: 0s;
}

.workflow-visual-human::before {
  inset: 24% 28% 23%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 224, 176, 0.2) 0 7%, rgba(48, 192, 192, 0.08) 24%, transparent 62%);
  opacity: 0.28;
  animation: workflow-core-idle 8.2s ease-in-out infinite;
}

.workflow-visual-human::after {
  inset: 14% 8%;
  background: linear-gradient(180deg, transparent 0 48%, rgba(126, 244, 222, 0.28) 49.4%, rgba(22, 143, 232, 0.14) 50.2%, transparent 52%);
  -webkit-mask-image: radial-gradient(ellipse 72% 66% at 50% 52%, #000 0 52%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 66% at 50% 52%, #000 0 52%, transparent 78%);
  opacity: 0;
  transform: translate3d(0, -32%, 0);
  animation: none;
}

.workflow-visual-fixed {
  background-image: url("/static/images/workflow-fixed-selling-v3.png");
  background-size: 208px 208px;
  mix-blend-mode: screen;
  --workflow-idle-duration: 12.6s;
  --workflow-idle-delay: -2.1s;
}

.workflow-visual-fixed::before {
  inset: 28% 30% 29%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 246, 217, 0.26) 0 6%, rgba(48, 192, 192, 0.09) 24%, transparent 66%);
  opacity: 0.24;
  animation: workflow-core-idle 9.4s ease-in-out -1.8s infinite;
}

.workflow-visual-fixed::after {
  inset: 20% 16% 14%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 15%, rgba(80, 224, 176, 0.38) 20%, transparent 26% 52%, rgba(22, 143, 232, 0.26) 58%, transparent 64% 100%);
  -webkit-mask-image: radial-gradient(ellipse 48% 30% at 50% 66%, transparent 0 54%, #000 58% 66%, transparent 70%);
  mask-image: radial-gradient(ellipse 48% 30% at 50% 66%, transparent 0 54%, #000 58% 66%, transparent 70%);
  opacity: 0.05;
  animation: none;
}

.workflow-visual-story {
  background-image: url("/static/images/workflow-story-v8.png");
  background-size: 90% auto;
  mix-blend-mode: screen;
  --workflow-idle-duration: 11.4s;
  --workflow-idle-delay: -3.2s;
}

.workflow-visual-story::before {
  inset: 27% 32% 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(128, 250, 226, 0.28) 0 5%, rgba(48, 192, 192, 0.1) 22%, transparent 66%);
  opacity: 0.24;
  animation: workflow-core-idle 8.8s ease-in-out -2.5s infinite;
}

.workflow-visual-story::after {
  inset: 22% 19% 16%;
  border: 1px solid rgba(80, 224, 176, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(22, 143, 232, 0.08), inset 0 0 14px rgba(80, 224, 176, 0.08);
  opacity: 0;
  transform: scale(0.58);
  animation: none;
}

.workflow-visual-publish {
  background-image: url("/static/images/workflow-publish-v8.png");
  mix-blend-mode: screen;
  --workflow-idle-duration: 14.2s;
  --workflow-idle-delay: -4.4s;
}

.workflow-visual-publish::before {
  inset: 25% 28% 28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 246, 218, 0.26) 0 7%, rgba(22, 143, 232, 0.08) 30%, transparent 68%);
  opacity: 0.22;
  animation: workflow-core-idle 10.2s ease-in-out -1.2s infinite;
}

.workflow-visual-publish::after {
  inset: 18% 13% 15%;
  border-radius: 50%;
  background: conic-gradient(from 30deg, transparent 0 18%, rgba(22, 143, 232, 0.34) 23%, transparent 28% 55%, rgba(80, 224, 176, 0.36) 60%, transparent 66% 100%);
  -webkit-mask-image: radial-gradient(ellipse 44% 36% at 50% 58%, transparent 0 62%, #000 66% 70%, transparent 74%);
  mask-image: radial-gradient(ellipse 44% 36% at 50% 58%, transparent 0 62%, #000 66% 70%, transparent 74%);
  opacity: 0.04;
  animation: none;
}

.workflow-visual-fixed i,
.workflow-visual-story i {
  position: absolute;
  z-index: 2;
  display: grid;
  box-sizing: border-box;
  min-width: 36px;
  min-height: 18px;
  place-items: center;
  padding: 2px 5px;
  border-radius: 999px;
  color: rgba(221, 248, 241, 0.78);
  font-size: clamp(8px, 0.48vw, 9px);
  font-style: normal;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 8px rgba(54, 163, 209, 0.34);
  transform: translate(-50%, -50%);
  opacity: 0.68;
  animation: none;
}

.workflow-card-visual i:nth-child(2) { animation-delay: -1.1s; }
.workflow-card-visual i:nth-child(3) { animation-delay: -2.2s; }
.workflow-card-visual i:nth-child(4) { animation-delay: -3.3s; }
.workflow-card-visual i:nth-child(5) { animation-delay: -4.4s; }

.workflow-visual-story i {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0 2px;
  color: #eefef9;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  opacity: 1;
  text-shadow: none;
  transform-origin: center;
}

.workflow-visual-fixed i {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  color: #eefef9;
  font-size: 8px;
  font-weight: 700;
  opacity: 1;
  text-shadow: none;
}

.workflow-visual-fixed i:nth-child(1) { left: calc(50% + 55px); top: calc(50% - 68px); }
.workflow-visual-fixed i:nth-child(2) { left: calc(50% + 74px); top: calc(50% - 38px); }
.workflow-visual-fixed i:nth-child(3) { left: calc(50% + 72px); top: 50%; }
.workflow-visual-fixed i:nth-child(4) { left: calc(50% + 57px); top: calc(50% + 28px); }
.workflow-visual-story i:nth-child(1) { left: 33.6%; top: calc(50% - 28.1cqw); width: 25.1%; transform: translate(-50%, -50%); }
.workflow-visual-story i:nth-child(2) { left: 71.6%; top: calc(50% - 28.1cqw); width: 25.4%; transform: translate(-50%, -50%); }
.workflow-visual-story i:nth-child(3) { left: 23.4%; top: calc(50% - 6.8cqw); width: 20.2%; transform: translate(-50%, -50%); }
.workflow-visual-story i:nth-child(4) { left: 81.1%; top: calc(50% - 6.8cqw); width: 20.1%; transform: translate(-50%, -50%); }
.workflow-visual-story i:nth-child(5) { left: 52.4%; top: calc(50% + 25.3cqw); width: 32.8%; transform: translate(-50%, -50%); }

.home-workflow-card.is-motion-active {
  border-color: rgba(80, 224, 176, 0.38);
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 224, 176, 0.16), transparent 36%),
    radial-gradient(circle at 100% 70%, rgba(22, 143, 232, 0.075), transparent 44%),
    linear-gradient(180deg, rgba(3, 33, 28, 0.99) 0%, rgba(0, 21, 18, 0.99) 52%, rgba(1, 26, 22, 0.99) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 22px 50px rgba(0, 0, 0, 0.23), 0 0 30px rgba(80, 224, 176, 0.075);
  transform: translateY(-5px);
}

.home-workflow-card.is-motion-active .workflow-card-visual {
  animation: none;
  opacity: 1;
  transform: none;
}

.home-workflow-card.is-motion-active .workflow-card-visual::before {
  opacity: 0.7;
  animation: workflow-core-active 5.8s ease-in-out infinite;
}

.home-workflow-card.is-motion-active .workflow-visual-human::after {
  animation: workflow-scan-line 7.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.home-workflow-card.is-motion-active .workflow-visual-fixed::after {
  animation: workflow-orbit-sweep 13.2s linear infinite;
}

.home-workflow-card.is-motion-active .workflow-visual-story::after {
  animation: workflow-story-wave 9.8s ease-out infinite;
}

.home-workflow-card.is-motion-active .workflow-visual-publish::after {
  animation: workflow-orbit-sweep 14.6s linear infinite reverse;
}

.home-workflow-card.is-motion-active .workflow-visual-fixed i,
.home-workflow-card.is-motion-active .workflow-visual-story i {
  animation: none;
  opacity: 1;
  text-shadow: none;
}

.home-workflow-card.is-motion-active .workflow-card-visual i:nth-child(2) { animation-delay: -1.1s; }
.home-workflow-card.is-motion-active .workflow-card-visual i:nth-child(3) { animation-delay: -2.2s; }
.home-workflow-card.is-motion-active .workflow-card-visual i:nth-child(4) { animation-delay: -3.3s; }
.home-workflow-card.is-motion-active .workflow-card-visual i:nth-child(5) { animation-delay: -4.4s; }

button.home-workflow-card.is-motion-active:hover .workflow-card-visual,
button.home-workflow-card.is-motion-active:focus-visible .workflow-card-visual {
  animation: none;
  opacity: 1;
  transform: none;
}

button.home-workflow-card.is-motion-active:hover .workflow-card-visual::before,
button.home-workflow-card.is-motion-active:focus-visible .workflow-card-visual::before {
  opacity: 0.58;
  animation: workflow-core-active 3.8s ease-in-out infinite;
}

button.home-workflow-card.is-motion-active:hover .workflow-visual-human::after,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-human::after {
  animation-duration: 4.6s;
}

button.home-workflow-card.is-motion-active:hover .workflow-visual-fixed::after,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-fixed::after {
  animation-duration: 7.6s;
}

button.home-workflow-card.is-motion-active:hover .workflow-visual-story::after,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-story::after {
  animation-duration: 5.8s;
}

button.home-workflow-card.is-motion-active:hover .workflow-visual-publish::after,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-publish::after {
  animation-duration: 8.4s;
}

button.home-workflow-card.is-motion-active:hover .workflow-visual-fixed i,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-fixed i,
button.home-workflow-card.is-motion-active:hover .workflow-visual-story i,
button.home-workflow-card.is-motion-active:focus-visible .workflow-visual-story i {
  animation: none;
  opacity: 1;
  text-shadow: none;
}

button.home-workflow-card:hover .workflow-card-visual i:nth-child(2),
button.home-workflow-card:focus-visible .workflow-card-visual i:nth-child(2) { animation-delay: 0.14s; }
button.home-workflow-card:hover .workflow-card-visual i:nth-child(3),
button.home-workflow-card:focus-visible .workflow-card-visual i:nth-child(3) { animation-delay: 0.28s; }
button.home-workflow-card:hover .workflow-card-visual i:nth-child(4),
button.home-workflow-card:focus-visible .workflow-card-visual i:nth-child(4) { animation-delay: 0.42s; }
button.home-workflow-card:hover .workflow-card-visual i:nth-child(5),
button.home-workflow-card:focus-visible .workflow-card-visual i:nth-child(5) { animation-delay: 0.56s; }

.workflow-card-action {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 1;
  grid-row: 4;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  min-height: 24px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.01em;
}

.workflow-card-action b { transition: transform 0.35s linear; }
button.home-workflow-card:hover .workflow-card-action b { transform: translateX(5px); }

.home-workflow-card.is-upcoming {
  opacity: 1;
  filter: none;
}

.home-workflow-card.is-upcoming .workflow-card-visual {
  opacity: 1;
}

.home-workflow-card.is-upcoming.is-motion-active .workflow-card-visual {
  opacity: 1;
}

.workflow-card-badge {
  display: none;
}

.home-layout[hidden],
.home-workflow-selector[hidden],
.workflow-selling-point-field[hidden],
.reference-upload-stack[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.workflow-structured-input {
  min-width: 0;
  padding: 0;
}

.submit-panel-primary .prompt-input-row.is-fixed-template {
  grid-template-columns: minmax(0, 1fr);
}

.prompt-input-row.is-fixed-template .workflow-structured-input {
  grid-column: 1;
  width: 100%;
}

.workflow-structured-head {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 6px;
}

.workflow-current-type {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(240, 255, 251, 0.96);
  font-size: 16px;
  font-weight: 780;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.workflow-current-type::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #50e0b0 0%, #30c0c0 58%, #168fe8 100%);
  box-shadow: 0 0 12px rgba(80, 224, 176, 0.34);
  content: "";
  transform: rotate(45deg);
}

.workflow-title-line {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.workflow-change-button {
  min-height: 30px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(214, 239, 236, 0.62);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workflow-change-button:hover {
  background: transparent;
  color: var(--ink);
}

.workflow-section-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 2px 8px;
}

.workflow-section-caption span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(225, 249, 244, 0.88);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.06em;
}

.workflow-section-caption span::before {
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, #50e0b0, rgba(22, 143, 232, 0.5));
  box-shadow: 0 0 8px rgba(80, 224, 176, 0.22);
  content: "";
}

.workflow-section-caption small {
  display: none;
}

.workflow-structured-fields {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(130px, 0.38fr) minmax(160px, 0.52fr);
  align-items: start;
  gap: 12px;
  margin: -10px 70px 0 0;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prompt-input-row.is-fixed-template .workflow-structured-fields {
  grid-template-columns: minmax(180px, 0.65fr) minmax(320px, 1.7fr) minmax(124px, 0.45fr) minmax(150px, 0.58fr);
}

.workflow-control-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}

.workflow-control-label {
  display: flex;
  min-height: 18px;
  align-items: center;
  gap: 7px;
  color: rgba(159, 202, 196, 0.68);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.workflow-control-label::before {
  display: inline;
  width: auto;
  height: auto;
  color: rgba(80, 224, 176, 0.82);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.06em;
}

.workflow-vehicle-field .workflow-control-label::before { content: "01"; }
.workflow-count-field .workflow-control-label::before { content: "02"; }
.workflow-output-field .workflow-control-label::before { content: "03"; }
.prompt-input-row.is-fixed-template .workflow-selling-point-field .workflow-control-label::before { content: "02"; }
.prompt-input-row.is-fixed-template .workflow-count-field .workflow-control-label::before { content: "03"; }
.prompt-input-row.is-fixed-template .workflow-output-field .workflow-control-label::before { content: "04"; }

.workflow-control-group .select-panel {
  width: 100%;
  min-width: 0;
}

.workflow-output-label {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(139, 242, 208, 0.12);
  border-radius: 12px;
  background: rgba(1, 13, 14, 0.48);
  color: rgba(229, 247, 244, 0.92);
}

.workflow-output-label::before {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(80, 224, 176, 0.18), rgba(22, 143, 232, 0.12));
  color: rgba(116, 233, 206, 0.88);
  content: "▶";
  font-size: 8px;
}

.workflow-helper {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(139, 242, 208, 0.12);
  color: rgba(159, 202, 196, 0.56);
  font-size: 12px;
  line-height: 1.55;
}

.submit-panel-primary .prompt-input-row:not(.is-fixed-template) {
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 22px;
}

.submit-panel-primary .prompt-input-row:not(.is-fixed-template) .reference-upload-stack {
  width: 94px;
  min-width: 94px;
  min-height: 128px;
  padding-right: 18px;
  border-right: 1px solid rgba(139, 242, 208, 0.08);
}

.submit-panel-primary .reference-upload-stack:not(.has-items) .reference-upload-button {
  width: 72px;
  height: 108px;
  flex-basis: 72px;
  flex-direction: column;
  gap: 10px;
  border-radius: 12px;
  transform: rotate(-2deg);
}

.submit-panel-primary .reference-upload-stack:not(.has-items) .reference-upload-button::after {
  color: rgba(159, 202, 196, 0.58);
  content: "参考视频";
  font-size: 10px;
  letter-spacing: 0.04em;
}

@keyframes workflow-card-enter {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes workflow-visual-idle {
  0%, 100% {
    opacity: 0.94;
    transform: translate3d(0, 0, 0) scale(var(--workflow-visual-scale));
  }
  50% {
    opacity: 1;
    transform: translate3d(0, -7px, 0) scale(var(--workflow-visual-scale));
  }
}

@keyframes workflow-visual-awaken {
  0%, 100% {
    opacity: 0.98;
    transform: translate3d(0, -2px, 0) scale(var(--workflow-visual-scale));
  }
  42% {
    opacity: 1;
    transform: translate3d(0, -10px, 0) scale(var(--workflow-visual-hover-scale));
  }
  72% {
    opacity: 1;
    transform: translate3d(0, -6px, 0) scale(var(--workflow-visual-hover-scale));
  }
}

@keyframes workflow-core-idle {
  0%, 100% { opacity: 0.07; transform: scale(0.96); }
  50% { opacity: 0.18; transform: scale(1.03); }
}

@keyframes workflow-core-active {
  0%, 100% { opacity: 0.38; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.18); }
}

@keyframes workflow-scan-line {
  0% { opacity: 0; transform: translate3d(0, -34%, 0); }
  18% { opacity: 0.46; }
  72% { opacity: 0.32; }
  100% { opacity: 0; transform: translate3d(0, 34%, 0); }
}

@keyframes workflow-orbit-sweep {
  0% { opacity: 0.08; transform: rotate(0deg); }
  34% { opacity: 0.68; }
  70% { opacity: 0.42; }
  100% { opacity: 0.08; transform: rotate(360deg); }
}

@keyframes workflow-story-wave {
  0% { opacity: 0; transform: scale(0.58); }
  28% { opacity: 0.76; }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes workflow-label-wake {
  0%, 100% { opacity: 0.74; text-shadow: 0 0 8px rgba(54, 163, 209, 0.28); }
  45% { opacity: 1; text-shadow: 0 0 12px rgba(80, 224, 176, 0.58), 0 0 5px rgba(22, 143, 232, 0.36); }
}

@keyframes workflow-label-idle {
  0%, 100% { opacity: 0.68; text-shadow: 0 0 6px rgba(54, 163, 209, 0.2); }
  35% { opacity: 0.94; text-shadow: 0 0 13px rgba(80, 224, 176, 0.54); }
  58% { opacity: 1; text-shadow: 0 0 17px rgba(22, 143, 232, 0.52), 0 0 8px rgba(80, 224, 176, 0.46); }
}

@media (prefers-reduced-motion: reduce) {
  .home-workflow-card,
  .workflow-card-visual,
  .workflow-card-visual::before,
  .workflow-card-visual::after,
  .workflow-card-visual i {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  button.home-workflow-card:hover,
  button.home-workflow-card:focus-visible,
  button.home-workflow-card:active,
  button.home-workflow-card:hover .workflow-card-visual,
  button.home-workflow-card:focus-visible .workflow-card-visual {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .home-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-workflow-card {
    min-height: 208px;
    grid-template-columns: minmax(0, 1fr);
  }
  .workflow-card-visual { min-height: 208px; }
}

@media (max-width: 720px) {
  .home-workflow-selector { margin-top: 16px; }
  .home-workflow-grid { grid-template-columns: 1fr; }
  .home-workflow-card {
    min-height: 184px;
    grid-template-columns: minmax(0, 1fr);
  }
  .workflow-card-visual { min-height: 184px; }
  .workflow-structured-input { padding-top: 0; }
  .workflow-title-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .workflow-structured-fields,
  .prompt-input-row.is-fixed-template .workflow-structured-fields {
    grid-template-columns: 1fr;
    margin: 18px 0 0;
  }
}

@media (min-width: 721px) {
  body.home-page-active #page-home.active:has(.home-workflow-selector:not([hidden])) {
    min-height: 0;
    overflow: hidden;
  }

  .home-workflow-selector:not([hidden]) {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .home-workflow-selector:not([hidden]) .home-workflow-grid {
    min-height: 0;
    height: 100%;
    max-height: 514px;
    align-self: start;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .home-workflow-card[data-home-source-type="vehicle_micro_drama"] {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .home-workflow-card[data-home-source-type="reference_video"] {
    grid-column: 2;
    grid-row: 1;
  }

  .home-workflow-card[data-home-route="social-publish"] {
    grid-column: 2;
    grid-row: 2;
  }

  .home-workflow-selector:not([hidden]) .home-workflow-card,
  .home-workflow-selector:not([hidden]) .workflow-card-visual {
    min-height: 0;
  }
}

@media (min-width: 721px) and (max-height: 820px) {
  .home-workflow-selector:not([hidden]) {
    margin-top: 12px;
    gap: 16px 18px;
  }

  .home-workflow-selector:not([hidden]) .home-workflow-grid {
    gap: 10px 14px;
  }

  .home-workflow-selector:not([hidden]) .home-workflow-card {
    padding: 16px 0 14px 20px;
  }

  .home-workflow-selector:not([hidden]) .workflow-card-visual {
    height: calc(100% + 28px);
    margin: -16px 0 -12px;
  }

  .home-workflow-selector:not([hidden]) .workflow-card-head {
    gap: 9px 8px;
  }

  .home-workflow-selector:not([hidden]) .workflow-card-head b {
    font-size: 17px;
  }

  .home-workflow-selector:not([hidden]) .workflow-card-copy {
    margin-top: 3px;
    font-size: 12px;
  }

  .home-workflow-selector:not([hidden]) .workflow-card-action {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
  }
}

/* Final cascade for the unified pages. */
.home-workflow-selector.home-quick-composer { width: min(1120px, calc(100% - 40px)); margin: -34px auto 18px; padding: 18px; display: block; }
.home-workflow-selector.home-quick-composer::before { display: none; }
.commercial-page { --commercial-accent: var(--accent); --commercial-ink: var(--ink); background: transparent; color: var(--ink); }
.commercial-page .commercial-page-header h1 { color: var(--ink); }
.commercial-page .commercial-page-header p:last-child { color: var(--muted); }
.commercial-page .commercial-composer { border: 1px solid var(--line); color: var(--ink); background: rgba(4,20,19,.9); box-shadow: var(--shadow); }
.commercial-page .commercial-type-switch { background: rgba(255,255,255,.04); }
.commercial-page .commercial-type-switch button { color: var(--muted); }
.commercial-page .commercial-type-switch button.active { color: #00130f; background: var(--accent); box-shadow: none; }
.commercial-page .commercial-project-select,
.commercial-page .commercial-parameters label { color: var(--muted); }
.commercial-page .commercial-project-select select,
.commercial-page .commercial-parameters select { border-color: var(--line); color: var(--body-ink); background: rgba(255,255,255,.035); }
.commercial-page #commercial-script { min-height: 260px; padding: 20px 64px 54px 20px; border-color: var(--line-strong); color: var(--ink); background: rgba(0,10,10,.72); }
.commercial-page #commercial-script:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(80,224,176,.09); }
.commercial-page .commercial-tool-button { border-color: var(--line); color: var(--body-ink); background: rgba(255,255,255,.035); }
.commercial-page #commercial-asset-limit,
.commercial-page .commercial-submit-row p { color: var(--muted); }
.commercial-page .commercial-resolution { color: var(--muted); background: rgba(255,255,255,.05); }
.commercial-page .commercial-task-card { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.025); }
.commercial-page .commercial-task-card strong { color: var(--ink); }
.commercial-page .commercial-task-card span { color: var(--muted); }

/* Commercial creation */
.commercial-page {
  --commercial-accent: #14b8a6;
  --commercial-ink: #10212c;
  padding: 28px clamp(20px, 4vw, 56px) 60px;
  background: linear-gradient(180deg, #f7fbfb 0, #f5f7f9 420px);
}

.side-nav-item[hidden] { display: none !important; }

.commercial-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.commercial-page-header,
.commercial-project-row,
.commercial-composer-tools,
.commercial-submit-row,
.commercial-popover-head,
.commercial-agent-list article,
.commercial-task-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.commercial-page-header h1 {
  margin: 2px 0 4px;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--commercial-ink);
}

.commercial-page-header p:last-child {
  margin: 0;
  color: #71808a;
}

.commercial-composer {
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(20, 184, 166, .18);
  background: #fff;
  box-shadow: 0 18px 52px rgba(31, 55, 65, .08);
}

.commercial-project-row {
  align-items: flex-end;
  margin-bottom: 18px;
}

.commercial-type-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: #edf3f3;
}

.commercial-type-switch button {
  min-width: 104px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  color: #64747d;
  background: transparent;
  cursor: pointer;
}

.commercial-type-switch button.active {
  color: #087d71;
  background: #fff;
  box-shadow: 0 4px 12px rgba(18, 70, 68, .1);
  font-weight: 700;
}

.commercial-project-select {
  display: grid;
  gap: 6px;
  min-width: 240px;
  font-size: 12px;
  color: #71808a;
}

.commercial-project-select select,
.commercial-parameters select,
.commercial-agent-dialog input,
.commercial-agent-dialog textarea,
.commercial-agent-dialog select {
  border: 1px solid #dce5e8;
  border-radius: 10px;
  background: #fff;
  color: #253740;
}

.commercial-project-select select {
  height: 40px;
  padding: 0 12px;
}

#commercial-script {
  width: 100%;
  min-height: 224px;
  padding: 20px;
  resize: vertical;
  border: 1px solid #d8e3e5;
  border-radius: 16px;
  outline: none;
  background: #fbfdfd;
  color: #1e313b;
  font: inherit;
  line-height: 1.75;
  transition: border-color .2s, box-shadow .2s;
}

#commercial-script:focus {
  border-color: var(--commercial-accent);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .1);
}

.commercial-asset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.commercial-asset-strip:empty { margin: 0; }

.commercial-asset-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 300px;
  min-height: 46px;
  padding: 4px;
  border: 1px solid #cfe4e2;
  border-radius: 10px;
  background: #f2fbfa;
  color: #28504e;
  overflow: hidden;
}

.commercial-asset-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

button.commercial-asset-chip-main { cursor: pointer; }

.commercial-asset-chip-main.is-previewable:hover .commercial-asset-chip-name,
.commercial-asset-chip-main.is-previewable:focus-visible .commercial-asset-chip-name {
  color: var(--commercial-accent);
}

.commercial-asset-chip-media {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 7px;
  color: #6c8784;
  background: rgba(20, 184, 166, .08);
  overflow: hidden;
}

button.commercial-asset-chip-media { cursor: zoom-in; }

.commercial-asset-chip-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
}

button.commercial-asset-chip-media:hover img,
button.commercial-asset-chip-media:focus-visible img,
.commercial-asset-chip-main.is-previewable:hover .commercial-asset-chip-media img,
.commercial-asset-chip-main.is-previewable:focus-visible .commercial-asset-chip-media img {
  transform: scale(1.08);
}

.commercial-asset-chip-media.is-placeholder {
  font-size: 10px;
  font-weight: 700;
}

.commercial-asset-chip-status {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: var(--commercial-accent);
  font-size: 10px;
}

.commercial-asset-chip-name {
  min-width: 0;
  max-width: 92px;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s ease;
}

.commercial-asset-chip b { flex: 0 0 auto; color: #829493; }
.commercial-asset-chip.is-attached { border-style: dashed; background: rgba(255,255,255,.025); color: #8da09e; }
.commercial-asset-chip.is-attached .commercial-asset-chip-status { background: #60706f; }
.commercial-asset-chip.is-attached b { color: var(--commercial-accent); font-size: 11px; }

.commercial-asset-chip-remove {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #829493;
  background: transparent;
  cursor: pointer;
}

.commercial-asset-chip-remove:hover,
.commercial-asset-chip-remove:focus-visible {
  color: #ffb8b8;
  background: rgba(255, 107, 107, .12);
}

.commercial-asset-chip-delete {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #829493;
  background: transparent;
  cursor: pointer;
}

.commercial-asset-chip-delete svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.commercial-asset-chip-delete:hover,
.commercial-asset-chip-delete:focus-visible {
  color: #d45454;
  background: rgba(255, 107, 107, .12);
}

.commercial-upload-hint {
  display: block;
  margin-top: 4px;
  color: #829493;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.commercial-composer-tools {
  padding: 12px 2px 18px;
  border-bottom: 1px solid #edf1f2;
}

.commercial-reference-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.commercial-tool-button {
  padding: 8px 12px;
  border: 1px solid #dce5e8;
  border-radius: 9px;
  background: #fff;
  color: #42545d;
  cursor: pointer;
}

#commercial-asset-limit { margin-left: 4px; color: #8a989e; font-size: 12px; }

.commercial-parameters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
}

.commercial-parameters label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: #738188;
  font-size: 11px;
}

.commercial-parameters select { height: 40px; padding: 0 12px; }
.commercial-agent-status { max-width: 210px; color: #8b9c9a; font-size: 10px; line-height: 1.35; }
.commercial-agent-status[data-type="optimized"] { color: var(--commercial-accent); }
.commercial-resolution { padding: 11px 14px; border-radius: 9px; background: #eef3f4; color: #617078; font-size: 12px; }
.commercial-submit-row { padding-top: 4px; }
.commercial-submit-row p { margin: 0; color: #5e7078; }
.commercial-generate-button { min-width: 132px; min-height: 46px; background: var(--commercial-accent); }

/* Recent task queue: task-first ordering, one person per visual row. */
#page-videos .videos-layout .list-panel {
  max-height: 430px;
}

#page-videos #task-list {
  display: block;
  padding: 0 18px 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

#page-videos .recent-task-list {
  display: grid;
  gap: 14px;
}

#page-videos .recent-task-group {
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 16px;
  background: rgba(3, 18, 18, 0.9);
}

#page-videos .recent-task-group.is-failed {
  border-color: rgba(255, 112, 112, 0.3);
}

#page-videos .recent-task-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(80, 224, 176, 0.12);
  background: rgba(80, 224, 176, 0.035);
}

#page-videos .recent-task-group-header > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

#page-videos .recent-task-group-header strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-videos .recent-task-type,
#page-videos .recent-task-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: rgba(80, 224, 176, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

#page-videos .recent-task-group.is-failed .recent-task-status {
  background: rgba(255, 112, 112, 0.12);
  color: #ff9f9f;
}

#page-videos .recent-task-group-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

#page-videos .recent-task-people {
  display: grid;
}

#page-videos .recent-task-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 138px;
  padding: 12px 16px;
  gap: 16px;
  border-bottom: 1px solid rgba(80, 224, 176, 0.1);
}

#page-videos .recent-task-row:last-child {
  border-bottom: 0;
}

#page-videos .recent-task-visual {
  width: 112px;
  height: 138px;
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: 12px;
  background: rgba(4, 24, 23, 0.96);
}

#page-videos .recent-task-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page-videos .recent-task-visual-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

#page-videos .recent-task-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

#page-videos .recent-task-row .recent-task-heading,
#page-videos .recent-task-row .recent-task-content > strong {
  display: none;
}

#page-videos .recent-task-person {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

#page-videos .recent-task-error,
#page-videos .recent-task-progress {
  max-width: 920px;
  margin: 0;
  line-height: 1.6;
}

#page-videos .recent-task-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 92, 92, 0.08);
  color: #ffb1b1;
}

#page-videos .recent-task-error b {
  color: #ff8585;
}

.task-detail-error {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #ffb1b1;
  line-height: 1.6;
}

.task-detail-error b {
  color: #ff8585;
}

#page-videos .recent-task-progress {
  display: grid;
  width: min(520px, 100%);
  gap: 7px;
  color: var(--muted);
}

#page-videos .recent-task-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

#page-videos .recent-task-progress-top span {
  color: var(--accent);
}

#page-videos .recent-task-progress-top b {
  color: var(--body-ink);
  font-size: 12px;
}

#page-videos .recent-task-progress > i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

#page-videos .recent-task-progress > i::before {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  content: "";
  transition: width 0.3s ease;
}

#page-videos .recent-task-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.commercial-task-card { padding: 16px; border: 1px solid #e0e7e9; border-radius: 13px; background: #fff; }
.commercial-task-card > div:first-child { align-items: flex-start; }
.commercial-task-card strong { display: block; color: #263a43; }
.commercial-task-card span { color: #86949a; font-size: 12px; }
.commercial-task-card > b { color: #48616a; font-size: 12px; }
.commercial-task-card p { margin: 8px 0; color: #c64f4f; font-size: 12px; }
.commercial-task-card a { display: inline-block; margin-top: 10px; color: #087d71; }
.commercial-task-progress { height: 6px; margin: 14px 0 8px; overflow: hidden; border-radius: 9px; background: #eaf0f1; }
.commercial-task-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2dd4bf, #0f9f91); transition: width .3s; }
.commercial-task-card.is-failed .commercial-task-progress i { background: #e87979; }

.commercial-popover {
  position: fixed;
  z-index: 120;
  width: min(350px, calc(100vw - 24px));
  max-height: 400px;
  padding: 15px;
  overflow: auto;
  border: 1px solid #dce6e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 64px rgba(24, 48, 57, .2);
}

.commercial-popover-head button {
  border: 0;
  background: transparent;
  color: #6d7a80;
  font-size: 22px;
  cursor: pointer;
}

.commercial-create-asset {
  width: 100%;
  margin: 12px 0;
  padding: 11px;
  border: 1px dashed #a7cfca;
  border-radius: 10px;
  background: #f3fbfa;
  color: #087d71;
  cursor: pointer;
}

.commercial-asset-section { display: grid; gap: 6px; margin-top: 12px; }
.commercial-asset-section > span { color: #93a0a5; font-size: 11px; }
.commercial-asset-section button { display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 9px; text-align: left; background: #f6f8f9; cursor: pointer; }
.commercial-asset-section button:hover { background: #eaf7f5; }
.commercial-asset-section i { color: #159b8d; font-size: 11px; font-style: normal; }
.commercial-asset-section i.commercial-asset-popover-thumb { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 6px; overflow: hidden; }
.commercial-asset-section i.commercial-asset-popover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.commercial-asset-section b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.commercial-project-dialog { max-width: 460px; }
.commercial-project-dialog p { color: #687981; line-height: 1.7; }
.commercial-agent-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  max-height: min(760px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
}
.commercial-agent-dialog [hidden] { display: none !important; }
.commercial-agent-list { display: grid; gap: 8px; min-height: 0; margin: 0; padding: 18px 22px; overflow: auto; }
.commercial-agent-list article { padding: 12px; border: 1px solid #e3e9eb; border-radius: 11px; }
.commercial-agent-list span { display: block; margin-top: 4px; color: #87949a; font-size: 12px; }
#commercial-agent-form { display: grid; gap: 12px; min-height: 0; margin: 0; padding: 18px 22px 22px; overflow: auto; }
#commercial-agent-form[hidden] { display: none; }
#commercial-agent-form label:not(.commercial-agent-enabled) { display: grid; gap: 6px; color: #687981; font-size: 12px; }
#commercial-agent-form input, #commercial-agent-form select { height: 40px; padding: 0 12px; }
#commercial-agent-form textarea { padding: 12px; resize: vertical; }
.commercial-agent-enabled { display: flex; align-items: center; gap: 8px; }
#commercial-agent-add { margin: 0 22px 22px; justify-self: end; }

.work-search-chip input { width: 190px; border: 0; outline: 0; background: transparent; }
#page-videos .work-search-chip,
#page-videos .work-business-chip { border-color: rgba(105, 233, 209, .22); background: rgba(255, 255, 255, .035); }
#page-videos .work-search-chip input { color: #e8fffb; }
#page-videos .work-search-chip input::placeholder { color: rgba(207, 231, 227, .52); }
#page-videos .work-business-chip select { color: #e8fffb; background: transparent; }
#page-videos .commercial-work-results {
  flex: 0 0 auto;
  max-height: min(300px, 36vh);
  margin: 16px 20px 0;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  color: #e9fffb;
  border-color: rgba(105, 233, 209, .18);
  background: rgba(6, 26, 28, .88);
}
#page-videos .commercial-work-results > h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
#page-videos .commercial-work-results > div {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
#page-videos .commercial-work-card {
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  background: rgba(255, 255, 255, .045);
}
#page-videos .commercial-work-card video {
  grid-row: 1 / 4;
  width: 76px;
  height: 135px;
  max-height: none;
  aspect-ratio: auto;
}
#page-videos .commercial-work-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-videos .commercial-work-card a {
  align-self: end;
}
.commercial-work-results { margin: 0 0 18px; padding: 18px; border: 1px solid #dfe8ea; border-radius: 14px; background: #f8fbfb; }
.commercial-work-results > h3 { margin: 0 0 12px; }
.commercial-work-results > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }

/* Works task board final overrides */
#page-videos .task-preview-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 70px;
  padding: 8px;
}

#page-videos .task-preview-media {
  flex: 0 0 76px;
  width: 76px;
  height: 54px;
  min-height: 54px;
  aspect-ratio: auto;
}

#page-videos .task-preview-caption {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}

#page-videos .task-preview-caption strong {
  min-height: 0;
}

/* Works library tabs: default to finished works, switch to full-height generation queue on submit. */
#page-videos .videos-page-tabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 12px;
  background: rgba(3, 18, 17, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

#page-videos .videos-page-tab {
  position: relative;
  min-height: 38px;
  min-width: 96px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(207, 231, 227, 0.68);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#page-videos .videos-page-tab.active {
  background: linear-gradient(180deg, rgba(80, 224, 176, 0.18), rgba(80, 224, 176, 0.1));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(80, 224, 176, 0.16);
}

#page-videos .videos-page-tab::after {
  display: none;
}

#page-videos .videos-page-tab:hover,
#page-videos .videos-page-tab:focus-visible {
  color: #e8fffb;
}

#page-videos .videos-layout {
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
}

#page-videos .videos-layout > [hidden] {
  display: none !important;
}

#page-videos .videos-layout[data-active-tab="works"] .detail-panel,
#page-videos .videos-layout[data-active-tab="tasks"] .list-panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#page-videos .videos-layout[data-active-tab="tasks"] .list-panel > .panel-header {
  display: none;
}

#page-videos .videos-layout[data-active-tab="works"] .detail-panel-header {
  display: none;
}

#page-videos .videos-layout[data-active-tab="works"] .detail-panel-header > div {
  display: none;
}

#page-videos .videos-layout[data-active-tab="works"] .task-detail.video-preview-gallery,
#page-videos .videos-layout[data-active-tab="works"] .video-gallery-grid,
#page-videos .videos-layout[data-active-tab="tasks"] #task-list {
  flex: 1 1 auto;
  min-height: 0;
}

#page-videos .videos-layout[data-active-tab="tasks"] #task-list {
  display: block;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

#page-videos .recent-task-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 300px));
  gap: 22px;
  align-items: start;
  justify-content: start;
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: min(300px, 100%);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 50% 18%, rgba(80, 224, 176, 0.12), transparent 38%),
    var(--panel-strong);
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-media {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 9 / 16;
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-placeholder {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 34%, rgba(80, 224, 176, 0.16), transparent 34%),
    rgba(5, 16, 17, 0.72);
}

#page-videos .task-preview-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-placeholder .home-generation-spinner {
  width: 42px;
  height: 42px;
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-status {
  top: 14px;
  left: 14px;
}

#page-videos .videos-layout[data-active-tab="tasks"] .task-preview-title-row {
  right: 12px;
  bottom: 12px;
  left: 12px;
}

#page-videos .task-complete-state {
  display: grid;
  min-height: 420px;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.commercial-work-card { display: grid; gap: 7px; padding: 10px; border-radius: 11px; background: #fff; }
.commercial-work-card video { width: 100%; aspect-ratio: 9 / 16; max-height: 260px; border-radius: 8px; background: #101619; object-fit: cover; }
.commercial-work-card span { color: #849299; font-size: 12px; }
.commercial-work-card a { color: #087d71; font-size: 12px; }

@media (max-width: 760px) {
  .commercial-page { padding: 18px 12px 40px; }
  .commercial-page-header, .commercial-project-row, .commercial-submit-row { align-items: stretch; flex-direction: column; }
  .commercial-project-select { min-width: 0; }
  .commercial-composer-tools { align-items: flex-start; flex-direction: column; }
  .commercial-parameters label { flex: 1 1 42%; min-width: 120px; }
  .commercial-generate-button { width: 100%; }
}

/* C matrix icon set: quiet, consistent line icons. */
#home-workflow-selector .home-workflow-card::before,
#home-workflow-selector .home-workflow-card.is-motion-active::before {
  display: none !important;
}

#home-workflow-selector .home-workflow-card > .workflow-card-icon {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--module-accent) 25%, transparent);
  border-radius: 15px;
  color: var(--module-accent);
  background: color-mix(in srgb, var(--module-accent) 5%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#home-workflow-selector .home-workflow-card > .workflow-card-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  #home-workflow-selector .home-workflow-card > .workflow-card-icon {
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Homepage C matrix: a balanced brand entry for creation and distribution. */
#home-workflow-selector .home-workflow-grid {
  --workflow-card-height: clamp(310px, 47vh, 408px);
  position: relative;
  display: grid;
  height: auto;
  max-height: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(var(--workflow-card-height), auto);
  gap: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(5, 28, 24, 0.94), rgba(3, 18, 16, 0.96)) padding-box,
    linear-gradient(90deg, rgba(93, 220, 183, 0.055) 0%, rgba(93, 220, 183, 0.17) 16%, rgba(93, 220, 183, 0.17) 84%, rgba(93, 220, 183, 0.055) 100%) border-box;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#home-workflow-selector .home-workflow-grid::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  z-index: 5;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(87, 224, 179, 0.16) 10%, #63e0b3 30%, rgba(183, 247, 225, 0.9) 43%, #5bdfb5 58%, #46cf9f 74%, rgba(70, 207, 159, 0.16) 90%, transparent 100%);
  background-position: 100% 50%;
  background-size: 220% 100%;
  box-shadow: 0 0 12px rgba(78, 215, 189, 0.22), 0 0 22px rgba(71, 210, 165, 0.08);
  opacity: 0.82;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 5%, #000 16%, #000 84%, rgba(0, 0, 0, 0.2) 95%, transparent 100%);
  animation: workflow-gradient-stream 8s linear infinite;
  will-change: background-position;
}

#home-workflow-selector .home-workflow-grid::after {
  position: absolute;
  top: -2px;
  right: 12%;
  left: 12%;
  z-index: 4;
  height: 7px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(88, 224, 180, 0.2), rgba(104, 231, 187, 0.16), transparent);
  filter: blur(7px);
  opacity: 0.7;
  animation: workflow-gradient-glow 5.6s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes workflow-gradient-stream {
  from { background-position: 100% 50%; }
  to { background-position: -100% 50%; }
}

@keyframes workflow-gradient-glow {
  from { opacity: 0.38; transform: translateX(-4%); }
  to { opacity: 0.72; transform: translateX(4%); }
}

@media (prefers-reduced-motion: reduce) {
  #home-workflow-selector .home-workflow-grid::before,
  #home-workflow-selector .home-workflow-grid::after {
    animation: none;
  }
}

#home-workflow-selector .home-workflow-card,
#home-workflow-selector .home-workflow-card.is-motion-active,
#home-workflow-selector .home-workflow-card[data-home-source-type="vehicle_micro_drama"],
#home-workflow-selector .home-workflow-card[data-home-source-type="reference_video"],
#home-workflow-selector .home-workflow-card[data-home-route="social-publish"] {
  --module-accent: #5de0b4;
  --module-gradient: linear-gradient(135deg, #79e8c2 0%, #48d6a5 100%);
  display: grid;
  min-height: var(--workflow-card-height);
  padding: 24px 26px 20px;
  overflow: hidden;
  grid-column: auto;
  grid-row: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  border: 0;
  border-right: 1px solid rgba(93, 204, 174, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  animation: none;
  transition: background 0.28s ease;
}

#home-workflow-selector .home-workflow-card[data-home-source-type="reference_video"] {
  --module-accent: #63dfb3;
  --module-gradient: linear-gradient(135deg, #a0f0d2 0%, #59dcad 52%, #35c894 100%);
}

#home-workflow-selector .home-workflow-card[data-home-route="social-publish"] {
  --module-accent: #62d9c0;
  --module-gradient: linear-gradient(135deg, #8ae8c8 0%, #50d5a8 100%);
  border-right: 0;
}

#home-workflow-selector .home-workflow-card::before,
#home-workflow-selector .home-workflow-card.is-motion-active::before {
  position: absolute;
  top: 22px;
  right: 24px;
  bottom: auto;
  left: auto;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--module-accent) 28%, transparent);
  border-radius: 17px;
  color: var(--module-accent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--module-accent) 11%, transparent), rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  font-size: 20px;
  content: "✦";
  opacity: 1;
  pointer-events: none;
}

#home-workflow-selector .home-workflow-card[data-home-source-type="reference_video"]::before {
  content: "◎";
}

#home-workflow-selector .home-workflow-card[data-home-route="social-publish"]::before {
  content: "↗";
}

#home-workflow-selector .home-workflow-card::after,
#home-workflow-selector .home-workflow-card.is-motion-active::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--module-accent) 12%, transparent), transparent 28%), linear-gradient(180deg, color-mix(in srgb, var(--module-accent) 5%, transparent), transparent 46%);
  opacity: 0.45;
  transition: opacity 0.28s ease;
}

#home-workflow-selector .home-workflow-card > * {
  position: relative;
  z-index: 1;
}

#home-workflow-selector .workflow-card-head {
  display: grid;
  grid-row: 1;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 5px;
}

#home-workflow-selector .workflow-card-head > strong {
  display: block;
  width: auto;
  height: auto;
  grid-column: 1;
  grid-row: 1;
  border: 0;
  color: var(--module-accent);
  background: transparent;
  font-size: 10px;
  letter-spacing: 0.12em;
}

#home-workflow-selector .workflow-card-head > span {
  display: none;
}

#home-workflow-selector .workflow-card-head::after {
  display: block !important;
  width: auto;
  padding: 0;
  grid-column: 2;
  grid-row: 1;
  border: 0;
  color: var(--module-accent);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  content: "/ STORY";
}

#home-workflow-selector .home-workflow-card[data-home-source-type="reference_video"] .workflow-card-head::after {
  content: "/ AVATAR";
}

#home-workflow-selector .home-workflow-card[data-home-route="social-publish"] .workflow-card-head::after {
  content: "/ DISTRIBUTE";
}

#home-workflow-selector .workflow-card-head > b,
#home-workflow-selector .home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-head > b {
  margin-top: 43px;
  grid-column: 1 / -1;
  grid-row: 2;
  color: #f1f7f5;
  font-size: clamp(22px, 1.75vw, 29px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.12;
  white-space: nowrap;
}

#home-workflow-selector .workflow-card-copy,
#home-workflow-selector .home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-copy {
  display: block;
  min-height: 40px;
  margin-top: 9px;
  grid-row: 2;
  color: #91aaa3;
  font-size: 12px;
  line-height: 1.65;
}

#home-workflow-selector .workflow-card-path,
#home-workflow-selector .workflow-card-path-compact {
  display: flex;
  min-height: 0;
  margin: 18px 0 0;
  grid-row: 3;
  align-self: start;
  flex-wrap: wrap;
  gap: 7px;
  border: 0;
}

#home-workflow-selector .workflow-card-path::before,
#home-workflow-selector .workflow-card-path::after,
#home-workflow-selector .workflow-card-path-compact::before,
#home-workflow-selector .workflow-card-path-compact::after {
  display: none;
}

#home-workflow-selector .workflow-card-path i,
#home-workflow-selector .workflow-card-path-compact i {
  display: block;
  min-height: 0;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 10%, transparent);
  border-radius: 8px;
  color: #9ab4ac;
  background: color-mix(in srgb, var(--module-accent) 6%, transparent);
  text-align: left;
}

#home-workflow-selector .workflow-card-path i > b,
#home-workflow-selector .workflow-card-path-compact i > b {
  display: none;
}

#home-workflow-selector .workflow-card-path i > span,
#home-workflow-selector .workflow-card-path-compact i > span {
  display: block;
}

#home-workflow-selector .workflow-card-path strong,
#home-workflow-selector .workflow-card-path-compact strong {
  display: block;
  max-width: none;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

#home-workflow-selector .workflow-card-action {
  display: flex;
  min-height: 42px;
  margin-top: 20px;
  padding-top: 13px;
  grid-row: 4;
  align-self: end;
  border-top: 1px solid rgba(89, 218, 181, 0.16);
  color: var(--module-accent);
}

#home-workflow-selector .workflow-card-action b {
  width: 30px;
  height: 30px;
  background: var(--module-gradient);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

#home-workflow-selector button.home-workflow-card:hover,
#home-workflow-selector button.home-workflow-card:focus-visible,
#home-workflow-selector button.home-workflow-card.is-motion-active:hover,
#home-workflow-selector button.home-workflow-card.is-motion-active:focus-visible {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--module-accent) 7%, transparent), transparent 62%);
  box-shadow: none;
  transform: none;
}

#home-workflow-selector button.home-workflow-card:hover::after,
#home-workflow-selector button.home-workflow-card:focus-visible::after {
  opacity: 0.85;
}

#home-workflow-selector button.home-workflow-card:hover .workflow-card-action b,
#home-workflow-selector button.home-workflow-card:focus-visible .workflow-card-action b {
  transform: translateX(4px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--module-accent) 24%, transparent);
}

@media (max-width: 900px) {
  #home-workflow-selector .home-workflow-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  #home-workflow-selector .home-workflow-card,
  #home-workflow-selector .home-workflow-card.is-motion-active,
  #home-workflow-selector .home-workflow-card[data-home-source-type="vehicle_micro_drama"],
  #home-workflow-selector .home-workflow-card[data-home-source-type="reference_video"],
  #home-workflow-selector .home-workflow-card[data-home-route="social-publish"] {
    min-height: 274px;
    border-right: 0;
    border-bottom: 1px solid rgba(93, 204, 174, 0.14);
  }

  #home-workflow-selector .home-workflow-card[data-home-route="social-publish"] {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  #home-workflow-selector .home-workflow-card,
  #home-workflow-selector .home-workflow-card.is-motion-active {
    padding: 22px;
  }

  #home-workflow-selector .home-workflow-card::before,
  #home-workflow-selector .home-workflow-card.is-motion-active::before {
    right: 20px;
    width: 52px;
    height: 52px;
  }

  #home-workflow-selector .workflow-card-head > b,
  #home-workflow-selector .home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-head > b {
    font-size: 24px;
  }
}

/* Local integration guard: keep embedded workspace pages mounted and smooth.
   These rules affect only the Content Factory shell, never the iframe internals. */
body.short-drama-page-active {
  height: 100vh;
  overflow: hidden;
}

body.short-drama-page-active .page-shell {
  height: 100vh;
  padding-bottom: 28px;
  overflow: hidden;
}

body.short-drama-page-active .app-frame,
body.short-drama-page-active .workspace,
body.short-drama-page-active #page-short-drama {
  height: 100%;
  min-height: 0;
}

.home-poster-media {
  display: block;
}

.home-poster-media img {
  display: block;
  width: 100%;
  height: auto;
}

.short-drama-screen {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: calc(100vh - var(--page-y) * 2);
}

.short-drama-frame-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: calc(100vh - var(--page-y) * 2);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.short-drama-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  transform: translateZ(0);
  transition: opacity 0.18s ease;
}

.short-drama-frame.active {
  opacity: 1;
  pointer-events: auto;
}

.short-drama-frame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle at 28% 74%, rgba(80, 224, 176, 0.14), transparent 32%),
    var(--panel-strong);
  pointer-events: none;
}

.short-drama-frame-loading[hidden] {
  display: none;
}

/* Flat workflow cards: solid surfaces, restrained hierarchy, no decorative artwork. */
.home-workflow-selector {
  margin-top: clamp(18px, 2vh, 24px);
  gap: 14px;
}

.home-workflow-selector::before {
  color: #e7f2ef;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-workflow-grid {
  gap: 12px;
}

.home-workflow-card,
.home-workflow-card.is-motion-active {
  padding: 26px 28px 22px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  column-gap: 0;
  border: 1px solid #203a34;
  border-radius: 14px;
  background: #081512;
  box-shadow: none;
  animation: none;
  transform: none;
}

.home-workflow-card[data-home-source-type="vehicle_micro_drama"],
.home-workflow-card[data-home-source-type="vehicle_micro_drama"].is-motion-active {
  border-color: #2a5147;
  background: #0b1a17;
}

.home-workflow-card::before,
.home-workflow-card::after,
.home-workflow-card.is-motion-active::before,
.home-workflow-card.is-motion-active::after {
  display: none;
}

button.home-workflow-card,
button.home-workflow-card.is-motion-active {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

button.home-workflow-card:hover,
button.home-workflow-card:focus-visible,
button.home-workflow-card.is-motion-active:hover,
button.home-workflow-card.is-motion-active:focus-visible {
  border-color: #4ac79f;
  background: #0d201b;
  box-shadow: none;
  transform: translateY(-2px);
  outline: none;
}

button.home-workflow-card:focus-visible,
button.home-workflow-card.is-motion-active:focus-visible {
  outline: 2px solid rgba(80, 224, 176, 0.75);
  outline-offset: 3px;
}

button.home-workflow-card:active,
button.home-workflow-card.is-motion-active:active {
  transform: translateY(0);
}

.workflow-card-head {
  gap: 16px 12px;
}

.workflow-card-head strong {
  display: grid;
  width: 32px;
  height: 28px;
  place-items: center;
  border: 1px solid #2f5d52;
  border-radius: 7px;
  color: #73e7c0;
  background: #102821;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.workflow-card-head::after {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid #263c36;
  border-radius: 999px;
  color: #8da39e;
  background: #0c1916;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.workflow-card-head b {
  color: #f1f7f5;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-head b {
  font-size: clamp(24px, 1.8vw, 30px);
}

.workflow-card-copy {
  margin-top: 10px;
  color: #98ada7;
  font-size: 13px;
  line-height: 1.6;
}

.workflow-card-capabilities {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 1;
  grid-row: 3;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.workflow-card-capabilities i {
  padding: 6px 9px;
  border: 1px solid #263f38;
  border-radius: 7px;
  color: #afc0bb;
  background: #0b1815;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

.workflow-card-path {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1;
  grid-row: 4;
  width: min(100%, 520px);
  align-self: center;
  border-top: 1px solid #20362f;
}

.workflow-card-path i {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-bottom: 1px solid #20362f;
  color: #c2d1cd;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.workflow-card-path b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #07110e;
  background: #65dcb5;
  font-size: 10px;
}

.workflow-card-action {
  grid-row: 5;
  justify-content: space-between;
  min-height: 38px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #20362f;
  color: #73e7c0;
  font-size: 13px;
  font-weight: 700;
}

.workflow-card-action b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #06110e;
  background: #65dcb5;
  transition: transform 160ms ease, background-color 160ms ease;
}

button.home-workflow-card:hover .workflow-card-action b,
button.home-workflow-card:focus-visible .workflow-card-action b {
  background: #82ecc8;
  transform: translateX(2px);
}

@media (max-width: 720px) {
  .home-workflow-card,
  .home-workflow-card.is-motion-active {
    min-height: 188px;
    padding: 22px;
  }

  .home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-head b {
    font-size: 22px;
  }

  .workflow-card-capabilities {
    margin-top: 16px;
  }

  .workflow-card-path {
    display: none;
  }
}

/* Quiet 2D card illustrations: supportive, never a primary focal point. */
.workflow-card-visual {
  position: absolute;
  top: 50%;
  right: 28px;
  z-index: 1;
  display: block;
  width: clamp(104px, 9vw, 142px);
  height: clamp(104px, 9vw, 142px);
  min-height: 0;
  margin: 0;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.14;
  mix-blend-mode: normal;
  transform: translateY(-50%);
  filter: saturate(0.78);
  pointer-events: none;
}

.workflow-visual-story {
  right: 34px;
  width: clamp(124px, 12vw, 190px);
  height: clamp(124px, 12vw, 190px);
  background-image: url("/static/images/workflow-story-flat-v1.png");
  opacity: 0.11;
  -webkit-mask-image: none;
  mask-image: none;
}

.workflow-visual-human {
  background-image: url("/static/images/workflow-digital-human-flat-v1.png");
  opacity: 0.1;
  -webkit-mask-image: none;
  mask-image: none;
}

.workflow-visual-publish {
  background-image: url("/static/images/workflow-publish-flat-v1.png");
  opacity: 0.085;
  filter: brightness(0.78) saturate(0.68);
}

.home-workflow-card.is-motion-active .workflow-visual-story {
  opacity: 0.11;
  transform: translateY(-50%);
  animation: none;
}

.workflow-card-visual::before,
.workflow-card-visual::after,
.workflow-card-visual i {
  display: none !important;
}

.home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-path {
  width: min(calc(100% - 180px), 520px);
}

.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-head,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-copy,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-capabilities {
  max-width: calc(100% - 156px);
}

@media (max-width: 720px) {
  .workflow-card-visual {
    display: none;
  }

  .home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-path,
  .home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-head,
  .home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-copy,
  .home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-capabilities {
    width: auto;
    max-width: none;
  }
}

/* Keep the richer original hover feedback while the resting cards stay flat. */
button.home-workflow-card,
button.home-workflow-card.is-motion-active {
  transition: border-color 280ms ease, background 280ms ease, box-shadow 280ms ease, transform 280ms ease;
}

button.home-workflow-card:hover,
button.home-workflow-card:focus-visible,
button.home-workflow-card.is-motion-active:hover,
button.home-workflow-card.is-motion-active:focus-visible {
  border-color: rgba(80, 224, 176, 0.48);
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 224, 176, 0.13), transparent 38%),
    radial-gradient(circle at 100% 72%, rgba(22, 143, 232, 0.065), transparent 42%),
    linear-gradient(180deg, #0d211c 0%, #091a16 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 42px rgba(0, 0, 0, 0.26),
    0 0 28px rgba(80, 224, 176, 0.075);
  transform: translateY(-5px);
}

button.home-workflow-card:hover .workflow-card-visual,
button.home-workflow-card:focus-visible .workflow-card-visual,
button.home-workflow-card.is-motion-active:hover .workflow-card-visual,
button.home-workflow-card.is-motion-active:focus-visible .workflow-card-visual {
  opacity: 0.2;
  transform: translateY(-50%) scale(1.035);
}

button.home-workflow-card:hover .workflow-visual-publish,
button.home-workflow-card:focus-visible .workflow-visual-publish {
  opacity: 0.14;
}

button.home-workflow-card:hover .workflow-card-action b,
button.home-workflow-card:focus-visible .workflow-card-action b {
  background: #8af0cd;
  transform: translateX(5px);
}

@media (prefers-reduced-motion: reduce) {
  button.home-workflow-card:hover,
  button.home-workflow-card:focus-visible,
  button.home-workflow-card.is-motion-active:hover,
  button.home-workflow-card.is-motion-active:focus-visible,
  button.home-workflow-card:hover .workflow-card-visual,
  button.home-workflow-card:focus-visible .workflow-card-visual {
    transform: none;
  }
}

/* Linear workflow cards v4: structured product flow without decorative artwork. */
.home-workflow-card,
.home-workflow-card.is-motion-active {
  overflow: hidden;
  grid-template-rows: auto auto auto minmax(74px, 1fr) auto;
}

.workflow-card-visual {
  display: none !important;
}

.home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-path,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-path,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-head,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-copy,
.home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-capabilities {
  width: 100%;
  max-width: none;
}

.workflow-card-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  width: 100%;
  margin: 28px 0 20px;
  border: 0;
  isolation: isolate;
}

.workflow-card-path::before,
.workflow-card-path::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: -1;
  width: calc(100% - 32px);
  height: 1px;
}

.workflow-card-path::before {
  background: #29423b;
}

.workflow-card-path::after {
  width: 0;
  background: linear-gradient(90deg, #50e0b0 0%, #30c0c0 62%, #168fe8 100%);
  box-shadow: 0 0 10px rgba(80, 224, 176, 0.22);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.workflow-card-path i {
  display: grid;
  grid-template-columns: none;
  grid-template-rows: 33px auto;
  justify-items: start;
  gap: 10px;
  min-height: 0;
  border: 0;
  color: inherit;
  font-style: normal;
}

.workflow-card-path i:nth-child(2) {
  justify-items: center;
  text-align: center;
}

.workflow-card-path i:last-child {
  justify-items: end;
  text-align: right;
}

.workflow-card-path b {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid #356358;
  border-radius: 50%;
  color: #92b9ae;
  background: #0b1a17;
  box-shadow: 0 0 0 5px #0b1a17;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.workflow-card-path i > span {
  display: grid;
  gap: 4px;
}

.workflow-card-path strong {
  color: #dce9e5;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.workflow-card-path small {
  color: #6f8982;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

button.home-workflow-card:hover,
button.home-workflow-card:focus-visible,
button.home-workflow-card.is-motion-active:hover,
button.home-workflow-card.is-motion-active:focus-visible {
  border-color: rgba(80, 224, 176, 0.5);
  background:
    radial-gradient(circle at 16% 0%, rgba(80, 224, 176, 0.11), transparent 38%),
    linear-gradient(180deg, #0d211c 0%, #091a16 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 14px 34px rgba(0, 0, 0, 0.22);
  transform: none;
}

button.home-workflow-card:hover .workflow-card-path::after,
button.home-workflow-card:focus-visible .workflow-card-path::after {
  width: calc(100% - 32px);
}

button.home-workflow-card:hover .workflow-card-path b,
button.home-workflow-card:focus-visible .workflow-card-path b {
  border-color: #62dbb5;
  color: #06110e;
  background: #65dcb5;
  box-shadow: 0 0 0 5px #0d211c, 0 0 15px rgba(80, 224, 176, 0.24);
}

.workflow-card-path-compact {
  min-height: 54px;
  margin: 14px 0 8px;
}

.workflow-card-path-compact i {
  grid-template-rows: 27px auto;
  gap: 7px;
}

.workflow-card-path-compact::before,
.workflow-card-path-compact::after {
  top: 12px;
  left: 13px;
  width: calc(100% - 26px);
}

.workflow-card-path-compact b {
  width: 27px;
  height: 27px;
  box-shadow: 0 0 0 4px #081512;
  font-size: 8px;
}

.workflow-card-path-compact strong {
  font-size: 11px;
}

.workflow-card-path-compact small {
  display: none;
}

button.home-workflow-card:hover .workflow-card-path-compact::after,
button.home-workflow-card:focus-visible .workflow-card-path-compact::after {
  width: calc(100% - 26px);
}

button.home-workflow-card:hover .workflow-card-path-compact b,
button.home-workflow-card:focus-visible .workflow-card-path-compact b {
  box-shadow: 0 0 0 4px #0d211c, 0 0 12px rgba(80, 224, 176, 0.2);
}

@media (min-width: 721px) and (max-height: 820px) {
  .workflow-card-path {
    margin: 18px 0 12px;
  }

  .workflow-card-path-compact {
    margin: 8px 0 4px;
  }

  .workflow-card-path small {
    display: none;
  }
}

/* Flow nodes are landmarks, not a second numbering system. */
.workflow-card-path {
  margin-block: 24px 16px;
}

.workflow-card-path::before,
.workflow-card-path::after {
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
}

.workflow-card-path i,
.workflow-card-path-compact i {
  grid-template-rows: 11px auto;
  gap: 11px;
}

.workflow-card-path b,
.workflow-card-path-compact b {
  width: 11px;
  height: 11px;
  border-color: #42776a;
  background: #10231e;
  box-shadow: 0 0 0 4px #0b1a17;
  font-size: 0;
}

.workflow-card-path-compact {
  min-height: 44px;
  margin: 12px 0 4px;
}

.workflow-card-path-compact::before,
.workflow-card-path-compact::after {
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
}

button.home-workflow-card:hover .workflow-card-path::after,
button.home-workflow-card:focus-visible .workflow-card-path::after,
button.home-workflow-card:hover .workflow-card-path-compact::after,
button.home-workflow-card:focus-visible .workflow-card-path-compact::after {
  width: calc(100% - 10px);
}

button.home-workflow-card:hover .workflow-card-path b,
button.home-workflow-card:focus-visible .workflow-card-path b,
button.home-workflow-card:hover .workflow-card-path-compact b,
button.home-workflow-card:focus-visible .workflow-card-path-compact b {
  box-shadow: 0 0 0 4px #0d211c, 0 0 10px rgba(80, 224, 176, 0.28);
}

@media (min-width: 721px) and (max-height: 820px) {
  .workflow-card-path {
    margin: 16px 0 10px;
  }

  .workflow-card-path-compact {
    min-height: 40px;
    margin: 8px 0 0;
  }
}

@media (max-width: 720px) {
  .home-workflow-card,
  .home-workflow-card.is-motion-active {
    min-height: 250px;
  }

  .workflow-card-path {
    display: grid;
    margin: 24px 0 12px;
  }

  .workflow-card-path small {
    display: none;
  }

  .workflow-card-path strong {
    max-width: 86px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-card-path::after,
  .workflow-card-path b {
    transition: none;
  }
}

/* Reduced card copy: one clear message per visual layer. */
.home-workflow-card,
.home-workflow-card.is-motion-active {
  grid-template-rows: auto auto minmax(66px, 1fr) auto;
}

.workflow-card-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 12px;
}

.workflow-card-head > strong {
  grid-column: 1;
  grid-row: 1;
}

.workflow-card-head > span,
.workflow-card-head::after,
.workflow-card-capabilities {
  display: none !important;
}

.workflow-card-head > b,
.home-workflow-card[data-home-source-type="vehicle_micro_drama"] .workflow-card-head > b {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(20px, 1.55vw, 25px);
}

.workflow-card-copy {
  grid-row: 2;
  margin-top: 10px;
}

.workflow-card-path {
  grid-row: 3;
}

.workflow-card-action {
  grid-row: 4;
}

@media (min-width: 721px) and (max-height: 820px) {
  .home-workflow-selector:not([hidden]) .home-workflow-card {
    padding: 16px 20px 14px;
  }

  .home-workflow-card:not([data-home-source-type="vehicle_micro_drama"]) .workflow-card-copy {
    display: none;
  }

  .workflow-card-path-compact {
    min-height: 48px;
    margin: 8px 0 2px;
  }

  .workflow-card-action {
    min-height: 30px;
    margin-top: 4px;
    padding-top: 6px;
  }
}

/* The asset explorer needs the full content width on phones. Keep the
   navigation reachable in a compact bottom rail instead of reserving most of
   the viewport for the vertical desktop rail. */
@media (max-width: 720px) {
  body.asset-page-active .side-nav {
    top: auto;
    right: var(--page-x);
    bottom: var(--page-y);
    left: var(--page-x);
    width: auto;
    height: 58px;
    min-height: 58px;
    padding: 4px 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: hidden;
    border: 1px solid rgba(80, 224, 176, 0.16);
    border-radius: 18px;
    background: rgba(2, 16, 16, 0.88);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
  }

  body.asset-page-active .side-nav::before {
    inset: 0;
    background: linear-gradient(90deg, rgba(80, 224, 176, 0.06), transparent 72%);
    mask-image: none;
    filter: none;
  }

  body.asset-page-active .side-nav-brand,
  body.asset-page-active .side-nav-status {
    display: none;
  }

  body.asset-page-active .side-nav-item {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    height: 48px;
    min-height: 48px;
    padding: 5px 2px;
    border-radius: 12px;
  }

  body.asset-page-active .side-nav-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.asset-page-active .workspace {
    margin-left: 0;
    padding-bottom: 72px;
  }
}
