:root {
  --bg: #050815;
  --panel: #090d1b;
  --panel-2: #0d1223;
  --panel-3: #12182b;
  --line: rgba(190, 204, 255, 0.16);
  --line-strong: rgba(190, 204, 255, 0.28);
  --text: rgba(246, 248, 255, 0.96);
  --muted: rgba(217, 224, 255, 0.66);
  --muted-2: rgba(217, 224, 255, 0.42);
  --pink: #ff2f9c;
  --pink-2: #ff68bd;
  --blue: #08d7ff;
  --cyan: #7ee7ff;
  --green: #7cf7b1;
  --reading-font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --api-text-font: var(--reading-font);
  --api-text-size: 16px;
  --api-text-weight: 750;
  --api-text-line-height: 1.8;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  min-width: 1280px;
  min-height: 760px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

.editor-shell {
  display: grid;
  height: 100vh;
  grid-template-rows: 56px 52px minmax(0, 1fr);
  background:
    radial-gradient(circle at 83% 4%, rgba(255, 47, 156, 0.08), transparent 24rem),
    linear-gradient(180deg, #050817 0%, #040712 100%);
}

body.video-generator-page .editor-shell {
  grid-template-rows: 56px minmax(0, 1fr);
}

body.short-drama-page {
  min-width: 1280px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #050815;
}

body.short-drama-page .editor-shell {
  height: auto;
  min-height: 100vh;
  grid-template-rows: minmax(0, 1fr);
  background:
    radial-gradient(circle at 78% 7%, rgba(255, 47, 156, 0.08), transparent 28rem),
    linear-gradient(180deg, #050817 0%, #040712 100%);
}

body.short-drama-page .app-header,
body.short-drama-page .editor-main,
body.short-drama-page .toast {
  display: none;
}

.short-drama-main {
  display: none;
}

body.short-drama-page .short-drama-main {
  display: block;
  min-height: 100vh;
}

body.short-drama-page .short-drama-canvas {
  display: none;
}

body.short-drama-page.asset-library-mode .plot-page {
  min-height: 68px;
  grid-template-rows: 68px;
}

body.short-drama-page.asset-library-mode .plot-workspace {
  display: none;
}

body.short-drama-page.asset-canvas-mode {
  overflow: hidden;
  background: #eef0f3;
}

body.short-drama-page.asset-library-mode.asset-canvas-mode .plot-page,
body.short-drama-page.asset-library-mode.asset-canvas-mode .asset-library-page {
  display: none;
}

body.short-drama-page.asset-canvas-mode .short-drama-canvas {
  display: block;
}

.plot-page {
  display: grid;
  min-height: 100vh;
  grid-template-rows: 68px auto;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0, rgba(8, 215, 255, 0.08), transparent 28rem),
    #050815;
}

.plot-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 17, 0.96);
}

.plot-project,
.plot-steps,
.plot-account {
  display: flex;
  align-items: center;
}

.plot-project {
  position: relative;
  z-index: 2;
  gap: 14px;
}

.plot-project a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
  font-weight: 900;
}

.plot-project strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.plot-steps {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  justify-content: center;
  gap: 14px;
  transform: translate(-50%, -50%);
  color: rgba(217, 224, 255, 0.5);
  font-size: 14px;
  font-weight: 900;
}

.plot-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.plot-steps b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: rgba(246, 248, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.plot-steps span.active {
  color: #fff;
}

.plot-steps span.active b {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), #7b61ff);
}

.plot-steps i {
  width: 42px;
  height: 1px;
  background: rgba(190, 204, 255, 0.18);
}

.plot-account {
  position: relative;
  z-index: 2;
  width: max-content;
  justify-self: end;
  justify-content: flex-end;
  gap: 4px;
  min-height: 48px;
  padding: 0 8px 0 23px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.plot-account button {
  min-height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  color: rgba(246, 248, 255, 0.86);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
}

.plot-account .plot-avatar {
  width: 36px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff6cb8, #6e8cff);
}

@media (max-width: 1480px) {
  .plot-steps {
    left: calc(50% - 92px);
  }
}

.plot-ratio-picker {
  position: relative;
  display: inline-flex;
}

.plot-ratio-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plot-ratio-button b {
  color: rgba(246, 248, 255, 0.58);
  font-size: 13px;
}

.plot-ratio-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: -8px;
  z-index: 95;
  width: 154px;
  padding: 8px 0;
  border: 1px solid rgba(20, 27, 43, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.plot-ratio-menu[hidden] {
  display: none;
}

.plot-account .plot-ratio-menu button {
  display: grid;
  width: 100%;
  min-height: 38px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 8px;
  padding: 0 14px;
  border-radius: 0;
  color: #111318;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.plot-account .plot-ratio-menu button:hover,
.plot-account .plot-ratio-menu button.active {
  background: #f3f4f6;
}

.plot-ratio-icon {
  display: inline-block;
  box-sizing: border-box;
  border: 1.5px solid #111318;
  border-radius: 2px;
}

.plot-ratio-icon.tall {
  width: 12px;
  height: 20px;
}

.plot-ratio-icon.wide {
  width: 20px;
  height: 12px;
}

.plot-ratio-icon.portrait {
  width: 14px;
  height: 18px;
}

.plot-ratio-icon.classic {
  width: 18px;
  height: 14px;
}

.plot-ratio-icon.square {
  width: 16px;
  height: 16px;
}

.plot-style-picker {
  position: relative;
  display: inline-flex;
}

.plot-style-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.plot-style-button b {
  color: rgba(246, 248, 255, 0.58);
  font-size: 14px;
}

.style-mini-thumb {
  width: 28px;
  height: 20px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: var(--style-bg);
  background-size: cover;
  background-position: center;
}

.plot-style-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: -10px;
  z-index: 90;
  width: 828px;
  max-height: min(560px, calc(100vh - 92px));
  overflow: auto;
  padding: 22px 24px 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    #090d1b;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.plot-style-menu[hidden] {
  display: none;
}

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

.style-menu-head strong {
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.style-menu-head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 18px;
}

.style-menu-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 12px;
}

.style-menu-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(246, 248, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 900;
}

.style-menu-tabs button.active {
  color: #fff;
  border-color: rgba(255, 47, 156, 0.75);
  background: var(--pink);
}

.style-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.style-card {
  position: relative;
  min-width: 0;
  min-height: 86px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.style-card[hidden] {
  display: none;
}

.style-card.active {
  border-color: #7b61ff;
  box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.28);
}

.style-card-art,
.style-card-empty {
  position: absolute;
  inset: 0;
  background: var(--style-bg);
  background-size: cover;
  background-position: center;
}

.style-card-empty {
  display: grid;
  place-items: center;
  color: rgba(246, 248, 255, 0.38);
  background: rgba(255, 255, 255, 0.055);
  font-size: 26px;
  font-weight: 900;
}

.style-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.74));
  content: "";
}

