.editor-page {
  padding: 36px 0 80px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Simple mode (TikTok-style flow) —— */
.editor-simple-flow {
  margin-bottom: 0;
  padding: 24px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(139, 124, 248, 0.28);
  background:
    linear-gradient(
      145deg,
      rgba(91, 141, 239, 0.12) 0%,
      rgba(139, 124, 248, 0.08) 45%,
      rgba(6, 8, 15, 0.75) 100%
    );
  box-shadow:
    0 20px 50px rgba(91, 141, 239, 0.12),
    var(--shadow-inset);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.editor-simple-flow--panel {
  position: relative;
  overflow: hidden;
}

.editor-simple-flow--panel::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 168, 254, 0.2), transparent 70%);
  pointer-events: none;
}

.simple-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.simple-steps li,
.simple-step {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.simple-step--active {
  border-color: rgba(110, 168, 254, 0.55);
  background: rgba(110, 168, 254, 0.14);
  color: #dce8ff;
  font-weight: 700;
}

.simple-step--done {
  border-color: rgba(53, 196, 139, 0.45);
  background: rgba(53, 196, 139, 0.1);
  color: #b8f0d4;
}

.btn-make-export {
  width: 100%;
  margin-top: 10px;
  padding: 14px 24px;
  font-size: 0.98rem;
  font-weight: 700;
}

.btn-make-export:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.clips-export-bar--success {
  border-color: rgba(53, 196, 139, 0.55);
  background: linear-gradient(135deg, rgba(53, 196, 139, 0.12), rgba(0, 0, 0, 0.15));
}

.clips-export-bar--success #clipsExportBarTitle {
  color: #7ee8b4;
}

.editor-page--simple .upload-dropzone-inner .upload-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #c8dcff;
  background: rgba(110, 168, 254, 0.15);
  border: 1px solid rgba(110, 168, 254, 0.3);
}

.btn-make-clips {
  width: 100%;
  padding: 17px 28px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 28px rgba(110, 168, 254, 0.28);
}

.btn-make-clips:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(110, 168, 254, 0.38);
}

.btn-make-clips:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-open-game {
  width: 100%;
  margin-top: 4px;
}

.btn-open-game--pulse {
  border-color: rgba(139, 124, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(139, 124, 248, 0.2);
  animation: editor-game-pulse 1.6s ease-in-out infinite;
}

@keyframes editor-game-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(139, 124, 248, 0.15);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(139, 124, 248, 0.35);
  }
}

.editor-game-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-game-modal.is-open {
  display: flex;
}

body.editor-game-modal-open {
  overflow: hidden;
}

.editor-game-modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: 22px 24px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(139, 124, 248, 0.22);
  background:
    linear-gradient(165deg, rgba(91, 141, 239, 0.1) 0%, rgba(14, 20, 36, 0.95) 50%),
    var(--panel-strong);
  box-shadow: var(--shadow-lg);
}

.editor-game-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.editor-game-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.editor-game-modal-head {
  margin-bottom: 16px;
  padding-right: 40px;
}

.editor-game-modal-head h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.editor-game-modal-panel .dash-game-picker {
  margin-bottom: 14px;
}

.editor-game-modal .dash-game-layout {
  margin: 0;
}

.editor-game-modal .dash-game-canvas {
  height: 240px;
}

@media (max-width: 720px) {
  .editor-game-modal-panel {
    padding: 18px 16px 20px;
  }
}

.simple-flow-status {
  margin: 14px 0 0;
  min-height: 1.25em;
  font-size: 0.92rem;
  color: var(--primary);
}

.simple-flow-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.scan-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.scan-progress-wrap[hidden] {
  display: none !important;
}

.scan-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #9b7bff);
  transition: width 0.25s ease;
}

.scan-progress-pct {
  flex: 0 0 auto;
  min-width: 2.5em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.generated-clip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.generated-clip-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.clips-export-bar--pulse {
  animation: export-bar-pulse 1.2s ease-in-out 3;
}

.clips-export-bar--ready {
  border-color: rgba(80, 200, 140, 0.45);
}

@keyframes export-bar-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(53, 196, 139, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(53, 196, 139, 0.22);
  }
}

