:root {
  --bg: #050a14;
  --panel: #0c1424;
  --panel-2: #111a2b;
  --panel-3: #151f32;
  --panel-soft: #182239;
  --line: #26324a;
  --line-soft: rgba(139, 151, 180, 0.18);
  --text: #f5f7ff;
  --muted: #8c9ab3;
  --muted-2: #64728b;
  --purple: #8d5cff;
  --purple-2: #b18bff;
  --purple-soft: rgba(141, 92, 255, 0.16);
  --blue: #63a8ff;
  --cyan: #45d8cf;
  --green: #43d08a;
  --yellow: #f3c74e;
  --red: #ff6b7a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #02050b;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body {
  min-width: 1440px;
}

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

button {
  border: 0;
}

button:not(:disabled),
[data-action],
[data-go-step] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--purple-2);
  outline-offset: 2px;
}

.screen-canvas {
  position: relative;
  width: 1440px;
  height: 1024px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 10%, rgba(109, 75, 202, 0.12), transparent 34%),
    linear-gradient(145deg, #08101e 0%, #050a14 55%, #060b16 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

body:not(.all-mode) #app {
  width: 1440px;
  margin: 0 auto;
}

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 12, 23, 0.94);
  backdrop-filter: blur(18px);
}

.back-button,
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #c9d2e3;
  background: #0e1727;
  border: 1px solid var(--line);
  font-size: 23px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 195px;
}