.style-card strong {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.style-thumb-1 {
  --style-bg:
    radial-gradient(circle at 44% 40%, rgba(255, 202, 111, 0.85), transparent 12%),
    linear-gradient(135deg, #3b3e55, #d58d3d);
}

.style-thumb-2 {
  --style-bg:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.55), transparent 18%),
    linear-gradient(135deg, #304540, #94b66b 50%, #1b2b2d);
}

.style-thumb-3 {
  --style-bg: linear-gradient(135deg, #20140e, #87542f 45%, #110d10);
}

.style-thumb-4 {
  --style-bg: linear-gradient(135deg, #0d1a1b, #225148 50%, #0b1015);
}

.style-thumb-5 {
  --style-bg: linear-gradient(135deg, #452a58, #e9c7bc 52%, #87577b);
}

.style-thumb-6 {
  --style-bg: linear-gradient(135deg, #142534, #697e8a 52%, #0b121a);
}

.style-thumb-7 {
  --style-bg: linear-gradient(135deg, #715b50, #e6c2a9 48%, #5b393d);
}

.style-thumb-8 {
  --style-bg: linear-gradient(135deg, #2a2e36, #b49b75 52%, #11151c);
}

.style-thumb-9 {
  --style-bg: linear-gradient(135deg, #14251d, #9aa971 48%, #20261a);
}

.style-thumb-10 {
  --style-bg: linear-gradient(135deg, #162748, #19a5ff 45%, #ff8b25);
}

.style-thumb-11 {
  --style-bg: linear-gradient(135deg, #1c1532, #a878ff 45%, #161923);
}

.style-thumb-custom {
  --style-bg:
    radial-gradient(circle at 50% 48%, rgba(246, 248, 255, 0.36), transparent 15%),
    rgba(255, 255, 255, 0.055);
}

.plot-workspace {
  position: relative;
  display: grid;
  min-height: calc(100vh - 68px);
  justify-items: center;
  align-content: start;
  padding: 18px 24px 86px;
}

.plot-count {
  width: min(880px, 70vw);
  margin-bottom: 8px;
  transform: translateY(8px);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.plot-meta {
  width: min(880px, 70vw);
  margin: 8px 0 28px;
  color: rgba(246, 248, 255, 0.88);
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
  line-height: var(--api-text-line-height);
}

.plot-meta b {
  color: #8d7bff;
  font-weight: 900;
}

.plot-more {
  position: absolute;
  top: 26px;
  right: calc(50% - 430px);
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0;
  font-weight: 900;
  line-height: 0;
}

.plot-more::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    -8px 0 0 #fff,
    8px 0 0 #fff;
  content: "";
  transform: translate(-50%, -50%);
}

.plot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(880px, 70vw);
  min-height: max(620px, calc(100vh - 154px));
  padding: 48px 64px 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    #090d1b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 70px rgba(0, 0, 0, 0.28);
}

.plot-card details {
  margin-bottom: 28px;
}

.plot-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.plot-card summary::marker {
  color: var(--muted);
}

.plot-card p {
  max-width: 760px;
  margin: 14px 0 0 30px;
  color: rgba(246, 248, 255, 0.92);
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
  line-height: var(--api-text-line-height);
  white-space: pre-line;
}

.plot-card summary button {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: rgba(246, 248, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
}

.episode-list {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  max-width: 760px;
  margin: 34px 0 0;
}

.episode-item {
  display: grid;
  width: 100%;
  gap: 8px;
}

.episode-line {
  display: grid;
  grid-template-columns: 18px 28px minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  column-gap: 8px;
  margin: 0;
  color: rgba(246, 248, 255, 0.96);
  cursor: pointer;
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  list-style: none;
}

.plot-card summary.episode-line {
  display: grid;
  grid-template-columns: 18px 28px minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  column-gap: 8px;
  font-size: 20px;
}

.episode-line::-webkit-details-marker {
  display: none;
}

.episode-toggle {
  display: inline-grid;
  width: 18px;
  place-items: center;
  color: #fff;
  transition: transform 0.18s ease;
}

.episode-item[open] .episode-toggle {
  transform: rotate(90deg);
}

.episode-number {
  color: #8d7bff;
  font-weight: 900;
}

.episode-line strong {
  min-width: 0;
  color: #fff;
  font-weight: 900;
}

.episode-detail {
  max-width: 706px;
  margin: 0 0 8px 54px;
  padding: 12px 14px;
  border: 1px solid rgba(190, 204, 255, 0.12);
  border-radius: 10px;
  color: rgba(246, 248, 255, 0.92);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
  line-height: var(--api-text-line-height);
  white-space: pre-line;
}

.episode-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-self: end;
  padding: 0 9px;
  border-radius: 999px;
  color: #49d184;
  background: rgba(73, 209, 132, 0.14);
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
}

.episode-status.pending {
  color: rgba(246, 248, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.episode-status.generating {
  color: #71d7ff;
  background: rgba(67, 205, 255, 0.14);
}

.episode-status.failed {
  color: #ff8da8;
  background: rgba(255, 77, 126, 0.14);
}

.plot-bottom-bar {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 14px 0 18px;
  border: 1px solid rgba(190, 204, 255, 0.12);
  border-radius: 999px;
  color: rgba(246, 248, 255, 0.86);
  background: #1d1d20;
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
  line-height: var(--api-text-line-height);
}

.plot-bottom-bar span::before {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6b4cff;
  content: "✓";
  font-size: 14px;
}

.plot-bottom-bar button {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  color: #11131a;
  background: #fff;
  font-family: var(--api-text-font);
  font-size: var(--api-text-size);
  font-weight: var(--api-text-weight);
}

.asset-library-page {
  display: none;
}

body.short-drama-page.asset-library-mode {
  background: #f2f3f5;
}

body.short-drama-page.asset-library-mode .asset-library-page {
  position: relative;
  display: block;
  min-height: calc(100vh - 68px);
  padding: 52px 50px 116px;
  color: #111827;
  background: #f2f3f5;
}

.asset-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.asset-tabs {
  display: flex;
  align-items: center;
  gap: 32px;
}

.asset-tab {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  color: #111827;
  background: transparent;
  font-size: 16px;
  font-weight: 900;
}

.asset-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: #111827;
  content: "";
}

.asset-tab-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #111827;
  font-size: 15px;
  line-height: 1;
}

.asset-tab-count {
  display: inline-grid;
  min-width: 20px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #e4e7eb;
  font-size: 11px;
  font-weight: 900;
}

.asset-edit-button {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: #111;
  font-size: 14px;
  font-weight: 900;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 192px));
  gap: 14px;
  align-items: start;
}

.asset-card {
  display: grid;
  min-height: 292px;
  grid-template-rows: 216px auto auto;
  padding: 4px 4px 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.03);
}

.asset-card.create {
  grid-template-rows: 222px auto auto;
}

.asset-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 14px 14px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.65), transparent 18%),
    linear-gradient(160deg, #e8ebef, #f9fafb);
}

.asset-thumb::before {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(255, 255, 255, 0.3), transparent 10px),
    #202733;
  content: "";
  transform: translateX(-50%);
}

.asset-thumb::after {
  position: absolute;
  right: 35px;
  bottom: -34px;
  left: 35px;
  height: 150px;
  border-radius: 48px 48px 18px 18px;
  background: linear-gradient(180deg, #f6f7f8 0 24%, #2f3c49 24% 100%);
  content: "";
}

.asset-thumb.hero {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 66px, transparent 67px),
    linear-gradient(135deg, #c9dfa0, #f5f6f1);
}

.asset-thumb.hero::before {
  left: 62px;
  background: #1e2732;
}

.asset-thumb.hero::after {
  right: auto;
  left: 14px;
  width: 92px;
  background: linear-gradient(180deg, #f3f4f5 0 24%, #f4d34a 24% 100%);
}

.asset-thumb.hero .asset-head-grid {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 70px;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.asset-thumb.hero .asset-head-grid i {
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%, #202733 0 18px, transparent 19px),
    #eef0f2;
}

.asset-thumb.coach::after {
  background: linear-gradient(180deg, #f7f8f9 0 22%, #4e555c 22% 100%);
}

.asset-thumb.villain {
  background: linear-gradient(135deg, #eee8db, #fafafa);
}

.asset-thumb.villain::after {
  background: linear-gradient(180deg, #fafafa 0 20%, #141414 20% 46%, #f2f2f2 46% 100%);
}

.asset-thumb.assistant::after {
  background: linear-gradient(180deg, #f8f8f8 0 22%, #1f232b 22% 100%);
}

.asset-thumb.manager::before {
  background: #8a3a1d;
}

.asset-thumb.manager::after {
  background: linear-gradient(180deg, #fff 0 28%, #f3f4f5 28% 100%);
}

.asset-thumb.has-image {
  background: #e9ebf0;
}

.asset-thumb.has-image::before,
.asset-thumb.has-image::after {
  display: none;
}

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

.asset-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #08715d;
  background: #c8fff0;
  font-size: 12px;
  font-weight: 900;
  line-height: 24px;
}

.asset-card strong,
.asset-card small {
  margin-right: 16px;
  margin-left: 16px;
}

.asset-card strong {
  margin-top: 14px;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.asset-card small {
  margin-top: 8px;
  color: #7b8491;
  font-size: 12px;
  font-weight: 800;
}

.asset-create-thumb {
  display: grid;
  place-items: center;
  border-radius: 20px 20px 14px 14px;
  background: #e9ebf0;
}

.asset-create-thumb span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px dashed #b9bec7;
  border-radius: 50%;
  color: #a5abb5;
  font-size: 24px;
  font-weight: 400;
}

.asset-bottom-bar {
  position: fixed;
  right: 50%;
  bottom: 28px;
  z-index: 15;
  display: flex;
  width: min(598px, calc(100vw - 120px));
  min-height: 58px;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: #1d1d1f;
  transform: translateX(50%);
}

.asset-bottom-bar span {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.asset-bottom-bar span::before {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6b4cff;
  content: "◐";
  font-size: 12px;
}

.asset-bottom-bar button {
  min-width: 42px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

#assetBackButton {
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
}

#assetNextButton {
  padding: 0 26px;
  color: #111827;
  background: #fff;
}

.short-drama-canvas {
  position: relative;
  height: 100vh;
  overflow: hidden;
  color: #1d2430;
  background-color: #eef0f3;
  background-image:
    radial-gradient(circle, rgba(93, 101, 116, 0.24) 1px, transparent 1px);
  background-size: 20px 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.short-drama-canvas.is-panning {
  cursor: grabbing;
}

.short-drama-toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.short-drama-toolbar-left,
.short-drama-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.short-drama-back {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #1d2430;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.12);
  font-size: 30px;
  font-weight: 400;
}

.short-drama-toolbar-left strong {
  font-size: 14px;
  font-weight: 900;
}

.saved-state {
  color: #16a35d;
  font-size: 12px;
  font-weight: 900;
}

.short-drama-toolbar-right {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.12);
}

.short-drama-toolbar-right button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #1d2430;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.short-drama-toolbar-right .short-drama-avatar {
  width: 34px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff6cb8, #6e8cff);
}

.short-drama-board-tools {
  position: absolute;
  top: 375px;
  left: 16px;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.14);
}

.short-drama-board-tools button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #1f2632;
  background: transparent;
  font-size: 22px;
  font-weight: 900;
}

.short-drama-board-tools button:first-child {
  color: #fff;
  background: #1f2632;
}

.short-drama-zoom {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: #1f2632;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.14);
  font-size: 13px;
  font-weight: 900;
}

.short-drama-zoom button {
  color: #727b87;
  background: transparent;
  font-size: 18px;
}

.matrix-board {
  position: absolute;
  top: 0;
  left: 0;
  width: 2400px;
  height: 1400px;
  transform-origin: 0 0;
  will-change: transform;
}

.matrix-board * {
  user-select: none;
  -webkit-user-drag: none;
}

.matrix-group,
.matrix-card {
  position: absolute;
  z-index: 2;
}

.matrix-group {
  display: flex;
  gap: 58px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(213, 216, 221, 0.62);
}

.matrix-group::after,
.matrix-standalone::after {
  position: absolute;
  top: 50%;
  right: -92px;
  width: 92px;
  height: 2px;
  background: rgba(151, 159, 172, 0.44);
  content: "";
}

.matrix-card {
  width: 198px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  cursor: grab;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.72) inset,
    0 14px 36px rgba(28, 34, 44, 0.12);
}

.matrix-card.dragging {
  z-index: 30;
  cursor: grabbing;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.72) inset,
    0 22px 48px rgba(28, 34, 44, 0.2);
}

.matrix-group .matrix-card {
  position: relative;
}

.matrix-card span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #0f8e99;
  background: #b9fbff;
  font-size: 11px;
  font-weight: 900;
}

.matrix-thumb {
  display: grid;
  height: 162px;
  margin-top: 8px;
  place-items: center;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 48%, #cdd3d9 0 4px, transparent 5px),
    radial-gradient(circle at 50% 58%, #cdd3d9 0 8px, transparent 9px),
    #e6e8eb;
}

.matrix-thumb.has-image {
  overflow: hidden;
  background: #e6e8eb;
}

.matrix-thumb.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matrix-card.wide {
  width: 260px;
}

.matrix-card.wide .matrix-thumb {
  height: 132px;
}

.matrix-card strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  color: #1d2430;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-card small {
  display: block;
  margin-top: 4px;
  color: #8a929d;
  font-size: 11px;
  font-weight: 800;
}

.group-hero {
  top: 160px;
  left: 300px;
}

.character-one {
  top: 160px;
  left: 880px;
}

.character-two {
  top: 160px;
  left: 1110px;
}

.character-three {
  top: 480px;
  left: 880px;
}

.scene-one {
  top: 160px;
  left: 1545px;
}

.scene-two {
  top: 520px;
  left: 1545px;
}

.scene-one::after,
.scene-two::after,
.character-three::after {
  display: none;
}

body.video-generator-page .storyboard-panel {
  grid-template-rows: minmax(0, 1fr);
  padding-top: 0;
}

body.video-generator-page .story-tools {
  display: none;
}

body.video-generator-page .tag-row {
  display: none;
}

body.video-generator-page .production-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 44px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.05);
}

body.video-generator-page .production-tabs button {
  height: 100%;
  padding: 0 18px;
  border: 0;
  border-radius: 0 0 18px 18px;
  color: rgba(246, 248, 255, 0.68);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 900;
}

body.video-generator-page .production-tabs button.active {
  color: #fff;
  background: rgba(5, 8, 17, 0.98);
  box-shadow: inset 0 2px 0 rgba(255, 47, 156, 0.9);
}

body.video-generator-page .production-frame {
  display: grid;
  min-height: 0;
  grid-template-rows: 44px minmax(0, 1fr);
  overflow: hidden;
  padding-right: 12px;
}

body.video-generator-page .production-frame-body {
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(190, 204, 255, 0.18);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.02);
}

body.video-generator-page .production-pane {
  height: 100%;
}

body.video-generator-page .production-pane[hidden] {
  display: none;
}

body.video-generator-page .production-dropzone {
  display: grid;
  height: 100%;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 1px dashed rgba(190, 204, 255, 0.28);
  border-radius: 14px;
  color: rgba(246, 248, 255, 0.76);
  background: rgba(5, 8, 17, 0.34);
}

body.video-generator-page .production-drop-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

body.video-generator-page .production-drop-actions button {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(190, 204, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 900;
}

body.video-generator-page .production-drop-actions button:first-child {
  border-color: rgba(255, 47, 156, 0.68);
  background: var(--pink);
}

body.video-generator-page .production-dropzone p {
  color: rgba(217, 224, 255, 0.54);
  font-size: 12px;
}

body.video-generator-page.drama-matrix-mode .editor-main {
  grid-template-rows: minmax(0, 1fr);
}

body.video-generator-page.drama-matrix-mode .lower-workspace,
body.video-generator-page.drama-matrix-mode .preview-panel {
  display: none;
}

body.video-generator-page.drama-matrix-mode .upper-workspace {
  border-bottom: 0;
}

body.video-generator-page.drama-matrix-mode .storyboard-panel {
  width: 100%;
  flex: 1 1 100%;
  padding: 0;
  border-right: 0;
}

body.video-generator-page.drama-matrix-mode .production-frame {
  padding: 0;
}

body.video-generator-page.drama-matrix-mode .production-tabs {
  width: 380px;
  margin: 12px 0 0 16px;
  border-radius: 14px 14px 0 0;
}

body.video-generator-page.drama-matrix-mode .production-frame-body {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.drama-matrix-board {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  color: #1b2230;
  background-color: #eef0f3;
  background-image:
    radial-gradient(circle, rgba(86, 94, 111, 0.22) 1px, transparent 1px);
  background-size: 20px 20px;
}

.drama-board-topbar {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #222936;
}

.drama-board-topbar strong {
  font-size: 14px;
  font-weight: 900;
}

.drama-board-topbar span {
  color: #17a35b;
  font-size: 12px;
  font-weight: 800;
}

.drama-card {
  position: absolute;
  z-index: 2;
  width: 198px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.72) inset,
    0 14px 36px rgba(28, 34, 44, 0.12);
}

.drama-card::before {
  position: absolute;
  top: 50%;
  right: -92px;
  width: 92px;
  height: 2px;
  background: rgba(149, 159, 174, 0.42);
  content: "";
}

.drama-card span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #0f8e99;
  background: #b9fbff;
  font-size: 11px;
  font-weight: 900;
}

.drama-thumb {
  display: grid;
  height: 162px;
  margin-top: 8px;
  place-items: center;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 48%, #cdd3d9 0 4px, transparent 5px),
    radial-gradient(circle at 50% 58%, #cdd3d9 0 8px, transparent 9px),
    #e6e8eb;
}

.drama-thumb.wide {
  height: 132px;
}

.drama-card strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  color: #1b2230;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-card small {
  display: block;
  margin-top: 4px;
  color: #8a929d;
  font-size: 11px;
  font-weight: 800;
}

.cluster-a {
  top: 110px;
  left: 260px;
}

.cluster-b {
  top: 110px;
  left: 520px;
}

.cluster-c {
  top: 110px;
  left: 850px;
}

.cluster-d {
  top: 110px;
  left: 1180px;
  width: 260px;
}

.cluster-e {
  top: 360px;
  left: 1180px;
  width: 260px;
}

.cluster-f {
  top: 360px;
  left: 850px;
}

.cluster-d::before,
.cluster-e::before {
  width: 160px;
  right: -160px;
}

.cluster-e::before,
.cluster-f::before {
  display: none;
}

.drama-board-tools {
  position: absolute;
  top: 320px;
  left: 16px;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.14);
}

