: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;
  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%);
}

.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;
}

.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;
}

.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;
  }
}