.logo-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(150deg, #3cc9d8, #356bff 62%, #6c48e8);
  box-shadow: 0 0 24px rgba(67, 150, 255, 0.38), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.logo-mark::before {
  width: 15px;
  height: 15px;
  left: 14px;
  top: 7px;
  background: #9af4ef;
}

.logo-mark::after {
  width: 26px;
  height: 12px;
  left: 8px;
  bottom: 7px;
  background: rgba(11, 34, 95, 0.55);
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-en {
  margin-left: 4px;
  color: #bf9cff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.top-spacer {
  flex: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-pill,
.account-pill,
.flow-chip {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #ccd5e7;
  background: #0c1423;
  font-size: 13px;
  white-space: nowrap;
}

.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #8d5cff, #4b6df1);
  font-weight: 800;
}

.flow-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.flow-nav button {
  min-width: 38px;
  height: 36px;
  border-radius: 9px;
  color: #dbe2f0;
  background: #121b2b;
  border: 1px solid #2d3a55;
}

.flow-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.flow-counter {
  min-width: 155px;
  padding: 0 12px;
  color: #9aa8c0;
  font-size: 12px;
  text-align: center;
}

.flow-counter strong {
  display: block;
  color: #f4f6ff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-rail {
  position: absolute;
  z-index: 15;
  left: 18px;
  top: 92px;
  bottom: 18px;
  width: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 8px;
  border: 1px solid rgba(137, 94, 224, 0.22);
  border-radius: 18px;
  background: rgba(11, 18, 33, 0.82);
}

.rail-link {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 4px;
  border-radius: 13px;
  color: #76859f;
  background: transparent;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
}

.rail-link .rail-icon {
  font-size: 22px;
  line-height: 1;
}

.rail-link.active {
  color: #d8d0ff;
  background: linear-gradient(145deg, rgba(130, 83, 224, 0.33), rgba(75, 58, 134, 0.2));
  border-color: rgba(158, 105, 255, 0.58);
  box-shadow: 0 0 24px rgba(117, 67, 220, 0.23);
}

.rail-link.bottom {
  margin-top: auto;
}

.main-view {
  position: absolute;
  left: 112px;
  top: 92px;
  right: 18px;
  bottom: 18px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(124, 97, 193, 0.24);
  border-radius: 20px;
  background: rgba(6, 12, 24, 0.52);
}

.main-view.home-view {
  background: transparent;
  border-color: transparent;
}

.page-scroll {
  height: 100%;
  overflow: auto;
  scrollbar-color: #5a477e transparent;
}

.page-pad {
  padding: 28px 30px;
}

.section-title,
.page-title {
  margin: 0;
  letter-spacing: -0.02em;
}

.page-title {
  font-size: 30px;
}

.section-title {
  font-size: 22px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--purple-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.subtle {
  color: var(--muted-2);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  font-weight: 750;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #9c68ff, #7347e8);
  box-shadow: 0 10px 28px rgba(128, 73, 235, 0.24);
}

.secondary-button {
  color: #cbb9ff;
  background: rgba(105, 66, 179, 0.12);
  border: 1px solid #6e4cae;
}

.ghost-button {
  color: #b8c3d7;
  background: #111a2a;
  border: 1px solid var(--line);
}

.danger-button {
  color: #ff9da7;
  background: rgba(137, 45, 57, 0.15);
  border: 1px solid rgba(255, 107, 122, 0.35);
}

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

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge,
.status-pill,
.count-pill,
.asset-chip,
.tiny-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.badge,
.status-pill,
.count-pill {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #b8c5da;
  background: rgba(19, 29, 48, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.purple,
.count-pill.active {
  color: #d9c8ff;
  border-color: #7b57b7;
  background: rgba(119, 74, 198, 0.2);
}

.status-pill.green {
  color: #74efb5;
  border-color: rgba(65, 208, 138, 0.45);
  background: rgba(43, 177, 113, 0.15);
}

.status-pill.red {
  color: #ff99a4;
  border-color: rgba(255, 107, 122, 0.45);
  background: rgba(194, 54, 70, 0.13);
}

/* Home */
.home-stack {
  height: 100%;
  overflow: auto;
  padding: 8px 12px 32px;
}

.home-hero {
  position: relative;
  min-height: 325px;
  overflow: hidden;
  padding: 52px 56px;
  border: 1px solid #202d45;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(4, 11, 24, 0.98) 0%, rgba(7, 13, 28, 0.9) 52%, rgba(12, 15, 31, 0.4) 100%),
    radial-gradient(circle at 80% 44%, rgba(135, 80, 231, 0.54), transparent 22%),
    linear-gradient(140deg, #111b2f, #080c16);
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  right: 86px;
  border: 1px solid rgba(137, 111, 211, 0.24);
  transform: rotate(-4deg);
}

.home-hero::before {
  top: 58px;
  width: 360px;
  height: 210px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 45% 45%, rgba(255, 213, 161, 0.5), transparent 9%),
    linear-gradient(145deg, rgba(91, 49, 61, 0.42), rgba(9, 20, 38, 0.94));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.home-hero::after {
  top: 84px;
  right: 120px;
  width: 292px;
  height: 155px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 44%, rgba(12, 15, 24, 0.75) 45% 55%, transparent 56%),
    radial-gradient(circle at 30% 50%, #b99074 0 6%, transparent 7%),
    radial-gradient(circle at 70% 50%, #caa18c 0 6%, transparent 7%),
    linear-gradient(145deg, #201a1d, #3b222b 45%, #172339);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 590px;
}

.hero-copy h1 {
  margin: 0 0 6px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 42px;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: #67ccff;
  font-size: 25px;
}

.hero-copy p {
  margin: 0 0 38px;
  color: #8998b1;
  font-size: 16px;
}

.hero-flow {
  position: absolute;
  z-index: 3;
  right: 42px;
  bottom: 24px;
  display: flex;
  gap: 8px;
  color: #d1d8e7;
}

.hero-flow span {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(16, 23, 37, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 11px;
}

.hero-flow i {
  align-self: center;
  color: #66738b;
  font-style: normal;
}

.home-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 28px 0 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.project-card,
.view-all-card,
.tool-card {
  min-height: 142px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, #121b2c, #0d1422);
  border: 1px solid #27344d;
}

.project-card,
.view-all-card {
  color: #eef2fb;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: "▶";
  position: absolute;
  right: 22px;
  top: 42px;
  width: 56px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: rgba(209, 218, 235, 0.2);
  background: rgba(127, 142, 171, 0.13);
}

.project-card h3 {
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin: 26px 0 10px;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.view-all-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #aeb9cd;
  border-style: dashed;
}

.view-all-card .folder-icon {
  font-size: 35px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 95px;
}

.tool-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 22px;
  background: linear-gradient(145deg, #8d5cff, #405de7);
}

.tool-card h4,
.tool-card p {
  margin: 0;
}

.tool-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

/* Modal / Drawer */
.modal-backdrop {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 50px;
  background: rgba(1, 5, 12, 0.72);
  backdrop-filter: blur(8px);
}

.modal {
  width: 560px;
  overflow: hidden;
  border-radius: 18px;
  background: #101929;
  border: 1px solid #2a3852;
  box-shadow: var(--shadow);
}

.modal.wide {
  width: 900px;
}

.modal.workflow {
  width: 920px;
}

.modal-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
}

.close-x {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #99a8c0;
  background: #111b2c;
  border: 1px solid #2b3850;
  font-size: 22px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.field label {
  color: #aeb9cc;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.select-like,
.search-input {
  width: 100%;
  color: #eef2fb;
  background: #091220;
  border: 1px solid #263550;
  border-radius: 11px;
}

.field input,
.select-like,
.search-input {
  height: 46px;
  padding: 0 14px;
}

.field textarea {
  min-height: 88px;
  padding: 13px 14px;
  resize: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  color: #9ba9be;
  background: #0a1220;
  border: 1px solid #26344e;
}

.radio-card.selected {
  color: #f0f4ff;
  background: #0f293f;
  border-color: #2e9acb;
}

.radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #75859e;
}

.radio-card.selected .radio-dot {
  background: #45b9f1;
  box-shadow: 0 0 0 4px rgba(69, 185, 241, 0.12);
}

.drawer-backdrop {
  position: absolute;
  z-index: 76;
  inset: 0;
  background: rgba(1, 4, 10, 0.7);
  backdrop-filter: blur(5px);
}

.full-drawer {
  position: absolute;
  z-index: 78;
  inset: 34px;
  display: grid;
  grid-template-columns: 390px 1fr;
  overflow: hidden;
  border: 1px solid #2a344a;
  border-radius: 18px;
  background: #0b111c;
  box-shadow: var(--shadow);
}

.drawer-form {
  padding: 24px;
  overflow: auto;
  border-right: 1px solid #28334a;
  background: #141d2e;
}

.drawer-stage {
  position: relative;
  padding: 24px;
  overflow: auto;
}

.drawer-close {
  position: absolute;
  right: 20px;
  top: 18px;
  z-index: 2;
}

/* Empty / importer */
.center-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.empty-art {
  position: relative;
  width: 126px;
  height: 106px;
  margin-bottom: 10px;
}

.empty-art::before {
  content: "＋";
  position: absolute;
  left: 24px;
  top: 10px;
  width: 82px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 20px 20px 28px 28px;
  color: #9272ff;
  background: linear-gradient(145deg, #b8d7ef, #d7dfeb);
  border-top: 20px solid #7fb4e8;
  font-size: 32px;
  transform: rotate(-6deg);
  box-shadow: 0 18px 45px rgba(55, 77, 128, 0.32);
}

.center-empty h2,
.center-empty p {
  margin: 0;
}

.center-empty p {
  color: #73829c;
}

.import-layout,
.parser-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 100%;
}

.import-sidebar,
.parser-sidebar {
  padding: 26px 22px;
  overflow: auto;
  border-right: 1px solid var(--line-soft);
  background: #121b2b;
}

.upload-card {
  display: grid;
  gap: 16px;
  margin-top: 250px;
  padding: 22px;
  border: 1px solid #35405a;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(94, 78, 139, 0.23), rgba(46, 53, 80, 0.32));
}

.upload-card h3,
.upload-card p {
  margin: 0;
}

.upload-card p {
  color: #9aa8bf;
  font-size: 13px;
}

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

.format-row span {
  padding: 6px 10px;
  border-radius: 7px;
  color: #8291aa;
  background: #202a3e;
  border: 1px solid #344058;
  font-size: 11px;
}

.editor-panel {
  display: grid;
  grid-template-rows: 78px 1fr;
  min-width: 0;
}

.editor-toolbar,
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(13, 21, 36, 0.72);
}

.editor-toolbar h2 {
  margin-right: auto;
  font-size: 19px;
}

.size-switch,
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #1b2537;
}

.size-switch span,
.segmented button {
  min-width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #8190a8;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.size-switch span.active,
.segmented button.active {
  color: #f2f5fc;
  background: #303a4f;
}

.full-textarea {
  width: calc(100% - 56px);
  height: calc(100% - 44px);
  margin: 22px 28px;
  padding: 18px;
  resize: none;
  border: 0;
  border-radius: 12px;
  color: #aebbd0;
  background: transparent;
  line-height: 1.72;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.full-textarea::placeholder {
  color: #6f7f9a;
}

/* Parser */
.file-meta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0 8px;
  padding: 13px;
  border: 1px dashed #35415a;
  border-radius: 10px;
}

.doc-icon {
  width: 36px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: #5274ef;
  font-weight: 800;
}

.file-meta strong {
  font-size: 13px;
}

.file-stat {
  color: #9fb0c9;
  font-size: 12px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
  color: #8da0bb;
  font-size: 13px;
  font-weight: 750;
}

.plus-mini {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #9fb4d2;
  background: #152034;
  border: 1px solid #2c3a54;
}

.error-copy {
  margin: 26px 0;
  color: #ff566b;
}

.error-copy h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.error-copy p {
  margin: 0;
  color: #9fb0c9;
  font-size: 12px;
  line-height: 1.6;
}

.parser-bottom {
  position: absolute;
  left: 22px;
  bottom: 24px;
  width: 296px;
}

.parser-bottom p {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 12px;
}

.parser-bottom button {
  width: 100%;
}

.parser-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(14, 22, 37, 0.72);
}

.parser-editor-toolbar input {
  width: 130px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: #d6ddec;
  background: #111a2b;
  border: 1px solid #26334b;
  font-size: 11px;
}

.parser-editor-toolbar .toolbar-spacer {
  flex: 1;
}

.script-document {
  height: calc(100% - 65px);
  padding: 26px 30px 60px;
  overflow: auto;
  color: #aeb9ca;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
}

.script-document p {
  margin: 0 0 5px;
}

.script-document .matched-title {
  margin-left: -8px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(147, 109, 216, 0.42);
}

.rule-card {
  position: relative;
  margin-bottom: 20px;
  padding: 13px 48px 13px 14px;
  border: 1px solid #7657b2;
  border-radius: 10px;
  background: rgba(116, 78, 179, 0.22);
}

.rule-card strong,
.rule-card small {
  display: block;
}

.rule-card small {
  margin-top: 5px;
  color: #8f9cb2;
}

.rule-card .rule-count {
  position: absolute;
  right: 14px;
  top: 18px;
  color: #a16cff;
  font-weight: 800;
}

.episode-preview-list {
  display: grid;
  gap: 9px;
  max-height: 440px;
  overflow: auto;
}

.episode-preview-card {
  padding: 13px 14px;
  border-radius: 10px;
  color: #aeb9ca;
  background: #111a29;
  border: 1px solid #29354b;
}

.episode-preview-card.active {
  color: white;
  border-color: #7051b1;
  background: rgba(102, 67, 161, 0.25);
}

.episode-preview-card span {
  float: right;
  color: #718098;
  font-size: 11px;
}

.rule-help {
  margin: 2px 0 0;
  color: #718098;
  font-size: 11px;
}

/* Episodes */
.episode-page {
  display: grid;
  grid-template-rows: 82px 1fr;
  height: 100%;
}

.page-toolbar {
  justify-content: space-between;
}

.title-stack p {
  margin: 5px 0 0;
  color: #7f8da5;
  font-size: 12px;
}

.episode-body {
  display: grid;
  grid-template-columns: 172px 1fr;
  min-height: 0;
  margin: 18px 22px 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(10, 16, 29, 0.72);
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  overflow: auto;
  border-right: 1px solid var(--line-soft);
}

.episode-list button {
  min-height: 44px;
  border-radius: 10px;
  color: #9aa9bf;
  background: transparent;
  font-weight: 700;
}

.episode-list button.active {
  color: #d9ceff;
  background: rgba(105, 72, 161, 0.2);
  border: 1px solid #62469c;
}

.episode-list .add-episode {
  margin-top: auto;
  border: 1px solid #2d3a51;
  background: #111927;
}

.episode-editor {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 20px 24px 24px;
}

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

.episode-editor-head h2,
.episode-editor-head p {
  margin: 0;
}

.episode-editor-head p {
  margin-top: 4px;
  color: #7f8da4;
  font-size: 12px;
}

.episode-editor textarea {
  width: 100%;
  height: 100%;
  padding: 20px;
  resize: none;
  color: #aebacd;
  background: #101829;
  border: 1px solid #744ab2;
  border-radius: 13px;
  line-height: 1.8;
}

.finalize-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(97, 69, 155, 0.14);
  border: 1px solid #4b3b6f;
}

.summary-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #d7c2ff;
  background: #2d2050;
  font-size: 22px;
  font-weight: 800;
}

/* Precheck */
.precheck-page {
  height: 100%;
  padding: 46px 58px;
  background:
    radial-gradient(circle at 75% 35%, rgba(101, 67, 186, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(15, 31, 52, 0.76), rgba(14, 14, 38, 0.4));
}

.precheck-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 72px;
  align-items: center;
  height: 100%;
}

.precheck-copy h1 {
  margin: 14px 0 20px;
  font-size: 48px;
  letter-spacing: -0.04em;
}

.precheck-copy > p {
  max-width: 650px;
  color: #93a6c2;
  font-size: 16px;
  line-height: 1.9;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.process-step {
  min-height: 128px;
  padding: 20px;
  border-radius: 16px;
  background: #111a2c;
  border: 1px solid #26334a;
}

.process-step.active {
  border-color: #7750bc;
  background: rgba(101, 63, 168, 0.23);
}

.process-step.complete {
  border-color: rgba(47, 190, 129, 0.4);
  background: rgba(31, 142, 103, 0.14);
}

.step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #8f9cb0;
  background: #263246;
  font-weight: 800;
}

.process-step.active .step-number {
  color: white;
  background: linear-gradient(145deg, #a66cff, #7042e4);
}

.process-step.complete .step-number {
  color: white;
  background: #16845d;
}

.process-step h3,
.process-step p {
  margin: 0;
}

.process-step p {
  margin-top: 8px;
  color: #7f8da5;
  font-size: 12px;
}

.asset-status-card {
  padding: 28px;
  border-radius: 22px;
  background: rgba(21, 26, 54, 0.84);
  border: 1px solid #354060;
  box-shadow: var(--shadow);
}

.status-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  color: #91a0ba;
}

.status-card-head strong {
  color: white;
  font-size: 26px;
}

.asset-status-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 17px;
  border-radius: 14px;
  background: rgba(85, 43, 60, 0.26);
  border: 1px solid rgba(231, 88, 110, 0.35);
}

.asset-status-row.ready {
  background: rgba(32, 112, 84, 0.18);
  border-color: rgba(67, 208, 138, 0.35);
}

.status-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #e1b5c0;
  background: rgba(142, 61, 79, 0.38);
}

.asset-status-row.ready .status-icon {
  color: #82efbe;
  background: rgba(38, 144, 102, 0.32);
}

.asset-status-row h4,
.asset-status-row p {
  margin: 0;
}

.asset-status-row p {
  margin-top: 3px;
  color: #77859c;
  font-size: 11px;
}

/* Asset center */
.asset-page {
  display: grid;
  grid-template-rows: 78px 1fr;
  height: 100%;
}

.asset-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
}

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

.asset-tab {
  height: 40px;
  min-width: 95px;
  border-radius: 10px;
  color: #7e8ca2;
  background: #111a29;
  border: 1px solid #27334a;
  font-weight: 700;
}

.asset-tab.active {
  color: #decfff;
  background: rgba(107, 69, 175, 0.25);
  border-color: #7350aa;
}

.asset-toolbar .search-wrap {
  flex: 1;
  max-width: 330px;
  margin-left: 4px;
}

.asset-toolbar .button-row {
  margin-left: auto;
}

.asset-content {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 34px;
}

.asset-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: center;
}

.asset-empty .big-icon {
  font-size: 58px;
  opacity: 0.65;
}

.asset-empty h2,
.asset-empty p {
  margin: 0;
}

.asset-empty p {
  color: #728099;
}

.loading-strip {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #162137;
}

.loading-strip::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #9b6aff, transparent);
  animation: loading 0.9s linear infinite;
}

