:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #18202f;
  --muted: #6a7487;
  --line: #dfe5ef;
  --primary: #176b87;
  --primary-dark: #105169;
  --accent: #d9872b;
  --green: #27875b;
  --red: #c94a4a;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 700;
}

button:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: #eef3f7;
  color: var(--primary);
}

.text-link,
.side-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.side-link {
  color: #cdd8e2;
  padding: 11px 16px;
  border-radius: 8px;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.09);
}

button.small-action {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.login-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #071018;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 16, 24, 0.94), rgba(7, 16, 24, 0.7) 42%, rgba(7, 16, 24, 0.18)),
    url("/assets/login-bg.png") center / cover no-repeat;
  transform: scale(1.02);
}

.login-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 420px;
  gap: 32px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
}

.brand-panel h1 {
  font-size: 44px;
  margin: 18px 0 14px;
  color: #fff;
}

.brand-panel p {
  max-width: 560px;
  color: #d8e5ef;
  font-size: 17px;
  line-height: 1.8;
}

.promo-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px;
  max-width: 560px;
  margin-top: 22px;
}

.promo-metrics article {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.promo-metrics strong {
  display: block;
  color: #fff;
  font-size: 24px;
}

.promo-metrics span {
  display: block;
  margin-top: 4px;
  color: #c8d8e4;
  font-size: 13px;
}

.promo-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 620px;
  margin-top: 18px;
}

.promo-flow span {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e8f3f8;
  background: rgba(23, 107, 135, 0.34);
  font-size: 13px;
  font-weight: 800;
}

.brand-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.demo-box {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin-top: 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #d8e5ef;
  backdrop-filter: blur(10px);
}

.auth-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(24, 32, 47, 0.08);
}

.auth-card {
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.auth-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

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

.auth-actions button {
  flex: 1;
}

.promo-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.promo-points span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  background: #edf6f8;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.auth-card h2,
.panel h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

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

.message,
.toast {
  min-height: 22px;
  color: var(--red);
  margin: 0;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #102330;
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.side-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.side-brand span {
  display: block;
  margin-top: 4px;
  color: #aebdca;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav,
.logout {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #cdd8e2;
  border: 1px solid transparent;
}

.nav.active,
.nav:hover,
.logout:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
}

.logout {
  margin-top: auto;
}

.content {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 0 0 6px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.credit-pill {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}

.credit-pill strong {
  color: var(--accent);
}

.hero-band {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 35, 48, 0.96), rgba(23, 107, 135, 0.82)),
    url("/assets/login-bg.png") center / cover no-repeat;
}

.hero-band span {
  color: #9ed9e9;
  font-size: 13px;
  font-weight: 800;
}

.hero-band h3 {
  margin: 8px 0;
  font-size: 24px;
}

.hero-band p {
  max-width: 760px;
  margin: 0;
  color: #d8e5ef;
  line-height: 1.7;
}

.hero-band button {
  background: #fff;
  color: var(--primary);
  white-space: nowrap;
}

.hero-band button:hover {
  background: #e9f4f7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
}

.stats-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stats-grid span {
  color: var(--muted);
}

.stats-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

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

.work-grid .panel:nth-child(3) {
  grid-column: 1 / -1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-grid .panel {
  display: grid;
  gap: 12px;
}

.admin-table {
  margin-top: 16px;
}

.project-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.project-cell img,
.project-cover-empty {
  width: 42px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.project-cover-empty {
  display: grid;
  place-items: center;
  background: #102330;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-header h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.detail-header > div {
  flex: 1;
}

.detail-title-block {
  min-width: 0;
}

.detail-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.detail-step-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: currentColor;
}

.detail-step-code {
  font-weight: 900;
}

.detail-header .header-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-header p {
  margin: 0;
  color: var(--muted);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.3fr);
  gap: 16px;
  align-items: start;
}

.project-layout .panel {
  display: grid;
  gap: 14px;
}

.panel-title-row {
  justify-content: space-between;
}

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

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

.doc-editor {
  min-height: 260px;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

.doc-list,
.mini-task-list {
  display: grid;
  gap: 10px;
}

.doc-item,
.mini-task {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.doc-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.doc-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.asset-card {
  display: grid;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.asset-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6fa;
}

.asset-card span,
.mini-task p,
.empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.plan-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(24, 32, 47, 0.06);
}

.plan-card span {
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

.plan-card h3 {
  margin: 0;
  font-size: 22px;
}

.plan-card strong {
  font-size: 28px;
}

.plan-card p {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.billing-card {
  max-width: 520px;
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mini-task {
  display: grid;
  grid-template-columns: auto 90px 1fr;
  gap: 10px;
  align-items: start;
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.embedded-table {
  margin-top: 12px;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf3f8;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.badge.completed {
  background: #e9f7f0;
  color: var(--green);
}

.badge.queued,
.badge.running {
  background: #fff4df;
  color: #996017;
}

.badge.failed {
  background: #fff0f0;
  color: var(--red);
}

.progress {
  width: 120px;
  height: 8px;
  background: #e9edf3;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.result-text {
  max-width: 560px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.result-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-image {
  width: 132px;
  height: 176px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f3f6fa;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 14px;
  background: #102330;
  color: #fff;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.18s ease;
}

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

@media (max-width: 840px) {
  .login-stage,
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .stats-grid,
  .work-grid,
  .project-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-header .header-actions,
  .auth-actions,
  .panel-title-row {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .promo-metrics {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

  .mini-task {
    grid-template-columns: 1fr;
  }
}

/* Front user site: reference-style dark production workspace. */
.front-page {
  --bg: #07080c;
  --panel: rgba(255, 255, 255, 0.055);
  --ink: #f8fafc;
  --muted: rgba(226, 232, 240, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --primary: #ff2e68;
  --primary-dark: #e41652;
  --accent: #f59e0b;
  --green: #14b8a6;
  background: #07080c;
}

.front-page .login-view {
  background: #05060a;
}

.front-page .login-backdrop {
  background:
    radial-gradient(circle at 52% 40%, rgba(255, 46, 104, 0.16), transparent 28%),
    linear-gradient(90deg, rgba(5, 6, 10, 0.58), rgba(5, 6, 10, 0.14) 45%, rgba(5, 6, 10, 0.58)),
    linear-gradient(180deg, rgba(5, 6, 10, 0.1), rgba(5, 6, 10, 0.72)),
    url("/assets/login-bg.png") center / cover no-repeat;
  filter: saturate(1.12) contrast(1.08);
}

.front-page .login-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: none;
  padding: 34px;
}

.front-page .brand-panel {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.front-page .brand-panel .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff2e68, #315dff);
  box-shadow: 0 18px 46px rgba(255, 46, 104, 0.35);
}

.front-page .brand-panel h1 {
  margin: 12px 0 0;
  color: #fff;
  font-size: 28px;
}

.front-page .brand-panel p,
.front-page .promo-metrics,
.front-page .promo-flow {
  display: none;
}

.front-page .demo-box {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  backdrop-filter: none;
}

.front-page .auth-card {
  width: min(390px, calc(100vw - 34px));
  margin-top: 82px;
  padding: 34px 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(25, 27, 36, 0.84), rgba(40, 22, 31, 0.78));
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.front-page .auth-card h2 {
  font-size: 27px;
  line-height: 1.2;
}

.front-page .auth-kicker {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}

.front-page .auth-card label {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.front-page .auth-card input {
  min-height: 52px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.82);
  color: #fff;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.24);
}

.front-page .auth-actions {
  margin-top: 4px;
}

.front-page .auth-card button {
  min-height: 52px;
  border-radius: 16px;
  background: #111623;
  color: #fff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

.front-page .auth-card button:hover {
  background: #1a2132;
  color: #ff4f7f;
}

.front-page .auth-card button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ff6f95;
  box-shadow: none;
}

.front-page .promo-points span {
  min-height: 30px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
}

.front-page .shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% -10%, rgba(255, 46, 104, 0.14), transparent 32%),
    linear-gradient(180deg, #0b0c10, #07080c 38%, #050608);
  color: #fff;
}

.front-page .sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 78px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  background: rgba(6, 7, 10, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.front-page .side-brand .brand-mark.small {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff2e68, #315dff);
  box-shadow: 0 16px 34px rgba(255, 46, 104, 0.3);
}

.front-page .side-brand strong {
  color: #fff;
  font-size: 18px;
}

.front-page .side-brand span {
  color: #ff4f7f;
  font-weight: 800;
}

.front-page .sidebar nav {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.front-page .nav {
  width: auto;
  min-height: 40px;
  padding: 0 22px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.54);
  text-align: center;
  white-space: nowrap;
}

.front-page .nav.active,
.front-page .nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: transparent;
}

.front-page .logout {
  justify-self: end;
  width: auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
}

.front-page .content {
  padding: 18px 24px 28px;
  min-height: calc(100vh - 78px);
}

.front-page .topbar {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
}

.front-page .topbar h2 {
  color: #fff;
  font-size: 22px;
}

.front-page .topbar p {
  color: rgba(255, 255, 255, 0.55);
}

.front-page .credit-pill {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.front-page .hero-band,
.front-page .detail-header,
.front-page .panel,
.front-page .stats-grid article,
.front-page .plan-card,
.front-page .table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.front-page .hero-band {
  min-height: 132px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(13, 16, 26, 0.9), rgba(255, 46, 104, 0.12)),
    url("/assets/login-bg.png") center / cover no-repeat;
}

.front-page .hero-band h3 {
  font-size: 28px;
}

.front-page .hero-band p,
.front-page .stats-grid span,
.front-page .detail-header p,
.front-page .empty-note,
.front-page .asset-card span,
.front-page .mini-task p {
  color: rgba(255, 255, 255, 0.58);
}

.front-page button {
  border-radius: 14px;
  background: #ff2e68;
}

.front-page button:hover {
  background: #e41652;
}

.front-page button.secondary,
.front-page .hero-band button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.front-page .stats-grid {
  grid-template-columns: repeat(6, minmax(128px, 1fr));
}

.front-page .stats-grid article {
  padding: 16px;
  border-radius: 18px;
}

.front-page .stats-grid strong {
  font-size: 26px;
}

.front-page .work-grid {
  grid-template-columns: 0.85fr 1.5fr 0.75fr;
}

.front-page .work-grid .panel:nth-child(3) {
  grid-column: auto;
}

.front-page input,
.front-page select,
.front-page textarea {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(3, 7, 18, 0.54);
  color: #fff;
}

.front-page input::placeholder,
.front-page textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.front-page label {
  color: rgba(255, 255, 255, 0.62);
}

.front-page .project-layout {
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr) minmax(300px, 0.8fr);
}

.front-page .pipeline-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.front-page .pipeline-title {
  display: grid;
  gap: 4px;
}

.front-page .pipeline-title strong {
  font-size: 18px;
}

.front-page .pipeline-title span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.front-page .pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.front-page .tool-btn {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.front-page .tool-btn.amber {
  background: #f59e0b;
}

.front-page .tool-btn.green {
  background: #14b8a6;
}

.front-page .tool-btn.blue {
  background: #2563eb;
}

.front-page .tool-btn.purple {
  background: #c026d3;
}

.front-page .tool-btn.light {
  background: #e5e7eb;
  color: #111623;
}

.front-page .pipeline-shell {
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.front-page .pipeline-table-wrap {
  overflow: auto;
  max-height: 620px;
}

.front-page .pipeline-table {
  min-width: 1540px;
  table-layout: fixed;
}

.front-page .pipeline-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 17, 24, 0.96);
}

.front-page .pipeline-table th:nth-child(1),
.front-page .pipeline-table td:nth-child(1) {
  width: 78px;
}

.front-page .pipeline-table th:nth-child(2),
.front-page .pipeline-table td:nth-child(2) {
  width: 300px;
}

.front-page .pipeline-table th:nth-child(3),
.front-page .pipeline-table td:nth-child(3) {
  width: 180px;
}

.front-page .pipeline-table th:nth-child(4),
.front-page .pipeline-table td:nth-child(4),
.front-page .pipeline-table th:nth-child(6),
.front-page .pipeline-table td:nth-child(6) {
  width: 310px;
}

.front-page .pipeline-table th:nth-child(5),
.front-page .pipeline-table td:nth-child(5),
.front-page .pipeline-table th:nth-child(7),
.front-page .pipeline-table td:nth-child(7) {
  width: 190px;
}

.front-page .pipeline-table th:nth-child(8),
.front-page .pipeline-table td:nth-child(8) {
  width: 150px;
}

.front-page .pipeline-table td {
  background: rgba(255, 255, 255, 0.025);
}

.front-page .pipeline-table textarea {
  min-height: 132px;
  padding: 14px;
  border-radius: 14px;
  line-height: 1.55;
  resize: vertical;
}

.front-page .shot-index {
  text-align: center;
}

.front-page .shot-index strong {
  display: block;
  margin-bottom: 10px;
  color: #93c5fd;
}

.front-page .pipeline-thumb {
  width: 154px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.front-page .pipeline-empty,
.front-page .pipeline-result {
  min-height: 116px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
  line-height: 1.45;
}

.front-page .pipeline-result {
  place-items: start;
  overflow: auto;
  word-break: break-all;
  text-align: left;
}

.front-page .pipeline-row-actions {
  display: grid;
  gap: 8px;
}

.front-page .pipeline-row-actions .small-action {
  width: 100%;
  background: #ff2e68;
}

.front-page .pipeline-row-actions .secondary-action {
  background: #2563eb;
}

.front-page .pipeline-empty-row {
  height: 140px;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
}

.front-page #projectDetailTab .project-layout .panel:nth-child(2) {
  grid-row: span 2;
}

.front-page .doc-editor {
  min-height: 420px;
}

.front-page .doc-item,
.front-page .mini-task {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.front-page .asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.front-page .asset-card img,
.front-page .result-image {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.front-page table {
  color: #fff;
}

.front-page th {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
}

.front-page td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.front-page .badge {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

.front-page .badge.completed {
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
}

.front-page .badge.queued,
.front-page .badge.running {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.front-page .badge.failed {
  background: rgba(255, 46, 104, 0.16);
  color: #fb7185;
}

.front-page .progress {
  background: rgba(255, 255, 255, 0.1);
}

.front-page .progress span {
  background: #ff2e68;
}

.front-page.project-mode .script-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: block;
  padding: 0;
  background: #151617;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-app-shell {
  min-height: 100%;
  color: #d6d9df;
  background: #151617;
}

.front-page.project-mode .script-app-crumb {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #303136;
  color: #5f6670;
  font-size: 14px;
}

.front-page.project-mode .recycle-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #41434a;
  border-radius: 6px;
  background: #25272c;
  color: #f2f4f7;
  font-size: 14px;
}

.front-page.project-mode .script-app-main {
  padding: 22px 24px 48px;
}

.front-page.project-mode .script-app-head {
  display: grid;
  gap: 22px;
  align-items: start;
  justify-items: start;
  margin-bottom: 16px;
}

.front-page.project-mode .script-app-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.front-page.project-mode .script-app-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.front-page.project-mode .script-app-actions button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  background: #1785e8;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.front-page.project-mode .script-app-actions button.secondary {
  border: 1px solid #36383f;
  background: #22242a;
  color: #cdd3dc;
}

.front-page.project-mode .drama-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 322px);
  gap: 16px;
  align-items: start;
}

.front-page.project-mode .drama-card {
  height: 306px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 48px;
  border: 1px solid #292b31;
  border-radius: 10px;
  background: #25272c;
  color: #b9c0ca;
  box-shadow: none;
  cursor: pointer;
}

.front-page.project-mode .drama-card:hover {
  border-color: #3a3d45;
  background: #282a30;
}

.front-page.project-mode .drama-card-body {
  min-height: 0;
  padding: 20px 24px 16px;
}

.front-page.project-mode .drama-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.front-page.project-mode .book-mark {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.front-page.project-mode .drama-title-line strong {
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .drama-card p {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  color: #b9c0ca;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}

.front-page.project-mode .drama-card-footer {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  border-top: 1px solid #3a3c42;
  background: #24262b;
}

.front-page.project-mode .drama-card-footer span {
  height: 22px;
  background: #44464e;
}

.front-page.project-mode .card-icon-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6d747f;
  font-size: 18px;
  font-weight: 700;
}

.front-page.project-mode .card-icon-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #c8ced8;
}

.front-page.project-mode .empty-drama-card {
  width: 322px;
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed #3a3d45;
  border-radius: 10px;
  background: #22242a;
  color: #8f98a6;
}

.front-page.project-mode .empty-drama-card strong {
  color: #fff;
  font-size: 18px;
}

.front-page.project-mode .empty-drama-state {
  grid-column: 1 / -1;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #cbd5e1;
}

.front-page.project-mode .empty-drama-state p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.front-page.project-mode .empty-illustration {
  position: relative;
  width: 108px;
  height: 94px;
}

/* Final override: 我的剧本 = left directory + right editor. */
.front-page.project-mode .script-stage {
  min-height: 0;
  overflow: hidden;
  display: block;
  padding: 0;
  background: #151617;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-app-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  grid-template-rows: 40px minmax(0, 1fr);
  background: #151617;
}

.front-page.project-mode .script-app-crumb {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 40px;
  padding: 0 20px;
}

.front-page.project-mode .script-app-main {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 12px 24px 20px;
  border-right: 1px solid #2c2e33;
}

.front-page.project-mode .script-app-head {
  gap: 14px;
  margin-bottom: 14px;
}

.front-page.project-mode .script-app-actions,
.front-page.project-mode .script-app-actions button {
  width: 100%;
}

.front-page.project-mode .drama-card-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.front-page.project-mode .drama-card {
  width: 100%;
  height: 306px;
}

.front-page.project-mode .drama-card.active {
  border-color: rgba(255, 46, 104, 0.72);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .script-workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: auto auto auto minmax(520px, 1fr);
  gap: 12px;
  margin: 0;
  padding: 18px 20px 28px;
  background: #151617;
}

.front-page.project-mode .script-workspace.hidden {
  display: none;
}

.front-page.project-mode .script-detail-head,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border-radius: 8px;
  border-color: #30313a;
  background: #1b1d22;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px;
  gap: 12px;
  padding: 14px;
}

.front-page.project-mode .script-generate label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.front-page.project-mode .script-generate textarea {
  min-height: 74px;
  max-height: 140px;
}

.front-page.project-mode .drama-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.front-page.project-mode .episode-board {
  min-height: 144px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.front-page.project-mode .episode-list {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: 1fr;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
}

.front-page.project-mode .episode-item {
  min-width: 0;
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 96px minmax(180px, 1fr) 136px;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 520px;
}

.front-page.project-mode .script-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-start;
  padding: 10px 0 0;
  background: #1b1d22;
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-app-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .front-page.project-mode .episode-grid,
  .front-page.project-mode .episode-grid.two,
  .front-page.project-mode .script-generate {
    grid-template-columns: 1fr;
  }

  .front-page.project-mode .script-generate label:nth-of-type(3),
  .front-page.project-mode .drama-actions {
    grid-column: auto;
  }
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-stage {
  grid-template-columns: minmax(8px, 1fr) 228px minmax(860px, 1180px) minmax(8px, 1fr) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-panel {
  width: min(1180px, 100%) !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-stage {
    grid-template-columns: 210px minmax(760px, 1fr) !important;
  }
}

/* Storyboard source pages: the left buttons are navigation, the right side is a full page. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-head {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-panel {
  height: min(520px, calc(100vh - 200px)) !important;
  max-height: calc(100vh - 200px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-view {
  height: 100% !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-stage,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open .storyboard-stage,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open .storyboard-stage {
  grid-template-columns: minmax(8px, 1fr) 228px minmax(860px, 1180px) minmax(8px, 1fr) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open .storyboard-script-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open .storyboard-script-panel {
  width: min(1180px, 100%) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView > .app-table-wrap {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  height: 48px !important;
  padding: 8px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions .secondary,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions .secondary {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master-list {
  min-height: 0 !important;
  padding-right: 10px !important;
  overflow: auto !important;
  border-right: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-card {
  min-height: 94px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px !important;
  background: rgba(31, 34, 42, .86) !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-card:hover,
body.front-page.project-mode.project-storyboard-step .doc-pick-card.active {
  border-color: rgba(255, 47, 115, .88) !important;
  background: linear-gradient(180deg, rgba(255, 47, 115, .13), rgba(31, 34, 42, .92)) !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master-detail {
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 47, 115, .72) !important;
  border-radius: 8px !important;
  background: rgba(15, 17, 22, .92) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head strong {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head span {
  display: block !important;
  margin-top: 2px !important;
  color: #ff6b9c !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head em {
  min-width: 78px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255, 47, 115, .18) !important;
  color: #ffffff !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid article,
body.front-page.project-mode.project-storyboard-step .doc-detail-preview,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips article {
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 8px !important;
  background: rgba(20, 23, 29, .88) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid article {
  padding: 12px !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid strong,
body.front-page.project-mode.project-storyboard-step .doc-detail-preview strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips span {
  color: #ffffff !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips p {
  margin: 6px 0 0 !important;
  color: #cbd3df !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-preview {
  min-height: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-preview pre {
  height: calc(100% - 28px) !important;
  margin: 10px 0 0 !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  color: #f4f7fb !important;
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-page {
  grid-template-rows: auto minmax(180px, 1fr) auto !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 18px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero strong {
  font-size: 20px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero button,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop {
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero button {
  height: 38px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-drop {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  border-style: dashed !important;
  border-color: rgba(255, 47, 115, .42) !important;
  background: rgba(255, 47, 115, .07) !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-drop span {
  width: 52px !important;
  height: 52px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: rgba(255, 47, 115, .18) !important;
  color: #ff7aa5 !important;
  font-size: 34px !important;
  font-weight: 400 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-tips {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-tips article {
  padding: 14px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-tips strong {
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 8px !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
}

/* Absolute final layout override: navigation rail + full-width content canvas. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage {
  width: 100% !important;
  min-height: calc(100vh - 78px) !important;
  height: calc(100vh - 78px) !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  grid-template-rows: 58px minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::before,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::after {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 180px !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 18px 8px 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row h2 {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-empty {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 180px !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 16px 8px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 47, 115, .85) !important;
  border-radius: 0 !important;
  background: rgba(10, 12, 16, .28) !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-script-panel {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 0 0 16px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-view {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView {
  grid-template-rows: minmax(0, 1fr) 54px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open #storyboardInlineImportView {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master,
body.front-page.project-mode.project-storyboard-step .storyboard-doc-master {
  height: 100% !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions {
  height: 54px !important;
  padding: 8px 0 0 !important;
}

/* True EOF: only hide meta blocks on 调取已有剧本 page. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail .script-detail-fields,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail .script-detail-grid {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail.storyboard-script-master-detail,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-master-detail {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

/* Hide script meta fields requested by user; keep the actual script body. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .script-detail-fields,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .script-detail-grid {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-master-detail {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

/* Full canvas layout: left navigation rail, right content fills all remaining space. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage {
  width: 100% !important;
  min-height: calc(100vh - 78px) !important;
  height: calc(100vh - 78px) !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  grid-template-rows: 58px minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::before,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::after {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 180px !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 18px 8px 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row h2 {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-empty {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 180px !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 16px 8px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 47, 115, .85) !important;
  border-radius: 0 !important;
  background: rgba(10, 12, 16, .28) !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn:first-child {
  height: 42px !important;
  min-height: 42px !important;
  width: 100% !important;
  padding: 0 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-script-panel {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 0 0 16px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-panel {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-view {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView {
  grid-template-rows: minmax(0, 1fr) 54px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open #storyboardInlineImportView {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master,
body.front-page.project-mode.project-storyboard-step .storyboard-doc-master {
  height: 100% !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions {
  height: 54px !important;
  padding: 8px 0 0 !important;
}

@media (max-width: 820px) {
  .front-page.project-mode .script-stage {
    overflow: auto;
  }

  .front-page.project-mode .script-app-shell {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 40px auto auto;
  }

  .front-page.project-mode .script-app-main,
  .front-page.project-mode .script-workspace {
    grid-column: 1;
    grid-row: auto;
    border-right: 0;
  }
}

/* Real final compact layout. Must stay at EOF. */
.front-page.project-mode .script-app-shell {
  grid-template-columns: 300px minmax(0, 1fr) !important;
  grid-template-rows: 34px minmax(0, 1fr) !important;
}

.front-page.project-mode .script-app-crumb {
  height: 34px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
}

.front-page.project-mode .script-app-main {
  padding: 12px 8px 16px 12px !important;
  background: #111216 !important;
}

.front-page.project-mode .script-app-head {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.front-page.project-mode .script-app-head h2 {
  font-size: 19px !important;
  line-height: 1.15 !important;
}

.front-page.project-mode .script-app-actions button {
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, #ff2e68, #ff6a3d) !important;
  font-size: 12px !important;
}

.front-page.project-mode .drama-card-grid {
  gap: 8px !important;
}

.front-page.project-mode .drama-card {
  height: 118px !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 28px !important;
  border: 1px solid #2c2f38 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #202228, #191b20) !important;
}

.front-page.project-mode .drama-card.active {
  border-color: #ff2e68 !important;
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.14), #1b1d22 62%) !important;
  box-shadow: inset 3px 0 #ff2e68 !important;
}

.front-page.project-mode .drama-card-body {
  min-height: 0 !important;
  padding: 10px 12px 6px !important;
}

.front-page.project-mode .drama-card-top {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.front-page.project-mode .zm-card-mark {
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: rgba(255, 46, 104, 0.16) !important;
  color: #ff7da0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.front-page.project-mode .drama-title-line {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
  margin: 0 !important;
}

.front-page.project-mode .drama-title-line strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.front-page.project-mode .drama-title-line span {
  color: #ff8aaa !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.front-page.project-mode .drama-card p {
  font-size: 12px !important;
  line-height: 1.45 !important;
  -webkit-line-clamp: 2 !important;
}

.front-page.project-mode .drama-card-footer {
  min-height: 28px !important;
  border-top: 1px solid #2f323b !important;
}

.front-page.project-mode .drama-card-footer span {
  height: 14px !important;
}

.front-page.project-mode .card-icon-btn {
  min-height: 28px !important;
  font-size: 12px !important;
}

.front-page.project-mode .script-workspace {
  padding: 12px 14px 18px !important;
  gap: 8px !important;
  grid-template-rows: auto auto auto auto !important;
  overflow: auto !important;
}

.front-page.project-mode .script-detail-head {
  padding: 9px 12px !important;
}

.front-page.project-mode .script-detail-head button {
  min-height: 30px !important;
}

.front-page.project-mode .script-generate {
  padding: 10px !important;
  gap: 8px !important;
  grid-template-columns: minmax(220px, 1fr) 100px !important;
}

.front-page.project-mode .script-generate textarea {
  min-height: 52px !important;
  max-height: 76px !important;
}

.front-page.project-mode .drama-actions button {
  min-height: 32px !important;
}

.front-page.project-mode .episode-board {
  min-height: 104px !important;
  max-height: 132px !important;
}

.front-page.project-mode .episode-list-head {
  padding: 9px 12px !important;
}

.front-page.project-mode .episode-list-head button {
  min-height: 30px !important;
}

.front-page.project-mode .episode-list {
  padding: 8px !important;
  gap: 6px !important;
  overflow-x: hidden !important;
}

.front-page.project-mode .episode-item {
  min-height: 48px !important;
  padding: 8px 10px !important;
}

.front-page.project-mode .episode-item strong {
  font-size: 13px !important;
}

.front-page.project-mode .episode-item span {
  font-size: 11px !important;
}

.front-page.project-mode .episode-editor {
  overflow: visible !important;
  padding: 10px !important;
  gap: 8px !important;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 80px minmax(160px, 1fr) 116px !important;
  gap: 8px !important;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.front-page.project-mode .episode-editor textarea {
  min-height: 62px !important;
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 260px !important;
  max-height: 360px !important;
  overflow: auto !important;
}

.front-page.project-mode .script-editor-actions {
  position: static !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  background: transparent !important;
}

.front-page.project-mode .script-editor-actions button {
  min-height: 34px !important;
  padding: 0 12px !important;
}

.front-page.project-mode .drama-actions {
  display: none !important;
}

/* Last-pass compact ZM cards. Keep this after legacy app-like rules. */
.front-page.project-mode .script-app-shell {
  grid-template-columns: 330px minmax(0, 1fr);
}

.front-page.project-mode .script-app-main {
  padding: 16px 10px 22px 16px;
  background: #121316;
}

.front-page.project-mode .script-app-head h2 {
  font-size: 21px;
}

.front-page.project-mode .script-app-actions button {
  min-height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2e68, #ff6a3d);
  font-size: 13px;
}

.front-page.project-mode .drama-card-grid {
  gap: 10px;
}

.front-page.project-mode .drama-card {
  height: 136px;
  display: grid;
  grid-template-rows: 1fr 34px;
  border: 1px solid #2c2f38;
  border-radius: 8px;
  background: linear-gradient(180deg, #202228, #191b20);
}

.front-page.project-mode .drama-card:hover {
  border-color: rgba(255, 46, 104, 0.48);
  background: #22242a;
}

.front-page.project-mode .drama-card.active {
  border-color: #ff2e68;
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.12), #1b1d22 58%);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .drama-card-body {
  padding: 12px 14px 8px;
}

.front-page.project-mode .drama-card-top {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.front-page.project-mode .zm-card-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 46, 104, 0.16);
  color: #ff7da0;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .drama-title-line {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.front-page.project-mode .drama-title-line strong {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .drama-title-line span {
  color: #ff8aaa;
  font-size: 12px;
  font-weight: 800;
}

.front-page.project-mode .drama-card p {
  color: #aeb6c4;
  font-size: 12px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

.front-page.project-mode .drama-card-footer {
  grid-template-columns: 1fr 1px 1fr;
  min-height: 34px;
  border-top: 1px solid #2f323b;
  background: rgba(255, 255, 255, 0.02);
}

.front-page.project-mode .drama-card-footer span {
  height: 16px;
  background: #3a3d46;
}

.front-page.project-mode .card-icon-btn {
  min-height: 34px;
  color: #8f98a8;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .card-icon-btn:hover {
  color: #fff;
  background: rgba(255, 46, 104, 0.12);
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* ZM compact script directory. */
.front-page.project-mode .script-app-shell {
  grid-template-columns: 330px minmax(0, 1fr);
}

.front-page.project-mode .script-app-main {
  padding: 16px 10px 22px 16px;
  background: #121316;
}

.front-page.project-mode .script-app-head h2 {
  font-size: 21px;
}

.front-page.project-mode .script-app-actions button {
  min-height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2e68, #ff6a3d);
  font-size: 13px;
}

.front-page.project-mode .drama-card-grid {
  gap: 10px;
}

.front-page.project-mode .drama-card {
  height: 136px;
  display: grid;
  grid-template-rows: 1fr 34px;
  border: 1px solid #2c2f38;
  border-radius: 8px;
  background: linear-gradient(180deg, #202228, #191b20);
}

.front-page.project-mode .drama-card:hover {
  border-color: rgba(255, 46, 104, 0.48);
  background: #22242a;
}

.front-page.project-mode .drama-card.active {
  border-color: #ff2e68;
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.12), #1b1d22 58%);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .drama-card-body {
  padding: 12px 14px 8px;
}

.front-page.project-mode .drama-card-top {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.front-page.project-mode .zm-card-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 46, 104, 0.16);
  color: #ff7da0;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .drama-title-line {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.front-page.project-mode .drama-title-line strong {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .drama-title-line span {
  color: #ff8aaa;
  font-size: 12px;
  font-weight: 800;
}

.front-page.project-mode .drama-card p {
  color: #aeb6c4;
  font-size: 12px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

.front-page.project-mode .drama-card-footer {
  grid-template-columns: 1fr 1px 1fr;
  min-height: 34px;
  border-top: 1px solid #2f323b;
  background: rgba(255, 255, 255, 0.02);
}

.front-page.project-mode .drama-card-footer span {
  height: 16px;
  background: #3a3d46;
}

.front-page.project-mode .card-icon-btn {
  min-height: 34px;
  color: #8f98a8;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .card-icon-btn:hover {
  color: #fff;
  background: rgba(255, 46, 104, 0.12);
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* Final script page layout: left drama directory, right editor. */
.front-page.project-mode .script-stage {
  min-height: 0;
  overflow: hidden;
  display: block;
  padding: 0;
  background: #151617;
}

.front-page.project-mode .script-app-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  grid-template-rows: 40px minmax(0, 1fr);
  background: #151617;
}

.front-page.project-mode .script-app-crumb {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 40px;
  padding: 0 20px;
}

.front-page.project-mode .script-app-main {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 12px 24px 20px;
  border-right: 1px solid #2c2e33;
}

.front-page.project-mode .script-app-head {
  gap: 14px;
  margin-bottom: 14px;
}

.front-page.project-mode .script-app-head h2 {
  font-size: 22px;
}

.front-page.project-mode .script-app-actions {
  width: 100%;
}

.front-page.project-mode .script-app-actions button {
  width: 100%;
  justify-content: center;
}

.front-page.project-mode .drama-card-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.front-page.project-mode .drama-card {
  width: 100%;
  height: 306px;
  border-color: #363943;
  background: #25272c;
}

.front-page.project-mode .drama-card.active {
  border-color: rgba(255, 46, 104, 0.72);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .script-recycle-panel {
  width: 100%;
}

.front-page.project-mode .script-workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: auto auto auto minmax(520px, 1fr);
  gap: 12px;
  margin: 0;
  padding: 18px 20px 28px;
  background: #151617;
}

.front-page.project-mode .script-workspace.hidden {
  display: none;
}

.front-page.project-mode .script-detail-head,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border-radius: 8px;
  border-color: #30313a;
  background: #1b1d22;
}

.front-page.project-mode .script-detail-head {
  padding: 12px 14px;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px;
  gap: 12px;
  padding: 14px;
}

.front-page.project-mode .script-generate label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.front-page.project-mode .script-generate textarea {
  min-height: 74px;
  max-height: 140px;
}

.front-page.project-mode .drama-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.front-page.project-mode .drama-actions button {
  min-width: 96px;
  min-height: 36px;
  border-radius: 8px;
}

.front-page.project-mode .episode-board {
  min-height: 144px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.front-page.project-mode .episode-list {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: 1fr;
  overflow: auto;
  padding: 12px;
}

.front-page.project-mode .episode-item {
  min-height: 58px;
  border-radius: 8px;
}

.front-page.project-mode .episode-editor {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 96px minmax(180px, 1fr) 136px;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 520px;
}

.front-page.project-mode .script-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-start;
  padding: 10px 0 0;
  background: #1b1d22;
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-app-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .front-page.project-mode .episode-grid,
  .front-page.project-mode .episode-grid.two,
  .front-page.project-mode .script-generate {
    grid-template-columns: 1fr;
  }

  .front-page.project-mode .script-generate label:nth-of-type(3),
  .front-page.project-mode .drama-actions {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .front-page.project-mode .script-stage {
    overflow: auto;
  }

  .front-page.project-mode .script-app-shell {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 40px auto auto;
  }

  .front-page.project-mode .script-app-main,
  .front-page.project-mode .script-workspace {
    grid-column: 1;
    grid-row: auto;
    border-right: 0;
  }
}

.front-page.project-mode .script-recycle-panel {
  margin-top: 18px;
  width: min(720px, 100%);
  border: 1px solid #30313a;
  border-radius: 10px;
  background: #202228;
}

.front-page.project-mode .script-recycle-head,
.front-page.project-mode .recycle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.front-page.project-mode .script-recycle-head {
  border-bottom: 1px solid #30313a;
}

.front-page.project-mode .script-recycle-head strong,
.front-page.project-mode .recycle-item strong {
  color: #fff;
}

.front-page.project-mode .recycle-item + .recycle-item {
  border-top: 1px solid #30313a;
}

.front-page.project-mode .recycle-item span {
  display: block;
  margin-top: 4px;
  color: #8d96a5;
  font-size: 12px;
}

.front-page.project-mode .recycle-actions {
  display: flex;
  gap: 8px;
}

.front-page.project-mode .recycle-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

.front-page.project-mode .empty-illustration::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 12px;
  border-radius: 50%;
  background: #838991;
}

.front-page.project-mode .empty-paper {
  position: absolute;
  left: 30px;
  top: 16px;
  width: 50px;
  height: 62px;
  border-radius: 4px;
  background: #9ca3ad;
  box-shadow: 0 18px 0 -8px #b1b7bf;
}

.front-page.project-mode .empty-paper::before,
.front-page.project-mode .empty-paper::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 30px;
  height: 6px;
  border-radius: 2px;
  background: #818993;
}

.front-page.project-mode .empty-paper::before {
  top: 14px;
}

.front-page.project-mode .empty-paper::after {
  top: 28px;
}

.front-page.project-mode .empty-bubble {
  position: absolute;
  right: 4px;
  top: 0;
  min-width: 30px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #8b929c;
  color: #d8dde3;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .script-workspace {
  margin: 0 24px 40px;
  min-height: 0;
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto 158px minmax(420px, auto);
  gap: 12px;
}

.front-page.project-mode .script-workspace.hidden {
  display: none;
}

.front-page.project-mode .script-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #30313a;
  border-radius: 10px;
  background: #1b1d22;
}

.front-page.project-mode .script-detail-head strong {
  color: #fff;
  font-size: 15px;
}

.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border: 1px solid #30313a;
  border-radius: 10px;
  background: #1b1d22;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: 220px 120px minmax(0, 1fr) 176px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}

.front-page.project-mode .script-workspace {
  grid-template-rows: auto 158px minmax(0, 1fr);
}

.front-page.project-mode .script-generate {
  grid-template-columns: 220px 120px minmax(0, 1fr) 176px;
}

.front-page.project-mode .drama-actions {
  display: grid;
  gap: 8px;
  align-self: end;
}

.front-page.project-mode .drama-actions button {
  min-height: 38px;
  border-radius: 10px;
}

.front-page.project-mode .danger-soft {
  background: rgba(255, 68, 104, 0.13);
  color: #ff6b8e;
}

.front-page.project-mode .danger-soft:hover {
  background: rgba(255, 68, 104, 0.24);
  color: #fff;
}

.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border: 1px solid #30313a;
  border-radius: 14px;
  background: #15161b;
}

.front-page.project-mode .episode-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .episode-list-head strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.front-page.project-mode .episode-list-head button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #ff2e68;
}

.front-page.project-mode .episode-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 250px);
  overflow-x: auto;
  overflow-y: hidden;
}

.front-page.project-mode .episode-editor {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.front-page.project-mode .episode-grid {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 150px;
  gap: 12px;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: 1fr 1fr;
}

.front-page.project-mode .episode-editor textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.65;
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 280px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.front-page.project-mode .episode-stats {
  padding: 10px 12px;
  border: 1px solid rgba(255, 46, 104, 0.24);
  border-radius: 10px;
  background: rgba(255, 46, 104, 0.08);
  color: #ff88a8;
  font-size: 13px;
  font-weight: 800;
}

.front-page.project-mode .sidebar nav .project-nav-step {
  background: #303136;
  color: #ff477d;
}

.front-page.project-mode .sidebar nav .project-nav-step.active,
.front-page.project-mode .sidebar nav .project-nav-step:hover {
  background: #ff2e68;
  color: #fff;
}

.front-page.project-mode .script-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 46, 104, 0.1), transparent 34%),
    #101116;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-sidebar,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border: 1px solid #30313a;
  border-radius: 14px;
  background: #15161b;
}

.front-page.project-mode .script-sidebar {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.front-page.project-mode .script-sidebar-head,
.front-page.project-mode .episode-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .script-sidebar-head span,
.front-page.project-mode .episode-list-head strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.front-page.project-mode .script-sidebar-head button,
.front-page.project-mode .episode-list-head button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #ff2e68;
}

.front-page.project-mode .script-doc-list,
.front-page.project-mode .episode-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.front-page.project-mode .script-doc-item,
.front-page.project-mode .episode-item {
  width: 100%;
  min-height: 66px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #30313a;
  border-radius: 11px;
  background: #1c1d24;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.front-page.project-mode .script-doc-item.active,
.front-page.project-mode .script-doc-item:hover,
.front-page.project-mode .episode-item.active,
.front-page.project-mode .episode-item:hover {
  border-color: rgba(255, 46, 104, 0.62);
  background: rgba(255, 46, 104, 0.12);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .script-doc-item strong,
.front-page.project-mode .episode-item strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .script-doc-item span,
.front-page.project-mode .episode-item span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.front-page.project-mode .script-workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 158px minmax(0, 1fr);
  gap: 12px;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: 220px 120px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}

.front-page.project-mode .script-generate label,
.front-page.project-mode .episode-editor label {
  min-height: 0;
}

.front-page.project-mode .script-generate textarea {
  min-height: 58px;
  max-height: 92px;
  resize: vertical;
}

.front-page.project-mode .script-generate button {
  align-self: end;
  min-height: 42px;
  border-radius: 10px;
  background: #ff2e68;
}

.front-page.project-mode .episode-board {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.front-page.project-mode .episode-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  overflow-x: auto;
  overflow-y: hidden;
}

.front-page.project-mode .episode-editor {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.front-page.project-mode .episode-grid {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 140px;
  gap: 12px;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: 1fr 1fr;
}

.front-page.project-mode .episode-editor textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.65;
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 280px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.front-page.project-mode .script-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 2px;
}

.front-page.project-mode .script-editor-actions button {
  min-height: 40px;
  border-radius: 10px;
}

.front-page .toast {
  background: rgba(17, 22, 35, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .front-page .sidebar {
    grid-template-columns: 1fr;
  }

  .front-page .sidebar nav,
  .front-page .logout {
    justify-self: stretch;
  }

  .front-page .stats-grid,
  .front-page .work-grid,
  .front-page .project-layout {
    grid-template-columns: 1fr;
  }

  .front-page .pipeline-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .front-page .pipeline-actions {
    justify-content: flex-start;
  }

  .front-page #projectDetailTab .project-layout .panel:nth-child(2) {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .front-page .login-stage {
    padding: 20px;
  }

  .front-page .brand-panel {
    top: 24px;
  }

  .front-page .auth-card {
    margin-top: 92px;
    padding: 26px;
    border-radius: 28px;
  }

  .front-page .demo-box {
    display: none;
  }

  .front-page .sidebar nav {
    overflow-x: auto;
  }
}

/* Production board polish */
.front-page #projectDetailTab {
  min-height: calc(100vh - 126px);
}

.front-page #projectDetailTab .detail-header {
  min-height: 68px;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(16, 18, 26, 0.96), rgba(22, 16, 26, 0.94));
}

.front-page #projectDetailTab .detail-header h3 {
  font-size: 18px;
}