.drama-board-tools button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #1f2632;
  background: transparent;
  font-size: 22px;
  font-weight: 800;
}

.drama-board-tools button:first-child {
  color: #fff;
  background: #1f2632;
}

.drama-board-zoom {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: #1f2632;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(30, 35, 45, 0.14);
  font-size: 13px;
  font-weight: 900;
}

.drama-board-zoom button {
  color: #777f8b;
  background: transparent;
  font-size: 18px;
}

.app-header,
.brand,
.header-nav,
.account-tools,
.project-bar,
.project-actions,
.mode-tabs,
.upper-workspace,
.story-tools,
.left-tools,
.right-tools,
.tag-row,
.player-row,
.transport-row,
.mv-planner,
.style-row,
.style-pills,
.timeline-actions,
.workflow-row,
.timeline-toolbar {
  display: flex;
  align-items: center;
}

.app-header {
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #050817;
}

.brand {
  min-width: 310px;
  gap: 10px;
}

.xlike-logo-shell {
  --xlike-logo-size: 32px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: var(--xlike-logo-size);
  height: var(--xlike-logo-size);
  overflow: hidden;
  border: 1px solid rgba(126, 153, 255, 0.32);
  border-radius: 9px;
  background:
    radial-gradient(circle at 36% 18%, rgba(105, 240, 255, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(17, 23, 54, 0.78), rgba(6, 9, 28, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 16px rgba(25, 39, 92, 0.24),
    0 0 14px rgba(79, 109, 255, 0.2);
  transform-origin: 50% 60%;
  animation: xlike-logo-enter 800ms ease-out both;
}

.xlike-logo-shell::before {
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42%);
  content: "";
  pointer-events: none;
}

.xlike-logo-mark {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: block;
  width: min(32px, calc(var(--xlike-logo-size) - 2px));
  max-height: calc(var(--xlike-logo-size) - 6px);
  overflow: visible;
  aspect-ratio: 330 / 128;
  line-height: 0;
}

.xlike-logo-mark::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/brand/xlike-logo.webp") center / contain no-repeat;
  content: "";
  filter: brightness(0) saturate(100%) invert(24%) sepia(78%) saturate(926%) hue-rotate(166deg) brightness(82%) contrast(96%);
  opacity: 0.46;
  transform: translate(-2px, 2px) scale(1.018);
  transform-origin: center;
  pointer-events: none;
}

.xlike-logo-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.24));
  pointer-events: none;
  user-select: none;
}