@keyframes loading {
  from { transform: translateX(-110%); }
  to { transform: translateX(270%); }
}

.asset-table-head,
.asset-row {
  display: grid;
  grid-template-columns: 160px 120px 150px 1fr 1.25fr 118px 44px;
  gap: 14px;
  align-items: center;
}

.asset-table-head {
  padding: 0 16px 13px;
  color: #68768d;
  font-size: 11px;
  font-weight: 700;
}

.asset-row {
  min-height: 158px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 14px;
  color: #9aa8bd;
  background: #101827;
  border: 1px solid #27334a;
}

.asset-row h3,
.asset-row p {
  margin: 0;
}

.asset-row h3 {
  color: #d4dbea;
  font-size: 15px;
}

.asset-row p {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.55;
}

.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #1a2435;
  border: 1px solid #354158;
}

.thumb.person {
  width: 100px;
  height: 76px;
  background:
    radial-gradient(circle at 50% 29%, #d3a58c 0 11%, transparent 12%),
    radial-gradient(ellipse at 50% 93%, #80a4b9 0 35%, transparent 36%),
    linear-gradient(145deg, #eef1eb, #8faab9);
}

.thumb.hospital {
  min-height: 105px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,.18) 49% 51%, transparent 52%),
    linear-gradient(0deg, rgba(40, 33, 34, .8) 0 18%, transparent 19%),
    repeating-linear-gradient(90deg, #1a2731 0 14%, #60717a 15% 18%, #1a2731 19% 31%);
}

.thumb.video {
  width: 100%;
  height: 100%;
  min-height: 172px;
  background:
    radial-gradient(circle at 50% 58%, rgba(237, 242, 248, 0.33) 0 7%, transparent 8%),
    linear-gradient(90deg, #101826 0 25%, transparent 26% 74%, #101826 75%),
    linear-gradient(145deg, #334953, #111821 46%, #3a3031 72%, #101722);
}

.thumb.video::after {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: white;
  background: rgba(7, 11, 18, 0.72);
  border: 1px solid rgba(255,255,255,.2);
}

.asset-gen-state {
  display: grid;
  place-items: center;
  min-height: 530px;
  color: #74829a;
}

.asset-media-groups {
  display: grid;
  gap: 22px;
}

.media-group h3 {
  margin: 0 0 12px;
}

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

.media-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 14px;
  background: #121b2c;
  border: 1px solid #2c3850;
}

.media-card .thumb {
  height: 210px;
  border: 0;
  border-radius: 0;
}

.media-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
}

/* Workflow modal */
.workflow-body {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 500px;
}

.workflow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-right: 1px solid var(--line-soft);
}

.workflow-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 10px;
  color: #aeb8ca;
  background: #111928;
  border: 1px solid transparent;
}