.front-page #projectDetailTab .detail-header p {
  font-size: 12px;
}

.front-page #projectDetailTab .detail-header button {
  min-height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.front-page #projectDetailTab .detail-header #exportProjectBtn {
  background: #ff2e68;
}

.front-page .pipeline-toolbar {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(12, 14, 20, 0.92);
}

.front-page .pipeline-title strong {
  font-size: 17px;
}

.front-page .pipeline-title span {
  font-size: 12px;
}

.front-page .tool-btn {
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

.front-page .tool-btn.dark {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}

.front-page .pipeline-shell {
  border-radius: 16px;
  background: #101116;
}

.front-page .pipeline-table-wrap {
  max-height: calc(100vh - 282px);
  min-height: 440px;
}

.front-page .pipeline-table {
  border-collapse: separate;
  border-spacing: 0;
}

.front-page .pipeline-table th {
  height: 48px;
  padding: 11px 14px;
  background: #171821;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.front-page .pipeline-table td {
  padding: 14px;
  background: #111217;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.front-page .pipeline-table th:first-child,
.front-page .pipeline-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #14151b;
}

.front-page .pipeline-table th:last-child,
.front-page .pipeline-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #171018;
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.24);
}

.front-page .pipeline-table th:first-child,
.front-page .pipeline-table th:last-child {
  z-index: 3;
}

.front-page .pipeline-table textarea {
  min-height: 126px;
  max-height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #22232a;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.18);
}

.front-page .pipeline-table textarea:focus {
  border-color: rgba(255, 46, 104, 0.52);
  background: #262832;
  outline: none;
}

.front-page .shot-index strong {
  color: #7db7ff;
  font-size: 14px;
}

.front-page .shot-index .badge {
  min-width: 62px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 11px;
}

.front-page .pipeline-empty,
.front-page .pipeline-result {
  min-height: 126px;
  border-radius: 14px;
  background: #22232a;
  border-color: rgba(255, 255, 255, 0.08);
}

.front-page .pipeline-thumb {
  width: 160px;
  height: 126px;
  border-radius: 14px;
}

.front-page .pipeline-row-actions {
  align-content: center;
  min-height: 126px;
}

.front-page .pipeline-row-actions .small-action {
  min-height: 38px;
  border-radius: 11px;
}

.front-page .pipeline-aux {
  margin-top: 16px;
  padding-top: 4px;
}

/* Reference-style episode production page */
.front-page.project-mode {
  background: #0d0e11;
}

.front-page.project-mode .shell {
  background: #0d0e11;
}

.front-page.project-mode .sidebar {
  min-height: 78px;
  padding: 14px 24px;
  grid-template-columns: 1fr auto 1fr;
  background: #07080a;
  border-bottom: 1px solid #1f2026;
}

.front-page.project-mode .side-brand {
  gap: 14px;
}

.front-page.project-mode .side-brand .brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f43f7f;
  box-shadow: 0 0 32px rgba(244, 63, 127, 0.48);
}

.front-page.project-mode .side-brand strong {
  max-width: 360px;
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .side-brand span {
  color: #ff2e68;
  font-size: 12px;
}

.front-page.project-mode .sidebar nav {
  min-width: 284px;
  justify-content: center;
  padding: 5px;
  border-radius: 16px;
  background: #1b1c20;
}

.front-page.project-mode .nav {
  min-height: 38px;
  padding: 0 26px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.42);
}

.front-page.project-mode .nav.active {
  background: #303136;
  color: #ff477d;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.front-page.project-mode .project-nav-step {
  min-width: 118px;
  padding: 0 20px;
}

.front-page.project-mode .project-nav-step.active,
.front-page.project-mode .project-nav-step:hover {
  background: #ff2e68;
  color: #fff;
}

.front-page.project-mode .logout {
  min-height: 42px;
  border: 1px solid #2d2e35;
  background: #15161b;
  color: #fff;
  justify-self: end;
}

.front-page.project-mode .content {
  padding: 0;
  min-height: calc(100vh - 78px);
  max-height: calc(100vh - 78px);
  overflow: hidden;
}

.front-page.project-mode .topbar {
  display: none;
}

.front-page.project-mode #projectDetailTab {
  height: calc(100vh - 78px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.front-page.project-mode #projectDetailTab .detail-header {
  min-height: 68px;
  margin: 0;
  padding: 0 24px;
  border-width: 0 0 1px;
  border-color: #272831;
  border-radius: 0;
  background: #121319;
}

.front-page.project-mode #projectDetailTab .detail-header > button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #30313a;
  border-radius: 12px;
  background: #171820;
  color: transparent;
  position: relative;
}

.front-page.project-mode #projectDetailTab .detail-header > button::before {
  content: "<";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  font-weight: 900;
}

.front-page.project-mode #projectDetailTab .detail-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.front-page.project-mode #projectDetailTab .detail-header p {
  margin-top: 4px;
  color: #ff2e68;
  font-size: 12px;
  font-weight: 800;
}

.front-page.project-mode #projectDetailTab .detail-step-meta {
  line-height: 1.35;
}

.front-page.project-mode #projectDetailTab .detail-step-code {
  color: #fff;
}

.front-page.project-mode #projectDetailTab #knowledgeStatus {
  color: #ff4f87;
}

.front-page.project-mode #projectDetailTab .detail-header .header-actions {
  display: none;
}

.front-page.project-mode .pipeline-toolbar {
  min-height: 68px;
  margin: 0;
  padding: 0 24px;
  border-width: 0 0 1px;
  border-color: #2b2c33;
  border-radius: 0;
  background: #15161c;
}

.front-page.project-mode .agent-stage {
  display: grid;
  flex: 1;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 46, 104, 0.11), transparent 34%),
    #101116;
}

.front-page.project-mode .script-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 46, 104, 0.1), transparent 34%),
    #101116;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-sidebar,
.front-page.project-mode .script-generate,
.front-page.project-mode .script-editor {
  border: 1px solid #30313a;
  border-radius: 14px;
  background: #15161b;
}

.front-page.project-mode .script-sidebar {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.front-page.project-mode .script-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .script-sidebar-head span {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.front-page.project-mode .script-sidebar-head button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #ff2e68;
}

.front-page.project-mode .script-doc-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.front-page.project-mode .script-doc-item {
  width: 100%;
  min-height: 68px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #30313a;
  border-radius: 11px;
  background: #1c1d24;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.front-page.project-mode .script-doc-item.active,
.front-page.project-mode .script-doc-item:hover {
  border-color: rgba(255, 46, 104, 0.62);
  background: rgba(255, 46, 104, 0.12);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .script-doc-item strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .script-doc-item span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.front-page.project-mode .script-workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}

.front-page.project-mode .script-generate div {
  display: grid;
  align-content: center;
  gap: 4px;
}

.front-page.project-mode .script-generate strong {
  color: #fff;
  font-size: 16px;
}

.front-page.project-mode .script-generate span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.5;
}

.front-page.project-mode .script-generate textarea {
  min-height: 74px;
  max-height: 110px;
  resize: vertical;
}

.front-page.project-mode .script-generate button {
  border-radius: 11px;
  background: #ff2e68;
}

.front-page.project-mode .script-editor {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 14px;
}

.front-page.project-mode .script-editor label {
  min-height: 0;
}

.front-page.project-mode .script-editor input {
  min-height: 44px;
  font-size: 15px;
  font-weight: 900;
}

.front-page.project-mode .script-editor textarea {
  height: 100%;
  min-height: 0;
  resize: none;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.72;
}

.front-page.project-mode .script-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.front-page.project-mode .script-editor-actions button {
  min-height: 40px;
  border-radius: 10px;
}

.front-page.project-mode .agent-topbar {
  flex: 0 0 82px;
  min-height: 82px;
  padding: 0 16px;
  border-bottom: 1px solid #2b2c33;
  background: #101116;
}

.front-page.project-mode .agent-topbar .agent-head {
  width: 100%;
  min-height: 82px;
  padding: 0 8px;
  border: 0;
}

.front-page.project-mode .agent-topbar .agent-head h3 {
  font-size: 26px;
}

.front-page.project-mode .agent-chat-panel,
.front-page.project-mode .agent-knowledge {
  border: 1px solid #30313a;
  border-radius: 14px;
  background: #15161b;
}

.front-page.project-mode .agent-chat-panel {
  order: 2;
  height: 100%;
  width: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.front-page.project-mode .agent-knowledge {
  order: 1;
  height: 100%;
}

.front-page.project-mode .agent-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .agent-head-left {
  min-height: 104px;
  padding: 18px 16px;
  border: 1px solid #30313a;
  border-radius: 14px;
  background: #15161b;
}

.front-page.project-mode .agent-head span,
.front-page.project-mode .agent-kb-card span {
  color: #ff477d;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .agent-head h3 {
  margin: 5px 0 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
}

.front-page.project-mode .agent-head strong {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
  font-size: 12px;
}

.front-page.project-mode .agent-messages {
  max-height: none;
  min-height: 0;
  height: 100%;
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.48) transparent;
  scrollbar-width: thin;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 22px;
}

.front-page.project-mode .agent-message-row {
  max-width: 92%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.front-page.project-mode .agent-message-row.assistant {
  justify-self: start;
}

.front-page.project-mode .agent-message-row.user {
  justify-self: end;
  justify-content: flex-end;
}

.front-page.project-mode .agent-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 79, 127, 0.42);
  border-radius: 12px;
  object-fit: cover;
  background: #09090b;
  box-shadow: 0 10px 26px rgba(255, 46, 104, 0.2);
}

.front-page.project-mode .agent-message {
  min-width: 0;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: #24252c;
  color: rgba(255, 255, 255, 0.86);
}