.xlike-logo-edge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  mix-blend-mode: screen;
  pointer-events: none;
}

.xlike-logo-edge-trace {
  fill: none;
  stroke: rgba(99, 224, 255, 0.16);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.xlike-logo-edge-spark {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(235, 255, 255, 0.98) 0 18%, rgba(91, 235, 255, 0.96) 34%, rgba(35, 190, 255, 0.72) 56%, rgba(35, 190, 255, 0) 74%);
  box-shadow:
    0 0 6px rgba(118, 244, 255, 0.9),
    0 0 13px rgba(39, 190, 255, 0.6);
  opacity: 0;
  offset-anchor: 50% 50%;
  offset-path: path("M 3.3 12 L 9 4 L 14.6 4.1 L 11.9 7.7 L 16.9 13.1 L 11.1 13.3 L 8.4 9.6 L 3.3 13.5 L 0.9 12.2 L 6.1 8.1 L 2.5 4.2 L 7.7 4.2 L 10.1 6.8 L 12.7 4 L 19.7 4 L 19.7 12 L 24.9 12 L 25.3 4 L 30.4 4 L 29.7 7.7 L 34.3 4 L 40.4 4 L 36.3 7.4 L 42.4 7.4 L 41.7 9.5 L 35.3 9.6 L 34.3 11.9 L 42.6 12 L 41.7 14.1 L 31.3 14.1 L 31.7 9.9 L 26.8 14.1 L 22.1 14.1 L 23 4.1 L 21.9 14.1 L 16.1 14.1 L 11.9 8.9 L 6.2 14.1 L 1.4 14.1 Z");
  offset-distance: 0%;
  offset-rotate: auto;
  pointer-events: none;
  will-change: offset-distance, opacity;
  animation: xlike-logo-edge-run 8s linear 1.15s infinite;
}