.workflow-item.active {
  color: white;
  background: rgba(109, 72, 176, 0.3);
  border-color: #734ead;
}

.workflow-preview {
  padding: 24px;
}

.workflow-preview h3 {
  margin: 0 0 22px;
}

.prompt-preview {
  height: 365px;
  padding: 18px;
  border-radius: 12px;
  color: #708098;
  background: #0a111e;
  border: 1px solid #26334a;
}

/* Overview / storyboard */
.episode-tabs-row {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
}

.episode-tabs-row button {
  min-width: 72px;
  height: 38px;
  border-radius: 9px;
  color: #7f8da4;
  background: #111928;
  border: 1px solid #27334a;
  font-weight: 700;
}

.episode-tabs-row button.active {
  color: #ddcfff;
  background: rgba(113, 72, 180, 0.24);
  border-color: #7752b2;
}

.overview-body {
  display: grid;
  grid-template-columns: 350px 1fr;
  height: calc(100% - 66px);
}

.script-pane {
  min-width: 0;
  padding: 24px 20px;
  border-right: 1px solid var(--line-soft);
  background: rgba(12, 20, 35, 0.72);
}

.script-pane h2,
.script-pane p {
  margin: 0;
}

.script-pane .script-copy {
  height: calc(100% - 82px);
  margin-top: 22px;
  padding-top: 18px;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  color: #9aa8bd;
  font-size: 13px;
  line-height: 1.95;
}

.storyboard-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.storyboard-empty .big-icon {
  font-size: 64px;
  opacity: 0.52;
}

.storyboard-empty h2,
.storyboard-empty p {
  margin: 0;
}

.storyboard-workspace {
  display: grid;
  grid-template-rows: 66px 1fr;
  height: 100%;
}

.storyboard-main {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 0;
}

.bound-script {
  padding: 18px;
  overflow: auto;
  border-right: 1px solid var(--line-soft);
  background: rgba(13, 21, 35, 0.76);
}

.bound-script h2,
.bound-script p {
  margin: 0;
}

.script-block {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  color: #8998ae;
  line-height: 1.65;
  font-size: 12px;
}

.script-block.active {
  color: #e2e7f1;
  border-left-color: #559cff;
  background: rgba(70, 94, 155, 0.25);
  box-shadow: inset 0 0 0 1px rgba(89, 120, 191, 0.32);
}