.editor-advanced-toggle-wrap {
  margin: 0 0 16px;
  text-align: center;
}

.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.editor-page--simple .editor-layout--simple.editor-layout--advanced-visible {
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  max-width: none;
}

.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .editor-sidebar-right,
.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .smart-detect-card,
.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .editor-sidebar-left .editor-card:not(.upload-card):not(.account-card) {
  display: none !important;
}

.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .backend-status-panel {
  display: none;
}

.editor-page--simple .editor-hero--simple {
  margin-bottom: 20px;
  text-align: center;
}

.editor-page--simple .editor-hero--simple .editor-hero-copy,
.editor-page--simple .editor-hero--simple > div {
  max-width: 640px;
  margin: 0 auto;
}

.editor-page--simple .editor-hero--simple h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(165deg, #fff 0%, #e2ecff 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.editor-page--simple .editor-advanced-toggle-wrap {
  margin-bottom: 20px;
}

.editor-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.plan-pill--free {
  border: 1px solid rgba(110, 168, 254, 0.45);
  background: rgba(110, 168, 254, 0.12);
  color: #c8dcff;
}

.plan-pill--pro {
  border: 1px solid rgba(180, 140, 255, 0.5);
  background: rgba(120, 90, 255, 0.18);
  color: #e4d8ff;
}

.plan-pill--soft {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.editor-page--simple .upload-card {
  border-color: rgba(110, 168, 254, 0.22);
}

.editor-page--simple .clips-card {
  min-height: 280px;
}

.editor-page--simple .clips-card .card-head h2 {
  font-size: 1.15rem;
}

.editor-page--simple .account-card {
  padding: 16px 18px;
}

.editor-page--simple .account-card .card-head h2 {
  font-size: 1rem;
}

.editor-page--simple .clips-card .ghost-btn#btnAddClipDraft {
  display: none;
}

.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .player-card--simple-preview .timeline-box,
.editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) .player-card--simple-preview .player-head-actions {
  display: none !important;
}

.editor-page--simple .editor-layout--simple.editor-layout--advanced-visible #editorSimpleOptions {
  display: none !important;
}

.editor-page--simple .editor-layout--simple.editor-layout--advanced-visible .player-card--simple-preview .video-preview-shell {
  max-width: none;
  margin: 0;
}

.editor-page--simple .editor-layout--simple.editor-layout--advanced-visible .player-card--simple-preview .player-controls {
  max-width: none;
  margin: 12px 0 0;
}

.editor-manual-guide {
  margin: 0 auto 20px;
  max-width: 960px;
}

.editor-manual-guide-inner {
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(110, 168, 254, 0.35);
  background: linear-gradient(135deg, rgba(110, 168, 254, 0.1) 0%, rgba(120, 90, 255, 0.08) 100%);
}

.editor-manual-guide-inner > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
  color: #e8f0ff;
}

.editor-manual-guide-steps {
  margin: 0 0 10px;
  padding-left: 1.25rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.editor-manual-guide-steps li + li {
  margin-top: 6px;
}

.editor-manual-guide-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, var(--text-soft));
  line-height: 1.45;
}

.editor-page--simple .player-card--simple-preview .video-preview-shell {
  max-width: 300px;
  margin: 0 auto;
}

.editor-page--simple .player-card--simple-preview .player-controls {
  max-width: 300px;
  margin: 12px auto 0;
}

.editor-simple-options {
  border-color: rgba(110, 168, 254, 0.22);
}

.editor-simple-options .simple-options-lead {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.editor-simple-options .field-block {
  margin-bottom: 14px;
}

.simple-crop-block,
.simple-subs-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.simple-subs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.simple-whisper-chip {
  flex: 0 0 auto;
}

.simple-whisper-chip.status-chip--ok {
  border-color: rgba(53, 196, 139, 0.45);
  color: #9ef0c8;
}

.simple-whisper-chip.status-chip--warn {
  border-color: rgba(255, 170, 90, 0.45);
  color: #ffd9a8;
}

.simple-subs-lead {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.simple-subs-generate-btn {
  margin-top: 10px;
}

.simple-subs-generate-btn[hidden] {
  display: none !important;
}

.simple-subs-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.simple-subs-progress-wrap[hidden] {
  display: none !important;
}

.simple-subs-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.simple-subs-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b7bff, var(--primary));
  transition: width 0.25s ease;
}