@keyframes xlike-logo-enter {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.88);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes xlike-logo-edge-run {
  0% {
    opacity: 0.82;
    offset-distance: 0%;
  }

  100% {
    opacity: 0.82;
    offset-distance: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xlike-logo-shell {
    animation: none;
  }

  .xlike-logo-edge,
  .xlike-logo-edge-spark {
    display: none;
  }
}

.brand strong {
  font-size: 28px;
  line-height: 1;
}

.clapper {
  color: #fff;
  font-size: 18px;
  transform: rotate(-9deg);
}

.header-nav {
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
  margin-left: auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.header-nav a {
  color: rgba(246, 248, 255, 0.86);
}

.header-nav a.active {
  color: #fff;
}

.account-tools {
  gap: 10px;
  white-space: nowrap;
}

.pill-btn,
.credit-btn,
.icon-btn,
.avatar-btn,
.dark-btn,
.mode-tabs button,
.story-tools button,
.tag-row button,
.transport-row button,
.style-pills button,
.timeline-actions button,
.workflow-row button {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.pill-btn {
  padding: 0 14px;
  border-radius: 999px;
}

.credit-btn {
  padding: 0 14px;
  border-radius: 999px;
  color: #ffd3fb;
}

.credit-btn span {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #101427;
  background: #ffd66f;
  font-size: 10px;
}

.icon-btn {
  width: 32px;
  border: 0;
  background: transparent;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border-color: rgba(126, 231, 255, 0.6);
  background: linear-gradient(135deg, #ff6cb8, #6e8cff);
}

.project-bar {
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 17, 0.92);
}

.project-bar h1 {
  font-size: 14px;
  font-weight: 900;
}

.project-actions {
  gap: 10px;
}

.mode-tabs {
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.mode-tabs button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
}

.mode-tabs button.active {
  color: #fff;
  background: var(--pink);
}

.mode-tabs span {
  margin-left: 4px;
  color: var(--pink-2);
  font-size: 10px;
}

.dark-btn {
  padding: 0 14px;
}

.editor-main {
  display: grid;
  min-height: 0;
  grid-template-rows: 432px 1fr;
  background: #050817;
}

.upper-workspace {
  min-height: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.preview-panel {
  display: grid;
  width: 46%;
  min-width: 560px;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) 38px 46px;
  padding: 16px 24px 10px;
  border-right: 1px solid var(--line);
  background: #050817;
}

.video-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border-radius: 2px;
  background: #02040c;
}

#previewCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: min(74%, 620px);
  height: 100%;
  object-fit: contain;
  background: #10172b;
}

.blur-wing {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 22%;
  background:
    linear-gradient(90deg, rgba(4, 5, 10, 0.72), rgba(4, 5, 10, 0.18)),
    url("assets/hero-bg.png") center / cover;
  filter: blur(5px);
  opacity: 0.68;
}

.blur-wing.left {
  left: 11%;
}

.blur-wing.right {
  right: 11%;
  transform: scaleX(-1);
}

.caption-chip {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 50%;
  padding: 2px 8px;
  border-radius: 4px;
  color: #111;
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
  transform: translateX(-50%);
}

.expand-btn {
  position: absolute;
  right: 14px;
  bottom: 34px;
  z-index: 2;
  width: 30px;
  height: 30px;
  color: #fff;
  background: transparent;
  font-size: 24px;
}

.player-row {
  gap: 10px;
  min-width: 0;
  padding: 8px 12px 0;
}

.round-control {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #050817;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.plain-control {
  width: 26px;
  height: 28px;
  color: #fff;
  background: transparent;
  font-size: 20px;
}

.player-row strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  white-space: nowrap;
}