.shot-panel {
  display: grid;
  grid-template-rows: 70px 1fr;
  min-width: 0;
}

.shot-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
}

.shot-toolbar .button-row {
  margin-left: auto;
}

.shot-list {
  position: relative;
  padding: 18px 22px 80px 52px;
  overflow: auto;
}

.shot-list::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: #24405f;
}

.shot-card {
  position: relative;
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 20px;
  min-height: 210px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 16px;
  color: #9ba9be;
  background: #101827;
  border: 1px solid #27344b;
}

.shot-card::before {
  content: attr(data-index);
  position: absolute;
  left: -44px;
  top: 24px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c6d2e4;
  background: #17233a;
  border: 1px solid #456488;
}

.shot-card.active {
  border-color: #6f4cad;
  box-shadow: 0 0 0 1px rgba(131, 86, 209, 0.2);
}

.shot-card h3 {
  margin: 0 0 12px;
  color: #d8deeb;
}

.shot-card p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.65;
}

.shot-time {
  position: absolute;
  right: 16px;
  top: 16px;
}

.asset-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.asset-chip {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
  border: 1px solid;
}

.asset-chip.role {
  color: #77b9ff;
  border-color: #356aa2;
  background: rgba(42, 106, 169, 0.15);
}

.asset-chip.scene {
  color: #5ee2ce;
  border-color: #258e83;
  background: rgba(29, 137, 126, 0.14);
}

.asset-chip.prop {
  color: #f4d359;
  border-color: #9b7b1d;
  background: rgba(147, 114, 23, 0.14);
}

/* Video generator */
.video-generator {
  display: grid;
  grid-template-columns: 520px 1fr;
  height: 100%;
}

.video-config {
  padding: 22px;
  overflow: auto;
  border-right: 1px solid var(--line-soft);
  background: #141d2d;
}

.video-results {
  padding: 22px;
  overflow: auto;
}

.config-title-row {
  display: grid;
  grid-template-columns: 1fr 95px 90px;
  gap: 8px;
  margin-bottom: 14px;
}

.config-title-row .select-like {
  display: flex;
  align-items: center;
}

.reference-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: #101828;
  border: 1px solid #28354c;
}

.reference-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid #40506a;
  background:
    radial-gradient(circle at 50% 30%, #d1a088 0 13%, transparent 14%),
    linear-gradient(145deg, #9bb4c1, #233343 72%);
}

.reference-add {
  display: grid;
  place-items: center;
  color: #aeb9cb;
  font-size: 12px;
  background: #182235;
}

.prompt-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #101827;
  border: 1px solid #28354c;
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #aeb9cb;
  font-size: 12px;
}

.toggle-row {
  display: flex;
  gap: 16px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8e9cb1;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.toggle i {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #344057;
}

.toggle i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd4e3;
}

.toggle.on i {
  background: #367acc;
}

.toggle.on i::after {
  left: 19px;
  background: white;
}

.prompt-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prompt-box {
  height: 240px;
  padding: 13px;
  overflow: auto;
  border-radius: 10px;
  color: #9aa8bb;
  background: #0b1321;
  border: 1px solid #26334b;
  font-size: 11px;
  line-height: 1.75;
}

.config-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.config-footer .select-like {
  display: flex;
  align-items: center;
  flex: 1;
}

.result-section {
  margin-bottom: 24px;
}

.result-section h3 {
  margin: 0 0 12px;
}

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

.video-result-card {
  position: relative;
  min-height: 295px;
  overflow: hidden;
  border-radius: 15px;
  background: #111929;
  border: 1px solid #2b3750;
}

.video-result-card .thumb.video {
  min-height: 238px;
}

.video-result-card .media-card-footer {
  height: 56px;
}