.simple-subs-progress-pct {
  flex: 0 0 auto;
  min-width: 2.5em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c8b8ff;
}

.simple-subs-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.simple-subs-status--busy {
  color: #c8b8ff;
}

.simple-subs-status--ok {
  color: #7ee8b4;
}

.simple-subs-status--err {
  color: #ffb4a8;
}

.simple-subs-lang {
  margin-top: 10px;
}

.simple-subs-lang[hidden] {
  display: none !important;
}

.editor-page--simple .clips-card-actions #btnExportAllMp4 {
  display: none;
}

.clips-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 214, 140, 0.32);
  background: linear-gradient(
    135deg,
    rgba(61, 214, 140, 0.1) 0%,
    rgba(91, 141, 239, 0.08) 100%
  );
  box-shadow: var(--shadow-inset);
}

.clips-export-bar[hidden] {
  display: none !important;
}

.clips-export-bar-copy {
  display: grid;
  gap: 4px;
  flex: 1 1 200px;
}

.clips-export-bar-copy strong {
  font-size: 1rem;
}

.clips-export-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.clips-export-progress-wrap[hidden] {
  display: none !important;
}

.clips-export-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.clips-export-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #35c48b, var(--primary));
  transition: width 0.2s ease;
}

.clips-export-progress-pct {
  flex: 0 0 auto;
  min-width: 2.5em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #35c48b;
}

.clips-export-bar-hint {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.btn-export-hero {
  flex: 0 0 auto;
  min-width: min(100%, 220px);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(53, 196, 139, 0.25);
}

.btn-export-hero:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.editor-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.editor-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.editor-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.editor-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.editor-gate-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 180, 80, 0.45);
  background: rgba(255, 180, 80, 0.08);
}

.editor-gate-banner[hidden] {
  display: none !important;
}

.editor-gate-banner p {
  margin: 0;
  flex: 1 1 240px;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.92rem;
}

.editor-gate-banner--ok {
  border-color: rgba(80, 200, 140, 0.45);
  background: rgba(80, 200, 140, 0.08);
}

.editor-project-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(91, 141, 239, 0.28);
  background: rgba(91, 141, 239, 0.08);
}

.editor-project-bar[hidden] {
  display: none !important;
}

.editor-project-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  flex: 1 1 200px;
}

.editor-project-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.editor-project-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.editor-project-hint {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.editor-project-hint--ok {
  color: #8ef0c4;
}

.editor-project-hint--err {
  color: #ff9eb0;
}

.editor-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.editor-sidebar-left,
.editor-sidebar-right,
.editor-main {
  display: grid;
  gap: 20px;
}

.editor-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(53, 196, 139, 0.15);
  color: #9ce0c0;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-chip--soft {
  background: rgba(110, 168, 254, 0.14);
  color: #b8d4ff;
}