.seek-track {
  height: 5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.seek-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.transport-row {
  gap: 18px;
  padding: 0 18px;
  color: #fff;
}

.transport-row button {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.transport-row .ratio-btn {
  display: inline-flex;
  width: 64px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.speed-select {
  position: relative;
  z-index: 35;
  display: inline-flex;
}

.speed-btn {
  display: inline-flex;
  min-width: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.speed-caret {
  display: block;
  width: 0;
  height: 0;
  margin-top: 2px;
  border-top: 4px solid rgba(246, 248, 255, 0.9);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.speed-select.open .speed-caret {
  transform: rotate(180deg);
}

.speed-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: -10px;
  z-index: 70;
  width: 122px;
  overflow: hidden;
  padding: 5px 0;
  border: 1px solid rgba(95, 105, 135, 0.58);
  border-radius: 4px;
  background: #1b1c20;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44);
}

.speed-menu[hidden] {
  display: none;
}

.speed-menu button {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.speed-menu button.active,
.speed-menu button:hover {
  color: #1c1d20;
  background: #e6e6ea;
}

.ratio-select {
  position: relative;
  z-index: 30;
  display: inline-flex;
}

.ratio-caret {
  display: block;
  width: 0;
  height: 0;
  border-top: 4px solid rgba(246, 248, 255, 0.8);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.ratio-select.open .ratio-caret {
  transform: rotate(180deg);
}

.ratio-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 248px;
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(95, 105, 135, 0.7);
  border-radius: 6px;
  background: #1b1c20;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.ratio-menu[hidden] {
  display: none;
}

.ratio-menu button {
  display: grid;
  width: 100%;
  min-height: 32px;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  color: rgba(246, 248, 255, 0.9);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.ratio-menu button.active,
.ratio-menu button:hover {
  background: #2d2e34;
  color: #fff;
}

.ratio-menu button span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ratio-check {
  color: rgba(246, 248, 255, 0.75);
  opacity: 0;
  text-align: right;
}

.ratio-menu button.active .ratio-check {
  opacity: 1;
}

.ratio-icon {
  display: block;
  border: 1.5px solid rgba(202, 208, 232, 0.66);
  border-radius: 2px;
}

.ratio-icon.wide {
  width: 13px;
  height: 9px;
}

.ratio-icon.tall {
  width: 8px;
  height: 14px;
}

.ratio-icon.square {
  width: 12px;
  height: 12px;
}

.ratio-icon.classic {
  position: relative;
  width: 13px;
  height: 10px;
  border-radius: 1px;
}

.ratio-icon.classic::before {
  position: absolute;
  top: -4px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-top: 1.5px solid rgba(202, 208, 232, 0.66);
  border-left: 1.5px solid rgba(202, 208, 232, 0.66);
  content: "";
  transform: rotate(45deg);
}

.ratio-icon.feed {
  width: 9px;
  height: 14px;
}

.spacer {
  flex: 1;
}

.storyboard-panel {
  position: relative;
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  grid-template-rows: 54px 44px minmax(0, 1fr);
  padding: 8px 12px 10px;
  overflow: hidden;
  background: var(--panel);
}

.story-tools {
  justify-content: space-between;
  gap: 12px;
}

.left-tools,
.right-tools {
  gap: 8px;
}

.story-tools button {
  padding: 0 12px;
  font-size: 13px;
}

.right-tools {
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.right-tools button {
  border: 0;
  color: var(--muted);
}

.right-tools button.active {
  color: #fff;
  background: #151c31;
}

.left-tools button.active {
  color: #fff;
  border-color: rgba(255, 47, 156, 0.6);
  background: rgba(255, 47, 156, 0.14);
}

.subtitle-panel {
  position: absolute;
  top: 52px;
  left: 12px;
  z-index: 80;
  width: min(420px, calc(100% - 28px));
  max-height: calc(100% - 64px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 47, 156, 0.45);
  border-radius: 9px;
  background: rgba(13, 14, 22, 0.98);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  scrollbar-color: rgba(255, 255, 255, 0.66) transparent;
}

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

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

.subtitle-panel-head strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.subtitle-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subtitle-text-field {
  display: block;
  margin-bottom: 10px;
}

.subtitle-text-field > span {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.subtitle-text-field small {
  overflow: hidden;
  color: rgba(221, 229, 255, 0.56);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-text-field textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid rgba(190, 204, 255, 0.2);
  border-radius: 8px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.subtitle-text-field textarea:focus {
  border-color: rgba(8, 215, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(8, 215, 255, 0.14);
}

.subtitle-input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.ghost-subtitle-btn,
.apply-subtitle-btn {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.ghost-subtitle-btn {
  color: var(--muted);
  border: 1px solid rgba(190, 204, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.apply-subtitle-btn {
  color: #fff;
  border: 1px solid rgba(255, 47, 156, 0.65);
  background: var(--pink);
}

.subtitle-setting,
.rhyme-color-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 204, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.subtitle-setting.active {
  border-color: rgba(255, 47, 156, 0.82);
  background:
    linear-gradient(90deg, rgba(255, 47, 156, 0.18), rgba(255, 47, 156, 0.08)),
    rgba(255, 255, 255, 0.025);
}

.subtitle-setting-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.subtitle-setting-copy div {
  min-width: 0;
}

.setting-icon {
  flex: 0 0 auto;
  width: 17px;
  color: var(--pink-2);
  font-size: 16px;
  text-align: center;
}

.subtitle-setting strong,
.rhyme-color-panel span,
.subtitle-field > span,
.subtitle-style-section > span {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.subtitle-setting small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(221, 229, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.toggle-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #080b14;
  transition:
    left 0.18s ease,
    background 0.18s ease;
}

.toggle-switch.is-on {
  background: #f5f6fb;
}

.toggle-switch.is-on span {
  left: 19px;
  background: #161924;
}

.sync-btn {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 900;
}

.sync-btn.synced {
  border-color: rgba(8, 215, 255, 0.56);
  color: var(--cyan);
}

.rhyme-color-panel {
  display: block;
  min-height: 68px;
  border-style: dashed;
  border-color: rgba(255, 47, 156, 0.55);
  background: rgba(255, 47, 156, 0.06);
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.color-swatches button {
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
}

.color-swatches .auto-swatch {
  width: auto;
  min-width: 42px;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 800;
}

.color-swatches button.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 47, 156, 0.38);
}

.subtitle-field,
.subtitle-style-section {
  display: block;
  margin-bottom: 16px;
}

.subtitle-field > span,
.subtitle-style-section > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(221, 229, 255, 0.74);
}

.subtitle-field strong {
  color: #fff;
}

.font-select-btn {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgba(190, 204, 255, 0.2);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 900;
}

.subtitle-field input[type="range"] {
  width: 100%;
  accent-color: #f5f6fb;
}

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

.subtitle-style-card {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(190, 204, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.62)),
    linear-gradient(135deg, rgba(20, 30, 62, 0.9), rgba(50, 29, 66, 0.92));
  font-size: 12px;
  font-weight: 900;
}

.subtitle-style-card:nth-child(3),
.subtitle-style-card:nth-child(4) {
  background:
    linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.62)),
    linear-gradient(135deg, rgba(71, 35, 89, 0.95), rgba(227, 190, 59, 0.72));
}

.subtitle-style-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(8, 215, 255, 0.34);
}

.tag-row {
  gap: 8px;
  border-top: 1px solid rgba(190, 204, 255, 0.08);
}

.tag-row button {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.tag-row span {
  flex: 1;
}

.tag-row .view-btn {
  width: 30px;
  padding: 0;
  border-radius: 6px;
}

.tag-row .view-btn.active {
  border-color: rgba(255, 47, 156, 0.6);
  color: var(--pink-2);
  background: rgba(255, 47, 156, 0.16);
}

.story-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 12px 12px 18px 0;
  scrollbar-color: rgba(255, 255, 255, 0.65) transparent;
}

.story-card {
  position: relative;
  min-height: 130px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11182b;
  cursor: pointer;
}

.story-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(8, 215, 255, 0.35);
}

.story-card::before {
  position: absolute;
  inset: 0;
  background: var(--thumb-bg);
  background-size: cover;
  background-position: center;
  content: "";
  transform: scale(1.04);
}

.story-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 17, 0.08), rgba(5, 8, 17, 0.72));
  content: "";
}

.story-play {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: rgba(255, 255, 255, 0.86);
  font-size: 10px;
}

.story-meta {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 2;
}

.story-meta strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.story-meta span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 800;
}

.lower-workspace {
  display: grid;
  min-height: 0;
  grid-template-rows: 110px 46px 40px minmax(120px, 1fr);
  padding: 26px 24px 14px;
  background: #070b18;
}

body.video-generator-page .lower-workspace {
  grid-template-rows: 92px 44px 124px minmax(105px, 1fr);
  padding-top: 20px;
}

.mv-planner {
  justify-content: space-between;
  gap: 24px;
  min-height: 0;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.mv-planner h2 {
  font-size: 17px;
}

.mv-planner h2 span {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: rgba(255, 47, 156, 0.72);
  font-size: 11px;
}

.mv-planner p {
  margin-top: 10px;
  color: #b9e7ff;
  font-size: 13px;
}

.mv-planner button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  color: #151922;
  background: #f6f8ff;
  font-weight: 900;
}

.style-row {
  justify-content: space-between;
  gap: 16px;
}

.style-pills,
.timeline-actions {
  gap: 8px;
}

.style-pills button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

.style-pills button.active {
  color: #fff;
  border-color: rgba(255, 47, 156, 0.54);
}

.style-pills button:nth-child(3) {
  color: #8eeeff;
  border-color: rgba(8, 215, 255, 0.58);
}

.gear-btn {
  width: 34px;
  padding: 0;
}

.timeline-actions .hot-btn {
  padding: 0 16px;
  color: #fff;
  border-color: rgba(255, 47, 156, 0.65);
  background: var(--pink);
}

.workflow-row {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-row button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-row button.active {
  color: #fff;
  background: var(--pink);
}

.workflow-row p {
  color: #b8c4ed;
  font-size: 12px;
}

.video-generate-panel h2 {
  color: #fff;
}

.generation-pills button {
  min-width: 86px;
}

.video-generate-form {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(360px, 1.25fr) minmax(480px, 1fr);
  align-items: stretch;
  gap: 14px;
}

.prompt-editor {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.prompt-editor span,
.generation-options span {
  color: rgba(246, 248, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.prompt-editor textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid rgba(190, 204, 255, 0.2);
  border-radius: 8px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.prompt-editor textarea:focus {
  border-color: rgba(8, 215, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(8, 215, 255, 0.14);
}

.generation-options {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.generation-options label {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(190, 204, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.generation-options select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(190, 204, 255, 0.22);
  border-radius: 7px;
  color: #fff;
  background: #111522;
  font-weight: 800;
}

.generation-options input[type="range"] {
  width: 100%;
  accent-color: var(--pink);
}

.reference-btn {
  min-height: 100%;
  padding: 0 12px;
  border: 1px dashed rgba(8, 215, 255, 0.5);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(8, 215, 255, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.timeline-wrap {
  min-height: 0;
  overflow: hidden;
}

.timeline-toolbar {
  position: relative;
  display: block;
  height: 18px;
  color: #9faad0;
  font-size: 10px;
}

.timeline-toolbar span {
  position: absolute;
  top: 0;
  line-height: 18px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.timeline-toolbar span:first-child {
  transform: translateX(0);
}

.timeline-toolbar span:last-child {
  transform: translateX(-100%);
}

.clip-track {
  position: relative;
  display: flex;
  height: 66px;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-left: 1px solid var(--pink);
  scrollbar-width: none;
}

.clip-track::-webkit-scrollbar {
  display: none;
}

.clip {
  position: relative;
  flex: 0 0 var(--clip-width);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: var(--thumb-bg);
  background-size: cover;
  background-position: center;
}

.clip.active {
  border: 2px solid var(--blue);
}

.clip span {
  position: absolute;
  right: 4px;
  bottom: 3px;
  z-index: 2;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 4px #000;
}

.clip::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.7));
  content: "";
}

.waveform {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 38px;
  margin-top: 7px;
  padding-left: 2px;
  border-left: 1px solid var(--pink);
}

.waveform span {
  display: block;
  flex: 1 1 0;
  min-width: 1px;
  max-width: 2px;
  height: var(--bar-h);
  border-radius: 999px;
  background: rgba(175, 204, 255, 0.72);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 17, 0.94);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
}

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

@media (max-width: 1500px) {
  .story-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .brand {
    min-width: 260px;
  }

  .brand strong {
    font-size: 24px;
  }
}