.result-empty,
.result-loading {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #748299;
  border: 1px dashed #2d394f;
  border-radius: 14px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(139, 102, 223, 0.17);
  border-top-color: #9968ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Delivery */
.delivery-page {
  display: grid;
  grid-template-columns: 505px 1fr;
  height: 100%;
}

.delivery-sidebar {
  display: grid;
  grid-template-rows: 72px 1fr;
  min-height: 0;
  border-right: 1px solid var(--line-soft);
  background: rgba(13, 20, 35, 0.78);
}

.delivery-search {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.delivery-search input {
  flex: 1;
  min-width: 0;
}

.delivery-list {
  padding: 18px;
  overflow: auto;
}

.delivery-episode {
  margin-bottom: 24px;
}

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

.delivery-episode-head h3 {
  margin: 0;
}

.shot-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.delivery-shot {
  position: relative;
  min-height: 135px;
  overflow: hidden;
  border-radius: 12px;
  background: #0e1625;
  border: 1px solid #27334a;
  color: #eef2fb;
}

.delivery-shot.active {
  border-color: #8b5bd5;
  box-shadow: 0 0 0 1px rgba(148, 95, 227, 0.24);
}

.delivery-shot .thumb.video {
  min-height: 135px;
}

.delivery-shot span {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
}

.empty-shot {
  display: grid;
  place-items: center;
  color: #59687e;
}

.delivery-detail {
  padding: 26px;
  overflow: auto;
}

.breadcrumb {
  margin-bottom: 16px;
  color: #7d8ba2;
  font-size: 12px;
  font-weight: 700;
}

.player {
  position: relative;
  height: 450px;
  overflow: hidden;
  border-radius: 15px;
  background: #020407;
}

.player .vertical-film {
  position: absolute;
  left: 50%;
  top: 0;
  width: 260px;
  height: 100%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 70%, rgba(244, 249, 255, .18) 0 8%, transparent 9%),
    repeating-linear-gradient(90deg, #17222c 0 14%, #687880 15% 18%, #16212c 19% 31%),
    linear-gradient(#3c4c55, #131820);
  box-shadow: 0 0 80px rgba(68, 102, 127, 0.32);
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: white;
  background: rgba(8, 12, 19, 0.74);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 25px;
}

.player-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 11px;
}

.progress {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.progress::before {
  content: "";
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: white;
}

.versions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.versions-head h3 {
  margin: 0;
}

.version-card {
  width: 230px;
  overflow: hidden;
  border-radius: 13px;
  background: #101829;
  border: 1px solid #8053c1;
}

.version-card .thumb.video {
  min-height: 150px;
}

.version-card p {
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
}

/* Toast */
.toast {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: 28px;
  min-width: 310px;
  padding: 14px 18px;
  transform: translateX(-50%);
  border-radius: 12px;
  color: #e8fff4;
  background: rgba(21, 92, 65, 0.96);
  border: 1px solid rgba(81, 219, 155, 0.46);
  box-shadow: 0 18px 55px rgba(0,0,0,.42);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

/* All screens export mode */
body.all-mode {
  min-width: 4380px;
  padding: 28px;
  background: #05070d;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1440px);
  gap: 36px 28px;
  width: max-content;
}

.gallery-item {
  width: 1440px;
}

.gallery-label {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #cdd5e5;
  background: #111623;
  border: 1px solid #30394c;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.gallery-label span:first-child {
  color: #b798ff;
  letter-spacing: 0.12em;
}

.gallery-item .screen-canvas {
  border-radius: 0 0 12px 12px;
}

/* compact helpers */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stack-8 {
  display: grid;
  gap: 8px;
}

.stack-14 {
  display: grid;
  gap: 14px;
}

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line-soft);
}

.danger-text {
  color: var(--red);
}

.success-text {
  color: var(--green);
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   剧灵 · Cinematic Workbench visual system
   A warm, editorial production-console identity that is intentionally
   different from the screenshot reference's blue/purple SaaS treatment.
   -------------------------------------------------------------------------- */

:root {
  --bg: #090d0e;
  --panel: #101617;
  --panel-2: #151d1f;
  --panel-3: #1a2426;
  --panel-soft: #202b2d;
  --line: #2b3739;
  --line-soft: rgba(218, 229, 222, 0.12);
  --text: #f3efe6;
  --muted: #96a29f;
  --muted-2: #687673;
  --purple: #f2a443;
  --purple-2: #ffd28a;
  --purple-soft: rgba(242, 164, 67, 0.13);
  --blue: #70a9ff;
  --cyan: #38ccb7;
  --green: #56d59a;
  --yellow: #f2b95f;
  --red: #ff766d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  --jueling-ink: #090d0e;
  --jueling-surface: #12191a;
  --jueling-warm: #f2a443;
  --jueling-warm-soft: #ffd28a;
  --jueling-mint: #38ccb7;
}

html,
body {
  background:
    radial-gradient(circle at 18% -10%, rgba(242, 164, 67, 0.10), transparent 28%),
    #070a0b;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.screen-canvas {
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    radial-gradient(circle at 87% 6%, rgba(56, 204, 183, 0.08), transparent 26%),
    radial-gradient(circle at 12% 100%, rgba(242, 164, 67, 0.07), transparent 28%),
    linear-gradient(145deg, #0b1011 0%, #080c0d 72%, #0d1112 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline-color: var(--jueling-warm-soft);
}

.topbar {
  height: 78px;
  padding: 0 26px;
  border-bottom-color: rgba(220, 232, 225, 0.10);
  background: rgba(8, 12, 13, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

.back-button,
.icon-button {
  border-radius: 7px;
  color: #bec9c5;
  background: #131a1c;
  border-color: #2b3739;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.brand {
  gap: 11px;
  min-width: 210px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 8px;
  color: #111515;
  background: var(--jueling-warm);
  border: 1px solid #ffc774;
  box-shadow: 8px 8px 0 rgba(56, 204, 183, 0.15);
}

.logo-mark::before {
  content: "灵";
  inset: 0;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: #121615;
  background: transparent;
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 800;
}

.logo-mark::after {
  width: 7px;
  height: 7px;
  left: auto;
  right: 5px;
  top: 5px;
  bottom: auto;
  border-radius: 50%;
  background: #0c1111;
  box-shadow: none;
}

.brand-name {
  color: #f7f1e5;
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-en {
  margin-left: 8px;
  color: var(--jueling-mint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.theme-pill,
.account-pill,
.flow-chip {
  height: 40px;
  border-radius: 7px;
  color: #b8c4c0;
  background: #111719;
  border-color: #293537;
}

.account-avatar {
  border-radius: 7px;
  color: #121615;
  background: var(--jueling-mint);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}

.flow-nav button {
  border-radius: 6px;
  color: #c9d2ce;
  background: #151c1e;
  border-color: #303b3d;
}

.flow-counter {
  color: #7f8e8a;
}

.flow-counter strong {
  color: #e9e5dc;
}

.side-rail {
  left: 18px;
  top: 96px;
  bottom: 18px;
  width: 82px;
  gap: 8px;
  padding: 10px 8px;
  border-color: rgba(218, 229, 222, 0.11);
  border-radius: 10px;
  background: rgba(13, 18, 19, 0.91);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.rail-link {
  position: relative;
  min-height: 70px;
  gap: 8px;
  border-radius: 6px;
  color: #6f7e7a;
  font-weight: 650;
}

.rail-link .rail-icon {
  font-size: 20px;
}

.rail-link.active {
  color: #f3efe6;
  background: #1a2425;
  border-color: #354344;
  box-shadow: inset 3px 0 var(--jueling-warm), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.main-view {
  left: 118px;
  top: 96px;
  border-color: rgba(218, 229, 222, 0.12);
  border-radius: 12px;
  background: rgba(10, 15, 16, 0.68);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.16);
}

.page-scroll {
  scrollbar-color: #52635f transparent;
}

.page-title,
.section-title {
  color: #f5f0e7;
}

.eyebrow {
  color: var(--jueling-warm);
  letter-spacing: 0.22em;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 700;
}

.primary-button {
  color: #121615;
  background: var(--jueling-warm);
  box-shadow: 0 10px 24px rgba(242, 164, 67, 0.18);
}

.secondary-button {
  color: #85e2d4;
  background: rgba(56, 204, 183, 0.08);
  border-color: rgba(56, 204, 183, 0.38);
}

.ghost-button {
  color: #b2bfbb;
  background: #151d1f;
  border-color: #303b3d;
}

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

.badge,
.status-pill,
.count-pill {
  min-height: 26px;
  border-radius: 4px;
  color: #aab7b3;
  background: #171f21;
  border-color: #344143;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.status-pill.purple,
.count-pill.active {
  color: #ffd28a;
  border-color: rgba(242, 164, 67, 0.46);
  background: rgba(242, 164, 67, 0.10);
}

.status-pill.green {
  color: #75ddb5;
  border-color: rgba(86, 213, 154, 0.42);
  background: rgba(86, 213, 154, 0.10);
}

/* Brand stage / Home */
.home-stack {
  padding: 8px 10px 32px;
}

.home-hero {
  min-height: 332px;
  padding: 54px 58px;
  border: 1px solid #303a3b;
  border-left: 5px solid var(--jueling-warm);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(12, 17, 18, 0.99) 0%, rgba(13, 19, 20, 0.96) 52%, rgba(12, 18, 19, 0.46) 100%),
    radial-gradient(circle at 78% 36%, rgba(242, 164, 67, 0.28), transparent 24%),
    linear-gradient(145deg, #1a2424, #0b1011);
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 24px 70px rgba(0,0,0,.22);
}

.home-hero::before {
  content: "SCENE 01  ·  READY";
  top: 48px;
  right: 70px;
  width: 360px;
  height: 205px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border: 1px solid rgba(243, 239, 230, 0.20);
  border-radius: 6px;
  color: rgba(245, 240, 231, 0.68);
  background:
    linear-gradient(180deg, transparent 60%, rgba(4, 7, 8, 0.74)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 1px, transparent 1px 26px),
    radial-gradient(circle at 34% 43%, rgba(242, 164, 67, 0.58), transparent 8%),
    radial-gradient(circle at 68% 48%, rgba(56, 204, 183, 0.28), transparent 10%),
    linear-gradient(145deg, #293332, #111819 68%);
  box-shadow: 18px 18px 0 rgba(56, 204, 183, 0.08), 0 30px 70px rgba(0,0,0,.34);
  transform: rotate(1.2deg);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.home-hero::after {
  content: "●  AI PRODUCTION CONSOLE";
  top: 69px;
  right: 92px;
  bottom: auto;
  width: auto;
  height: auto;
  padding: 8px 11px;
  border: 0;
  border-radius: 4px;
  color: #131817;
  background: var(--jueling-warm);
  transform: rotate(1.2deg);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .10em;
}

.hero-copy {
  width: 610px;
}

.hero-copy h1 {
  margin-bottom: 2px;
  color: #f7f0e3;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 58px;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero-copy h2 {
  margin-bottom: 14px;
  color: var(--jueling-mint);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .05em;
}

.hero-copy p {
  color: #98a5a1;
}

.hero-flow {
  right: 34px;
  bottom: 23px;
  gap: 6px;
}

.hero-flow span {
  padding: 8px 10px;
  border-radius: 4px;
  color: #bac5c1;
  background: rgba(15, 21, 22, 0.88);
  border-color: #354143;
}

.hero-flow i {
  color: var(--jueling-warm);
}

.project-card,
.view-all-card,
.tool-card {
  border-radius: 8px;
  background: linear-gradient(145deg, #151d1e, #101617);
  border-color: #2c383a;
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}

.project-card {
  border-top: 2px solid rgba(242, 164, 67, 0.60);
}

.project-card::after {
  content: "CONTINUE  →";
  right: 18px;
  top: auto;
  bottom: 18px;
  width: auto;
  height: auto;
  border-radius: 0;
  color: rgba(242, 164, 67, .68);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.tool-icon {
  border-radius: 6px;
  color: #111615;
  background: var(--jueling-mint);
  box-shadow: 6px 6px 0 rgba(242, 164, 67, .10);
}

/* Dialogs and form controls */
.modal-backdrop {
  background: rgba(3, 6, 7, 0.78);
  backdrop-filter: blur(10px);
}

.modal {
  border-radius: 10px;
  background: #111819;
  border-color: #344143;
  box-shadow: 0 34px 110px rgba(0,0,0,.58);
}

.modal-header,
.modal-footer {
  border-color: rgba(218, 229, 222, 0.10);
  background: rgba(15, 21, 22, .72);
}

.field input,
.field textarea,
.select-like,
.search-input,
.replace-input,
.rule-input {
  border-radius: 6px;
  color: #d9dfdb;
  background: #0c1213;
  border-color: #303d3f;
}

.field input:focus,
.field textarea:focus,
.search-input:focus {
  border-color: rgba(242, 164, 67, .72);
  box-shadow: 0 0 0 3px rgba(242, 164, 67, .08);
}

.ratio-option,
.upload-card,
.file-meta,
.rule-card,
.finalize-summary,
.process-step,
.asset-status-card,
.asset-status-row,
.asset-row,
.workflow-item,
.prompt-preview,
.script-block,
.shot-card,
.reference-strip,
.prompt-card,
.prompt-box,
.result-section,
.video-result-card,
.delivery-shot,
.version-card {
  border-radius: 8px;
}

.import-sidebar,
.parser-sidebar,
.video-config,
.delivery-sidebar,
.script-pane,
.bound-script {
  background: rgba(16, 23, 24, 0.92);
}

.upload-card {
  border-color: #3b494b;
  background:
    linear-gradient(135deg, rgba(242, 164, 67, .08), transparent 54%),
    #172022;
}

.format-row span,
.size-switch,
.segmented {
  border-radius: 5px;
  background: #202a2c;
}

.size-switch span,
.segmented button {
  border-radius: 4px;
}

.size-switch span.active,
.segmented button.active {
  color: #151918;
  background: var(--jueling-warm-soft);
}

.doc-icon {
  border-radius: 4px;
  color: #111615;
  background: var(--jueling-mint);
}

.plus-mini {
  border-radius: 5px;
  color: #ffd28a;
  background: rgba(242, 164, 67, .08);
  border-color: rgba(242, 164, 67, .34);
}

.episode-body {
  border-radius: 8px;
  background: rgba(11, 16, 17, .80);
}

.episode-list button,
.episode-tabs-row button,
.asset-tab {
  border-radius: 5px;
}

.episode-tabs-row button,
.episode-list button {
  color: #879591;
  background: #141c1e;
  border-color: #2d393b;
}

.episode-list .add-episode {
  color: #8adfd3;
  background: rgba(56, 204, 183, .07);
  border-color: rgba(56, 204, 183, .28);
}

.episode-list button.active,
.episode-tabs-row button.active,
.asset-tab.active,
.workflow-item.active {
  color: #ffd28a;
  background: rgba(242, 164, 67, .09);
  border-color: rgba(242, 164, 67, .46);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.episode-editor textarea {
  color: #c4ceca;
  background: #0d1314;
  border-color: #495758;
  border-radius: 7px;
}

.summary-number,
.process-step.active .step-number {
  color: #141817;
  background: var(--jueling-warm);
}

.finalize-summary {
  background: rgba(242, 164, 67, .07);
  border-color: rgba(242, 164, 67, .30);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.precheck-page {
  background:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px),
    radial-gradient(circle at 78% 34%, rgba(56, 204, 183, .11), transparent 32%),
    linear-gradient(135deg, rgba(15, 22, 23, .80), rgba(9, 13, 14, .52));
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.process-step {
  background: #141c1d;
  border-color: #2f3b3d;
}

.process-step.active {
  border-color: rgba(242, 164, 67, .48);
  background: rgba(242, 164, 67, .08);
}

.asset-status-card {
  background: rgba(17, 24, 25, .92);
  border-color: #374547;
}

.asset-toolbar,
.editor-toolbar,
.page-toolbar,
.episode-tabs-row,
.shot-toolbar,
.delivery-search {
  border-color: rgba(218, 229, 222, .10);
  background: rgba(13, 19, 20, .76);
}

.asset-tab {
  color: #879591;
  background: #151d1f;
  border-color: #303c3e;
}

.asset-row {
  background: #111819;
  border-color: #2c393b;
  border-left: 3px solid rgba(56, 204, 183, .30);
}

.thumb {
  border-radius: 6px;
  background: #1b2527;
  border-color: #3a4749;
}

.loading-strip {
  background: #192324;
}

.loading-strip::after {
  background: linear-gradient(90deg, transparent, var(--jueling-warm), transparent);
}

.workflow-item {
  background: #141c1e;
}

.prompt-preview {
  background: #0b1112;
  border-color: #2c393b;
}

.script-block.active {
  color: #eeeae1;
  border-left-color: var(--jueling-warm);
  background: rgba(242, 164, 67, .08);
  box-shadow: inset 0 0 0 1px rgba(242, 164, 67, .18);
}

.script-block {
  width: 100%;
  border: 1px solid #2c383a;
  border-left: 3px solid #344143;
  border-radius: 5px;
  color: #889793;
  background: #141c1e;
  text-align: left;
}

.script-block.active {
  color: #eeeae1;
  border-color: rgba(242, 164, 67, .30);
  border-left-color: var(--jueling-warm);
  background: rgba(242, 164, 67, .08);
  box-shadow: inset 0 0 0 1px rgba(242, 164, 67, .18);
}

.shot-list::before {
  background: linear-gradient(var(--jueling-warm), rgba(56, 204, 183, .30));
}

.shot-card {
  background: #111819;
  border-color: #2d3a3c;
}

.shot-card::before {
  border-radius: 5px;
  color: #111615;
  background: var(--jueling-warm);
  border-color: #ffc16d;
}

.shot-card.active {
  border-color: rgba(242, 164, 67, .62);
  box-shadow: inset 3px 0 var(--jueling-warm), 0 14px 34px rgba(0,0,0,.18);
}

.asset-chip {
  border-radius: 4px;
}

.video-config {
  background: #131b1c;
}

.reference-strip,
.prompt-card,
.prompt-box,
.result-section {
  background: #0f1617;
  border-color: #2d3a3c;
}

.toggle.on {
  color: #111615;
  background: var(--jueling-mint);
}

.video-result-card,
.version-card,
.delivery-shot {
  background: #101718;
  border-color: #2e3b3d;
}

.delivery-shot.active,
.version-card {
  border-color: rgba(242, 164, 67, .58);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.player {
  border-radius: 8px;
  border: 1px solid #303c3e;
  background: #030606;
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
}

.player-play {
  color: #111615;
  background: var(--jueling-warm);
  border-color: #ffc672;
}

.progress::before {
  background: var(--jueling-warm);
}

.toast {
  border-radius: 6px;
  color: #dffff3;
  background: rgba(24, 93, 76, .97);
  border-color: rgba(75, 220, 172, .46);
}

body.all-mode {
  min-width: 4432px;
  background: #070a0b;
}

.gallery-label {
  color: #d6ddd9;
  background: #12191a;
  border-color: #313d3f;
  border-radius: 7px 7px 0 0;
}

.gallery-label span:first-child {
  color: var(--jueling-warm);
}

.gallery-item .screen-canvas {
  border-radius: 0 0 7px 7px;
}

/* Small state surfaces that carry the new brand accents. */
.close-x {
  border-radius: 6px;
  color: #aebbb7;
  background: #151d1f;
  border-color: #303d3f;
}

.radio-card {
  border-radius: 6px;
  color: #96a39f;
  background: #0d1314;
  border-color: #303c3e;
}

.radio-card.selected {
  color: #ffe1ad;
  background: rgba(242, 164, 67, .09);
  border-color: rgba(242, 164, 67, .58);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.radio-card.selected .radio-dot {
  background: var(--jueling-warm);
  border-color: var(--jueling-warm-soft);
  box-shadow: 0 0 0 4px rgba(242, 164, 67, .12);
}

.drawer-backdrop {
  background: rgba(3, 6, 7, .74);
  backdrop-filter: blur(8px);
}

.full-drawer {
  border-radius: 10px;
  background: #0d1314;
  border-color: #344143;
}

.drawer-form {
  border-color: #303d3f;
  background: #151d1f;
}

.drawer-stage {
  background:
    radial-gradient(circle at 80% 10%, rgba(56,204,183,.06), transparent 24%),
    #0d1314;
}

.empty-art::before {
  color: #141817;
  background: linear-gradient(145deg, #ffd28a, #f2a443);
  border-top-color: #38ccb7;
  box-shadow: 12px 14px 0 rgba(56, 204, 183, .12), 0 18px 45px rgba(0,0,0,.28);
}

.parser-editor-toolbar input {
  color: #d5dcd8;
  background: #0e1516;
  border-color: #303d3f;
}

.script-document .matched-title {
  color: #ffe0ad;
  background: rgba(242, 164, 67, .18);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.rule-card {
  border-color: rgba(242, 164, 67, .48);
  background: rgba(242, 164, 67, .08);
}

.rule-card .rule-count {
  color: var(--jueling-warm);
}

.episode-preview-card {
  border-radius: 6px;
  color: #a4b0ac;
  background: #141c1e;
  border-color: #2e3b3d;
}

.episode-preview-card.active {
  color: #f5f0e7;
  border-color: rgba(242, 164, 67, .52);
  background: rgba(242, 164, 67, .08);
  box-shadow: inset 3px 0 var(--jueling-warm);
}

.toggle.on i {
  background: #147f72;
}

.result-empty,
.result-loading {
  color: #82918d;
  border-color: #344143;
  border-radius: 8px;
  background: rgba(17, 24, 25, .34);
}

.spinner {
  border-color: rgba(242, 164, 67, .14);
  border-top-color: var(--jueling-warm);
}