.editor-page--simple .upload-dropzone {
  min-height: 148px;
  border-width: 2px;
  border-style: dashed;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.editor-page--simple .upload-dropzone:hover,
.editor-page--simple .upload-dropzone.is-dragover {
  box-shadow: inset 0 0 0 1px rgba(110, 168, 254, 0.2);
}

.upload-dropzone {
  display: block;
  cursor: pointer;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-dropzone:hover {
  border-color: rgba(110, 168, 254, 0.45);
  background: rgba(110, 168, 254, 0.06);
}

.upload-dropzone.is-dragover {
  border-color: rgba(53, 196, 139, 0.55);
  background: rgba(53, 196, 139, 0.08);
}

.upload-dropzone-inner {
  min-height: 180px;
  padding: 24px 18px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(110, 168, 254, 0.14);
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.upload-dropzone-inner strong {
  font-size: 1rem;
}

.upload-dropzone-inner span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.source-list-empty {
  margin: 0;
  padding: 14px 10px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.source-item--hidden {
  display: none;
}

.account-cabinet-link {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.account-cabinet-link a {
  font-weight: 600;
  color: var(--primary);
}

.account-upgrade {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.account-upgrade a {
  color: var(--primary);
  font-weight: 700;
}

.account-limits {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.backend-status-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.backend-status-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.conn-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  flex-shrink: 0;
  background: #6b7280;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.conn-dot--ok {
  background: #35c48b;
  box-shadow: 0 0 0 3px rgba(53, 196, 139, 0.2);
}

.conn-dot--off {
  background: #ff6b81;
  box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.18);
}

.backend-status-panel strong {
  font-size: 0.95rem;
}

.backend-status-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.backend-status-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.backend-status-meta strong {
  font-size: 0.85rem;
  color: var(--text-soft);
}

#ffmpegStatusLabel.ffmpeg-ready {
  color: #9ce0c0;
}

#ffmpegStatusLabel.ffmpeg-miss {
  color: #ffb4c0;
}

.backend-recheck-btn {
  width: 100%;
  justify-content: center;
}

.import-url-box {
  margin-top: 18px;
}

.import-url-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.import-url-head label {
  margin-bottom: 0 !important;
}

.url-ytdlp-chip.status-chip--ok {
  border-color: rgba(53, 196, 139, 0.45);
  color: #9ef0c8;
}

.url-ytdlp-chip.status-chip--warn {
  border-color: rgba(255, 170, 90, 0.45);
  color: #ffd9a8;
}

.url-import-hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.4;
}

.url-import-status {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: #9ec4ff;
  min-height: 1.2em;
}

.url-import-status[hidden] {
  display: none !important;
}

.url-import-status--err {
  color: #ffb4a8;
}

.url-import-status--ok {
  color: #7ee8b4;
}

.import-url-box label,
.field-block span,
.timeline-fields span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.inline-field input,
.field-block input,
.field-block select,
.timeline-fields input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  outline: none;
}

.inline-field input::placeholder,
.field-block input::placeholder {
  color: #7f8aa8;
}

.btn-small {
  min-height: 46px;
  padding: 0 14px;
}

.ghost-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-item {
  width: 100%;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.source-item--active {
  border-color: rgba(110, 168, 254, 0.34);
  background: rgba(110, 168, 254, 0.08);
}

.source-thumb,
.generated-clip-thumb {
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(110, 168, 254, 0.3), transparent 34%),
    linear-gradient(180deg, #22315e 0%, #121931 100%);
}

.source-thumb {
  aspect-ratio: 1 / 1;
}

.source-meta strong,
.generated-clip-content strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.source-meta span,
.generated-clip-content span {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.info-row span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.player-card {
  overflow: hidden;
}

.player-head-actions {
  display: flex;
  gap: 12px;
}

.video-preview-shell {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 16px;
}

.video-preview-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(110, 168, 254, 0.2), transparent 32%),
    linear-gradient(180deg, #19234a 0%, #0d1430 100%);
  transition: aspect-ratio 0.2s ease;
}

.video-preview-stage--aspect-9-16 {
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 720px);
  margin-inline: auto;
}

.video-preview-stage--aspect-1-1 {
  aspect-ratio: 1 / 1;
  max-height: min(62vh, 640px);
  margin-inline: auto;
}

.video-preview-stage--aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.video-preview-stage--crop .editor-video.is-visible {
  object-fit: cover;
  object-position: center center;
}

.preview-aspect-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.preview-aspect-badge[hidden] {
  display: none !important;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.crop-pan-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.crop-pan-panel[hidden] {
  display: none !important;
}

.crop-pan-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.crop-pan-pad {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 36px);
  gap: 6px;
  justify-content: center;
  margin: 4px 0;
}

.crop-pad-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.crop-pad-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.crop-pad-btn--center {
  grid-column: 2;
  grid-row: 2;
}

.crop-pan-pad .crop-pad-btn:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
}

.crop-pan-pad .crop-pad-btn:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.crop-pan-pad .crop-pad-btn:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.crop-pan-pad .crop-pad-btn:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.crop-pan-pad .crop-pad-btn:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}

.crop-slider-row {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.crop-slider-row input[type="range"] {
  width: 100%;
}

.subtitle-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 0 5% 8%;
  text-align: center;
}

.subtitle-overlay--bottom {
  bottom: 6%;
}