.front-page.project-mode .agent-empty {
  align-self: center;
  justify-self: center;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.front-page.project-mode .agent-messages::-webkit-scrollbar {
  width: 8px;
}

.front-page.project-mode .agent-messages::-webkit-scrollbar-track {
  background: transparent;
}

.front-page.project-mode .agent-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.front-page.project-mode .agent-message.user {
  background: #ff2e68;
  color: #fff;
}

.front-page.project-mode .agent-message > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.front-page.project-mode .agent-message p,
.front-page.project-mode .agent-plain {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.front-page.project-mode .agent-rich {
  color: rgba(238, 246, 255, 0.92);
  font-size: 14px;
  line-height: 1.78;
}

.front-page.project-mode .agent-rich > *:first-child {
  margin-top: 0;
}

.front-page.project-mode .agent-rich > *:last-child {
  margin-bottom: 0;
}

.front-page.project-mode .agent-rich p {
  margin: 10px 0;
}

.front-page.project-mode .agent-rich h1,
.front-page.project-mode .agent-rich h2,
.front-page.project-mode .agent-rich h3,
.front-page.project-mode .agent-rich h4 {
  margin: 18px 0 10px;
  color: #f7fbff;
  font-weight: 900;
  line-height: 1.35;
}

.front-page.project-mode .agent-rich h1 {
  font-size: 22px;
}

.front-page.project-mode .agent-rich h2 {
  font-size: 20px;
}

.front-page.project-mode .agent-rich h3 {
  font-size: 18px;
}

.front-page.project-mode .agent-rich h4 {
  font-size: 16px;
}

.front-page.project-mode .agent-rich strong,
.front-page.project-mode .agent-rich a {
  display: inline;
  margin: 0;
  color: #ff4f7f;
  font-size: inherit;
  font-weight: 900;
  text-decoration: none;
}

.front-page.project-mode .agent-brand-icon {
  width: 19px;
  min-width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px 0 1px;
  border: 1px solid rgba(255, 124, 162, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 124, 162, 0.22), rgba(255, 46, 104, 0.08)),
    #35121d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: -3px;
  box-shadow: 0 8px 20px rgba(255, 46, 104, 0.18);
}

.front-page.project-mode .agent-rich ul,
.front-page.project-mode .agent-rich ol {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding-left: 22px;
}

.front-page.project-mode .agent-rich li {
  padding-left: 3px;
}

.front-page.project-mode .agent-rich li::marker {
  color: rgba(255, 255, 255, 0.72);
}

.front-page.project-mode .agent-rich hr {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: rgba(255, 255, 255, 0.09);
}

.front-page.project-mode .agent-rich blockquote {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 3px solid #ff2e68;
  background: rgba(255, 46, 104, 0.08);
  color: rgba(238, 246, 255, 0.9);
}

.front-page.project-mode .agent-rich code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #ff7ca2;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
}

.front-page.project-mode .agent-table-wrap {
  overflow: auto;
  margin: 12px 0;
  border: 1px solid #34363d;
  border-radius: 0;
}

.front-page.project-mode .agent-rich table {
  min-width: 520px;
  border-collapse: collapse;
  background: transparent;
}

.front-page.project-mode .agent-rich th,
.front-page.project-mode .agent-rich td {
  padding: 9px 12px;
  border-right: 1px solid #34363d;
  border-bottom: 1px solid #34363d;
  vertical-align: top;
}

.front-page.project-mode .agent-rich th {
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.16), rgba(255, 46, 104, 0.06)), #221820;
  color: #f7fbff;
  font-weight: 900;
}

.front-page.project-mode .agent-rich td {
  background: rgba(255, 255, 255, 0.015);
}

.front-page.project-mode .agent-input {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid #2a2b31;
}

.front-page.project-mode .agent-input textarea {
  min-height: 62px;
  max-height: 150px;
  border-radius: 12px;
  resize: vertical;
}

.front-page.project-mode .agent-send-actions {
  display: grid;
  grid-template-rows: 1fr 34px;
  gap: 8px;
}

.front-page.project-mode .agent-send-actions button {
  min-height: 0;
}

.front-page.project-mode .agent-send-actions button[type="submit"] {
  min-height: 62px;
}

.front-page.project-mode .agent-retry-btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  background: #272932;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.front-page.project-mode .agent-knowledge {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.front-page.project-mode .agent-new-session {
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  background: #ff2e68;
}

.front-page.project-mode .agent-session-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 3px;
  scrollbar-width: thin;
}

.front-page.project-mode .agent-session-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 6px;
  align-items: stretch;
  border: 1px solid #30313a;
  border-radius: 11px;
  background: #1c1d24;
}

.front-page.project-mode .agent-session-item {
  min-width: 0;
  min-height: 56px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px 0 0 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.front-page.project-mode .agent-session-item strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .agent-session-item span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

.front-page.project-mode .agent-session-row.active {
  border-color: rgba(255, 46, 104, 0.62);
  background: rgba(255, 46, 104, 0.12);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .agent-session-delete {
  width: 32px;
  min-height: 32px;
  align-self: center;
  justify-self: center;
  padding: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.58);
  font-size: 18px;
  line-height: 1;
}

.front-page.project-mode .agent-session-delete:hover {
  background: #3a1722;
  color: #ff7197;
}

.front-page.project-mode .agent-session-footer {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid #2a2b31;
}

.front-page.project-mode .agent-session-footer button {
  width: 100%;
  min-height: 40px;
  background: #2b171d;
  color: #ff7197;
}

.front-page.project-mode .agent-session-footer .agent-export-session {
  background: #202a35;
  color: #8fd3ff;
}

.front-page.project-mode .agent-kb-card {
  padding: 16px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 46, 104, 0.16), rgba(37, 99, 235, 0.1)),
    #1c1d24;
}

.front-page.project-mode .agent-kb-card::before {
  content: "AI";
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff2e68, #315dff);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(255, 46, 104, 0.26);
}

.front-page.project-mode .agent-kb-card strong {
  display: block;
  margin: 8px 0;
  color: #fff;
  font-size: 20px;
}

.front-page.project-mode .agent-kb-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.6;
}

.front-page.project-mode .agent-kb-list {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.front-page.project-mode .agent-kb-list strong {
  color: #fff;
}

.front-page.project-mode .agent-kb-list span {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #30313a;
  border-radius: 10px;
  background: #1c1d24;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.front-page.project-mode #knowledgeItems {
  min-height: 0;
  max-height: 318px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.front-page.project-mode #knowledgeItems b {
  color: #ff477d;
  font-size: 11px;
}

.front-page.project-mode .pipeline-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.front-page.project-mode .pipeline-title strong {
  color: #fff;
  font-size: 18px;
}

.front-page.project-mode .pipeline-title span {
  color: rgba(255, 255, 255, 0.5);
}

.front-page.project-mode .pipeline-actions {
  gap: 10px;
}

.front-page.project-mode .tool-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.front-page.project-mode .tool-btn.amber {
  background: #f59e0b;
}

.front-page.project-mode .tool-btn.green {
  background: #14b8a6;
}

.front-page.project-mode .tool-btn.blue {
  background: #1f6bff;
}

.front-page.project-mode .tool-btn.purple {
  background: #d946ef;
}

.front-page.project-mode .tool-btn.light {
  background: #e8edf5;
  color: #111623;
}

.front-page.project-mode .tool-btn.dark {
  background: #2b2c33;
}

.front-page.project-mode .pipeline-shell {
  flex: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #111216;
}

.front-page.project-mode .pipeline-table-wrap {
  max-height: calc(100vh - 574px);
  min-height: 320px;
  border-radius: 0;
}

.front-page.project-mode .pipeline-table {
  min-width: 1760px;
  height: 100%;
}

.front-page.project-mode .pipeline-table th {
  height: 52px;
  padding: 0 16px;
  background: #1b1c22;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-right: 1px solid #2a2b31;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .pipeline-table td {
  height: 194px;
  padding: 16px;
  background: #15161b;
  border-right: 1px solid #2a2b31;
  border-bottom: 1px solid #2a2b31;
}

.front-page.project-mode .pipeline-table th:first-child,
.front-page.project-mode .pipeline-table td:first-child {
  background: #15161b;
}

.front-page.project-mode .pipeline-table th:last-child,
.front-page.project-mode .pipeline-table td:last-child {
  background: #1a1317;
}

.front-page.project-mode .pipeline-table th:nth-child(1),
.front-page.project-mode .pipeline-table td:nth-child(1) {
  width: 66px;
}

.front-page.project-mode .pipeline-table th:nth-child(2),
.front-page.project-mode .pipeline-table td:nth-child(2) {
  width: 320px;
}

.front-page.project-mode .pipeline-table th:nth-child(3),
.front-page.project-mode .pipeline-table td:nth-child(3) {
  width: 240px;
}

.front-page.project-mode .pipeline-table th:nth-child(4),
.front-page.project-mode .pipeline-table td:nth-child(4),
.front-page.project-mode .pipeline-table th:nth-child(6),
.front-page.project-mode .pipeline-table td:nth-child(6) {
  width: 330px;
}

.front-page.project-mode .pipeline-table th:nth-child(5),
.front-page.project-mode .pipeline-table td:nth-child(5),
.front-page.project-mode .pipeline-table th:nth-child(7),
.front-page.project-mode .pipeline-table td:nth-child(7) {
  width: 210px;
}

.front-page.project-mode .pipeline-table th:nth-child(8),
.front-page.project-mode .pipeline-table td:nth-child(8) {
  width: 154px;
}

.front-page.project-mode .pipeline-table textarea {
  width: 100%;
  min-height: 148px;
  max-height: 148px;
  padding: 14px 16px;
  border: 1px solid #3b3c43;
  border-radius: 12px;
  background: #2a2b31;
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}

.front-page.project-mode .pipeline-empty,
.front-page.project-mode .pipeline-result,
.front-page.project-mode .pipeline-thumb {
  min-height: 148px;
  height: 148px;
  border-radius: 12px;
  background: #2a2b31;
}

.front-page.project-mode .pipeline-thumb {
  width: 178px;
  object-fit: cover;
}

.front-page.project-mode .shot-index strong {
  margin-top: 6px;
  color: #7db7ff;
}

.front-page.project-mode .shot-index .badge {
  min-width: 54px;
  padding: 4px 6px;
  border-radius: 7px;
}

.front-page.project-mode .pipeline-row-actions {
  min-height: 148px;
  align-content: center;
}

.front-page.project-mode .pipeline-row-actions .small-action {
  min-height: 38px;
  border-radius: 10px;
  background: #ff1f5f;
  color: #fff;
  font-size: 12px;
}

.front-page.project-mode .pipeline-row-actions .secondary-action {
  background: #1f6bff;
}

.front-page.project-mode .pipeline-aux {
  position: fixed;
  inset: 92px 24px 24px;
  z-index: 20;
  overflow: auto;
  padding: 18px;
  border: 1px solid #30313a;
  border-radius: 18px;
  background: rgba(12, 13, 18, 0.96);
  backdrop-filter: blur(18px);
}

/* Full front-suite reference shell */
.front-page .shell {
  background: #0d0e11;
}

.front-page .sidebar {
  background: #07080a;
  border-bottom: 1px solid #202127;
}

.front-page .side-brand .brand-mark.small {
  border-radius: 999px;
  background: #f43f7f;
  box-shadow: 0 0 32px rgba(244, 63, 127, 0.42);
}

.front-page .sidebar nav {
  background: #1b1c20;
  border-radius: 16px;
}

.front-page .nav {
  border-radius: 12px;
  font-weight: 900;
}

.front-page .nav.active {
  background: #303136;
  color: #ff477d;
}

.front-page .logout {
  border: 1px solid #2d2e35;
  background: #15161b;
  color: #fff;
}

.front-page .content {
  background: #0d0e11;
}

.front-page .topbar {
  min-height: 76px;
  margin-bottom: 18px;
  border-color: #2a2b31;
  border-radius: 18px;
  background: linear-gradient(90deg, #171820, #21121a);
}

.front-page .topbar h2 {
  font-size: 24px;
  font-weight: 900;
}

.front-page .credit-pill {
  border-color: rgba(245, 158, 11, 0.48);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-weight: 900;
}

.front-page .hero-band {
  min-height: 150px;
  border-color: #2a2b31;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(13, 16, 26, 0.94), rgba(13, 16, 26, 0.58), rgba(255, 46, 104, 0.12)),
    url("/assets/login-bg.png") center / cover no-repeat;
}

.front-page .hero-band h3 {
  font-size: 28px;
  font-weight: 900;
}

.front-page .stats-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.front-page .stats-grid article,
.front-page .panel,
.front-page .plan-card,
.front-page .table-wrap {
  border-color: #30313a;
  border-radius: 10px;
  background: #15161b;
  box-shadow: none;
  backdrop-filter: none;
}

.front-page .stats-grid article {
  min-height: 100px;
}

.front-page .stats-grid strong {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.front-page .work-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.55fr) minmax(280px, 0.8fr);
}

.front-page .panel h3,
.front-page .plan-card h3 {
  color: #fff;
  font-weight: 900;
}

.front-page input,
.front-page select,
.front-page textarea {
  border-color: #30313a;
  border-radius: 10px;
  background: #0b0e14;
}

.front-page button {
  border-radius: 10px;
  background: #ff2e68;
  font-weight: 900;
}

.front-page button.secondary {
  background: #272932;
}

.front-page .table-wrap {
  overflow: auto;
}

.front-page table {
  border-collapse: separate;
  border-spacing: 0;
}

.front-page th {
  height: 48px;
  background: #1b1c22;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.front-page td {
  background: #15161b;
  border-bottom: 1px solid #2a2b31;
}

.front-page .project-cell img,
.front-page .project-cover-empty {
  border-color: #30313a;
  border-radius: 8px;
}

.front-page .plan-card {
  min-height: 210px;
}

.front-page .plan-card span {
  color: #ff477d;
}

.front-page .plan-card strong {
  color: #fff;
}

.front-page .billing-card {
  border-radius: 10px;
}

.front-page .progress {
  background: #272932;
}

.front-page .progress span {
  background: #ff2e68;
}

/* App-like "我的剧本" page override */
.front-page.project-mode .script-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: block;
  padding: 0;
  background: #171819;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-app-shell {
  min-height: 100%;
  color: #d6d9df;
  background: #171819;
}

.front-page.project-mode .script-app-crumb {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #323338;
  color: #5d636c;
  font-size: 14px;
}

.front-page.project-mode .recycle-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #44464d;
  border-radius: 6px;
  background: #25272c;
  color: #f4f6f9;
  font-size: 14px;
}

.front-page.project-mode .script-app-main {
  padding: 20px 20px 48px;
}

.front-page.project-mode .script-app-head {
  display: grid;
  gap: 28px;
  align-items: start;
  justify-items: start;
  margin-bottom: 14px;
}

.front-page.project-mode .script-app-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.front-page.project-mode .script-app-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.front-page.project-mode .script-app-actions button {
  min-height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  background: #1785e8;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.front-page.project-mode .drama-card-grid {
  min-height: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 322px);
  gap: 16px;
  align-items: start;
}

.front-page.project-mode .drama-card {
  height: 306px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 48px;
  border: 1px solid #2b2d32;
  border-radius: 10px;
  background: #25272c;
  color: #b9c0ca;
  cursor: pointer;
}

.front-page.project-mode .drama-card-body {
  min-height: 0;
  padding: 20px 24px 16px;
}

.front-page.project-mode .drama-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.front-page.project-mode .book-mark,
.front-page.project-mode .drama-title-line strong {
  color: #fff;
}

.front-page.project-mode .drama-title-line strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-page.project-mode .drama-card p {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  color: #b9c0ca;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}

.front-page.project-mode .drama-card-footer {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  border-top: 1px solid #3a3c42;
  background: #24262b;
}

.front-page.project-mode .drama-card-footer span {
  height: 22px;
  background: #44464e;
}

.front-page.project-mode .card-icon-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6d747f;
  font-size: 18px;
}

.front-page.project-mode .empty-drama-state {
  grid-column: 1 / -1;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.front-page.project-mode .empty-drama-state p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.front-page.project-mode .empty-illustration {
  position: relative;
  width: 108px;
  height: 94px;
}

/* Final override: scripts page = left directory + right editor. */
.front-page.project-mode .script-stage {
  min-height: 0;
  overflow: hidden;
  display: block;
  padding: 0;
  background: #151617;
}

.front-page.project-mode .script-stage.hidden {
  display: none;
}

.front-page.project-mode .script-app-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: 34px minmax(0, 1fr);
  color: #d6d9df;
  background: #151617;
}

.front-page.project-mode .script-app-crumb {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.front-page.project-mode .script-app-main {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px 8px 16px 12px;
  background: #111216;
  border-right: 1px solid #2c2e33;
}

.front-page.project-mode .script-app-head {
  gap: 10px;
  margin-bottom: 10px;
}

.front-page.project-mode .script-app-actions,
.front-page.project-mode .script-app-actions button {
  width: 100%;
}

.front-page.project-mode .drama-card-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.front-page.project-mode .drama-card {
  width: 100%;
  height: 118px;
  grid-template-rows: minmax(0, 1fr) 28px;
  border: 1px solid #2c2f38;
  border-radius: 8px;
  background: linear-gradient(180deg, #202228, #191b20);
}

.front-page.project-mode .drama-card.active {
  border-color: #ff2e68;
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.14), #1b1d22 62%);
  box-shadow: inset 3px 0 #ff2e68;
}

.front-page.project-mode .script-workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 18px;
  background: #151617;
}

.front-page.project-mode .script-workspace.hidden {
  display: none;
}

.front-page.project-mode .script-detail-head,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  border-radius: 8px;
  border-color: #30313a;
  background: #1b1d22;
}

.front-page.project-mode .script-generate {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 100px;
  gap: 8px;
  padding: 10px;
}

.front-page.project-mode .script-generate label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.front-page.project-mode .script-generate textarea {
  min-height: 52px;
  max-height: 76px;
}