.subtitle-overlay--middle {
  top: 50%;
  bottom: auto;
  padding: 0 5%;
  transform: translateY(-50%);
}

.subtitle-overlay--top {
  top: 8%;
  bottom: auto;
  padding: 0 5%;
}

.subtitle-overlay span {
  display: inline-block;
  max-width: 94%;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: clamp(0.82rem, 2.1vw, 1.12rem);
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-wrap;
}

.subtitle-overlay--style-bold span {
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.subtitle-overlay--style-classic span {
  color: #fff;
  background: transparent;
  text-shadow:
    0 0 4px #000,
    0 0 10px #000,
    2px 2px 0 #000;
}

.subtitle-overlay--style-yellow span {
  color: #ffe566;
  background: rgba(0, 0, 0, 0.68);
}

.subtitle-auto-box {
  display: grid;
  gap: 10px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}

.subtitle-auto-box[hidden] {
  display: none !important;
}

.subtitle-upload-box {
  display: grid;
  gap: 10px;
}

.subtitle-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subtitle-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.subtitle-show-row {
  margin: 4px 0 8px;
}

.video-preview-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
}

.video-preview-overlay {
  padding: 24px;
  border-radius: 20px;
  background: rgba(8, 12, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.video-preview-overlay h3 {
  margin: 0 0 10px;
}

.video-preview-overlay p {
  margin: 0;
  color: var(--text-soft);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.control-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
}

.control-btn--play {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border: 0;
}

.time-readout {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 700;
}

.timeline-box {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.timeline-header span {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.timeline-header-hint {
  color: var(--text-soft);
  font-size: 0.88rem;
  text-align: right;
}

.timeline-loop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--text-soft);
  cursor: pointer;
}

.timeline-loop span {
  line-height: 1.45;
}

.timeline-loop input {
  margin-top: 3px;
  flex-shrink: 0;
}

.timeline-ruler {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.timeline-track {
  position: relative;
  height: 86px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  user-select: none;
}

.timeline-wave {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.04) 0%,
      rgba(110,168,254,0.09) 8%,
      rgba(255,255,255,0.04) 16%,
      rgba(255,255,255,0.08) 22%,
      rgba(255,255,255,0.03) 28%,
      rgba(143,124,255,0.1) 38%,
      rgba(255,255,255,0.03) 48%,
      rgba(110,168,254,0.08) 58%,
      rgba(255,255,255,0.03) 68%,
      rgba(255,255,255,0.09) 82%,
      rgba(255,255,255,0.04) 100%
    );
  opacity: 0.8;
}

.timeline-selection {
  position: absolute;
  inset: 14px 16% 14px 12%;
  display: flex;
  align-items: stretch;
}

.timeline-handle {
  width: 14px;
  flex-shrink: 0;
  border-radius: 999px;
  background: white;
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.18);
  cursor: ew-resize;
  touch-action: none;
}

.timeline-handle:hover {
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.35);
}

.timeline-range {
  flex: 1;
  margin: 0 4px;
  border-radius: 12px;
  background: rgba(110, 168, 254, 0.22);
  border: 1px solid rgba(110, 168, 254, 0.34);
  cursor: grab;
  touch-action: none;
}

.timeline-range:active {
  cursor: grabbing;
}

.timeline-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.generated-clips-list {
  display: grid;
  gap: 14px;
}

.generated-clip-item--done {
  border-color: rgba(80, 200, 140, 0.35);
}

.generated-clip-item--error {
  border-color: rgba(255, 100, 100, 0.4);
}

.generated-clip-item--busy {
  opacity: 0.85;
}

.clips-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.clips-empty-hint {
  margin: 0 0 14px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.clips-empty-hint[hidden] {
  display: none;
}

.smart-detect-card .smart-detect-lead {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.smart-detect-card .smart-detect-lead strong {
  color: var(--text);
}

.smart-scan-btn {
  width: 100%;
}

.smart-scan-status {
  min-height: 1.35em;
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.scene-cut-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.scene-cut-list[hidden] {
  display: none;
}

.scene-cut-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.scene-cut-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.scene-cut-time {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.scene-cut-score {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.scene-cut-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-suggest-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.scene-suggest-box[hidden] {
  display: none;
}

.scene-suggest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.scene-suggest-head strong {
  font-size: 0.95rem;
}

.scene-suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.scene-suggest-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(120, 90, 255, 0.06);
}

.scene-suggest-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.scene-suggest-meta strong {
  font-size: 0.9rem;
}

.scene-suggest-meta span {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.scene-suggest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-page--simple .generated-clip-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.12));
  transition: border-color 0.2s;
}

.editor-page--simple .generated-clip-thumb--playable {
  cursor: pointer;
}

.editor-page--simple .generated-clip-thumb--playable::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  background: rgba(0, 0, 0, 0.22);
  opacity: 0.85;
  transition: opacity 0.15s;
  pointer-events: none;
}

.editor-page--simple .generated-clip-thumb--playable:hover::after {
  opacity: 1;
  background: rgba(0, 0, 0, 0.35);
}

.editor-page--simple .generated-clip-item--playing {
  border-color: rgba(110, 168, 254, 0.55);
  box-shadow: 0 0 0 1px rgba(110, 168, 254, 0.2);
}

.editor-page--simple .generated-clip-actions .clip-action-mp4 {
  font-weight: 700;
  color: #0d1a12;
}

.generated-clip-item--locked {
  border-color: rgba(180, 140, 255, 0.28);
  background: rgba(120, 90, 255, 0.06);
  opacity: 0.92;
}

.generated-clip-item--locked .generated-clip-thumb {
  position: relative;
  filter: blur(5px) brightness(0.55);
  overflow: hidden;
}

.generated-clip-item--locked .generated-clip-content strong {
  color: var(--text-soft);
}

.clip-lock-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8dcff;
  background: rgba(20, 12, 40, 0.55);
  z-index: 1;
}

.clip-upgrade-btn {
  font-weight: 700;
  color: #d4c4ff;
}

.generated-clip-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-inset);
  background: rgba(255, 255, 255, 0.03);
}

.generated-clip-thumb {
  aspect-ratio: 9 / 16;
}

.generated-clip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field-block {
  display: block;
}

.toggle-list {
  display: grid;
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.export-format-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .export-format-compare {
    grid-template-columns: 1fr;
  }
}

.export-format-col {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.export-format-col--mp4 {
  border-color: rgba(80, 140, 255, 0.35);
  background: rgba(80, 140, 255, 0.06);
}

.export-format-col--webm {
  border-color: rgba(255, 255, 255, 0.08);
}

.export-format-col strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.export-format-list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.export-format-list li {
  margin-bottom: 4px;
}

.export-btn-hint {
  margin: -8px 0 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.render-btn--webm {
  opacity: 0.92;
}

.status-dot--ok {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(53, 196, 139, 0.12);
}

.status-dot--warn {
  background: #e8a838;
  box-shadow: 0 0 0 6px rgba(232, 168, 56, 0.12);
}

.render-box {
  display: grid;
  gap: 12px;
}

.render-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(53, 196, 139, 0.12);
}

.render-status strong {
  display: block;
  margin-bottom: 6px;
}

.render-status p,
.future-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.render-btn {
  width: 100%;
}

.future-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.future-list li {
  padding-left: 16px;
  position: relative;
  color: var(--text-soft);
}

.future-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

@media (max-width: 1300px) {
  .editor-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .editor-sidebar-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .editor-page--simple .editor-layout--simple:not(.editor-layout--advanced-visible) {
    grid-template-columns: 1fr;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar-right {
    grid-template-columns: 1fr;
  }

  .editor-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-fields,
  .generated-clip-item {
    grid-template-columns: 1fr;
  }

  .generated-clip-actions {
    justify-content: flex-start;
  }
}
.editor-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050814;
}

.editor-video.is-visible {
  display: block;
}

.video-preview-placeholder.is-hidden {
  display: none;
}

.account-card .account-status {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.account-fields label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.account-fields label:first-of-type {
  margin-top: 0;
}

.account-fields input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.account-logged-row {
  margin-top: 8px;
}

.account-logged-row--hidden {
  display: none;
}

.account-hint {
  margin: 12px 0 0;
}