.front-page.project-mode .drama-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.front-page.project-mode .episode-board {
  min-height: 104px;
  max-height: 132px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.front-page.project-mode .episode-list {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: 1fr;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  gap: 6px;
}

.front-page.project-mode .episode-item {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 80px minmax(160px, 1fr) 116px;
  gap: 8px;
}

.front-page.project-mode .episode-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-page.project-mode .episode-editor .script-body-field {
  min-height: 292px;
  display: grid;
  gap: 6px;
}

.front-page.project-mode .episode-editor .script-body-field textarea {
  min-height: 260px;
  max-height: 360px;
  overflow: auto;
}

.front-page.project-mode .script-editor-actions {
  position: static;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .front-page.project-mode .episode-grid,
  .front-page.project-mode .episode-grid.two,
  .front-page.project-mode .script-generate {
    grid-template-columns: 1fr;
  }

  .front-page.project-mode .script-generate label:nth-of-type(3),
  .front-page.project-mode .drama-actions {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .front-page.project-mode .script-stage {
    overflow: auto;
  }

  .front-page.project-mode .script-app-shell {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 40px auto auto;
  }

  .front-page.project-mode .script-app-main,
  .front-page.project-mode .script-workspace {
    grid-column: 1;
    grid-row: auto;
    border-right: 0;
  }
}

/* Final episode number selector and refresh-stable editor polish. */
.front-page.project-mode .drama-actions {
  display: none !important;
}

.front-page.project-mode .episode-board {
  min-height: 86px !important;
  max-height: 108px !important;
}

.front-page.project-mode .episode-list-head {
  padding: 8px 12px !important;
}

.front-page.project-mode .episode-list {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  gap: 8px !important;
  padding: 8px 12px 10px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.front-page.project-mode .episode-item {
  width: auto !important;
  min-width: 72px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: #20232a !important;
  box-shadow: none !important;
}

.front-page.project-mode .episode-item strong {
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.front-page.project-mode .episode-item span {
  display: none !important;
}

.front-page.project-mode .episode-item.active,
.front-page.project-mode .episode-item:hover {
  border-color: #ff2e68 !important;
  background: linear-gradient(135deg, #ff2e68, #ff6a3d) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* Final field-label fix: prevent compressed Chinese labels. */
.front-page.project-mode .episode-editor label {
  min-height: auto !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, auto) !important;
  gap: 6px !important;
  align-content: start !important;
  overflow: visible !important;
  color: #b7bfcc !important;
  font-size: 12px !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}

.front-page.project-mode .episode-editor label > input,
.front-page.project-mode .episode-editor label > textarea {
  width: 100% !important;
  min-width: 0 !important;
}

.front-page.project-mode .episode-editor label > textarea {
  line-height: 1.6 !important;
  white-space: pre-wrap !important;
}

/* Put recycle beside collapse in the editor header. */
.front-page.project-mode .script-app-crumb {
  justify-content: flex-start !important;
}

.front-page.project-mode .script-detail-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.front-page.project-mode .script-detail-actions .recycle-btn,
.front-page.project-mode .script-detail-actions #closeScriptDetailBtn {
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* Remove script breadcrumb row and use the space. */
.front-page.project-mode .script-app-shell {
  grid-template-rows: minmax(0, 1fr) !important;
}

.front-page.project-mode .script-app-main,
.front-page.project-mode .script-workspace {
  grid-row: 1 !important;
}

/* Episode info cards in one row, matching ZM card style. */
.front-page.project-mode .episode-info-strip {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}

.front-page.project-mode .episode-info-card {
  min-height: 118px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 7px !important;
  padding: 10px 12px !important;
  border: 1px solid #2c2f38 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #202228, #191b20) !important;
  color: #b7bfcc !important;
  overflow: hidden !important;
}

.front-page.project-mode .episode-info-card > span {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.front-page.project-mode .episode-info-card textarea {
  min-height: 70px !important;
  height: 70px !important;
  max-height: 70px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #d7dde8 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  resize: none !important;
  overflow: auto !important;
}

@media (max-width: 1280px) {
  .front-page.project-mode .episode-info-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
  }
}

/* Hide episode section title row; keep number pills only. */
.front-page.project-mode .episode-list-head {
  display: none !important;
}

.front-page.project-mode .episode-board {
  min-height: 46px !important;
  max-height: 76px !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

/* Drama info card: title/count/intro in one ZM-style row. */
.front-page.project-mode .script-generate {
  min-height: 92px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(180px, 1fr) 92px minmax(280px, 1.7fr) !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 46, 104, 0.52) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(255, 46, 104, 0.12), #1b1d22 64%) !important;
  box-shadow: inset 3px 0 #ff2e68 !important;
}

.front-page.project-mode .script-generate::before {
  content: "ZM";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 9px;
  background: rgba(255, 46, 104, 0.16);
  color: #ff7da0;
  font-size: 12px;
  font-weight: 900;
}

.front-page.project-mode .script-generate label {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 6px !important;
  color: #ff8aaa !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.front-page.project-mode .script-generate label:nth-of-type(3) {
  grid-column: auto !important;
}

.front-page.project-mode .script-generate input,
.front-page.project-mode .script-generate textarea {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 800 !important;
}

.front-page.project-mode .script-generate textarea {
  min-height: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  resize: none !important;
  overflow: auto !important;
  color: #d7dde8 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: pre-wrap !important;
}

.front-page.project-mode .script-generate input:focus,
.front-page.project-mode .script-generate textarea:focus {
  outline: 1px solid rgba(255, 46, 104, 0.45) !important;
  outline-offset: 4px !important;
}

@media (max-width: 1180px) {
  .front-page.project-mode .script-generate {
    grid-template-columns: 34px minmax(160px, 1fr) 80px !important;
  }

  .front-page.project-mode .script-generate label:nth-of-type(3) {
    grid-column: 2 / -1 !important;
  }
}

/* Keep the five episode info cards in one row on desktop. */
.front-page.project-mode .episode-info-strip {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
}

@media (max-width: 980px) {
  .front-page.project-mode .episode-info-strip {
    grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  }
}

/* Remove project detail title/meta bar; project nav now returns to project list. */
.front-page.project-mode #projectDetailTab .detail-header {
  display: none !important;
}

.front-page.project-mode #projectDetailTab {
  height: 100% !important;
}

.front-page.project-mode .agent-stage,
.front-page.project-mode .script-stage {
  height: 100% !important;
}

/* Compact drama info card height. */
.front-page.project-mode .script-generate {
  min-height: 64px !important;
  padding: 8px 10px !important;
  gap: 8px !important;
  align-items: center !important;
}

.front-page.project-mode .script-generate::before {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

.front-page.project-mode .script-generate label {
  gap: 3px !important;
  line-height: 14px !important;
}

.front-page.project-mode .script-generate input {
  min-height: 24px !important;
  height: 24px !important;
  font-size: 13px !important;
}

.front-page.project-mode .script-generate textarea {
  min-height: 32px !important;
  height: 32px !important;
  max-height: 32px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Compact episode selector and basic fields. */
.front-page.project-mode .episode-board {
  min-height: 38px !important;
  max-height: 44px !important;
  border-radius: 7px !important;
}

.front-page.project-mode .episode-list {
  min-height: 38px !important;
  padding: 6px 10px !important;
  gap: 6px !important;
  align-items: center !important;
}

.front-page.project-mode .episode-item {
  min-width: 58px !important;
  min-height: 26px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

.front-page.project-mode .episode-item strong {
  font-size: 12px !important;
}

.front-page.project-mode .episode-editor {
  padding: 8px !important;
  gap: 7px !important;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 78px minmax(160px, 1fr) 116px !important;
  gap: 7px !important;
}

.front-page.project-mode .episode-grid > label {
  gap: 3px !important;
  line-height: 14px !important;
  font-size: 12px !important;
}

.front-page.project-mode .episode-grid input {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* Final compact episode basic row and full-height ZM chat. */
.front-page.project-mode .content {
  min-height: 0 !important;
}

.front-page.project-mode #projectDetailTab {
  height: calc(100vh - 76px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.front-page.project-mode .agent-stage {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

.front-page.project-mode .agent-chat-panel {
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
}

.front-page.project-mode .agent-messages {
  min-height: 0 !important;
  height: auto !important;
}

.front-page.project-mode .episode-editor {
  padding: 6px !important;
  gap: 5px !important;
}

.front-page.project-mode .episode-grid {
  grid-template-columns: 72px minmax(150px, 1fr) 108px !important;
  gap: 6px !important;
}

.front-page.project-mode .episode-grid > label {
  gap: 2px !important;
  line-height: 12px !important;
  font-size: 11px !important;
}

.front-page.project-mode .episode-grid input {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

/* Remove gap under episode number pills. */
.front-page.project-mode .script-workspace {
  gap: 4px !important;
}

.front-page.project-mode .episode-board {
  min-height: 34px !important;
  max-height: 34px !important;
  height: 34px !important;
  display: block !important;
  overflow: hidden !important;
}

.front-page.project-mode .episode-list {
  min-height: 0 !important;
  height: 34px !important;
  padding: 4px 10px !important;
  align-items: center !important;
}

.front-page.project-mode .episode-item {
  min-height: 24px !important;
  height: 24px !important;
}

/* Compact script editor header and drama info card further. */
.front-page.project-mode .script-detail-head {
  min-height: 36px !important;
  height: 36px !important;
  padding: 5px 10px !important;
  border-radius: 7px !important;
}

.front-page.project-mode .script-detail-head strong {
  font-size: 13px !important;
  line-height: 1 !important;
}

.front-page.project-mode .script-detail-actions .recycle-btn,
.front-page.project-mode .script-detail-actions #closeScriptDetailBtn {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

.front-page.project-mode .script-generate {
  min-height: 54px !important;
  height: 54px !important;
  padding: 6px 9px !important;
  border-radius: 7px !important;
}

.front-page.project-mode .script-generate::before {
  width: 28px !important;
  height: 28px !important;
}

.front-page.project-mode .script-generate label {
  gap: 1px !important;
  font-size: 11px !important;
  line-height: 12px !important;
}

.front-page.project-mode .script-generate input {
  min-height: 20px !important;
  height: 20px !important;
  font-size: 12px !important;
}

.front-page.project-mode .script-generate textarea {
  min-height: 24px !important;
  height: 24px !important;
  max-height: 24px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

/* Move episode actions into script editor header. */
.front-page.project-mode .script-detail-head {
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 10px !important;
}

.front-page.project-mode .script-detail-actions {
  flex-wrap: wrap !important;
  row-gap: 6px !important;
}

.front-page.project-mode .script-detail-actions button {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

.front-page.project-mode .script-detail-actions button[form="episodeForm"] {
  background: #ff2e68 !important;
  color: #fff !important;
}

.front-page.project-mode .script-editor-actions {
  display: none !important;
}

/* Tighten vertical gaps in script editor. */
.front-page.project-mode .script-workspace {
  gap: 2px !important;
  padding-top: 6px !important;
}

.front-page.project-mode .script-detail-head,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.front-page.project-mode .script-detail-head + .script-generate,
.front-page.project-mode .script-generate + .episode-board,
.front-page.project-mode .episode-board + .episode-editor {
  margin-top: 0 !important;
}

.front-page.project-mode .script-generate {
  height: 48px !important;
  min-height: 48px !important;
}

.front-page.project-mode .episode-board {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
}

.front-page.project-mode .episode-list {
  height: 30px !important;
  padding: 3px 10px !important;
}

.front-page.project-mode .episode-editor {
  padding-top: 4px !important;
}

/* Stop grid rows from stretching and creating fake vertical gaps. */
.front-page.project-mode .script-workspace {
  align-content: start !important;
  grid-template-rows: max-content max-content max-content max-content !important;
  grid-auto-rows: max-content !important;
  row-gap: 2px !important;
}

.front-page.project-mode .script-detail-head,
.front-page.project-mode .script-generate,
.front-page.project-mode .episode-board,
.front-page.project-mode .episode-editor {
  align-self: start !important;
}

.front-page.project-mode .episode-editor {
  height: auto !important;
  min-height: 0 !important;
}

/* Scripts page should hug its content; only ZM chat keeps the full-screen shell. */
.front-page.project-mode.project-scripts-step #projectDetailTab {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.front-page.project-mode.project-scripts-step .script-stage {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

.front-page.project-mode.project-scripts-step .script-app-shell {
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: max-content !important;
  align-items: start !important;
}

.front-page.project-mode.project-scripts-step .script-app-main,
.front-page.project-mode.project-scripts-step .script-workspace {
  align-self: start !important;
}

.front-page.project-mode.project-scripts-step .script-workspace {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 6px !important;
  grid-template-rows: max-content max-content max-content max-content !important;
}

.front-page.project-mode.project-scripts-step .episode-editor {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 6px !important;
}

.front-page.project-mode.project-scripts-step .episode-editor .script-body-field {
  min-height: 224px !important;
  height: 224px !important;
  grid-template-rows: 18px minmax(0, 1fr) !important;
}

.front-page.project-mode.project-scripts-step .episode-editor .script-body-field textarea {
  min-height: 0 !important;
  height: 200px !important;
  max-height: 220px !important;
}

.front-page.project-mode.project-scripts-step .episode-stats {
  min-height: 30px !important;
  padding: 6px 10px !important;
  line-height: 16px !important;
}

/* Use the remaining screen as script body instead of showing empty black space. */
.front-page.project-mode.project-scripts-step #projectDetailTab {
  height: calc(100vh - 76px) !important;
  overflow: hidden !important;
}

.front-page.project-mode.project-scripts-step .script-stage,
.front-page.project-mode.project-scripts-step .script-app-shell {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.front-page.project-mode.project-scripts-step .script-app-shell {
  grid-template-rows: minmax(0, 1fr) !important;
}

.front-page.project-mode.project-scripts-step .script-workspace {
  height: 100% !important;
  overflow: hidden !important;
  grid-template-rows: max-content max-content max-content minmax(0, 1fr) !important;
}

.front-page.project-mode.project-scripts-step .episode-editor {
  height: 100% !important;
  overflow: hidden !important;
  grid-template-rows: max-content max-content minmax(0, 1fr) max-content !important;
}

.front-page.project-mode.project-scripts-step .episode-editor .script-body-field {
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: 18px minmax(0, 1fr) !important;
}

.front-page.project-mode.project-scripts-step .episode-editor .script-body-field textarea {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Bigger script body text for easier reading/editing. */
.front-page.project-mode .episode-editor .script-body-field textarea {
  font-size: 14px !important;
  line-height: 1.85 !important;
}

.front-page.project-mode .episode-editor .script-body-field {
  font-size: 13px !important;
}

/* Step 03: storyboard generation page, matched to the app-like four-step layout. */
.front-page.project-mode.project-storyboard-step #projectDetailTab {
  height: calc(100vh - 76px) !important;
  overflow: hidden !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-stage {
  height: 360px !important;
  min-height: 360px !important;
  display: grid !important;
  grid-template-rows: 36px 44px 210px 34px !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 10px 24px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #191a1c !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f4f7ff;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1;
}

.front-page.project-mode.project-storyboard-step .storyboard-help {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.front-page.project-mode.project-storyboard-step .storyboard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
}

.front-page.project-mode.project-storyboard-step .storyboard-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, max-content) minmax(40px, 1fr);
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.28);
  font-size: 14px;
  white-space: nowrap;
}

.front-page.project-mode.project-storyboard-step .storyboard-step::after {
  content: "";
  height: 1px;
  background: rgba(255,255,255,.12);
}

.front-page.project-mode.project-storyboard-step .storyboard-step b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #24272d;
  color: rgba(255,255,255,.58);
  font-size: 13px;
}

.front-page.project-mode.project-storyboard-step .storyboard-step.active {
  color: #f4f7ff;
  font-weight: 700;
}

.front-page.project-mode.project-storyboard-step .storyboard-step.active b {
  background: #1e97ff;
  color: #fff;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty {
  display: grid;
  place-items: center;
  align-content: start;
  gap: 14px;
  padding-top: 8px;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon {
  width: 76px;
  height: 72px;
  position: relative;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 8px;
  width: 38px;
  height: 46px;
  border-radius: 4px;
  background: linear-gradient(180deg, #aeb4bd, #808791);
  box-shadow: 0 18px 0 -7px rgba(174,180,189,.55);
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::after {
  content: "...";
  position: absolute;
  right: 4px;
  top: 0;
  width: 28px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #9298a1;
  color: #dfe4ea;
  font-size: 13px;
  letter-spacing: 1px;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon span {
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 72px;
  height: 12px;
  border-radius: 50%;
  background: rgba(174,180,189,.78);
}

.front-page.project-mode.project-storyboard-step .storyboard-start-actions {
  width: 326px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn {
  height: 42px;
  border-radius: 7px;
  border: 1px solid #464b55;
  background: #26282c;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn:hover {
  border-color: #ff2e68;
  color: #fff;
}

.front-page.project-mode.project-storyboard-step .pipeline-actions {
  justify-content: center !important;
  gap: 8px !important;
  align-items: center !important;
  align-self: end !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-actions .tool-btn {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-shell {
  height: calc(100vh - 436px) !important;
  min-height: 220px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #151617 !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-table-wrap {
  max-height: 100% !important;
  min-height: 100% !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-table th {
  height: 38px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-table td {
  height: 136px !important;
  padding: 8px !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-table textarea {
  min-height: 112px !important;
  max-height: 112px !important;
  padding: 10px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-empty,
.front-page.project-mode.project-storyboard-step .pipeline-result,
.front-page.project-mode.project-storyboard-step .pipeline-thumb {
  min-height: 112px !important;
  height: 112px !important;
}

/* Tighten storyboard top area so the table starts higher. */
.front-page.project-mode.project-storyboard-step .storyboard-stage {
  height: 272px !important;
  min-height: 272px !important;
  grid-template-rows: 28px 34px 154px 30px !important;
  gap: 6px !important;
  padding: 8px 24px 6px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row h2 {
  font-size: 20px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-steps {
  gap: 10px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step {
  grid-template-columns: 22px minmax(0, max-content) minmax(34px, 1fr) !important;
  gap: 7px !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step b {
  width: 22px !important;
  height: 22px !important;
  font-size: 12px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty {
  gap: 10px !important;
  padding-top: 2px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon {
  width: 58px !important;
  height: 52px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::before {
  left: 16px !important;
  top: 5px !important;
  width: 30px !important;
  height: 36px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::after {
  right: 0 !important;
  width: 24px !important;
  height: 18px !important;
  font-size: 11px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon span {
  left: 1px !important;
  width: 56px !important;
  height: 9px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-actions {
  width: 326px !important;
  gap: 8px 14px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn {
  height: 36px !important;
  font-size: 14px !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-actions .tool-btn {
  min-height: 28px !important;
  height: 28px !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-shell {
  height: calc(100vh - 348px) !important;
  min-height: 300px !important;
}

/* App state: before storyboard generation, do not show the production table. */
.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 560px !important;
  grid-template-rows: 36px 54px minmax(0, 1fr) !important;
  padding: 18px 24px 40px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .pipeline-actions,
.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .pipeline-shell {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty {
  align-content: center !important;
  padding-top: 0 !important;
  gap: 18px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon {
  width: 92px !important;
  height: 88px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::before {
  left: 24px !important;
  top: 8px !important;
  width: 46px !important;
  height: 56px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::after {
  right: 4px !important;
  width: 30px !important;
  height: 22px !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon span {
  left: 8px !important;
  width: 88px !important;
  height: 14px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-actions {
  width: 326px !important;
  gap: 14px 16px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn {
  height: 42px !important;
  font-size: 15px !important;
}

/* ZM branded storyboard empty state. */
.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-stage {
  background:
    linear-gradient(180deg, rgba(255, 46, 104, 0.05), rgba(255, 46, 104, 0) 34%),
    #151617 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-title-row {
  height: 34px !important;
  padding: 0 2px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-title-row h2 {
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-help {
  border-color: rgba(255, 255, 255, 0.52) !important;
  background: #202228 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-steps {
  height: 54px !important;
  padding: 0 12px !important;
  border: 1px solid #2a2d35 !important;
  border-radius: 8px !important;
  background: #1b1d22 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-step {
  color: #737b89 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-step.active {
  color: #fff !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-step.active b {
  background: #ff2e68 !important;
  box-shadow: 0 0 0 5px rgba(255, 46, 104, 0.12) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-step::after {
  background: #343741 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty {
  width: min(720px, 92vw) !important;
  justify-self: center !important;
  align-self: center !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  place-items: center !important;
  align-content: center !important;
  gap: 26px !important;
  min-height: 220px !important;
  padding: 22px 28px !important;
  border: 1px solid rgba(255, 46, 104, 0.26) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(255, 46, 104, 0.14), transparent 42%),
    #1b1d22 !important;
  box-shadow: inset 3px 0 #ff2e68, 0 18px 50px rgba(0, 0, 0, 0.22) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon {
  width: 112px !important;
  height: 112px !important;
  border-radius: 8px !important;
  background: #24272f !important;
  box-shadow: inset 0 0 0 1px #333743 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::before {
  left: 37px !important;
  top: 24px !important;
  width: 42px !important;
  height: 52px !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #ff7aa0, #ff2e68) !important;
  box-shadow: 0 16px 0 -8px rgba(255, 46, 104, 0.34) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::after {
  right: 22px !important;
  top: 18px !important;
  width: 30px !important;
  height: 20px !important;
  background: #353944 !important;
  color: #ffb5c9 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon span {
  left: 24px !important;
  bottom: 22px !important;
  width: 70px !important;
  height: 12px !important;
  background: rgba(255, 46, 104, 0.28) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn {
  height: 46px !important;
  border: 1px solid #373b45 !important;
  border-radius: 8px !important;
  background: #252830 !important;
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn:first-child {
  border-color: rgba(255, 46, 104, 0.58) !important;
  background: linear-gradient(135deg, #ff2e68, #ff5b36) !important;
  color: #fff !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn:hover {
  transform: translateY(-1px) !important;
  border-color: #ff2e68 !important;
}

@media (max-width: 760px) {
  .front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 18px !important;
  }
}

/* ZM storyboard production state: after importing/generating shots. */
.front-page.project-mode.project-storyboard-step.storyboard-has-shots #projectDetailTab {
  height: calc(100vh - 76px) !important;
  overflow: hidden !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-stage {
  height: 118px !important;
  min-height: 118px !important;
  grid-template-rows: 30px 40px 34px !important;
  gap: 6px !important;
  padding: 8px 24px 6px !important;
  border-bottom: 1px solid #282b33 !important;
  background: #151617 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-empty {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-title-row {
  height: 30px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-title-row h2 {
  font-size: 20px !important;
  font-weight: 900 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-steps {
  height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid #2a2d35 !important;
  border-radius: 8px !important;
  background: #1b1d22 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-step {
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-step.active b {
  background: #ff2e68 !important;
  box-shadow: 0 0 0 5px rgba(255, 46, 104, 0.12) !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-actions {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  height: 34px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-actions .tool-btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-shell {
  height: calc(100vh - 194px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #111216 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-table-wrap {
  max-height: 100% !important;
  min-height: 100% !important;
  background: #111216 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-table {
  min-width: 1680px !important;
  border-spacing: 0 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-table th {
  height: 36px !important;
  padding: 0 10px !important;
  background: #191b22 !important;
  color: #f8fafc !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-table td {
  height: 126px !important;
  padding: 8px !important;
  background: #121318 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-table textarea {
  min-height: 96px !important;
  max-height: 96px !important;
  padding: 10px !important;
  border-radius: 8px !important;
  background: #24262d !important;
  color: #f8fafc !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-empty,
.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-result,
.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-thumb {
  min-height: 96px !important;
  height: 96px !important;
  border-radius: 8px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-row-actions {
  min-height: 96px !important;
  gap: 8px !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-row-actions .small-action {
  min-height: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* Final: follow the App wizard. Step 1 is script generation, not the shot table. */
.front-page.project-mode.project-storyboard-step #projectDetailTab {
  height: calc(100vh - 76px) !important;
  overflow: hidden !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-actions,
.front-page.project-mode.project-storyboard-step .pipeline-shell {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 560px !important;
  display: grid !important;
  grid-template-rows: 36px 54px minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 18px 24px 40px !important;
  background: #191a1c !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row h2 {
  font-size: 22px !important;
  color: #fff !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-steps {
  height: 54px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step.active b {
  background: #1e97ff !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty {
  width: auto !important;
  min-height: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  align-content: center !important;
  gap: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon {
  width: 92px !important;
  height: 88px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::before {
  left: 24px !important;
  top: 8px !important;
  width: 46px !important;
  height: 56px !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #aeb4bd, #808791) !important;
  box-shadow: 0 18px 0 -7px rgba(174,180,189,.55) !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon::after {
  right: 4px !important;
  top: 0 !important;
  width: 30px !important;
  height: 22px !important;
  background: #9298a1 !important;
  color: #dfe4ea !important;
  font-size: 13px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon span {
  left: 8px !important;
  bottom: 0 !important;
  width: 88px !important;
  height: 14px !important;
  background: rgba(174,180,189,.78) !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-actions {
  width: 326px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 16px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn,
.front-page.project-mode.project-storyboard-step .storyboard-start-btn:first-child {
  height: 42px !important;
  border-radius: 7px !important;
  border: 1px solid #464b55 !important;
  background: #26282c !important;
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn:hover {
  transform: none !important;
  border-color: #6a7180 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-panel {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 42px minmax(0, 1fr) 42px !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid #30313a !important;
  border-radius: 8px !important;
  background: #1b1d22 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-panel.hidden {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-head,
.front-page.project-mode.project-storyboard-step .storyboard-script-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-head strong {
  color: #fff !important;
  font-size: 16px !important;
}

.front-page.project-mode.project-storyboard-step #storyboardDocSelect {
  width: 260px !important;
  height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid #3a3d46 !important;
  background: #24262d !important;
  color: #f8fafc !important;
}

.front-page.project-mode.project-storyboard-step #storyboardScriptText {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  border: 1px solid #30313a !important;
  border-radius: 8px !important;
  background: #0f1218 !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
  resize: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-actions {
  justify-content: flex-end !important;
}

/* Absolute final override: App-like first screen wins over older ZM card rules. */
.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-stage {
  background: #191a1c !important;
  height: calc(100vh - 76px) !important;
  min-height: 560px !important;
  grid-template-rows: 36px 54px minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 18px 24px 40px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-steps {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-step.active b {
  background: #1e97ff !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty {
  width: auto !important;
  min-height: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  align-content: center !important;
  gap: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon {
  width: 92px !important;
  height: 88px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::before {
  left: 24px !important;
  top: 8px !important;
  width: 46px !important;
  height: 56px !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #aeb4bd, #808791) !important;
  box-shadow: 0 18px 0 -7px rgba(174,180,189,.55) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon::after {
  right: 4px !important;
  top: 0 !important;
  width: 30px !important;
  height: 22px !important;
  background: #9298a1 !important;
  color: #dfe4ea !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-empty-icon span {
  left: 8px !important;
  bottom: 0 !important;
  width: 88px !important;
  height: 14px !important;
  background: rgba(174,180,189,.78) !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-actions {
  width: 326px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 16px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn,
.front-page.project-mode.project-storyboard-step:not(.storyboard-has-shots) .storyboard-start-btn:first-child {
  height: 42px !important;
  border-radius: 7px !important;
  border: 1px solid #464b55 !important;
  background: #26282c !important;
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

/* App-exact positioning for storyboard step 1. */
.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-stage {
  grid-template-rows: 34px 42px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px 24px 0 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-title-row {
  align-items: center !important;
  height: 34px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-title-row h2 {
  font-size: 21px !important;
  line-height: 1 !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-steps {
  width: min(1500px, calc(100vw - 48px)) !important;
  height: 42px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-step {
  grid-template-columns: 24px max-content minmax(70px, 1fr) !important;
  gap: 8px !important;
  font-size: 14px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-empty {
  align-content: start !important;
  justify-content: center !important;
  justify-items: center !important;
  padding-top: 18px !important;
  gap: 16px !important;
}

.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open) .storyboard-empty-icon {
  margin-bottom: 2px !important;
}

/* App storyboard wizard: structured script editor and staged workflow. */
.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 560px !important;
  grid-template-rows: 34px 42px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px 18px 12px !important;
  background: #191a1c !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-script-open .pipeline-actions,
.front-page.project-mode.project-storyboard-step.storyboard-script-open .pipeline-shell {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots:not(.storyboard-script-open) .pipeline-actions {
  display: flex !important;
}

.front-page.project-mode.project-storyboard-step.storyboard-has-shots:not(.storyboard-script-open) .pipeline-shell {
  display: block !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-style-panel,
.front-page.project-mode.project-storyboard-step .storyboard-assets-panel,
.front-page.project-mode.project-storyboard-step .storyboard-grid-panel,
.front-page.project-mode.project-storyboard-step .storyboard-script-panel {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 38px minmax(0, 1fr) 40px !important;
  gap: 8px !important;
  padding: 10px !important;
  border: 1px solid #30313a !important;
  border-radius: 8px !important;
  background: #1b1d22 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-style-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-assets-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-grid-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-script-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-table-wrap.hidden,
.front-page.project-mode.project-storyboard-step #storyboardScriptText.hidden {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-body {
  min-height: 0;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  gap: 8px;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #b7bdc8;
  font-size: 13px;
}

.front-page.project-mode.project-storyboard-step .storyboard-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid #30313a;
  border-radius: 7px;
  background: #101116;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table {
  width: max(1680px, 100%);
  border-spacing: 0;
  color: #eef2f7;
  font-size: 13px;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid #30313a;
  background: #24262d;
  color: #c8ced8;
  text-align: left;
  white-space: nowrap;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table td {
  min-width: 92px;
  height: 94px;
  padding: 7px;
  border-right: 1px solid #262932;
  border-bottom: 1px solid #262932;
  vertical-align: top;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table td:nth-child(1) {
  min-width: 58px;
  width: 58px;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table td:nth-child(2),
.front-page.project-mode.project-storyboard-step .storyboard-edit-table td:nth-child(7),
.front-page.project-mode.project-storyboard-step .storyboard-edit-table td:nth-child(9),
.front-page.project-mode.project-storyboard-step .storyboard-edit-table td:nth-child(11) {
  min-width: 220px;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table input,
.front-page.project-mode.project-storyboard-step .storyboard-edit-table select,
.front-page.project-mode.project-storyboard-step .storyboard-edit-table textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid #333741;
  border-radius: 6px;
  background: #17191f;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
}

.front-page.project-mode.project-storyboard-step .storyboard-edit-table textarea {
  height: 80px;
  resize: vertical;
}

.front-page.project-mode.project-storyboard-step .storyboard-param-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.front-page.project-mode.project-storyboard-step .storyboard-param-grid label,
.front-page.project-mode.project-storyboard-step .storyboard-prompt-item {
  display: grid;
  gap: 6px;
  color: #c8ced8;
  font-size: 13px;
}

.front-page.project-mode.project-storyboard-step .storyboard-param-grid .wide {
  grid-column: span 2;
}

.front-page.project-mode.project-storyboard-step .storyboard-param-grid input,
.front-page.project-mode.project-storyboard-step .storyboard-param-grid select,
.front-page.project-mode.project-storyboard-step .storyboard-param-grid textarea,
.front-page.project-mode.project-storyboard-step .storyboard-prompt-item textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #333741;
  border-radius: 7px;
  background: #101116;
  color: #f8fafc;
}

.front-page.project-mode.project-storyboard-step .storyboard-param-grid textarea,
.front-page.project-mode.project-storyboard-step .storyboard-prompt-item textarea {
  min-height: 120px;
  line-height: 1.7;
  resize: vertical;
}

.front-page.project-mode.project-storyboard-step .storyboard-assets-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: hidden;
}

.front-page.project-mode.project-storyboard-step .storyboard-assets-grid section {
  min-height: 0;
  display: grid;
  grid-template-rows: 26px minmax(0, 1fr);
  gap: 8px;
}

.front-page.project-mode.project-storyboard-step .storyboard-assets-grid h4 {
  margin: 0;
  color: #fff;
}

.front-page.project-mode.project-storyboard-step .storyboard-prompt-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.front-page.project-mode.project-storyboard-step .storyboard-prompt-item {
  padding: 8px;
  border: 1px solid #30313a;
  border-radius: 7px;
  background: #12141a;
}

.front-page.project-mode.project-storyboard-step .storyboard-grid-preview {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-content: start;
  gap: 10px;
}

.front-page.project-mode.project-storyboard-step .storyboard-grid-card {
  min-height: 126px;
  padding: 10px;
  border: 1px solid #30313a;
  border-radius: 7px;
  background: #101116;
}

.front-page.project-mode.project-storyboard-step .storyboard-grid-card b {
  color: #ff4f75;
}

.front-page.project-mode.project-storyboard-step .storyboard-grid-card p {
  margin: 8px 0;
  color: #f8fafc;
  line-height: 1.6;
}

.front-page.project-mode.project-storyboard-step .storyboard-grid-card span {
  color: #98a1b1;
  font-size: 12px;
}

/* Final App-port overrides for the storyboard page. */
.front-page.project-mode.project-storyboard-step .storyboard-stage {
  width: 100% !important;
  height: calc(100vh - 76px) !important;
  min-height: 600px !important;
  display: grid !important;
  grid-template-rows: 42px 56px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 14px 24px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #191a1c !important;
}

.front-page.project-mode.project-storyboard-step .pipeline-actions,
.front-page.project-mode.project-storyboard-step .pipeline-shell {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row {
  height: 34px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-row h2 {
  margin: 0 !important;
  color: #f4f7fb !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-help {
  width: 18px !important;
  height: 18px !important;
  border: 1px solid #f1f5f9 !important;
  color: #f1f5f9 !important;
  font-size: 12px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-steps {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center !important;
  gap: 10px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step {
  display: grid !important;
  grid-template-columns: 24px max-content minmax(30px, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  color: #747984 !important;
  font-size: 14px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step::after {
  content: "" !important;
  height: 1px !important;
  background: #2f3338 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step b {
  width: 24px !important;
  height: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #2b3037 !important;
  color: #8b919b !important;
  font-size: 12px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step.active {
  color: #f2f5f9 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-step.active b {
  background: #1988ff !important;
  color: #fff !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty {
  min-height: 0 !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty.hidden {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-empty-icon {
  width: 86px !important;
  height: 70px !important;
  opacity: .55 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-actions {
  display: grid !important;
  grid-template-columns: repeat(2, 190px) !important;
  gap: 14px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-start-btn,
.front-page.project-mode.project-storyboard-step .storyboard-start-btn:first-child {
  height: 40px !important;
  border: 1px solid #2b80e8 !important;
  border-radius: 4px !important;
  background: #1677d2 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-panel {
  width: min(760px, 100%) !important;
  justify-self: center !important;
  align-self: start !important;
  display: grid !important;
  grid-template-rows: 34px auto auto 40px !important;
  gap: 18px !important;
  padding-top: 8px !important;
  border: 0 !important;
  background: transparent !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-script-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-progress-panel.hidden,
.front-page.project-mode.project-storyboard-step .storyboard-result-panel.hidden {
  display: none !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-selected-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #f8fafc !important;
  font-size: 15px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-file-icon {
  color: #e5e7eb !important;
  font-size: 18px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-delete-selected {
  border: 0 !important;
  background: transparent !important;
  color: #ff4b55 !important;
  font-size: 18px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-title-edit {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #b8c0cc !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-card {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  margin-bottom: 12px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-tabs button {
  height: 38px !important;
  border: 1px solid #2b3036 !important;
  background: #202328 !important;
  color: #9ca3af !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-tabs button.active {
  color: #fff !important;
  border-color: #1988ff !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-field {
  height: 42px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: center !important;
  border: 1px solid #31353b !important;
  border-radius: 4px !important;
  background: #202328 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-field input {
  height: 40px !important;
  padding: 0 12px !important;
  border: 0 !important;
  background: transparent !important;
  color: #f8fafc !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-config-field span {
  color: #cbd5e1 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-quick-row {
  margin-top: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #a5acb8 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-quick-row button {
  min-width: 50px !important;
  height: 28px !important;
  border: 1px solid #333842 !important;
  border-radius: 4px !important;
  background: #202328 !important;
  color: #cbd5e1 !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-model-block h3 {
  margin: 0 0 10px !important;
  color: #f8fafc !important;
  font-size: 15px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-model-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 90px !important;
  gap: 10px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-model-row select {
  height: 38px !important;
  border: 1px solid #333842 !important;
  border-radius: 4px !important;
  background: #202328 !important;
  color: #f8fafc !important;
}

.front-page.project-mode.project-storyboard-step .link-like {
  border: 0 !important;
  background: transparent !important;
  color: #1988ff !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-next-btn {
  width: 76px !important;
  height: 36px !important;
  justify-self: center !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #1683f6 !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.app-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(0, 0, 0, .45) !important;
}

.app-modal-backdrop.hidden {
  display: none !important;
}

.app-modal {
  width: min(920px, calc(100vw - 64px)) !important;
  padding: 18px !important;
  border: 1px solid #323740 !important;
  border-radius: 6px !important;
  background: #1f2126 !important;
  color: #f8fafc !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .42) !important;
}

.app-modal-mid {
  width: min(840px, calc(100vw - 64px)) !important;
}

.app-modal-direct {
  width: min(960px, calc(100vw - 64px)) !important;
}

.app-modal-close {
  float: right !important;
  border: 0 !important;
  background: transparent !important;
  color: #b6bfcc !important;
  font-size: 20px !important;
}

.app-modal h3 {
  margin: 0 0 16px !important;
  font-size: 18px !important;
}

.app-table-wrap {
  max-height: 390px !important;
  overflow: auto !important;
  border: 1px solid #343943 !important;
}

.app-pick-table {
  width: 100% !important;
  border-spacing: 0 !important;
  color: #e5e7eb !important;
  font-size: 14px !important;
}

.app-pick-table th,
.app-pick-table td {
  height: 42px !important;
  padding: 0 12px !important;
  border-bottom: 1px solid #343943 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.app-pick-table th {
  background: #292c32 !important;
  color: #cbd5e1 !important;
}

.app-pick-table tr.selected td {
  background: #143f6f !important;
}

.app-radio {
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
  border: 1px solid #6b7280 !important;
  border-radius: 999px !important;
}

.app-radio.checked {
  border-color: #1988ff !important;
  box-shadow: inset 0 0 0 3px #1f2126 !important;
  background: #1988ff !important;
}

.app-table-clip {
  max-width: 320px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.app-empty-row {
  color: #98a1b1 !important;
  text-align: center !important;
}

.app-modal-actions {
  margin-top: 18px !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.app-modal-actions button {
  min-width: 72px !important;
  height: 34px !important;
  border: 1px solid #1988ff !important;
  border-radius: 4px !important;
  background: #1988ff !important;
  color: #fff !important;
}

.app-modal-actions button.secondary {
  border-color: #454b56 !important;
  background: #25282e !important;
}

.direct-field {
  display: grid !important;
  gap: 8px !important;
  color: #d7dde7 !important;
}

.direct-field input,
.direct-field textarea {
  width: 100% !important;
  border: 1px solid #343943 !important;
  border-radius: 4px !important;
  background: #17191d !important;
  color: #f8fafc !important;
}

.direct-field input {
  height: 38px !important;
  padding: 0 10px !important;
}

.direct-field textarea {
  min-height: 220px !important;
  padding: 10px !important;
  resize: vertical !important;
}

.direct-count {
  margin: 6px 0 12px !important;
  color: #858b96 !important;
  text-align: right !important;
  font-size: 12px !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-progress-panel {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 34px minmax(0, 1fr) !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-progress-center {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 22px !important;
}

.storyboard-progress-ring {
  --progress: 1;
  width: 120px !important;
  height: 120px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: conic-gradient(#248bff calc(var(--progress) * 1%), #34383d 0) !important;
  color: #f8fafc !important;
  font-size: 24px !important;
  position: relative !important;
}

.storyboard-progress-ring::after {
  content: "" !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: inherit !important;
  background: #191a1c !important;
}

.storyboard-progress-ring span {
  position: relative !important;
  z-index: 1 !important;
}

.storyboard-progress-checks {
  display: grid !important;
  gap: 10px !important;
  color: #aab2bf !important;
  font-size: 14px !important;
}

.storyboard-progress-checks span::first-letter {
  color: #53d22f !important;
}

.front-page.project-mode.project-storyboard-step .storyboard-result-panel {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 38px minmax(0, 1fr) 54px !important;
  gap: 8px !important;
}

.storyboard-result-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.storyboard-result-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.app-blue-btn,
.app-dark-btn {
  position: relative !important;
  z-index: 3 !important;
  height: 32px !important;
  padding: 0 14px !important;
  border-radius: 4px !important;
  color: #fff !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.app-blue-btn {
  border: 1px solid #1988ff !important;
  background: #1988ff !important;
}

.app-dark-btn {
  border: 1px solid #444b56 !important;
  background: #202328 !important;
}

.storyboard-app-table-wrap {
  min-height: 0 !important;
  overflow: auto !important;
  background: #191a1c !important;
}

.storyboard-app-table {
  width: max(1640px, 100%) !important;
  border-spacing: 0 !important;
  color: #f5f7fb !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.storyboard-app-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  height: 38px !important;
  padding: 0 10px !important;
  border-right: 1px solid #353942 !important;
  border-bottom: 1px solid #3a3e46 !important;
  background: #24262a !important;
  color: #f1f5f9 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.storyboard-app-table td {
  height: 92px !important;
  padding: 10px !important;
  border-bottom: 1px solid #30343b !important;
  vertical-align: middle !important;
}

.storyboard-app-table th:nth-child(1),
.storyboard-app-table td:nth-child(1) {
  width: 44px !important;
  color: #9aa3af !important;
  text-align: center !important;
}

.storyboard-app-table th:nth-child(2),
.storyboard-app-table td:nth-child(2) {
  width: 58px !important;
}

.storyboard-app-table th:nth-child(3),
.storyboard-app-table td:nth-child(3) {
  width: 370px !important;
}

.storyboard-app-table th:nth-child(6),
.storyboard-app-table td:nth-child(6),
.storyboard-app-table th:nth-child(8),
.storyboard-app-table td:nth-child(8),
.storyboard-app-table th:nth-child(9),
.storyboard-app-table td:nth-child(9),
.storyboard-app-table th:nth-child(10),
.storyboard-app-table td:nth-child(10) {
  width: 170px !important;
}

.storyboard-app-table input,
.storyboard-app-table textarea {
  width: 100% !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #f8fafc !important;
  font: inherit !important;
  line-height: 1.55 !important;
}

.storyboard-app-table textarea {
  min-height: 54px !important;
  resize: none !important;
}

.storyboard-app-table tr:focus-within input,
.storyboard-app-table tr:focus-within textarea {
  padding: 6px 8px !important;
  background: #111317 !important;
  outline: 0 !important;
}

.storyboard-trash {
  min-width: 46px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(255, 68, 79, 0.45) !important;
  border-radius: 4px !important;
  background: rgba(255, 68, 79, 0.08) !important;
  color: #ff444f !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.storyboard-empty-row td {
  height: 160px !important;
  color: #9aa3af !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.storyboard-result-foot {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) 120px !important;
  align-items: center !important;
  gap: 12px !important;
}

.app-add-row {
  width: max-content !important;
  height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid #444b56 !important;
  border-radius: 4px !important;
  background: #202328 !important;
  color: #f8fafc !important;
}

.storyboard-pager {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #f8fafc !important;
}

.pager-page,
.pager-arrow {
  min-width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  background: transparent !important;
  color: #f8fafc !important;
}

.pager-page.active {
  border: 1px solid #1988ff !important;
  border-radius: 6px !important;
  color: #1988ff !important;
}

#storyboardJumpPage {
  width: 52px !important;
  height: 32px !important;
  border: 1px solid #444b56 !important;
  border-radius: 6px !important;
  background: #17191d !important;
  color: #fff !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-stage > .pipeline-actions,
body.front-page.project-mode.project-storyboard-step .pipeline-shell,
body.front-page.project-mode.project-storyboard-step.storyboard-has-shots .storyboard-stage > .pipeline-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-has-shots .pipeline-shell,
body.front-page.project-mode.project-storyboard-step.storyboard-has-shots:not(.storyboard-script-open) .storyboard-stage > .pipeline-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-has-shots:not(.storyboard-script-open) .pipeline-shell {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 0 !important;
  grid-template-rows: 34px 42px minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 8px !important;
  padding-top: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-empty,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-script-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-progress-panel {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-panel {
  grid-row: 3 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: 36px minmax(0, 1fr) 52px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table-wrap {
  max-height: none !important;
}

#toast {
  pointer-events: none !important;
}

/* App storyboard four-step panels: final overrides. */
body.front-page.project-mode.project-storyboard-step .storyboard-style-panel,
body.front-page.project-mode.project-storyboard-step .storyboard-assets-panel,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 0 2px 16px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-style-panel.hidden,
body.front-page.project-mode.project-storyboard-step .storyboard-assets-panel.hidden,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-panel.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-style-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-assets-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-grid-panel {
  grid-row: 3 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-param-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: start;
}

body.front-page.project-mode.project-storyboard-step .storyboard-param-grid label,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools label {
  display: grid;
  gap: 6px;
  color: #aeb7c8;
  font-size: 13px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-param-grid .wide {
  grid-column: 1 / -1;
}

body.front-page.project-mode.project-storyboard-step .storyboard-param-grid input,
body.front-page.project-mode.project-storyboard-step .storyboard-param-grid select,
body.front-page.project-mode.project-storyboard-step .storyboard-param-grid textarea,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools input,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #253047;
  border-radius: 6px;
  background: #121927;
  color: #edf3ff;
  padding: 9px 10px;
  outline: none;
}

body.front-page.project-mode.project-storyboard-step .storyboard-param-grid textarea {
  min-height: 92px;
  resize: vertical;
}

body.front-page.project-mode.project-storyboard-step .storyboard-panel-actions {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-grid section {
  min-width: 0;
  border: 1px solid #202a40;
  border-radius: 8px;
  background: #101725;
  padding: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-grid section.wide {
  grid-column: 1 / -1;
}

body.front-page.project-mode.project-storyboard-step .storyboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-section-head h4 {
  margin: 0;
  color: #f4f7ff;
  font-size: 15px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-section-head button,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools button {
  min-height: 34px;
  border: 1px solid #2b3852;
  border-radius: 6px;
  background: #172238;
  color: #dce7ff;
  padding: 0 12px;
  cursor: pointer;
}

body.front-page.project-mode.project-storyboard-step .storyboard-prompt-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

body.front-page.project-mode.project-storyboard-step .storyboard-prompt-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.front-page.project-mode.project-storyboard-step .storyboard-prompt-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.front-page.project-mode.project-storyboard-step .storyboard-prompt-item span {
  color: #f4f7ff;
  font-size: 13px;
  font-weight: 700;
}

body.front-page.project-mode.project-storyboard-step .storyboard-prompt-item textarea {
  min-height: 72px;
  border: 1px solid #26324a;
  border-radius: 6px;
  background: #0b1220;
  color: #dbe6f7;
  padding: 8px;
  resize: vertical;
  line-height: 1.55;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools {
  display: grid;
  grid-template-columns: 140px minmax(220px, 1fr) repeat(3, max-content);
  gap: 10px;
  align-items: end;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  min-height: 0;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card {
  min-height: 132px;
  border: 1px solid #26324a;
  border-radius: 8px;
  background: linear-gradient(180deg, #172033, #0f1624);
  padding: 10px;
  display: grid;
  grid-template-rows: max-content 1fr max-content;
  gap: 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card b {
  width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-size: 13px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card p {
  margin: 0;
  color: #edf3ff;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card span {
  color: #9eabc0;
  font-size: 12px;
}

@media (max-width: 1100px) {
  body.front-page.project-mode.project-storyboard-step .storyboard-param-grid,
  body.front-page.project-mode.project-storyboard-step .storyboard-grid-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools,
  body.front-page.project-mode.project-storyboard-step .storyboard-assets-grid,
  body.front-page.project-mode.project-storyboard-step .storyboard-prompt-list.compact {
    grid-template-columns: 1fr;
  }
}

/* Real App storyboard table should read like rows, not tiny scroll boxes. */
body.front-page.project-mode.project-storyboard-step .storyboard-app-table td {
  height: auto !important;
  min-height: 58px !important;
  padding: 8px 10px !important;
  vertical-align: top !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-app-table input,
body.front-page.project-mode.project-storyboard-step .storyboard-app-table textarea {
  overflow: hidden !important;
  min-height: 24px !important;
  padding: 0 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-app-table textarea {
  height: auto;
  min-height: 44px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-app-table tr:focus-within input,
body.front-page.project-mode.project-storyboard-step .storyboard-app-table tr:focus-within textarea {
  padding: 4px 6px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-app-table th:nth-child(3),
body.front-page.project-mode.project-storyboard-step .storyboard-app-table td:nth-child(3) {
  width: 430px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-app-table th:nth-child(10),
body.front-page.project-mode.project-storyboard-step .storyboard-app-table td:nth-child(10) {
  width: 260px !important;
}

/* App-parity storyboard steps 2-4. */
body.front-page.project-mode.project-storyboard-step .storyboard-style-panel,
body.front-page.project-mode.project-storyboard-step .storyboard-assets-panel,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-panel {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-style-cards {
  width: 446px;
  display: grid;
  grid-template-columns: repeat(4, 96px);
  gap: 14px 20px;
  align-self: start;
}

body.front-page.project-mode.project-storyboard-step .storyboard-style-cards button {
  height: 96px;
  border: 1px solid #45484d;
  border-radius: 6px;
  background: #1c1e21;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

body.front-page.project-mode.project-storyboard-step .storyboard-style-cards button.active {
  border-color: #1683f6;
  box-shadow: inset 0 0 0 1px #1683f6;
  color: #1683f6;
}

body.front-page.project-mode.project-storyboard-step .storyboard-panel-actions.centered {
  justify-content: center !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-note,
body.front-page.project-mode.project-storyboard-step .storyboard-asset-model-row,
body.front-page.project-mode.project-storyboard-step .storyboard-story-tools,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-save-row,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools {
  border-radius: 8px;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-note {
  padding: 18px 24px;
  color: #f8fafc;
  font-weight: 800;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-model-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 16px;
  color: #d7dde7;
  margin-top: -14px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-model-row select,
body.front-page.project-mode.project-storyboard-step .storyboard-story-tools select,
body.front-page.project-mode.project-storyboard-step .storyboard-story-tools input,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-save-row input,
body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools select {
  height: 32px;
  border: 1px solid #383c44;
  border-radius: 4px;
  background: #1a1c20;
  color: #f8fafc;
  padding: 0 10px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-sections {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 8px;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-sections section {
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

body.front-page.project-mode.project-storyboard-step .storyboard-assets-sections section + section {
  border-top: 1px solid #3a3f49;
  padding-top: 18px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card {
  position: relative;
  width: 120px;
  display: grid;
  gap: 6px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card.placeholder {
  width: 108px;
  gap: 5px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box {
  height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed #e5e7eb;
  border-radius: 4px;
  color: #f8fafc;
  font-size: 26px;
  cursor: pointer;
  overflow: hidden;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: #aeb7c8;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card.placeholder .storyboard-upload-box {
  height: 78px;
  border-color: #cfd6e3;
  background: #202328;
  font-size: 24px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box.has-image {
  position: relative;
  border-style: solid;
  padding: 0;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box.has-image button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-box.has-image em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 4px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  text-align: center;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card input {
  height: 30px;
  border: 1px solid #f8fafc;
  border-radius: 4px;
  background: #24262a;
  color: #fff;
  padding: 0 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card.placeholder input[data-asset-name] {
  height: 22px;
  border: 0;
  background: transparent;
  color: #9aa3af;
  padding: 0;
  text-align: center;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-card input.storyboard-upload-file {
  display: none;
}

body.front-page.project-mode.project-storyboard-step .storyboard-upload-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border: 1px solid #ff4b55;
  border-radius: 999px;
  background: #24262a;
  color: #ff4b55;
  line-height: 1;
}

body.front-page.project-mode.project-storyboard-step .storyboard-final-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 38px;
  border-bottom: 1px solid #333842;
}

body.front-page.project-mode.project-storyboard-step .storyboard-final-tabs button {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #f8fafc;
  font-weight: 700;
}

body.front-page.project-mode.project-storyboard-step .storyboard-final-tabs button.active {
  border-bottom-color: #1683f6;
  color: #1683f6;
}

body.front-page.project-mode.project-storyboard-step .storyboard-final-view.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px;
  color: #f8fafc;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-tools input#storyboardSaveDir {
  width: 210px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-tools input[type="number"] {
  width: 118px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-output {
  min-height: 190px;
  margin-top: 6px;
  overflow: auto;
  border-radius: 8px;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-story-output .empty-note {
  height: 190px;
  display: grid;
  place-items: center;
  margin: 0;
  color: #9aa3af;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-pager button,
body.front-page.project-mode.project-storyboard-step .storyboard-segment-pager input {
  width: 50px;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid #333842;
  border-radius: 4px;
  background: #1a1c20;
  color: #f8fafc;
  text-align: center;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table {
  width: 100%;
  border-spacing: 0;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.25;
  table-layout: fixed;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th,
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td {
  padding: 4px 5px;
  border-top: 1px solid #333842;
  text-align: left;
  vertical-align: middle;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th {
  height: 26px;
  font-weight: 700;
}

body.front-page.project-mode.project-storyboard-step .storyboard-cell-clip {
  display: -webkit-box;
  max-height: 32px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

body.front-page.project-mode.project-storyboard-step .storyboard-frame-box {
  min-height: 118px;
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  gap: 8px;
  border: 1px dashed #454b56;
  border-radius: 5px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-save-row {
  display: grid;
  grid-template-columns: minmax(360px, 790px) 110px;
  gap: 0;
  align-items: center;
  padding: 24px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-save-row label {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  color: #f8fafc;
  font-weight: 800;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 24px;
  color: #f8fafc;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-tools strong {
  margin-right: 12px;
  white-space: nowrap;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  gap: 16px;
  overflow: auto;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card {
  min-height: 488px;
  display: grid;
  grid-template-rows: 30px 204px 1fr 34px;
  gap: 12px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card strong {
  color: #f8fafc;
  text-align: center;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box {
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 7px;
  background: #202328;
  color: #b8c0cc;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box button {
  height: 28px;
  padding: 0 18px;
  border: 1px solid #454b56;
  border-radius: 4px;
  background: #202328;
  color: #f8fafc;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card textarea {
  min-height: 160px;
  border: 1px solid #333842;
  border-radius: 5px;
  background: #191a1c;
  color: #f8fafc;
  padding: 10px;
  line-height: 1.55;
  resize: vertical;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 0 !important;
  grid-template-rows: 30px 36px minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 6px !important;
  padding-top: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel {
  display: grid !important;
  grid-template-rows: 34px minmax(0, 1fr) 30px;
  gap: 6px;
  grid-row: 3 !important;
  align-self: stretch !important;
  margin-top: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-file {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box.has-image {
  position: relative;
  overflow: hidden;
  background: #111317;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box.has-image button {
  position: static;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box.has-image .storyboard-image-preview {
  position: absolute;
  right: 8px;
  top: 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-image-box.has-image em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 58%);
  color: #fff;
  font-style: normal;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-grid-card.queued .storyboard-single-image-btn {
  background: #2d3748;
  color: #93c5fd;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools {
  display: flex !important;
  flex-wrap: nowrap !important;
  height: 34px !important;
  min-height: 34px;
  padding: 3px 8px !important;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 0;
  border-radius: 6px;
  background: #24262a;
  column-gap: 6px !important;
  row-gap: 0 !important;
  font-size: 12px;
  line-height: 1.2;
  scrollbar-width: thin;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools label {
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools > * {
  flex: 0 0 auto;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools button {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 8px !important;
  border-radius: 4px;
  font-size: 12px !important;
  font-weight: 700;
  white-space: nowrap;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools input,
body.front-page.project-mode.project-storyboard-step .app-parity-tools select {
  height: 26px !important;
  min-height: 26px !important;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools input#storyboardSaveDir {
  width: 150px;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools #storyboardStoryModel {
  width: 212px;
}

body.front-page.project-mode.project-storyboard-step .app-parity-tools input[type="number"] {
  width: 56px;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel {
  display: block !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-output {
  margin-top: 0;
  min-height: 0;
  height: calc(100vh - 262px);
  max-height: calc(100vh - 262px);
  overflow: auto;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions {
  height: 30px;
  min-height: 30px;
  margin: 0 !important;
  padding: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 18px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head select,
body.front-page.project-mode.project-storyboard-step .storyboard-segment-head input {
  flex: 0 0 auto;
  height: 28px !important;
  min-height: 28px !important;
  border: 1px solid #333842;
  border-radius: 6px;
  background: #1a1c20;
  color: #f8fafc;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head {
  flex-wrap: nowrap;
  gap: 6px;
  padding: 5px 8px;
  border-bottom: 1px solid #333842;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head > * {
  flex: 0 0 auto;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head .link-like {
  flex: 0 0 auto;
  height: 28px;
  min-height: 28px;
  padding: 0 6px;
  white-space: nowrap;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head #storyboardImageModel {
  width: 246px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head #storyboardAspectRatio {
  width: 148px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-head #storyboardGridRatio {
  width: 142px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(1),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(1) {
  width: 48px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(2),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(2) {
  width: 88px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(3),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(3) {
  width: 236px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(4),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(4),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(5),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(5) {
  width: 72px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table th:nth-child(8),
body.front-page.project-mode.project-storyboard-step .storyboard-segment-table td:nth-child(8) {
  width: 46px;
  text-align: center;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table .storyboard-grid-image-box {
  width: 220px;
  height: 124px;
  border: 1px dashed #454b56;
  background: #202328;
  position: relative;
  padding: 5px;
  align-content: center;
  justify-items: center;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-frame-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table .storyboard-frame-actions {
  margin-top: 5px;
  gap: 6px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table .storyboard-frame-actions button {
  height: 24px !important;
  min-height: 24px !important;
  min-width: 54px;
  padding: 0 8px;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-table .storyboard-grid-image-box.has-image .storyboard-frame-actions {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px;
  border-radius: 5px;
  background: rgb(17 19 23 / 72%);
}

body.front-page.project-mode.project-storyboard-step .storyboard-delete-mini {
  border: 0;
  background: transparent;
  color: #ff4d67;
  cursor: pointer;
}

body.front-page.project-mode.project-storyboard-step .storyboard-draft-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  color: #f8fafc;
  font-weight: 800;
}

body.front-page.project-mode.project-storyboard-step .storyboard-segment-prompt-modal {
  width: min(800px, calc(100vw - 48px));
}

body.front-page.project-mode.project-storyboard-step .segment-prompt-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

body.front-page.project-mode.project-storyboard-step .segment-prompt-head h3 {
  margin: 0;
  color: #f8fafc;
}

body.front-page.project-mode.project-storyboard-step #storyboardSegmentPromptText {
  max-height: 480px;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #1a1c20;
  color: #f8fafc;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Step 3 visual assets: keep the App workflow panel in the main work area. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-stage {
  grid-template-rows: 34px 42px minmax(0, 1fr) !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel {
  grid-row: 3 !important;
  align-self: stretch !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto auto minmax(54px, 1fr) !important;
  align-content: start !important;
  gap: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-note {
  min-height: 40px !important;
  padding: 10px 18px !important;
  display: flex !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row {
  min-height: 40px !important;
  margin-top: 0 !important;
  padding: 0 18px !important;
  flex-wrap: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row span,
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row .link-like {
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row select {
  min-width: 240px !important;
  flex: 1 1 auto !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-sections {
  min-height: 0 !important;
  max-height: min(430px, calc(100vh - 360px)) !important;
  overflow: auto !important;
  align-self: start !important;
  align-content: start !important;
  grid-auto-rows: max-content !important;
  padding: 14px 18px !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-panel-actions.centered {
  min-height: 54px !important;
  align-self: end !important;
  justify-content: center !important;
  padding: 8px 0 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-panel-actions.centered button {
  min-width: 74px !important;
  height: 34px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card input {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-modal {
  position: relative !important;
  width: min(1500px, calc(100vw - 210px)) !important;
  height: min(620px, calc(100vh - 150px)) !important;
  max-width: none !important;
  display: grid !important;
  grid-template-rows: 38px 40px minmax(0, 1fr) !important;
  gap: 16px !important;
  padding: 22px 24px !important;
  background: #24262a;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-modal > .app-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 18px !important;
  float: none !important;
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-head,
body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 900;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-toolbar select {
  height: 32px;
  min-width: 0;
  flex: 0 0 250px;
  border: 1px solid #3a404b;
  border-radius: 5px;
  background: #202328;
  color: #f8fafc;
  padding: 0 10px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-toolbar .link-like {
  width: 92px;
  white-space: nowrap;
  text-align: left;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-toolbar .storyboard-next-btn {
  margin-left: auto;
  width: 88px !important;
  height: 34px !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 272px));
  align-content: start;
  gap: 16px;
  padding-right: 6px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-card {
  width: 100%;
  min-width: 0;
  min-height: 430px;
  display: grid;
  grid-template-rows: 28px minmax(150px, 1fr) 128px 32px;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #2b2e33;
  overflow: hidden;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-card strong {
  color: #f8fafc;
  text-align: center;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 7px;
  background: #24272d;
  color: #aeb7c8;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-empty span {
  font-size: 34px;
  line-height: 1;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-empty em {
  font-style: normal;
  color: #aeb7c8;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-result {
  min-width: 0;
  width: 100%;
  height: 100%;
  position: relative;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-preview {
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: block;
  border-radius: 7px;
  background: #111318;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-image-preview span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-download-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: #2388f5;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-download-btn:hover {
  background: #1673d6;
}

.storyboard-image-preview-modal {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.storyboard-image-preview-modal img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 6px;
  background: #111318;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-card textarea {
  min-height: 0;
  height: 128px;
  border: 1px solid #363b45;
  border-radius: 5px;
  background: #191a1c;
  color: #f8fafc;
  padding: 10px;
  line-height: 1.55;
  resize: none;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-one {
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: #1683f6;
  color: #fff;
  font-weight: 800;
}

body.front-page.project-mode.project-storyboard-step .storyboard-asset-generate-card.queued .storyboard-asset-generate-one {
  background: #2d3748;
  color: #93c5fd;
}

/* Match the desktop App controls for Step 3 asset sections. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head > div {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head button[data-asset-ai] {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid #1683f6 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #1683f6 !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head button[data-asset-add] {
  width: 22px !important;
  min-width: 22px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #c7ced8 !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

/* ZM compact launcher for Storyboard Step 1. Functions/IDs stay untouched. */
body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-stage {
  grid-template-rows: 36px 48px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 14px 22px 18px !important;
  background: #17181a !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-title-row {
  height: 32px !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-title-row h2 {
  font-size: 20px !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-steps {
  width: min(1360px, 100%) !important;
  grid-template-columns: 1.05fr 1fr 1.08fr 1.18fr !important;
  gap: 10px !important;
  align-self: center !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-step {
  grid-template-columns: 22px max-content minmax(36px, 1fr) !important;
  gap: 8px !important;
  color: #7d8796 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-step b {
  width: 22px !important;
  height: 22px !important;
  background: #2c3440 !important;
  color: #9aa5b5 !important;
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-step.active {
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-step.active b {
  background: linear-gradient(135deg, #ff2f73, #ff5b8f) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-step::after {
  background: #343941 !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-empty {
  min-height: 0 !important;
  align-content: start !important;
  justify-items: center !important;
  gap: 18px !important;
  padding-top: clamp(38px, 7vh, 84px) !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-empty-icon {
  width: 88px !important;
  height: 74px !important;
  opacity: .48 !important;
  filter: grayscale(.15) !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-start-actions {
  width: 294px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 38px !important;
  border: 1px solid #414956 !important;
  border-radius: 5px !important;
  background: #22252a !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-start-btn:hover {
  border-color: #ff3b78 !important;
  background: #2a2229 !important;
  color: #ff6f9d !important;
}

body.front-page.project-mode.project-storyboard-step:not(.storyboard-script-open):not(.storyboard-progress-open):not(.storyboard-result-open):not(.storyboard-style-open):not(.storyboard-assets-open):not(.storyboard-grid-open) .storyboard-start-btn:focus-visible {
  outline: 2px solid rgba(255, 47, 115, .55) !important;
  outline-offset: 2px !important;
}

/* Step 1 merged view: launcher on the left, generation settings on the right. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: 420px minmax(520px, 760px) minmax(0, 1fr) !important;
  grid-template-rows: 36px 48px minmax(0, 1fr) !important;
  gap: 8px 28px !important;
  padding: 14px 22px 18px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  grid-column: 1 / -1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 1 !important;
  grid-row: 3 !important;
  min-height: 0 !important;
  display: grid !important;
  align-content: start !important;
  justify-items: center !important;
  gap: 18px !important;
  padding-top: clamp(48px, 8vh, 92px) !important;
  background: transparent !important;
  border: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  width: 88px !important;
  height: 74px !important;
  opacity: .48 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  width: 294px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 38px !important;
  border: 1px solid #414956 !important;
  border-radius: 5px !important;
  background: #22252a !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  border-color: #ff3b78 !important;
  background: #2a2229 !important;
  color: #ff6f9d !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: min(760px, 100%) !important;
  justify-self: start !important;
  align-self: start !important;
  margin-top: 20px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-script {
  min-width: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-title {
  min-width: 0 !important;
  flex-wrap: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedTitle {
  max-width: 360px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: minmax(280px, 360px) minmax(460px, 1fr) !important;
    gap: 8px 18px !important;
  }
}

/* Final ZM visual polish for the merged Step 1 page. CSS only, no behavior changes. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: minmax(24px, 1fr) 318px minmax(620px, 700px) minmax(24px, 1fr) !important;
  grid-template-rows: 34px 48px minmax(0, 1fr) !important;
  gap: 10px 28px !important;
  padding: 14px 22px 18px !important;
  background:
    linear-gradient(180deg, rgba(255, 47, 115, .025), rgba(255, 47, 115, 0) 180px),
    #17181a !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  grid-column: 1 / -1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row h2 {
  color: #ffffff !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  width: 100% !important;
  grid-template-columns: 1fr 1fr 1.05fr 1.12fr !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step {
  grid-template-columns: 22px max-content minmax(44px, 1fr) !important;
  color: #778292 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step b {
  width: 22px !important;
  height: 22px !important;
  background: #2b3441 !important;
  color: #98a4b5 !important;
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active {
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active b {
  background: linear-gradient(135deg, #ff2f73, #ff5b8f) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step::after {
  background: #343943 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 318px !important;
  min-height: 300px !important;
  align-self: start !important;
  align-content: start !important;
  justify-items: center !important;
  gap: 20px !important;
  margin-top: 50px !important;
  padding: 32px 22px 24px !important;
  border: 1px solid #2d333d !important;
  border-radius: 8px !important;
  background: #1d1f24 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  width: 92px !important;
  height: 78px !important;
  opacity: .58 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  height: 40px !important;
  border: 1px solid #3d4552 !important;
  border-radius: 6px !important;
  background: #24272d !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  border-color: #ff3b78 !important;
  background: #2c222b !important;
  color: #ff7aa5 !important;
  transform: translateY(-1px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 3 !important;
  grid-row: 3 !important;
  width: min(700px, 100%) !important;
  min-height: 300px !important;
  justify-self: start !important;
  align-self: start !important;
  grid-template-rows: 34px auto auto 42px !important;
  gap: 16px !important;
  margin-top: 50px !important;
  padding: 20px 22px 22px !important;
  border: 1px solid #2d333d !important;
  border-radius: 8px !important;
  background: #1d1f24 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-title {
  height: 32px !important;
  padding-bottom: 4px !important;
  gap: 10px !important;
  border-bottom: 1px solid #2c323c !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-file-icon {
  color: #ff477f !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedTitle {
  max-width: 420px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedDuration {
  color: #c8d1df !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected {
  margin-left: auto !important;
  color: #ff477f !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  display: grid !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  height: 42px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  padding: 3px !important;
  border: 1px solid #313844 !important;
  border-radius: 8px !important;
  background: #22252b !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button {
  height: 34px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #8f9aad !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button.active {
  background: #ff2f73 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(255, 47, 115, .24) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  height: 40px !important;
  border: 1px solid #323946 !important;
  border-radius: 6px !important;
  background: #22252b !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field input {
  height: 38px !important;
  color: #ffffff !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field span {
  color: #ffffff !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row {
  align-items: center !important;
  gap: 9px !important;
  color: #9aa5b5 !important;
  font-weight: 750 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row button {
  min-width: 56px !important;
  height: 34px !important;
  border: 1px solid #384150 !important;
  border-radius: 6px !important;
  background: #23262c !important;
  color: #ffffff !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row button:hover {
  border-color: #ff477f !important;
  color: #ff7aa5 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block h3 {
  margin-bottom: 10px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 66px !important;
  gap: 14px !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row select {
  height: 40px !important;
  border: 1px solid #323946 !important;
  border-radius: 6px !important;
  background: #22252b !important;
  color: #ffffff !important;
  font-weight: 750 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row .link-like {
  color: #ff5b8f !important;
  text-align: left !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  justify-self: center !important;
  width: 86px !important;
  height: 38px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(255, 47, 115, .28) !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: minmax(260px, 320px) minmax(480px, 1fr) !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
    grid-column: 1 !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
  }
}

/* ZM Step 1 rebuild: one connected workspace, CSS-only so functions stay intact. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: minmax(18px, 1fr) 292px 760px minmax(18px, 1fr) !important;
  grid-template-rows: 34px 48px minmax(0, 1fr) !important;
  column-gap: 0 !important;
  row-gap: 10px !important;
  padding: 14px 20px 18px !important;
  background: #17181a !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-help {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row {
  grid-column: 1 / -1 !important;
  height: 32px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row h2 {
  color: #ffffff !important;
  font-size: 20px !important;
  letter-spacing: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  grid-column: 1 / -1 !important;
  height: 42px !important;
  grid-template-columns: 1fr 1fr 1.05fr 1.1fr !important;
  gap: 12px !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step {
  grid-template-columns: 22px max-content minmax(40px, 1fr) !important;
  font-size: 13px !important;
  color: #7b8491 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step b {
  width: 22px !important;
  height: 22px !important;
  background: #2c3440 !important;
  color: #9aa6b7 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active b {
  background: #ff2f73 !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active {
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step::after {
  background: #343943 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  align-self: start !important;
  margin-top: 44px !important;
  min-height: 390px !important;
  box-shadow: 0 22px 58px rgba(0, 0, 0, .22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 292px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 20px !important;
  padding: 28px 22px !important;
  border: 1px solid #303744 !important;
  border-right: 0 !important;
  border-radius: 8px 0 0 8px !important;
  background: #1b1d22 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  width: 82px !important;
  height: 68px !important;
  opacity: .42 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  width: 100% !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  height: 38px !important;
  border: 1px solid #3f4857 !important;
  border-radius: 5px !important;
  background: #23262c !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  border-color: #ff2f73 !important;
  background: #2b222a !important;
  color: #ff79a4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 3 !important;
  grid-row: 3 !important;
  width: 760px !important;
  display: grid !important;
  grid-template-rows: 40px auto auto 42px !important;
  gap: 16px !important;
  padding: 22px 26px !important;
  border: 1px solid #303744 !important;
  border-radius: 0 8px 8px 0 !important;
  background: #1d2026 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-title {
  height: 38px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid #323946 !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-file-icon {
  width: 8px !important;
  height: 18px !important;
  flex: 0 0 8px !important;
  border-radius: 99px !important;
  background: #ff2f73 !important;
  color: transparent !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedTitle {
  max-width: 520px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedDuration {
  color: #d6deea !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected {
  width: 26px !important;
  height: 26px !important;
  margin-left: auto !important;
  border: 1px solid #4a2333 !important;
  border-radius: 999px !important;
  background: rgba(255, 47, 115, .08) !important;
  color: transparent !important;
  font-size: 0 !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected::before {
  content: "x" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #ff6f9d !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  height: 42px !important;
  padding: 3px !important;
  border: 1px solid #333b48 !important;
  border-radius: 7px !important;
  background: #22262d !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button {
  height: 34px !important;
  border-radius: 5px !important;
  color: #9ba6b7 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button.active {
  background: #ff2f73 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(255, 47, 115, .22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  height: 42px !important;
  border: 1px solid #333b48 !important;
  border-radius: 6px !important;
  background: #22262d !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field input {
  height: 40px !important;
  padding-left: 16px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field span {
  padding-right: 18px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row {
  gap: 10px !important;
  color: #a8b2c2 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row button {
  min-width: 54px !important;
  height: 34px !important;
  border: 1px solid #3b4554 !important;
  border-radius: 5px !important;
  background: #23272e !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block h3 {
  margin: 2px 0 10px !important;
  color: #ffffff !important;
  font-size: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row {
  grid-template-columns: minmax(0, 1fr) 56px !important;
  gap: 16px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row select {
  height: 42px !important;
  border: 1px solid #333b48 !important;
  border-radius: 6px !important;
  background: #22262d !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row .link-like {
  color: #ff5b8f !important;
  line-height: 1.25 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  justify-self: end !important;
  width: 96px !important;
  height: 38px !important;
  margin-right: 0 !important;
  border-radius: 6px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(255, 47, 115, .24) !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: 280px minmax(520px, 1fr) !important;
    column-gap: 0 !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row,
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
    grid-column: 1 / -1 !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
    grid-column: 1 !important;
    width: 280px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
    width: 100% !important;
  }
}

/* Custom ZM storyboard console, intentionally not App-like. CSS only. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: minmax(16px, 1fr) 240px 820px minmax(16px, 1fr) !important;
  grid-template-rows: 32px 42px minmax(0, 1fr) !important;
  gap: 12px 0 !important;
  padding: 14px 24px 18px !important;
  background: #151618 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row {
  grid-column: 1 / -1 !important;
  height: 30px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row h2 {
  color: #f8fafc !important;
  font-size: 19px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  grid-column: 1 / -1 !important;
  height: 38px !important;
  align-self: center !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step {
  grid-template-columns: 22px max-content minmax(24px, 1fr) !important;
  gap: 8px !important;
  color: #768293 !important;
  font-size: 13px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step b {
  background: #2a3340 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active b {
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  margin-top: 38px !important;
  min-height: 330px !important;
  border-color: #2c3340 !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .2) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  width: 240px !important;
  align-content: start !important;
  justify-items: stretch !important;
  gap: 16px !important;
  padding: 22px 18px !important;
  border-right: 0 !important;
  border-radius: 8px 0 0 8px !important;
  background: #1a1c21 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid #323a47 !important;
  border-radius: 7px !important;
  background: #202329 !important;
  color: #eef2f7 !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  border-color: #ff2f73 !important;
  background: #2a2028 !important;
  color: #ff80a8 !important;
  transform: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 3 !important;
  width: 820px !important;
  grid-template-rows: 42px 114px 80px 42px !important;
  gap: 14px !important;
  padding: 22px 24px !important;
  border-left: 1px solid #232933 !important;
  border-radius: 0 8px 8px 0 !important;
  background: #1d2026 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-title {
  height: 42px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #303744 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-file-icon {
  width: 6px !important;
  height: 22px !important;
  flex-basis: 6px !important;
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedTitle {
  max-width: 560px !important;
  font-size: 15px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  display: grid !important;
  grid-template-columns: 1fr 190px !important;
  grid-template-rows: 40px 40px !important;
  gap: 12px 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  grid-column: 1 / -1 !important;
  height: 40px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button {
  height: 32px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  grid-column: 1 !important;
  height: 40px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row {
  grid-column: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row span {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row button {
  min-width: 0 !important;
  width: 100% !important;
  height: 32px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block {
  align-self: start !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block h3 {
  margin: 0 0 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 64px !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row select {
  height: 40px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row .link-like {
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  justify-self: end !important;
  align-self: end !important;
  width: 112px !important;
  height: 40px !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: 220px minmax(560px, 1fr) !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
    grid-column: 1 !important;
    width: 220px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
    width: 100% !important;
  }
}

/* ZM web-native storyboard step 1: toolbar + wide control desk, not App-card layout. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  height: calc(100vh - 76px) !important;
  grid-template-columns: minmax(18px, 1fr) minmax(900px, 1180px) minmax(18px, 1fr) !important;
  grid-template-rows: 34px 44px 56px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 14px 22px 18px !important;
  background: #151618 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  height: 32px !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row h2 {
  color: #f8fafc !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-help {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  grid-column: 2 !important;
  grid-row: 2 !important;
  width: 100% !important;
  height: 40px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 12px !important;
  border: 1px solid #2b313b !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
  color: #8c96a6 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step::after {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step b {
  width: 20px !important;
  height: 20px !important;
  background: #303846 !important;
  color: #a8b2c2 !important;
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active {
  border-color: rgba(255, 47, 115, .65) !important;
  background: rgba(255, 47, 115, .11) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-step.active b {
  background: #ff2f73 !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 100% !important;
  min-height: 0 !important;
  height: 56px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  width: 100% !important;
  height: 56px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
  color: #f8fafc !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  border-color: #ff2f73 !important;
  background: rgba(255, 47, 115, .1) !important;
  color: #ff7aa5 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 2 !important;
  grid-row: 4 !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 20px 0 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  grid-template-rows: 44px 96px 78px 44px !important;
  gap: 16px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-script {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #2b313b !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-title {
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-file-icon {
  width: 6px !important;
  height: 22px !important;
  flex: 0 0 6px !important;
  border-radius: 999px !important;
  background: #ff2f73 !important;
  color: transparent !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedTitle {
  max-width: 620px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardSelectedDuration {
  color: #cbd5e1 !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected {
  width: 28px !important;
  height: 28px !important;
  margin-left: auto !important;
  border: 1px solid rgba(255, 47, 115, .35) !important;
  border-radius: 7px !important;
  background: rgba(255, 47, 115, .08) !important;
  color: transparent !important;
  font-size: 0 !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected::before {
  content: "x" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #ff78a4 !important;
  font-size: 15px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  grid-column: 1 !important;
  grid-row: 2 / span 2 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 180px !important;
  grid-template-rows: 42px 42px 40px !important;
  gap: 12px !important;
  min-width: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  height: 42px !important;
  padding: 3px !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button {
  height: 34px !important;
  border-radius: 5px !important;
  color: #98a4b5 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs button.active {
  background: #ff2f73 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  grid-column: 1 !important;
  grid-row: 2 !important;
  height: 42px !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field input {
  height: 40px !important;
  padding-left: 16px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field span {
  padding-right: 18px !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row {
  grid-column: 2 !important;
  grid-row: 2 / span 2 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 36px !important;
  gap: 8px !important;
  align-content: start !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row span {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row button {
  min-width: 0 !important;
  width: 100% !important;
  height: 36px !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
  color: #f8fafc !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block {
  grid-column: 1 !important;
  grid-row: 4 !important;
  align-self: end !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block h3 {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 72px !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row select {
  height: 42px !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
  color: #ffffff !important;
  font-weight: 850 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row .link-like {
  min-width: 0 !important;
  height: 42px !important;
  color: #ff5b8f !important;
  font-weight: 900 !important;
  text-align: left !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  grid-column: 2 !important;
  grid-row: 4 !important;
  justify-self: end !important;
  align-self: end !important;
  width: 132px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: 16px minmax(780px, 1fr) 16px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps,
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty,
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
  }
}

/* Hide the Step 1 progress strip on the ZM storyboard entry page. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-rows: 34px 56px minmax(0, 1fr) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-row: 2 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-row: 3 !important;
}

/* Hide direct text entry from the storyboard source toolbar. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardDirectInputBtn {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Keep only the custom duration mode in Step 1. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardByGridTab {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  grid-template-columns: 1fr !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-quick-row {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  grid-template-columns: minmax(0, 1fr) 180px !important;
  grid-template-rows: 42px 42px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field::before {
  content: "自定? !important;
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #ff7aa5 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  pointer-events: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field input {
  padding-left: 68px !important;
  text-align: right !important;
}

/* Duration layout: keep script seconds, add a separate custom input. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  grid-template-columns: minmax(0, 1fr) 220px !important;
  grid-template-rows: 42px 42px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  grid-column: 1 !important;
  grid-row: 2 !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field::before {
  content: "剧本时长" !important;
  left: 14px !important;
  color: #9aa6b7 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field input {
  padding-left: 88px !important;
  text-align: left !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-custom-field {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field {
  grid-column: 2 !important;
  grid-row: 2 !important;
  height: 42px !important;
  display: grid !important;
  grid-template-columns: 58px minmax(82px, 1fr) 26px !important;
  align-items: center !important;
  border: 1px solid #303744 !important;
  border-radius: 7px !important;
  background: #1d2026 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.storyboard-script-open .storyboard-custom-field span,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field span {
  color: #ff7aa5 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field input {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field input::-webkit-outer-spin-button,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field input[type="number"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field input::placeholder {
  color: #657084 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field em {
  color: #ffffff !important;
  font-style: normal !important;
  font-weight: 900 !important;
  text-align: center !important;
}

/* Generated full-screen background for the ZM storyboard workspace. */
body.front-page.project-mode.project-storyboard-step .storyboard-stage {
  position: relative !important;
  overflow: hidden !important;
  background: #121316 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-stage::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(180deg, rgba(12, 13, 15, .30), rgba(12, 13, 15, .42)),
    radial-gradient(circle at 50% 18%, rgba(255, 47, 115, .12), transparent 36%),
    url("/assets/zm-storyboard-bg.png") center / cover no-repeat !important;
  opacity: .88 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-stage::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(10, 11, 13, .22) !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-stage > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Align the storyboard source toolbar and duration controls to one content grid. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  width: min(1060px, 100%) !important;
  justify-self: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-template-columns: minmax(0, 1fr) 210px 36px !important;
  grid-template-rows: 36px 42px 42px 78px 44px !important;
  gap: 10px 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-script {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-delete-selected {
  grid-column: 3 !important;
  justify-self: end !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  grid-column: 1 / 3 !important;
  grid-row: 2 / span 2 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 210px !important;
  grid-template-rows: 42px 42px !important;
  gap: 10px 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-field {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-custom-field {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block {
  grid-column: 1 / 3 !important;
  grid-row: 4 !important;
  align-self: end !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  grid-column: 3 !important;
  grid-row: 5 !important;
  justify-self: end !important;
}

/* Hide add-more model link on storyboard entry page. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row .link-like {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-row {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Final alignment pass: one shared right edge for toolbar, title, mode bar and duration row. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  width: min(1060px, 100%) !important;
  justify-self: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-template-columns: minmax(0, 1fr) 220px !important;
  grid-template-rows: 36px 42px 42px 76px 44px !important;
  gap: 10px 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-selected-script,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block {
  grid-column: 1 / -1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-card {
  grid-row: 2 / span 2 !important;
  grid-template-columns: minmax(0, 1fr) 220px !important;
  grid-template-rows: 42px 42px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-config-tabs {
  grid-column: 1 / -1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-model-block {
  grid-row: 4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-next-btn {
  grid-column: 2 !important;
  grid-row: 5 !important;
}

/* ZM web-native picker modals for script/storyboard sources. Function bindings unchanged. */
body.front-page #storyboardScriptPickerModal,
body.front-page #storyboardDocPickerModal {
  background: rgba(5, 6, 8, .72) !important;
  backdrop-filter: blur(10px) !important;
}

body.front-page #storyboardScriptPickerModal .app-modal,
body.front-page #storyboardDocPickerModal .app-modal {
  width: min(1120px, calc(100vw - 76px)) !important;
  max-height: min(720px, calc(100vh - 90px)) !important;
  display: grid !important;
  grid-template-rows: 42px minmax(0, 1fr) 52px !important;
  gap: 16px !important;
  padding: 22px 24px 20px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(33, 36, 43, .96), rgba(22, 24, 29, .96)),
    rgba(22, 24, 29, .96) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .54) !important;
  color: #f8fafc !important;
  overflow: hidden !important;
}

body.front-page #storyboardDocPickerModal .app-modal {
  width: min(980px, calc(100vw - 76px)) !important;
}

body.front-page #storyboardScriptPickerModal .app-modal-close,
body.front-page #storyboardDocPickerModal .app-modal-close {
  position: absolute !important;
  top: 20px !important;
  right: 22px !important;
  float: none !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 47, 115, .35) !important;
  border-radius: 8px !important;
  background: rgba(255, 47, 115, .08) !important;
  color: transparent !important;
  font-size: 0 !important;
  cursor: pointer !important;
}

body.front-page #storyboardScriptPickerModal .app-modal-close::before,
body.front-page #storyboardDocPickerModal .app-modal-close::before {
  content: "x" !important;
  color: #ff7aa5 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.front-page #storyboardScriptPickerModal h3,
body.front-page #storyboardDocPickerModal h3 {
  height: 42px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

body.front-page #storyboardScriptPickerModal h3::before,
body.front-page #storyboardDocPickerModal h3::before {
  content: "" !important;
  width: 6px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #ff2f73 !important;
}

body.front-page #storyboardScriptPickerModal .app-table-wrap,
body.front-page #storyboardDocPickerModal .app-table-wrap {
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding-right: 4px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table,
body.front-page #storyboardDocPickerModal .app-pick-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
  table-layout: fixed !important;
  color: #e5e7eb !important;
  font-size: 14px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table thead th,
body.front-page #storyboardDocPickerModal .app-pick-table thead th {
  height: 34px !important;
  padding: 0 12px !important;
  border: 0 !important;
  background: transparent !important;
  color: #8f9aac !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: left !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tbody tr,
body.front-page #storyboardDocPickerModal .app-pick-table tbody tr {
  cursor: pointer !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tbody td,
body.front-page #storyboardDocPickerModal .app-pick-table tbody td {
  height: 48px !important;
  padding: 0 12px !important;
  border-top: 1px solid #2c3440 !important;
  border-bottom: 1px solid #2c3440 !important;
  background: rgba(24, 27, 33, .88) !important;
  color: #f3f6fb !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tbody td:first-child,
body.front-page #storyboardDocPickerModal .app-pick-table tbody td:first-child {
  width: 42px !important;
  border-left: 1px solid #2c3440 !important;
  border-radius: 8px 0 0 8px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tbody td:last-child,
body.front-page #storyboardDocPickerModal .app-pick-table tbody td:last-child {
  border-right: 1px solid #2c3440 !important;
  border-radius: 0 8px 8px 0 !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tbody tr:hover td,
body.front-page #storyboardDocPickerModal .app-pick-table tbody tr:hover td {
  border-color: rgba(255, 47, 115, .38) !important;
  background: rgba(255, 47, 115, .08) !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table tr.selected td,
body.front-page #storyboardDocPickerModal .app-pick-table tr.selected td {
  border-color: rgba(255, 47, 115, .72) !important;
  background: rgba(255, 47, 115, .16) !important;
  color: #ffffff !important;
}

body.front-page #storyboardScriptPickerModal .app-radio,
body.front-page #storyboardDocPickerModal .app-radio {
  width: 16px !important;
  height: 16px !important;
  border: 1px solid #687386 !important;
  border-radius: 999px !important;
  background: #15171c !important;
}

body.front-page #storyboardScriptPickerModal .app-radio.checked,
body.front-page #storyboardDocPickerModal .app-radio.checked {
  border-color: #ff2f73 !important;
  box-shadow: inset 0 0 0 4px #15171c !important;
  background: #ff2f73 !important;
}

body.front-page #storyboardScriptPickerModal .app-table-clip,
body.front-page #storyboardDocPickerModal .app-table-clip {
  max-width: none !important;
}

body.front-page #storyboardScriptPickerModal .app-empty-row,
body.front-page #storyboardDocPickerModal .app-empty-row {
  height: 140px !important;
  color: #9aa6b7 !important;
  text-align: center !important;
}

body.front-page #storyboardScriptPickerModal .app-modal-actions,
body.front-page #storyboardDocPickerModal .app-modal-actions {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #2b313b !important;
}

body.front-page #storyboardScriptPickerModal .app-modal-actions button,
body.front-page #storyboardDocPickerModal .app-modal-actions button {
  min-width: 92px !important;
  height: 38px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page #storyboardScriptPickerModal .app-modal-actions button.secondary,
body.front-page #storyboardDocPickerModal .app-modal-actions button.secondary {
  border: 1px solid #384252 !important;
  background: #20242b !important;
  color: #d7deea !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table th:nth-child(1),
body.front-page #storyboardDocPickerModal .app-pick-table th:nth-child(1) {
  width: 42px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table th:nth-child(2),
body.front-page #storyboardDocPickerModal .app-pick-table th:nth-child(2) {
  width: 150px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table th:nth-child(3),
body.front-page #storyboardDocPickerModal .app-pick-table th:nth-child(3) {
  width: 88px !important;
}

body.front-page #storyboardScriptPickerModal .app-pick-table th:nth-child(6),
body.front-page #storyboardDocPickerModal .app-pick-table th:nth-child(6) {
  width: 86px !important;
}

/* Step 1 source navigation: left nav + right content workspace. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: minmax(18px, 1fr) 230px minmax(720px, 900px) minmax(18px, 1fr) !important;
  grid-template-rows: 34px minmax(0, 1fr) !important;
  gap: 18px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-title-row {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  grid-row: 2 !important;
  width: 230px !important;
  height: max-content !important;
  justify-self: end !important;
  align-self: start !important;
  margin: 22px 0 0 !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
  background: rgba(20, 23, 29, .78) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22) !important;
  backdrop-filter: blur(8px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  height: auto !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  height: 44px !important;
  text-align: left !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  background: rgba(29, 32, 38, .92) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover {
  background: rgba(255, 47, 115, .12) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 3 !important;
  grid-row: 2 !important;
  width: min(900px, 100%) !important;
  justify-self: start !important;
  align-self: start !important;
  margin: 22px 0 0 !important;
  padding: 0 !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: 210px minmax(620px, 1fr) !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
    grid-column: 1 !important;
    width: 210px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
    width: 100% !important;
  }
}

/* Final Step 1 layout: left source nav, right changing content area. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
  grid-template-columns: minmax(14px, 1fr) 228px minmax(680px, 960px) minmax(14px, 1fr) !important;
  grid-template-rows: 34px minmax(0, 1fr) !important;
  gap: 16px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
  grid-column: 2 !important;
  grid-row: 2 !important;
  width: 228px !important;
  height: auto !important;
  min-height: 0 !important;
  justify-self: end !important;
  align-self: start !important;
  margin: 18px 0 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px !important;
  background: rgba(17, 19, 24, .82) !important;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .24) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty-icon {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  border-radius: 8px !important;
  background: rgba(28, 31, 38, .92) !important;
  color: #e9edf5 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: left !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn.active {
  border-color: rgba(255, 47, 115, .58) !important;
  background: linear-gradient(90deg, rgba(255, 47, 115, .22), rgba(255, 47, 115, .08)) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn::before {
  content: "" !important;
  width: 4px !important;
  height: 18px !important;
  margin-right: 9px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .18) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn.active::before,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-start-btn:hover::before {
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open #storyboardDirectInputBtn {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
  grid-column: 3 !important;
  grid-row: 2 !important;
  width: min(960px, 100%) !important;
  min-height: 0 !important;
  justify-self: start !important;
  align-self: start !important;
  margin: 18px 0 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-selected-script,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-config-card,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-model-block,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-next-btn {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-script-panel {
  display: block !important;
  padding: 0 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-panel {
  width: 100% !important;
  height: min(560px, calc(100vh - 176px)) !important;
  min-height: 420px !important;
  max-height: calc(100vh - 176px) !important;
  display: grid !important;
  grid-template-rows: 42px minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 18px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(30, 33, 41, .94), rgba(18, 20, 25, .94)),
    rgba(18, 20, 25, .94) !important;
  box-shadow: 0 22px 64px rgba(0, 0, 0, .28) !important;
  color: #f8fafc !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-panel.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-head strong {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-head strong::before {
  content: "" !important;
  width: 6px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-head button,
body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-modal-actions button.secondary {
  height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .06) !important;
  color: #d8deea !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 48px !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-table-wrap {
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
  table-layout: fixed !important;
  color: #e8edf6 !important;
  font-size: 13px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table th {
  height: 32px !important;
  padding: 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: #8f9aac !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: left !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table td {
  height: 48px !important;
  padding: 0 10px !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  background: rgba(25, 28, 35, .9) !important;
  color: #f3f6fb !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table td:first-child {
  width: 38px !important;
  border-left: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px 0 0 8px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 0 8px 8px 0 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table tr:hover td,
body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table tr.selected td {
  border-color: rgba(255, 47, 115, .62) !important;
  background: rgba(255, 47, 115, .14) !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-radio {
  width: 15px !important;
  height: 15px !important;
  display: inline-block !important;
  border: 1px solid #657083 !important;
  border-radius: 999px !important;
  background: #15171c !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-radio.checked {
  border-color: #ff2f73 !important;
  box-shadow: inset 0 0 0 4px #15171c !important;
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-modal-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-modal-actions button:not(.secondary) {
  height: 36px !important;
  min-width: 92px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table th:nth-child(1) {
  width: 38px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table th:nth-child(2) {
  width: 150px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table th:nth-child(3) {
  width: 78px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-inline-picker-view .app-pick-table th:nth-child(6) {
  width: 78px !important;
}

/* Existing-script picker: script cards on the left, selected episode detail on the right. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView {
  grid-template-rows: minmax(0, 1fr) 48px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-inline-picker-panel {
  height: min(610px, calc(100vh - 134px)) !important;
  max-height: calc(100vh - 134px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 0 !important;
  border-color: rgba(255, 255, 255, .1) !important;
  border-radius: 8px !important;
  background: rgba(12, 14, 18, .9) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-inline-picker-head {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView > .app-table-wrap {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  height: 48px !important;
  padding: 8px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions .secondary {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #confirmStoryboardScriptPickInlineBtn {
  min-width: 170px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master-list {
  min-height: 0 !important;
  padding: 0 10px 0 0 !important;
  overflow: auto !important;
  border-right: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-card {
  min-height: 94px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
  padding: 12px 12px 9px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px !important;
  background: rgba(31, 34, 42, .86) !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-card:hover,
body.front-page.project-mode.project-storyboard-step .script-pick-card.active {
  border-color: rgba(255, 47, 115, .88) !important;
  background: linear-gradient(180deg, rgba(255, 47, 115, .13), rgba(31, 34, 42, .92)) !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-mark,
body.front-page.project-mode.project-storyboard-step .script-detail-logo {
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, #ff2f73, #7e153a) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-main {
  min-width: 0 !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-main strong {
  display: block !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-main em {
  display: block !important;
  margin-top: 2px !important;
  color: #ff6b9c !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-main p {
  margin: 8px 0 0 !important;
  color: #cbd3df !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-actions {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  align-items: center !important;
  margin: 8px -12px -9px !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
  color: #8290a3 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-actions button {
  height: 28px !important;
  border: 0 !important;
  background: transparent !important;
  color: #8b96a8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-actions span {
  width: 1px !important;
  height: 16px !important;
  background: rgba(255, 255, 255, .12) !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-actions button:hover {
  color: #ff7aa5 !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-card.active .script-pick-actions {
  color: #ff8db4 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master-detail {
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
  gap: 10px !important;
  padding-left: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-head {
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 47, 115, .72) !important;
  border-radius: 8px !important;
  background: rgba(15, 17, 22, .92) !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-head strong {
  display: block !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-head span {
  display: block !important;
  margin-top: 2px !important;
  color: #ff6b9c !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-head em {
  min-width: 56px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255, 47, 115, .18) !important;
  color: #ffffff !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-fields {
  display: grid !important;
  grid-template-columns: 70px minmax(0, 1fr) 90px !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-fields label {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-fields span,
body.front-page.project-mode.project-storyboard-step .script-detail-box strong,
body.front-page.project-mode.project-storyboard-step .script-detail-body strong {
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-fields input {
  height: 30px !important;
  min-width: 0 !important;
  padding: 0 9px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 6px !important;
  background: rgba(8, 10, 14, .8) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-box {
  min-height: 86px !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 7px !important;
  background: rgba(20, 23, 29, .88) !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-box p {
  margin: 7px 0 0 !important;
  max-height: 48px !important;
  overflow: auto !important;
  color: #d8dee9 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-body {
  min-height: 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 8px !important;
  background: rgba(7, 9, 13, .9) !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .script-detail-body pre {
  height: calc(100% - 26px) !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.72 !important;
}

body.front-page.project-mode.project-storyboard-step .script-pick-empty,
body.front-page.project-mode.project-storyboard-step .script-detail-empty {
  padding: 18px !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 8px !important;
  background: rgba(20, 23, 29, .88) !important;
  color: #cbd3df !important;
}

@media (max-width: 1180px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-stage {
    grid-template-columns: 210px minmax(600px, 1fr) !important;
    grid-template-rows: 34px minmax(0, 1fr) !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-empty {
    grid-column: 1 !important;
    width: 210px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open .storyboard-script-panel {
    grid-column: 2 !important;
    width: 100% !important;
  }
}

/* Final source-page override: three left nav items, three full right-side pages. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-head {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-panel {
  height: min(560px, calc(100vh - 176px)) !important;
  max-height: calc(100vh - 176px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-inline-picker-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open .storyboard-inline-picker-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open .storyboard-inline-picker-panel {
  height: min(520px, calc(100vh - 200px)) !important;
  max-height: calc(100vh - 200px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-stage,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open .storyboard-stage,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open .storyboard-stage {
  grid-template-columns: minmax(8px, 1fr) 228px minmax(860px, 1180px) minmax(8px, 1fr) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open .storyboard-script-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open .storyboard-script-panel {
  width: min(1180px, 100%) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView > .app-table-wrap,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView > .app-table-wrap {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  height: 48px !important;
  padding: 8px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions .secondary,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions .secondary {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master-list {
  min-height: 0 !important;
  padding-right: 10px !important;
  overflow: auto !important;
  border-right: 1px solid rgba(255, 255, 255, .09) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-card {
  min-height: 94px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px !important;
  background: rgba(31, 34, 42, .86) !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-card:hover,
body.front-page.project-mode.project-storyboard-step .doc-pick-card.active {
  border-color: rgba(255, 47, 115, .88) !important;
  background: linear-gradient(180deg, rgba(255, 47, 115, .13), rgba(31, 34, 42, .92)) !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-doc-master-detail {
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 47, 115, .72) !important;
  border-radius: 8px !important;
  background: rgba(15, 17, 22, .92) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head strong,
body.front-page.project-mode.project-storyboard-step .doc-detail-preview strong,
body.front-page.project-mode.project-storyboard-step .doc-detail-grid strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop strong,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips span {
  color: #ffffff !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head span {
  display: block !important;
  margin-top: 2px !important;
  color: #ff6b9c !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-head em {
  min-width: 78px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255, 47, 115, .18) !important;
  color: #ffffff !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid article,
body.front-page.project-mode.project-storyboard-step .doc-detail-preview,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips article {
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 8px !important;
  background: rgba(20, 23, 29, .88) !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid article,
body.front-page.project-mode.project-storyboard-step .doc-detail-preview,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips article {
  padding: 14px !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-grid p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-hero p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-drop p,
body.front-page.project-mode.project-storyboard-step .storyboard-import-tips p {
  margin: 6px 0 0 !important;
  color: #cbd3df !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-preview {
  min-height: 0 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step .doc-detail-preview pre {
  height: calc(100% - 28px) !important;
  margin: 10px 0 0 !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  color: #f4f7fb !important;
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-page {
  grid-template-rows: auto minmax(180px, 1fr) auto !important;
  gap: 14px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero strong {
  font-size: 20px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-hero button {
  height: 38px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-drop {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  padding: 20px !important;
  border-style: dashed !important;
  border-color: rgba(255, 47, 115, .42) !important;
  background: rgba(255, 47, 115, .07) !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-drop span {
  width: 52px !important;
  height: 52px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: rgba(255, 47, 115, .18) !important;
  color: #ff7aa5 !important;
  font-size: 34px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-tips {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-import-tips strong {
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 8px !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
}

/* True EOF override: full page source layout. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage {
  width: 100% !important;
  min-height: calc(100vh - 78px) !important;
  height: calc(100vh - 78px) !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  grid-template-rows: 58px minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::before,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-stage::after {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 180px !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 18px 8px 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-title-row h2 {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-empty {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 180px !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 16px 8px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 47, 115, .85) !important;
  border-radius: 0 !important;
  background: rgba(10, 12, 16, .28) !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-script-panel {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 0 0 16px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-panel,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-picker-open .storyboard-inline-picker-view {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView {
  grid-template-rows: minmax(0, 1fr) 54px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-import-open #storyboardInlineImportView {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.front-page.project-mode.project-storyboard-step .storyboard-script-master,
body.front-page.project-mode.project-storyboard-step .storyboard-doc-master {
  height: 100% !important;
  min-height: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions {
  height: 54px !important;
  padding: 8px 0 0 !important;
}

/* TRUE FINAL EOF: only hide meta blocks on ȡо籾 page. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail .script-detail-fields,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail .script-detail-grid {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptDetail,
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open .storyboard-script-master-detail {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

/* TRUE FINAL EOF: source page bottom generation controls like config panel. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView {
  grid-template-rows: minmax(0, 1fr) 176px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  height: 176px !important;
  padding: 10px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .12) !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-panel {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 30px 40px 38px 42px !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-title span {
  width: 5px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-title strong {
  flex: 1 !important;
  margin-left: 10px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-mode {
  width: 100% !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields label {
  min-width: 0 !important;
  height: 38px !important;
  display: grid !important;
  grid-template-columns: 84px minmax(0, 1fr) 32px !important;
  align-items: center !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 6px !important;
  background: rgba(29, 33, 41, .92) !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields span {
  color: #dbe2ee !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields input {
  min-width: 0 !important;
  height: 30px !important;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  outline: none !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields em {
  color: #ffffff !important;
  font-style: normal !important;
  text-align: right !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-bottom {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 140px !important;
  gap: 12px !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-bottom select {
  width: 100% !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 6px !important;
  background: rgba(29, 33, 41, .95) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-bottom button {
  height: 40px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

/* TRUE FINAL EOF: keep source generation controls inside viewport. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView {
  grid-template-rows: minmax(0, 1fr) 150px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  height: 150px !important;
  padding: 6px 0 0 !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-panel {
  height: 144px !important;
  grid-template-rows: 24px 34px 34px 36px !important;
  gap: 5px !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-mode,
body.front-page.project-mode.project-storyboard-step .source-generate-bottom button {
  height: 34px !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-fields label,
body.front-page.project-mode.project-storyboard-step .source-generate-bottom select {
  height: 34px !important;
}

/* TRUE FINAL EOF: pull source generation controls above page bottom. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-script-open #storyboardInlineScriptPickerView .app-modal-actions {
  transform: translateY(-24px) !important;
}

/* TRUE FINAL EOF: make the pink generate mode bar shorter. */
body.front-page.project-mode.project-storyboard-step .source-generate-mode {
  height: 26px !important;
  min-height: 26px !important;
  line-height: 26px !important;
  padding: 0 !important;
  font-size: 13px !important;
}

body.front-page.project-mode.project-storyboard-step .source-generate-panel {
  grid-template-rows: 22px 26px 32px 34px !important;
  gap: 5px !important;
}

/* TRUE FINAL EOF: keep script body scroll exactly where user leaves it. */
body.front-page.project-mode.project-storyboard-step .script-detail-body {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  overscroll-behavior: contain !important;
}

/* TRUE FINAL EOF: script text owns its own scroll position. */
body.front-page.project-mode.project-storyboard-step #storyboardInlineScriptDetail .script-detail-body pre {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  overscroll-behavior: contain !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-card {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-delete {
  width: 46px !important;
  height: 26px !important;
  border: 1px solid rgba(255, 47, 115, .55) !important;
  border-radius: 6px !important;
  background: rgba(255, 47, 115, .12) !important;
  color: #ff6b9a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step .doc-pick-delete:hover {
  background: rgba(255, 47, 115, .22) !important;
  color: #ffffff !important;
}
/* TRUE FINAL EOF: ZM custom storyboard config/progress UI, functions unchanged. */
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-stage,
body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-stage {
  position: relative !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-title-row {
  position: absolute !important;
  left: 24px !important;
  top: 18px !important;
  height: 32px !important;
  z-index: 6 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-title-row h2,
body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-title-row h2 {
  font-size: 22px !important;
  line-height: 32px !important;
  letter-spacing: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-steps,
body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-empty {
  position: absolute !important;
  left: clamp(220px, 18vw, 352px) !important;
  top: 82px !important;
  width: 236px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px !important;
  display: grid !important;
  align-content: start !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 10px !important;
  background: rgba(12,15,22,.74) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(14px) !important;
  z-index: 4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-empty-icon {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn:first-child {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.045) !important;
  color: #f5f7fb !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: left !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn::before {
  content: "" !important;
  width: 4px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
  border-radius: 99px !important;
  background: rgba(255,255,255,.22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn.active,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn:hover {
  border-color: rgba(255,47,115,.62) !important;
  background: rgba(255,47,115,.12) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn.active::before,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-btn:hover::before {
  background: #ff2f73 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) #storyboardDirectInputBtn {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-script-panel {
  position: absolute !important;
  left: clamp(480px, 31vw, 598px) !important;
  top: 82px !important;
  right: clamp(220px, 18vw, 352px) !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 136px !important;
  grid-template-rows: 48px 96px 52px !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-selected-script {
  grid-column: 1 / 3 !important;
  height: 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 10px !important;
  background: rgba(11,14,20,.74) !important;
  backdrop-filter: blur(14px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-selected-title {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 6px minmax(0, auto) auto 34px !important;
  align-items: center !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-file-icon {
  width: 6px !important;
  height: 24px !important;
  border-radius: 99px !important;
  background: #ff2f73 !important;
  color: transparent !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) #storyboardSelectedTitle,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) #storyboardSelectedDuration {
  font-size: 15px !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-delete-selected {
  width: 34px !important;
  height: 34px !important;
  justify-self: end !important;
  border: 1px solid rgba(255,47,115,.45) !important;
  border-radius: 8px !important;
  background: rgba(255,47,115,.08) !important;
  color: transparent !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-delete-selected::after {
  content: "x" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #ff5b91 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-card {
  grid-column: 1 / 3 !important;
  min-height: 0 !important;
  height: 96px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 220px !important;
  grid-template-rows: 42px 42px !important;
  gap: 10px 12px !important;
  padding: 10px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 10px !important;
  background: rgba(12,15,22,.72) !important;
  backdrop-filter: blur(14px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-tabs {
  grid-column: 1 / 3 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  height: 42px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) #storyboardByGridTab,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-quick-row {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-tabs button,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-tabs button.active {
  height: 42px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-field,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-custom-field {
  height: 42px !important;
  display: grid !important;
  align-items: center !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.045) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-field {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  padding: 0 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-field::before {
  content: "????" !important;
  color: #9aa3b2 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-field input,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-custom-field input {
  min-width: 0 !important;
  height: 100% !important;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  outline: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-custom-field {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  padding: 0 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-custom-field span {
  color: #ff6b9a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-config-field span,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-custom-field em {
  color: #ffffff !important;
  font-style: normal !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-model-block {
  grid-column: 1 / 2 !important;
  height: 52px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: block !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-model-block h3,
body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-model-row .link-like {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-model-row {
  height: 52px !important;
  display: block !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-model-row select {
  width: 100% !important;
  height: 52px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px !important;
  background: rgba(12,15,22,.72) !important;
  color: #ffffff !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-next-btn {
  grid-column: 2 / 3 !important;
  width: 136px !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  align-self: stretch !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 28px rgba(255,47,115,.24) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel {
  position: absolute !important;
  left: clamp(320px, 24vw, 460px) !important;
  right: clamp(260px, 18vw, 360px) !important;
  top: 112px !important;
  min-height: 0 !important;
  height: 430px !important;
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  gap: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 5 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel .storyboard-selected-script {
  min-height: 0 !important;
  height: 100% !important;
  padding: 18px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 12px !important;
  background: rgba(12,15,22,.76) !important;
  backdrop-filter: blur(14px) !important;
  display: grid !important;
  align-content: start !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel .storyboard-selected-title {
  display: grid !important;
  grid-template-columns: 8px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel .storyboard-file-icon {
  width: 8px !important;
  height: 42px !important;
  border-radius: 99px !important;
  background: #ff2f73 !important;
  color: transparent !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open #storyboardProgressTitle {
  color: #ffffff !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-center {
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-columns: 170px minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  gap: 18px 22px !important;
  align-content: center !important;
  align-items: center !important;
  justify-items: stretch !important;
  padding: 26px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 12px !important;
  background: rgba(12,15,22,.76) !important;
  backdrop-filter: blur(14px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-ring {
  grid-row: 1 / 3 !important;
  width: 150px !important;
  height: 150px !important;
  justify-self: center !important;
  background: conic-gradient(#ff2f73 calc(var(--progress) * 1%), rgba(255,255,255,.12) 0) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 22px 46px rgba(255,47,115,.16) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-ring::after {
  inset: 10px !important;
  background: rgba(10,12,18,.96) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-ring span {
  color: #ffffff !important;
  font-size: 30px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open #storyboardProgressText {
  align-self: end !important;
  color: #ffffff !important;
  font-size: 19px !important;
  line-height: 1.5 !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-checks {
  align-self: start !important;
  display: grid !important;
  gap: 10px !important;
  color: #cfd6e3 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-checks span {
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.045) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-checks span::first-letter {
  color: #52e06f !important;
}

@media (max-width: 1100px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-empty,
  body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-script-panel,
  body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel {
    left: 18px !important;
    right: 18px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-empty {
    top: 64px !important;
    width: auto !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-start-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-script-open:not(.storyboard-inline-picker-open) .storyboard-script-panel {
    top: 216px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-progress-open .storyboard-progress-panel {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
}
/* TRUE FINAL EOF: ZM storyboard result editor redesign, function unchanged. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-stage {
  height: calc(100vh - 76px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 42px 1fr !important;
  gap: 12px !important;
  padding: 18px 24px 18px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-title-row {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-title-row h2 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 42px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-help,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-panel {
  grid-row: 2 !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 58px minmax(0, 1fr) 56px !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 12px !important;
  background: rgba(12,15,22,.76) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(16px) !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head {
  min-height: 0 !important;
  height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 8px 10px !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-selected-title {
  min-width: 0 !important;
  height: 42px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, auto) auto 34px !important;
  align-items: center !important;
  gap: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-file-icon {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #ff2f73, #b91454) !important;
  color: transparent !important;
  overflow: hidden !important;
  position: relative !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-file-icon::after {
  content: "ZM" !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open #storyboardResultTitle {
  min-width: 0 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open #storyboardResultCount {
  display: inline-flex !important;
  align-items: center !important;
  height: 26px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  background: rgba(255,47,115,.13) !important;
  color: #ff6b9a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-title-edit {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.05) !important;
  color: transparent !important;
  pointer-events: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions button {
  height: 38px !important;
  min-width: 72px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions #saveStoryboardResultBtn {
  border-color: #ff2f73 !important;
  background: #ff2f73 !important;
  box-shadow: 0 12px 28px rgba(255,47,115,.22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions #exportStoryboardResultBtn,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions #clearStoryboardResultBtn {
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.055) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table-wrap {
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 10px !important;
  background: rgba(7,9,13,.72) !important;
  scrollbar-color: rgba(255,47,115,.65) rgba(255,255,255,.08) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table {
  width: max(1480px, 100%) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #f8fafc !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  table-layout: fixed !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 4 !important;
  height: 38px !important;
  padding: 0 10px !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
  border-bottom: 1px solid rgba(255,255,255,.1) !important;
  background: rgba(25,29,38,.98) !important;
  color: #cbd5e1 !important;
  text-align: left !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td {
  height: 76px !important;
  padding: 8px 10px !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  vertical-align: top !important;
  background: rgba(15,18,25,.68) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table tr:nth-child(even) td {
  background: rgba(21,24,32,.7) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table tr:focus-within td {
  background: rgba(255,47,115,.075) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(1),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(1) { width: 34px !important; text-align: center !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(2),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(2) { width: 54px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(3),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(3) { width: 320px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(4) { width: 72px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(5),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(5) { width: 86px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(6),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(6) { width: 150px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(7),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(7) { width: 120px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(8),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(8) { width: 190px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(9),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(9) { width: 150px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(10),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(10) { width: 190px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(11),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(11) { width: 70px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(12),
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td:nth-child(12) {
  width: 76px !important;
  position: sticky !important;
  right: 0 !important;
  z-index: 3 !important;
  background: rgba(18,21,29,.98) !important;
  text-align: center !important;
}
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th:nth-child(12) { z-index: 5 !important; }

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea {
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #ffffff !important;
  font: inherit !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  outline: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input {
  height: 30px !important;
  padding: 0 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea {
  min-height: 44px !important;
  max-height: 88px !important;
  padding: 4px !important;
  overflow: auto !important;
  resize: vertical !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input:focus,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea:focus {
  border-color: rgba(255,47,115,.42) !important;
  background: rgba(0,0,0,.22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-expand {
  color: #7dd3fc !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-trash {
  width: 48px !important;
  min-width: 48px !important;
  height: 30px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,47,115,.48) !important;
  border-radius: 7px !important;
  background: rgba(255,47,115,.1) !important;
  color: #ff5b91 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-foot {
  height: 56px !important;
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) 112px !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 8px 0 !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .app-add-row {
  width: 112px !important;
  height: 38px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.055) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-pager {
  justify-self: center !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .pager-page,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .pager-arrow {
  min-width: 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .pager-page.active {
  border-color: #ff2f73 !important;
  background: rgba(255,47,115,.14) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open #storyboardJumpPage {
  width: 48px !important;
  height: 32px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 7px !important;
  background: rgba(255,255,255,.055) !important;
  color: #ffffff !important;
  text-align: center !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .result-next {
  width: 112px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: #ff2f73 !important;
  box-shadow: 0 12px 28px rgba(255,47,115,.24) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
/* TRUE FINAL EOF: hide storyboard step strip on result/editor workflow. */
body.front-page.project-mode.project-storyboard-step .storyboard-steps {
  display: none !important;
}
/* TRUE FINAL EOF: hide storyboard page title label. */
body.front-page.project-mode.project-storyboard-step .storyboard-title-row {
  display: none !important;
}
/* TRUE FINAL EOF: hide outer project step title on storyboard page. */
body.front-page.project-mode.project-storyboard-step #detailMeta,
body.front-page.project-mode.project-storyboard-step #detailStepName,
body.front-page.project-mode.project-storyboard-step #detailStepCode,
body.front-page.project-mode.project-storyboard-step #knowledgeStatus,
body.front-page.project-mode.project-storyboard-step #detailUpdatedAt {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step #projectDetailTab .detail-header,
body.front-page.project-mode.project-storyboard-step .detail-header {
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
/* TRUE FINAL EOF: project nav text badges and result back button. */
body.front-page.project-mode #mainNav .project-nav-step {
  gap: 8px !important;
}

body.front-page.project-mode #mainNav .project-nav-step::first-letter {
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-nav-actions {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .result-back {
  width: 88px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.06) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .result-back:hover {
  border-color: rgba(255,47,115,.45) !important;
  background: rgba(255,47,115,.11) !important;
}
/* TRUE FINAL EOF: polished SVG icons for top project nav. */
body.front-page.project-mode #mainNav .project-nav-step {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
}

body.front-page.project-mode #mainNav .project-nav-step .project-nav-icon {
  width: 17px !important;
  height: 17px !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
}

body.front-page.project-mode #mainNav .project-nav-step .project-nav-icon svg {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.front-page.project-mode #mainNav .project-nav-step span:not(.project-nav-icon) {
  line-height: 1 !important;
}
/* TRUE FINAL EOF: compact storyboard result top spacing. */
body.front-page.project-mode.project-storyboard-step #projectDetailTab > .detail-header {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-stage {
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding-top: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-panel {
  grid-row: 1 !important;
}
/* TRUE FINAL EOF: tighter storyboard result header. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-panel {
  grid-template-rows: 44px minmax(0, 1fr) 56px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 8px 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-selected-title {
  height: 34px !important;
  grid-template-columns: 28px minmax(0, auto) auto 28px !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-file-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-head .storyboard-file-icon::after {
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open #storyboardResultTitle {
  font-size: 15px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open #storyboardResultCount {
  height: 24px !important;
  padding: 0 9px !important;
  font-size: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions {
  height: 34px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-result-actions button {
  height: 32px !important;
  min-width: 64px !important;
  padding: 0 13px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
}
/* TRUE FINAL EOF: prevent hidden storyboard title from peeking below result panel. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open #projectDetailTab {
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-stage {
  height: calc(100vh - 84px) !important;
  max-height: calc(100vh - 84px) !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-title-row h2 {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
/* TRUE FINAL EOF: fit 9 storyboard rows per visible page. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td {
  height: 58px !important;
  padding: 5px 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input {
  height: 24px !important;
  padding: 0 3px !important;
  font-size: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 2px 3px !important;
  line-height: 1.35 !important;
  font-size: 12px !important;
  overflow: auto !important;
  resize: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-trash {
  height: 28px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th {
  height: 34px !important;
}
/* TRUE FINAL EOF: larger 9-row storyboard page without changing pagination. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td {
  height: 68px !important;
  padding: 7px 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input {
  height: 28px !important;
  font-size: 13px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 3px 4px !important;
  line-height: 1.45 !important;
  font-size: 13px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-trash {
  height: 32px !important;
}
/* TRUE FINAL EOF: slightly larger storyboard result rows while keeping 9 rows per page. */
body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table {
  font-size: 13.5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table th {
  height: 36px !important;
  font-size: 12.5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table td {
  height: 72px !important;
  padding: 8px 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table input {
  height: 29px !important;
  font-size: 13.5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-result-open .storyboard-app-table textarea {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
}
/* TRUE FINAL EOF: redesigned centered style selection step, functions unchanged. */
body.front-page.project-mode.project-storyboard-step.storyboard-style-open #projectDetailTab {
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-stage {
  height: calc(100vh - 84px) !important;
  max-height: calc(100vh - 84px) !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  padding: 28px 34px 26px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-panel {
  width: min(1060px, calc(100vw - 96px)) !important;
  min-height: min(560px, calc(100vh - 172px)) !important;
  margin: 0 auto !important;
  padding: 34px 36px 30px !important;
  border: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(17,20,28,.82), rgba(10,12,18,.70)) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06) !important;
  backdrop-filter: blur(12px) !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 30px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards {
  width: min(860px, 100%) !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 16px !important;
  align-self: center !important;
  justify-self: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards button {
  width: 100% !important;
  height: 112px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 12px !important;
  background: rgba(18,22,31,.78) !important;
  color: #f8fafc !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards button:hover {
  border-color: rgba(255,47,115,.52) !important;
  background: rgba(255,47,115,.10) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards button.active {
  border-color: #ff2f73 !important;
  background: linear-gradient(180deg, rgba(255,47,115,.28), rgba(255,47,115,.13)) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 38px rgba(255,47,115,.18), inset 0 0 0 1px rgba(255,47,115,.34) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-panel-actions.centered {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-panel-actions.centered button {
  height: 42px !important;
  min-width: 112px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open #backStoryboardScriptBtn {
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.06) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open #nextStoryboardAssetsBtn {
  border-color: #ff2f73 !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(255,47,115,.28) !important;
}

@media (max-width: 900px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards {
    grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  }
}
/* TRUE FINAL EOF: keep style step fully below top navigation. */
body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-stage {
  place-items: start center !important;
  padding-top: 42px !important;
  padding-bottom: 26px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-panel {
  min-height: 0 !important;
  height: auto !important;
  max-height: calc(100vh - 148px) !important;
  padding-top: 28px !important;
  padding-bottom: 26px !important;
  align-content: start !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-style-open .storyboard-style-cards {
  align-self: start !important;
  margin-top: 0 !important;
}
/* TRUE FINAL EOF: redesigned ZM reference asset step, functions unchanged. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #projectDetailTab {
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-stage {
  height: calc(100vh - 84px) !important;
  max-height: calc(100vh - 84px) !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  padding: 28px 34px 22px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel {
  width: min(1760px, calc(100vw - 48px)) !important;
  height: calc(100vh - 136px) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 18px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(17,20,28,.86), rgba(10,12,18,.74)) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06) !important;
  backdrop-filter: blur(12px) !important;
  display: grid !important;
  grid-template-columns: minmax(320px, .78fr) minmax(520px, 1.42fr) !important;
  grid-template-rows: 54px minmax(0, 1fr) 52px !important;
  grid-template-areas:
    "asset-note asset-model"
    "asset-sections asset-sections"
    "asset-actions asset-actions" !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel.hidden {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-note {
  grid-area: asset-note !important;
  min-height: 0 !important;
  height: 54px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.055) !important;
  color: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row {
  grid-area: asset-model !important;
  height: 54px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.055) !important;
  display: grid !important;
  grid-template-columns: auto minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  color: #dbe4f0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row span {
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row select {
  width: 100% !important;
  height: 36px !important;
  min-width: 0 !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 9px !important;
  background: rgba(10,12,18,.75) !important;
  color: #ffffff !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-asset-model-row .link-like {
  height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255,47,115,.36) !important;
  border-radius: 9px !important;
  background: rgba(255,47,115,.10) !important;
  color: #ff6d9b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-sections {
  grid-area: asset-sections !important;
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-sections section {
  min-height: 0 !important;
  height: 100% !important;
  padding: 16px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 14px !important;
  background: rgba(12,15,22,.72) !important;
  display: grid !important;
  grid-template-rows: 40px minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-sections section + section {
  border-top: 1px solid rgba(255,255,255,.09) !important;
  padding-top: 16px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head {
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head h4 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head h4::after {
  content: "" !important;
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  margin-left: 8px !important;
  border-radius: 999px !important;
  background: #ff2f73 !important;
  vertical-align: middle !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head > div {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head button[data-asset-ai] {
  width: 42px !important;
  min-width: 42px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid rgba(255,47,115,.50) !important;
  border-radius: 999px !important;
  background: rgba(255,47,115,.12) !important;
  color: #ff6d9b !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-section-head button[data-asset-add] {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.06) !important;
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 700 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-list {
  min-height: 0 !important;
  height: 100% !important;
  padding: 2px 4px 8px 2px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  gap: 14px !important;
  overflow: auto !important;
  scrollbar-color: rgba(255,47,115,.64) rgba(255,255,255,.08) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card,
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card.placeholder {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 112px 36px !important;
  gap: 8px !important;
  padding: 10px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.045) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box,
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card.placeholder .storyboard-upload-box {
  width: 100% !important;
  height: 112px !important;
  border: 1px dashed rgba(255,255,255,.30) !important;
  border-radius: 10px !important;
  background: rgba(10,12,18,.62) !important;
  color: #ffffff !important;
  font-size: 26px !important;
  display: grid !important;
  place-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box em {
  margin-top: -18px !important;
  color: #b9c4d4 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box.has-image {
  border-style: solid !important;
  border-color: rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.06) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box.has-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  background: #0c0f16 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box.has-image button {
  top: 7px !important;
  right: 7px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  border-color: rgba(255,255,255,.45) !important;
  background: rgba(0,0,0,.48) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-box.has-image em {
  margin: 0 !important;
  padding: 4px 6px !important;
  background: rgba(0,0,0,.58) !important;
  color: #ffffff !important;
  font-size: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card input[data-asset-name] {
  width: 100% !important;
  height: 36px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 9px !important;
  background: rgba(10,12,18,.62) !important;
  color: #ffffff !important;
  padding: 0 10px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-align: left !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-card.placeholder input[data-asset-name] {
  border: 1px solid rgba(255,255,255,.10) !important;
  background: rgba(255,255,255,.035) !important;
  color: #aeb8c7 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-remove {
  top: 4px !important;
  right: 4px !important;
  width: 26px !important;
  height: 26px !important;
  border: 1px solid rgba(255,47,115,.65) !important;
  border-radius: 999px !important;
  background: rgba(12,15,22,.92) !important;
  color: #ff6d9b !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-panel-actions.centered {
  grid-area: asset-actions !important;
  height: 52px !important;
  min-height: 0 !important;
  align-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 6px 0 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-panel-actions.centered button {
  min-width: 96px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #backStoryboardStyleBtn {
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.06) !important;
  color: #ffffff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #nextStoryboardGridBtn {
  border-color: #ff2f73 !important;
  background: #ff2f73 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(255,47,115,.28) !important;
}

@media (max-width: 1100px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel {
    grid-template-columns: 1fr !important;
    grid-template-rows: 54px 54px minmax(0, 1fr) 52px !important;
    grid-template-areas:
      "asset-note"
      "asset-model"
      "asset-sections"
      "asset-actions" !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-assets-sections {
    grid-template-columns: 1fr !important;
  }
}
/* TRUE FINAL EOF: remove excessive top gap on reference asset step. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-stage {
  place-items: start center !important;
  padding-top: 12px !important;
  padding-bottom: 14px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel {
  height: calc(100vh - 108px) !important;
}
/* TRUE FINAL EOF: simplify asset delete control to a clean x only. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-remove {
  top: 8px !important;
  right: 8px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ff5d8f !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 18px !important;
  display: grid !important;
  place-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-upload-remove:hover {
  color: #ffffff !important;
  background: transparent !important;
}
/* TRUE FINAL EOF: remove legacy empty grid rows above asset panel. */
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-stage {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  place-items: stretch center !important;
  padding-top: 6px !important;
  padding-bottom: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open #storyboardAssetsPanel {
  grid-row: 1 !important;
  align-self: stretch !important;
  height: calc(100vh - 94px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-title-row h2,
body.front-page.project-mode.project-storyboard-step.storyboard-assets-open .storyboard-steps {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
/* TRUE FINAL EOF: keep stored-storyboard confirm button inside the visible panel. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 48px !important;
  gap: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions {
  height: 48px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px 0 0 !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #confirmStoryboardDocPickInlineBtn {
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
}
/* TRUE FINAL EOF: add bottom breathing room for stored-storyboard action button. */
body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView {
  grid-template-rows: minmax(0, 1fr) 44px !important;
  padding-bottom: 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #storyboardInlineDocPickerView .app-modal-actions {
  height: 44px !important;
  padding: 2px 0 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-inline-doc-open #confirmStoryboardDocPickInlineBtn {
  height: 36px !important;
  min-height: 36px !important;
}
/* TRUE FINAL EOF: full screen image preview viewer. */
#storyboardImagePreviewModal.app-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  background: rgba(0, 0, 0, .92) !important;
}

#storyboardImagePreviewModal.app-modal-backdrop.hidden {
  display: none !important;
}

#storyboardImagePreviewModal .storyboard-image-preview-modal {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 54px 18px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #05060a !important;
  box-shadow: none !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
  place-items: center !important;
  overflow: hidden !important;
}

#storyboardImagePreviewModal .storyboard-image-preview-modal h3 {
  position: absolute !important;
  left: 24px !important;
  top: 16px !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  z-index: 2 !important;
}

#storyboardImagePreviewModal .app-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 18px !important;
  z-index: 3 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  font-size: 24px !important;
}

#storyboardImagePreviewModal #storyboardImagePreviewImg {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 36px) !important;
  max-height: calc(100vh - 72px) !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #101217 !important;
  box-shadow: 0 20px 80px rgba(0,0,0,.50) !important;
}
/* TRUE FINAL EOF: storyboard final page UI refresh, functions unchanged. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-title-row,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-steps {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-stage {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
  place-items: stretch center !important;
  gap: 0 !important;
  padding: 8px 12px 10px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open #storyboardGridPanel.storyboard-grid-panel {
  width: min(1760px, calc(100vw - 24px)) !important;
  height: calc(100vh - 88px) !important;
  max-height: calc(100vh - 88px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) 38px !important;
  gap: 8px !important;
  padding: 10px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(13, 15, 22, .94), rgba(8, 10, 15, .96)) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .32) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools {
  min-height: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 7px 8px !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .045) !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools label,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools span {
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: rgba(248, 250, 252, .82) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools input,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools select {
  height: 30px !important;
  min-height: 30px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 7px !important;
  background: rgba(5, 7, 12, .70) !important;
  color: #fff !important;
  padding: 0 9px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  outline: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #storyboardSaveDir {
  width: clamp(220px, 24vw, 390px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #storyboardStoryModel {
  width: 230px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools input[type="number"] {
  width: 58px !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools button {
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #generateStoryVersionBtn {
  border-color: #ff2f73 !important;
  background: #ff2f73 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 47, 115, .22) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-output {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: auto auto auto minmax(190px, 1fr) auto auto auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .05) !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 16px;
  margin-right: 8px;
  border-radius: 99px;
  vertical-align: -3px;
  background: #ff2f73;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head .link-like,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head select,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head .storyboard-draft-toggle,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head .link-like {
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: #f8fafc !important;
  padding: 0 10px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head select {
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(5, 7, 12, .72) !important;
  color: #fff !important;
  padding: 0 9px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardImageModel {
  width: 236px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardAspectRatio,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardGridRatio {
  width: 142px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-draft-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(255, 47, 115, .36) !important;
  background: rgba(255, 47, 115, .10) !important;
  color: #ffdbe8 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 0 5px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(0, 0, 0, .25) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager button {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 6px !important;
  border: 0 !important;
  background: rgba(255, 255, 255, .10) !important;
  color: #fff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager input {
  width: 28px !important;
  height: 24px !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  text-align: center !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  overflow: auto !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 7px !important;
  padding-right: 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table thead,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table tbody,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table tr {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th {
  height: 30px !important;
  padding: 0 8px !important;
  border: 0 !important;
  background: rgba(255, 47, 115, .13) !important;
  color: #ff8db2 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-align: left !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:first-child {
  border-radius: 8px 0 0 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:last-child {
  border-radius: 0 8px 8px 0 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td {
  height: 134px !important;
  padding: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, .09) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: rgba(248, 250, 252, .90) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  vertical-align: middle !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:first-child {
  border-left: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 8px 0 0 8px !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 0 8px 8px 0 !important;
  text-align: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(1),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(1) { width: 58px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(2),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(2) { width: 88px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(3),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(3) { width: 272px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(5),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(5) { width: 78px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(8),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(8) { width: 48px !important; }

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-cell-clip {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 5 !important;
  overflow: hidden !important;
  white-space: normal !important;
  color: rgba(248, 250, 252, .88) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
  width: 252px !important;
  height: 142px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  display: grid !important;
  place-items: center !important;
  gap: 7px !important;
  padding: 8px !important;
  border: 1px dashed rgba(255, 255, 255, .24) !important;
  border-radius: 8px !important;
  background: radial-gradient(circle at 50% 20%, rgba(255,47,115,.14), rgba(255,255,255,.035) 58%) !important;
  color: rgba(255, 255, 255, .60) !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image {
  border-style: solid !important;
  border-color: rgba(255, 255, 255, .16) !important;
  background: rgba(0, 0, 0, .36) !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 28% !important;
  border-radius: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-frame-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-frame-actions button,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box > button[data-grid-upload] {
  height: 26px !important;
  min-height: 26px !important;
  min-width: 50px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image .storyboard-frame-actions {
  left: 50% !important;
  bottom: 8px !important;
  padding: 4px !important;
  border-radius: 7px !important;
  background: rgba(5, 7, 12, .74) !important;
  backdrop-filter: blur(8px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-image-preview {
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, .56) !important;
  color: #fff !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image em {
  top: 8px !important;
  left: 8px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: rgba(255, 47, 115, .86) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-delete-mini {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  border: 1px solid rgba(255, 47, 115, .34) !important;
  border-radius: 7px !important;
  background: rgba(255, 47, 115, .10) !important;
  color: #ff73a0 !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered {
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered button {
  height: 32px !important;
  min-height: 32px !important;
  min-width: 92px !important;
  padding: 0 16px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

@media (max-width: 1280px) {
  body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
    grid-template-columns: 1fr auto auto auto !important;
    overflow-x: auto !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(3),
  body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(3) {
    width: 230px !important;
  }

  body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
    width: 216px !important;
    height: 122px !important;
  }
}
/* TRUE FINAL EOF: tighten storyboard final page to full width and 5 visible rows. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-stage {
  padding: 4px 6px 6px !important;
  place-items: stretch !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open #storyboardGridPanel.storyboard-grid-panel {
  width: calc(100vw - 12px) !important;
  max-width: none !important;
  height: calc(100vh - 82px) !important;
  max-height: calc(100vh - 82px) !important;
  padding: 8px !important;
  gap: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools {
  padding: 6px 8px !important;
  gap: 5px 7px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools label,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools span,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools input,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools select,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools button {
  height: 28px !important;
  min-height: 28px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #storyboardSaveDir {
  width: clamp(260px, 26vw, 430px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-output {
  gap: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: 5px 8px !important;
  gap: 5px 7px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 13px !important;
  margin-right: 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head .link-like,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head select,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head .storyboard-draft-toggle,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  height: 28px !important;
  min-height: 28px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardImageModel {
  width: 240px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardAspectRatio,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardGridRatio {
  width: 138px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  order: 99 !important;
  flex-basis: auto !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table {
  border-spacing: 0 5px !important;
  padding-right: 2px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th {
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td {
  height: 112px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  line-height: 1.38 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:first-child {
  font-size: 17px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(1),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(1) { width: 54px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(2),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(2) { width: 86px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(3),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(3) { width: 250px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(5),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(5) { width: 76px !important; }
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th:nth-child(8),
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:nth-child(8) { width: 46px !important; }

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
  width: 230px !important;
  height: 96px !important;
  padding: 6px !important;
  gap: 5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-cell-clip {
  -webkit-line-clamp: 4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-frame-actions button,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box > button[data-grid-upload] {
  height: 24px !important;
  min-height: 24px !important;
  min-width: 48px !important;
  padding: 0 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered {
  height: 32px !important;
  min-height: 32px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered button {
  height: 28px !important;
  min-height: 28px !important;
}
/* TRUE FINAL EOF: make storyboard segment pager number clear. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 6px !important;
  gap: 6px !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager input {
  width: 34px !important;
  min-width: 34px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 26px !important;
  text-align: center !important;
  opacity: 1 !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager span {
  min-width: 34px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 26px !important;
  opacity: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager button {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}
/* TRUE FINAL EOF: keep storyboard segment controls in one clean row. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 6px 8px !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head > * {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 1 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  width: auto !important;
  min-width: 168px !important;
  height: 30px !important;
  margin: 0 4px 0 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  line-height: 30px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-pager {
  order: 0 !important;
  flex-basis: auto !important;
  margin-left: 0 !important;
}
/* TRUE FINAL EOF: storyboard final page density, six visible rows. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open #storyboardGridPanel.storyboard-grid-panel {
  height: calc(100vh - 80px) !important;
  max-height: calc(100vh - 80px) !important;
  gap: 5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools {
  padding: 5px 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  height: 38px !important;
  min-height: 38px !important;
  padding: 4px 8px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table {
  border-spacing: 0 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table th {
  height: 24px !important;
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td {
  height: 90px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:first-child {
  font-size: 16px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
  width: 230px !important;
  height: 76px !important;
  padding: 4px !important;
  gap: 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-frame-actions button,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box > button[data-grid-upload] {
  height: 22px !important;
  min-height: 22px !important;
  font-size: 11px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-cell-clip {
  -webkit-line-clamp: 3 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered {
  height: 30px !important;
  min-height: 30px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-panel > .storyboard-panel-actions.centered button {
  height: 26px !important;
  min-height: 26px !important;
}
/* TRUE FINAL EOF: slightly enlarge six-row storyboard table. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table {
  border-spacing: 0 5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td {
  height: 98px !important;
  padding: 6px 9px !important;
  font-size: 12.5px !important;
  line-height: 1.36 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table td:first-child {
  font-size: 17px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
  width: 240px !important;
  height: 84px !important;
  padding: 5px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-cell-clip {
  -webkit-line-clamp: 4 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-frame-actions button,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box > button[data-grid-upload] {
  height: 23px !important;
  min-height: 23px !important;
  font-size: 12px !important;
}
/* TRUE FINAL EOF: remove draft toggle and fix segment title readability. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-draft-toggle {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  height: 40px !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
  gap: 8px !important;
  align-items: center !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  flex: 0 0 238px !important;
  width: 238px !important;
  min-width: 238px !important;
  max-width: 238px !important;
  height: 30px !important;
  line-height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong::before {
  flex: 0 0 7px !important;
  margin-right: 8px !important;
}
/* TRUE FINAL EOF: prevent top toolbar from overlapping segment title. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 6px 8px !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools > * {
  flex: 0 0 auto !important;
  position: static !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools label,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools span,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools button,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools input,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools.app-parity-tools select {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  line-height: 30px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-output {
  grid-template-rows: 40px minmax(0, 1fr) !important;
  gap: 7px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-right: 8px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  background: transparent !important;
  z-index: 2 !important;
}
/* TRUE FINAL EOF: move export actions into segment row cleanly. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-action-dock {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin-left: 2px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-action-dock button {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  line-height: 30px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head strong {
  flex: 0 0 172px !important;
  width: 172px !important;
  max-width: 172px !important;
  min-width: 172px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardImageModel {
  width: 224px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardAspectRatio,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-head #storyboardGridRatio {
  width: 132px !important;
}
/* TRUE FINAL EOF: keep export buttons visible in segment row, hide old toolbar copies. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #saveStoryboardTableImageBtn,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #exportStoryboardPromptCsvBtn,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-tools #exportSegmentPromptsDocxBtn {
  display: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-action-dock {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin-left: 4px !important;
  overflow: visible !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-story-action-dock button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 30px !important;
  white-space: nowrap !important;
  color: #fff !important;
}
/* TRUE FINAL EOF: per-frame prompt document button and modal. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-frame-prompt-btn {
  position: absolute !important;
  top: 7px !important;
  right: 7px !important;
  z-index: 5 !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 6px !important;
  background: rgba(13,16,22,.78) !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 14px !important;
  line-height: 22px !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image .storyboard-frame-prompt-btn {
  right: 42px !important;
  background: rgba(0,0,0,.58) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-frame-prompt-btn:hover {
  border-color: rgba(255,47,115,.72) !important;
  color: #ffffff !important;
  background: rgba(255,47,115,.28) !important;
}

#storyboardFramePromptModal.app-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  background: rgba(0,0,0,.68) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 96px !important;
}

#storyboardFramePromptModal.app-modal-backdrop.hidden {
  display: none !important;
}

#storyboardFramePromptModal .storyboard-frame-prompt-modal {
  width: min(600px, calc(100vw - 40px)) !important;
  min-height: 292px !important;
  padding: 20px 24px 18px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 8px !important;
  background: #282b30 !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.45) !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  gap: 12px !important;
}

#storyboardFramePromptModal .storyboard-frame-prompt-modal h3 {
  margin: 0 !important;
  color: #f8fafc !important;
  font-size: 18px !important;
  font-weight: 950 !important;
}

#storyboardFramePromptModal #storyboardFramePromptText {
  width: 100% !important;
  height: 184px !important;
  resize: vertical !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 0 !important;
  background: #17191d !important;
  color: #ffffff !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#storyboardFramePromptModal #storyboardFramePromptText[readonly] {
  color: rgba(255,255,255,.92) !important;
}

#storyboardFramePromptModal .storyboard-frame-prompt-foot {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

#storyboardFramePromptModal #storyboardFramePromptCount {
  margin-right: auto !important;
  color: rgba(255,255,255,.34) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#storyboardFramePromptModal .storyboard-frame-prompt-foot button {
  height: 34px !important;
  min-height: 34px !important;
  min-width: 64px !important;
  border-radius: 7px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
/* TRUE FINAL EOF: clean generated storyboard image overlay layout. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box {
  position: relative !important;
  overflow: hidden !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image {
  display: block !important;
  padding: 0 !important;
  background: #0b0d12 !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 30% !important;
  border-radius: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image em {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4 !important;
  width: auto !important;
  min-width: 44px !important;
  max-width: 74px !important;
  height: 20px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  background: rgba(255,47,115,.88) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 20px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image .storyboard-frame-prompt-btn,
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image .storyboard-image-preview {
  top: 6px !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 6px !important;
  background: rgba(7,9,13,.70) !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 22px !important;
  box-shadow: none !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image .storyboard-image-preview {
  right: 6px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image .storyboard-frame-prompt-btn {
  right: 34px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image .storyboard-frame-actions {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 6px !important;
  transform: translateX(-50%) !important;
  z-index: 4 !important;
  width: auto !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 3px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: 7px !important;
  background: rgba(7,9,13,.72) !important;
  backdrop-filter: blur(8px) !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image .storyboard-frame-actions button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 50px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 8px !important;
  border-radius: 5px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 22px !important;
  white-space: nowrap !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-segment-table .storyboard-grid-image-box.has-image .storyboard-single-image-btn {
  min-width: 62px !important;
}
/* TRUE FINAL EOF: generated storyboard images are clickable for fullscreen preview. */
body.front-page.project-mode.project-storyboard-step.storyboard-grid-open .storyboard-grid-image-box.has-image img {
  cursor: zoom-in !important;
}
.project-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

button.danger-action {
  background: rgba(201, 74, 74, 0.16);
  color: #ffb8b8;
  border: 1px solid rgba(201, 74, 74, 0.36);
}

button.danger-action:hover {
  background: rgba(201, 74, 74, 0.28);
}

.front-page.project-mode .agent-script-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: #ff2d6f;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border: 0;
  margin: 2px 0;
}

.front-page.project-mode .agent-script-link:hover {
  background: #e91f60;
}

body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-table {
  table-layout: fixed !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-table th:nth-child(1),
body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-table td:nth-child(1) {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-table th:nth-child(4),
body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-table td:nth-child(4) {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-result,
body.front-page.project-mode.project-storyboard-step.storyboard-video-open .storyboard-video-generate-cell {
  max-width: 220px !important;
}
.credit-change {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  font-weight: 900;
  letter-spacing: .02em;
}
.credit-change.plus { color: #34d399; }
.credit-change.minus { color: #ff2d73; }
#creditsTab .embedded-table td,
#creditsTab .embedded-table th {
  white-space: nowrap;
}
#creditsTab .embedded-table td:last-child {
  white-space: normal;
  min-width: 260px;
}
