:root {
  font-family:
    Inter,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;

  color: #172033;
  background: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(56, 110, 255, 0.09),
      transparent 34%
    ),
    #f5f7fb;
}

/* =========================
   MAIN PAGE
   ========================= */

.studio-page {
  width: min(
    1120px,
    calc(100% - 40px)
  );

  margin:
    52px auto 100px;
}

/* =========================
   HERO
   ========================= */

.studio-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 30px;

  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;

  color: #61708c;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}

.studio-title {
  margin: 0;

  font-size: 44px;
  font-weight: 800;

  line-height: 1.05;

  letter-spacing: -0.04em;
}

.studio-subtitle {
  max-width: 650px;

  margin: 12px 0 0;

  color: #68758d;

  font-size: 16px;

  line-height: 1.7;
}

.video-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.video-card {
  padding: 14px 16px;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.video-card:hover {
  border-color: #9db5f5;
}

.video-card.selected {
  border-color: #245eea;
  background: #f4f7ff;
}

.video-card-title {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.video-card-meta {
  margin-top: 6px;
  color: #8793a6;
  font-size: 12px;
}

/* =========================
   SERVER STATUS
   ========================= */

.status-pill {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding:
    9px 14px;

  border:
    1px solid #dce3ef;

  border-radius: 999px;

  background: white;

  color: #68758d;

  font-size: 13px;
  font-weight: 700;

  box-shadow:
    0 4px 16px
    rgba(27, 44, 78, 0.05);

  white-space: nowrap;
}

.status-pill.connected {
  border-color: #bce9d3;

  background: #ecfbf3;

  color: #168252;
}

.status-pill.error {
  border-color: #ffd4d4;

  background: #fff1f1;

  color: #c74242;
}

.login-panel {
  margin-bottom: 24px;
  padding: 22px 24px;

  border: 1px solid #e1e6ef;
  border-radius: 18px;

  background: white;

  box-shadow:
    0 10px 30px
    rgba(30, 45, 75, 0.05);
}

.login-header h3 {
  margin: 0;

  font-size: 18px;
}

.login-header p {
  margin: 6px 0 18px;

  color: #7b879d;

  font-size: 13px;
}

.login-fields {
  display: grid;

  grid-template-columns:
    1fr 1fr auto;

  gap: 12px;
}

.login-fields input {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid #d7dfec;
  border-radius: 10px;

  font: inherit;

  outline: none;
}

.login-fields input:focus {
  border-color: #4b76ed;

  box-shadow:
    0 0 0 3px
    rgba(75, 118, 237, 0.1);
}

.login-button {
  padding: 11px 20px;

  border: 0;
  border-radius: 10px;

  background: #245eea;

  color: white;

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.login-button:disabled {
  opacity: 0.55;

  cursor: not-allowed;
}

.login-error {
  margin-top: 14px;

  padding: 12px 14px;

  border: 1px solid #ffd3d3;
  border-radius: 10px;

  background: #fff3f3;

  color: #bd3b3b;

  font-size: 13px;
}

.login-success {
  margin-bottom: 24px;

  padding: 13px 16px;

  border: 1px solid #bce9d3;
  border-radius: 12px;

  background: #ecfbf3;

  color: #168252;

  font-size: 14px;
  font-weight: 700;
}

/* =========================
   MAIN GRID
   ========================= */

.layout-grid {
  display: grid;

  grid-template-columns:
    320px 1fr;

  gap: 24px;

  align-items: start;
}

/* =========================
   PANEL
   ========================= */

.panel {
  border:
    1px solid #e3e8f1;

  border-radius: 20px;

  background:
    rgba(
      255,
      255,
      255,
      0.94
    );

  box-shadow:
    0 18px 45px
    rgba(
      32,
      48,
      77,
      0.06
    );

  overflow: hidden;
}

.panel-header {
  padding:
    22px 24px 18px;

  border-bottom:
    1px solid #edf0f5;
}

.panel-header h2 {
  margin: 0;

  font-size: 18px;
}

.panel-header p {
  margin:
    7px 0 0;

  color: #7b879d;

  font-size: 13px;

  line-height: 1.5;
}

.panel-body {
  padding: 24px;
}

/* =========================
   IMPORT PROFILE
   ========================= */

.profile-card {
  width: 100%;

  margin-bottom: 10px;

  padding: 16px;

  border:
    1px solid #dce5f7;

  border-radius: 14px;

  background: #f7faff;

  color: inherit;

  text-align: left;

  font: inherit;

  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.profile-card:hover {
  border-color: #9fb8f5;

  background: #f1f5ff;

  transform:
    translateY(-1px);
}

.profile-card.selected {
  border-color: #4b76ed;

  background: #eef3ff;

  box-shadow:
    0 0 0 3px
    rgba(
      75,
      118,
      237,
      0.1
    );
}

.profile-name {
  margin-bottom: 6px;

  font-size: 15px;

  font-weight: 750;
}

.profile-meta {
  color: #74829b;

  font-size: 13px;
}

/* =========================
   EXCEL UPLOAD
   ========================= */

.upload-zone {
  padding:
    38px 28px;

  border:
    2px dashed #cad5e8;

  border-radius: 18px;

  background: #fafcff;

  text-align: center;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.upload-zone:hover {
  border-color: #4a7cff;

  background: #f4f7ff;
}

.upload-icon {
  width: 54px;
  height: 54px;

  margin:
    0 auto 16px;

  display: grid;

  place-items: center;

  border-radius: 16px;

  background: #eaf0ff;

  color: #245eea;

  font-size: 26px;
}

.upload-title {
  margin: 0;

  font-size: 17px;

  font-weight: 750;
}

.upload-description {
  margin:
    7px 0 18px;

  color: #7b879d;

  font-size: 13px;
}

/* =========================
   FILE INPUT
   ========================= */

#excel-file {
  width:
    min(
      430px,
      100%
    );

  padding: 10px;

  border:
    1px solid #d7dfec;

  border-radius: 10px;

  background: white;

  color: #172033;
}

#excel-file::file-selector-button {
  margin-right: 12px;

  padding:
    9px 15px;

  border: 0;

  border-radius: 8px;

  background: #245eea;

  color: white;

  cursor: pointer;

  font-weight: 650;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

#excel-file::file-selector-button:hover {
  background: #194fcf;
}

#excel-file::file-selector-button:active {
  transform:
    scale(0.98);
}

/* =========================
   PREVIEW STATUS
   ========================= */

.preview-loading {
  margin-top: 20px;

  padding:
    14px 16px;

  border-radius: 12px;

  background: #edf4ff;

  color: #315fbc;
}

.preview-error {
  margin-top: 20px;

  padding:
    14px 16px;

  border:
    1px solid #ffd3d3;

  border-radius: 12px;

  background: #fff3f3;

  color: #bd3b3b;
}

/* =========================
   PREVIEW STATS
   ========================= */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      1fr
    );

  gap: 12px;

  margin-top: 24px;
}

.stat-card {
  padding: 18px;

  border:
    1px solid #e4e9f1;

  border-radius: 14px;

  background: white;

  box-shadow:
    0 5px 18px
    rgba(
      35,
      50,
      80,
      0.03
    );
}

.stat-label {
  color: #8490a4;

  font-size: 12px;

  font-weight: 650;
}

.stat-value {
  margin-top: 8px;

  font-size: 27px;

  font-weight: 800;
}

.stat-card.valid
.stat-value {
  color: #15845a;
}

.stat-card.warning
.stat-value {
  color: #d28a16;
}

.stat-card.error
.stat-value {
  color: #cc4949;
}

/* =========================
   WARNING ROWS
   ========================= */

.warning-section {
  margin-top: 26px;
}

.warning-section h3 {
  margin:
    0 0 12px;

  font-size: 18px;
}

.warning-list {
  margin: 0;

  padding: 0;

  list-style: none;
}

.warning-item {
  margin-bottom: 8px;

  padding:
    13px 15px;

  border:
    1px solid #f1dfb8;

  border-radius: 11px;

  background: #fffaf0;

  color: #5f512f;

  font-size: 13px;

  line-height: 1.55;
}

/* =========================
   EMPTY STATE
   ========================= */

.empty-state {
  margin-top: 22px;

  color: #8591a5;

  text-align: center;

  font-size: 13px;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (
  max-width: 800px
) {
  .login-fields {
    grid-template-columns: 1fr;
  }

  .studio-page {
    width:
      min(
        calc(100% - 24px),
        1120px
      );

    margin-top: 28px;
  }

  .studio-hero {
    flex-direction: column;
  }

  .studio-title {
    font-size: 34px;
  }

  .layout-grid {
    grid-template-columns:
      1fr;
  }

  .stats-grid {
    grid-template-columns:
      repeat(
        2,
        1fr
      );
  }
}

@media (
  max-width: 500px
) {
  .stats-grid {
    grid-template-columns:
      1fr;
  }

  .panel-body {
    padding: 18px;
  }

  .upload-zone {
    padding:
      28px 16px;
  }
}

.import-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.import-button {
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  background: #245eea;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.import-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.confirm-box {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid #dfe5f0;
  border-radius: 16px;
  background: #f9fbff;
}

.confirm-box h3 {
  margin-top: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cancel-button,
.commit-button {
  padding: 10px 17px;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cancel-button {
  border: 1px solid #d4dbe7;
  background: white;
  color: #526078;
}

.commit-button {
  border: 0;
  background: #168252;
  color: white;
}

.commit-result {
  margin-top: 28px;
  padding: 24px;

  border: 1px solid #bce9d3;
  border-radius: 16px;

  background: #f4fcf8;
}

.commit-result h3 {
  margin: 0;

  color: #168252;

  font-size: 20px;
}

.commit-result-description {
  margin: 8px 0 0;

  color: #637568;

  font-size: 14px;
}

.commit-messages {
  margin-top: 22px;
  padding-top: 18px;

  border-top: 1px solid #dcebe2;
}

.commit-messages h4 {
  margin: 0 0 10px;
}

.commit-messages ul {
  margin: 0;
  padding-left: 20px;
}

.commit-messages li {
  margin-bottom: 6px;

  color: #58675d;

  font-size: 13px;
}

.subtitle-workspace {
  margin-top: 24px;
}

.subtitle-search {
  display: grid;
  grid-template-columns: 180px auto;
  gap: 12px;
  margin-bottom: 22px;
}

.subtitle-search input {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid #d7dfec;
  border-radius: 10px;

  font: inherit;
}

.subtitle-load-button {
  padding: 11px 18px;

  border: 0;
  border-radius: 10px;

  background: #245eea;

  color: white;

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.subtitle-list {
  display: flex;

  flex-direction: column;

  gap: 10px;
}

.subtitle-cue {
  padding: 16px;

  border: 1px solid #e2e7ef;
  border-radius: 12px;

  background: #fafcff;
}

.subtitle-time {
  margin-bottom: 7px;

  color: #70809a;

  font-size: 12px;

  font-weight: 700;
}

.subtitle-text {
  color: #172033;

  font-size: 15px;

  line-height: 1.6;
}

.subtitle-meta {
  margin-top: 8px;

  color: #8a96a9;

  font-size: 12px;
}

@media (
  max-width: 800px
) {
  .subtitle-search {
    grid-template-columns:
      1fr;
  }
}





html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f7f8fb;
}

.app {
  min-height: 100vh;
}

.studio-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f7f8fb;
}

.studio-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e7eaf0;
  z-index: 20;
}

.studio-brand {
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eef0f4;
}

.studio-brand-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #245eea;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.studio-brand-name {
  color: #121826;
  font-size: 16px;
  font-weight: 800;
}

.studio-brand-label {
  margin-top: 1px;
  color: #8791a3;
  font-size: 12px;
}

.studio-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.studio-nav-section {
  padding: 18px 12px 7px;
  color: #9aa3b2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-nav-item {
  margin: 2px 0;
  border-radius: 10px;
}

.studio-nav-item a {
  color: inherit;
  text-decoration: none;
}

.studio-nav-link {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 10px;
  color: #525e71;
  font-size: 14px;
  font-weight: 600;
}

.studio-nav-item:hover .studio-nav-link {
  background: #f4f6fa;
  color: #182134;
}

.studio-nav-item.active .studio-nav-link {
  background: #edf3ff;
  color: #245eea;
}

.studio-nav-icon {
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.studio-nav-label {
  flex: 1;
}

.studio-nav-spacer {
  flex: 1;
  min-height: 24px;
}

.studio-main {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
}

.studio-topbar {
  position: sticky;
  top: 0;
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e7eaf0;
  backdrop-filter: blur(12px);
  z-index: 15;
}

.studio-topbar-title {
  color: #171d2b;
  font-size: 18px;
  font-weight: 750;
}

.studio-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.studio-environment {
  padding: 6px 10px;
  border: 1px solid #dce3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #68758b;
  font-size: 12px;
  font-weight: 650;
}

.studio-avatar {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #172033;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.studio-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px;
}

.page-heading {
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 0;
  color: #161d2c;
  font-size: 28px;
  font-weight: 800;
}

.page-heading p {
  margin: 7px 0 0;
  color: #7b879b;
  font-size: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card,
.placeholder-card {
  padding: 22px;
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(24, 33, 52, 0.035);
}

.dashboard-card-title {
  color: #758197;
  font-size: 13px;
  font-weight: 650;
}

.dashboard-card-value {
  margin-top: 13px;
  color: #182033;
  font-size: 28px;
  font-weight: 800;
}

.dashboard-card-description {
  margin-top: 7px;
  color: #98a1b0;
  font-size: 12px;
}

.placeholder-card {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b2;
  font-size: 14px;
}

@media (max-width: 1050px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .studio-shell {
    display: block;
  }

  .studio-sidebar {
    display: none;
  }

  .studio-main {
    min-height: 100vh;
  }

  .studio-topbar {
    padding: 0 18px;
  }

  .studio-content {
    padding: 22px 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.subtitle-track-panel {
  margin-top: 20px;
}

.selected-video-summary {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #f9fafc;
}

.selected-video-label {
  color: #929daf;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.selected-video-title {
  margin-top: 5px;
  color: #172033;
  font-size: 16px;
  font-weight: 750;
}

.selected-video-meta {
  margin-top: 4px;
  color: #8793a6;
  font-size: 12px;
}

.subtitle-open-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.subtitle-language-field {
  width: 220px;
}

.subtitle-language-field label {
  display: block;
  margin-bottom: 7px;
  color: #657188;
  font-size: 12px;
  font-weight: 700;
}

.subtitle-language-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #d7dfec;
  border-radius: 9px;
  font: inherit;
}

.subtitle-open-button {
  padding: 11px 18px;
  border: 0;
  border-radius: 9px;
  background: #245eea;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.subtitle-back-link {
  color: #53627a;
  font-size: 13px;
  font-weight: 700;
}

.subtitle-language-badge {
  padding: 6px 10px;
  border-radius: 7px;
  background: #edf3ff;
  color: #245eea;
  font-size: 12px;
  font-weight: 800;
}

.subtitle-editor-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.subtitle-editor-heading h1 {
  margin: 0;
  color: #161d2c;
  font-size: 28px;
}

.subtitle-editor-heading p {
  margin: 6px 0 0;
  color: #8994a7;
  font-size: 13px;
}

.subtitle-cue-count {
  color: #7c8799;
  font-size: 13px;
  font-weight: 700;
}

.subtitle-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.subtitle-editor-main {
  overflow: hidden;
  border: 1px solid #e4e8ef;
  border-radius: 14px;
  background: white;
}

.subtitle-editor-list-header {
  display: grid;
  grid-template-columns: 250px 1fr;
  padding: 12px 18px;
  border-bottom: 1px solid #e8ebf0;
  background: #f8f9fb;
  color: #8994a6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.subtitle-editor-row {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #eef0f4;
}

.subtitle-editor-row:last-child {
  border-bottom: 0;
}

.subtitle-editor-row {
  cursor: pointer;
}

.subtitle-editor-row.is-active {
  background: #f0f6ff;
}

.subtitle-editor-row.is-selected {
  background: #e8f0ff;
  box-shadow: inset 3px 0 0 #245eea;
}

.subtitle-editor-time {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #68758a;
  font-size: 12px;
}

.subtitle-row-number {
  min-width: 22px;
  color: #9ca5b3;
}

.subtitle-time-arrow {
  color: #b0b7c2;
}

.subtitle-editor-text {
  color: #172033;
  font-size: 14px;
  line-height: 1.6;
}

.subtitle-editor-meta {
  display: flex;
  gap: 8px;
  color: #9aa3b2;
  font-size: 11px;
  white-space: nowrap;
}

.subtitle-editor-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subtitle-side-card {
  padding: 18px;
  border: 1px solid #e4e8ef;
  border-radius: 14px;
  background: white;
}

.subtitle-side-card h3 {
  margin: 0 0 14px;
  color: #1b2232;
  font-size: 14px;
}

.subtitle-side-card p {
  margin: 0;
  color: #7f8a9c;
  font-size: 12px;
  line-height: 1.6;
}

.subtitle-side-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #7c8799;
  font-size: 12px;
}

.subtitle-side-row strong {
  color: #313c50;
}

@media (max-width: 1000px) {
  .subtitle-editor-layout {
    grid-template-columns: 1fr;
  }

  .subtitle-editor-side {
    display: none;
  }
}

.subtitle-editor-text textarea {
  width: 100%;
  min-height: 74px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dce2eb;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.subtitle-editor-text textarea:focus {
  outline: none;
  border-color: #245eea;
}

.subtitle-editor-actions {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtitle-save-button {
  padding: 7px 13px;
  border: 0;
  border-radius: 7px;
  background: #245eea;
  color: white;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-save-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.subtitle-save-error {
  color: #c73a3a;
  font-size: 11px;
}

.subtitle-delete-button {
  padding: 9px 14px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #ffffff;
  color: #dc2626;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-delete-button:hover {
  background: #fef2f2;
}

.subtitle-delete-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.subtitle-timing-editor {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.subtitle-timing-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtitle-timing-editor label span {
  font-size: 10px;
  font-weight: 700;
  color: #778196;
  text-transform: uppercase;
}

.subtitle-timing-editor input {
  width: 95px;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid #dce2eb;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.subtitle-timing-editor input:focus {
  outline: none;
  border-color: #245eea;
}

.subtitle-timing-save-button {
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  background: #172033;
  color: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-timing-save-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.subtitle-create-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  background: #ffffff;
}

.subtitle-create-header {
  margin-bottom: 14px;
}

.subtitle-create-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.subtitle-create-header p {
  margin: 0;
  font-size: 12px;
  color: #7d8798;
}

.subtitle-create-fields {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.subtitle-create-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.subtitle-create-fields label span {
  font-size: 11px;
  font-weight: 700;
  color: #778196;
}

.subtitle-create-fields input {
  box-sizing: border-box;
  width: 110px;
  padding: 9px 10px;
  border: 1px solid #dce2eb;
  border-radius: 8px;
  font: inherit;
}

.subtitle-create-text-field {
  flex: 1;
  min-width: 240px;
}

.subtitle-create-text-field input {
  width: 100%;
}

.subtitle-create-button {
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: #245eea;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-create-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.subtitle-delete-button {
  padding: 9px 14px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #ffffff;
  color: #dc2626;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-delete-button:hover {
  background: #fef2f2;
}

.subtitle-delete-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* =========================
   CLYVEN VIDEO PLAYER
   ========================= */

.subtitle-video-panel {
  position: relative;

  margin-bottom: 18px;

  overflow: hidden;

  border: 1px solid #202b3b;
  border-radius: 16px;

  background: #05080d;

  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.16);
}

.subtitle-player-stage {
  position: relative;

  width: 100%;

  overflow: hidden;

  background: #000;
}

.subtitle-video-player {
  display: block;

  width: 100%;
  max-height: 560px;

  background: #000;

  object-fit: contain;

  cursor: pointer;
}

.subtitle-player-topbar {
  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  display: flex;
  justify-content: flex-start;

  padding: 18px;

  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(2, 6, 12, 0.62),
      rgba(2, 6, 12, 0)
    );

  z-index: 10;
}

.subtitle-player-badge {
  padding: 6px 9px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;

  background: rgba(10, 17, 28, 0.72);
  backdrop-filter: blur(10px);

  color: rgba(255, 255, 255, 0.78);

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.subtitle-player-center-play {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 68px;
  height: 68px;

  transform: translate(-50%, -50%);

  border:
    1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;

  background:
    rgba(8, 14, 24, 0.72);

  backdrop-filter: blur(12px);

  color: white;

  font-size: 26px;

  cursor: pointer;

  box-shadow:
    0 14px 35px
    rgba(0, 0, 0, 0.35);

  z-index: 25;

  transition:
    transform 0.16s ease,
    background 0.16s ease;
}

.subtitle-player-center-play:hover {
  transform:
    translate(-50%, -50%)
    scale(1.06);

  background:
    rgba(36, 94, 234, 0.92);
}

.subtitle-video-caption-layer {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 92px;

  display: flex;
  justify-content: center;
  align-items: center;

  box-sizing: border-box;

  padding: 0 10%;

  pointer-events: none;

  z-index: 20;
}

.subtitle-video-caption {
  display: inline-block;

  max-width: 82%;

  padding: 9px 16px;

  border:
    1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;

  background:
    rgba(4, 8, 14, 0.78);

  backdrop-filter: blur(6px);

  color: #ffffff;

  font-size: 21px;
  font-weight: 650;
  line-height: 1.4;

  text-align: center;

  white-space: normal;

  text-shadow:
    0 2px 5px
    rgba(0, 0, 0, 0.6);
}

.subtitle-player-controls {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  padding:
    42px 16px 12px;

  background:
    linear-gradient(
      to bottom,
      rgba(3, 7, 13, 0),
      rgba(3, 7, 13, 0.94)
    );

  z-index: 30;
}

.subtitle-player-progress-wrap {
  display: flex;
  align-items: center;

  height: 18px;
}

.subtitle-player-progress {
  width: 100%;

  height: 4px;

  margin: 0;

  accent-color: #3b82f6;

  cursor: pointer;
}

.subtitle-player-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  min-height: 38px;
}

.subtitle-player-control-group {
  display: flex;
  align-items: center;

  gap: 7px;
}

.subtitle-player-control-group-right {
  justify-content: flex-end;
}

.subtitle-player-icon-button,
.subtitle-player-pill-button {
  height: 34px;

  border: 0;
  border-radius: 8px;

  background: transparent;

  color:
    rgba(255, 255, 255, 0.88);

  font: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.subtitle-player-icon-button {
  min-width: 34px;

  padding: 0 8px;
}

.subtitle-player-pill-button {
  min-width: 46px;

  padding: 0 11px;

  background:
    rgba(255, 255, 255, 0.08);
}

.subtitle-player-icon-button:hover,
.subtitle-player-pill-button:hover {
  background:
    rgba(255, 255, 255, 0.13);

  color: white;
}

.subtitle-player-icon-button:active,
.subtitle-player-pill-button:active {
  transform: scale(0.96);
}

.subtitle-player-play-button {
  color: white;

  font-size: 15px;
}

.subtitle-player-pill-button.is-active {
  background: #245eea;

  color: white;

  box-shadow:
    0 5px 14px
    rgba(36, 94, 234, 0.3);
}

.subtitle-player-time {
  margin-left: 4px;

  color:
    rgba(255, 255, 255, 0.78);

  font-size: 11px;
  font-weight: 650;

  font-variant-numeric:
    tabular-nums;

  white-space: nowrap;
}

.subtitle-player-volume-icon {
  font-size: 13px;
}

.subtitle-player-volume {
  width: 78px;

  height: 4px;

  accent-color: #3b82f6;

  cursor: pointer;
}

#subtitle-video-shell:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100vw;
  height: 100vh;

  border: 0;
  border-radius: 0;

  background: #000;
}

#subtitle-video-shell:fullscreen
.subtitle-player-stage {
  width: 100%;
}

#subtitle-video-shell:fullscreen
.subtitle-video-player {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
}

@media (max-width: 760px) {
  .subtitle-player-volume,
  .subtitle-player-volume-icon {
    display: none;
  }

  .subtitle-player-control-row {
    gap: 8px;
  }

  .subtitle-player-control-group {
    gap: 3px;
  }

  .subtitle-player-time {
    font-size: 10px;
  }

  .subtitle-video-caption {
    font-size: 17px;
  }
}

.subtitle-timeline-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  background: #ffffff;
}

.subtitle-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.subtitle-timeline {
  overflow-x: auto;
  padding: 18px 0;
}

.subtitle-timeline-track {
  position: relative;
  height: 72px;
  min-width: 100%;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      to right,
      #f4f6f9 0,
      #f4f6f9 49px,
      #dce2eb 50px
    );
}

.subtitle-timeline-cue {
  position: absolute;
  top: 20px;
  height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
}

.subtitle-timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;

  width: 10px;
  transform: translateX(-5px);

  background: transparent;

  cursor: ew-resize;
  z-index: 10;
}

.subtitle-timeline-playhead::after {
  content: '';

  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;

  width: 2px;

  background: #ef4444;
}

.subtitle-timeline-playhead::before {
  content: '';

  position: absolute;
  top: -5px;
  left: -1px;

  width: 12px;
  height: 12px;

  border-radius: 50%;
  background: #ef4444;
}

.subtitle-timeline-cue {
  cursor: pointer;
}

.subtitle-timeline-cue.is-selected {
  border: 2px solid #1d4ed8;
  background: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  z-index: 5;
}

.subtitle-timeline-cue {
  user-select: none;
}

.subtitle-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  z-index: 6;
}

.subtitle-resize-left {
  left: -5px;
}

.subtitle-resize-right {
  right: -5px;
}

.subtitle-timeline-cue:not(.is-selected) .subtitle-resize-handle {
  display: none;
}

.subtitle-timeline-cue.is-selected .subtitle-resize-handle {
  background: rgba(29, 78, 216, 0.35);
}

.subtitle-timeline-cue {
  cursor: grab;
}

.subtitle-timeline-cue:active {
  cursor: grabbing;
}

.subtitle-resize-handle {
  cursor: ew-resize;
}

.subtitle-timeline-cue.is-active {
  background: #bfdbfe;
  border-color: #3b82f6;
}

.subtitle-timeline-cue.is-selected {
  border: 2px solid #1d4ed8;
  background: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  z-index: 5;
}

.subtitle-timeline-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.subtitle-timeline-controls button {
  width: auto;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
  flex: 0 0 auto;
  border: 1px solid #d7deea;
  border-radius: 7px;
  background: #ffffff;
  color: #26334a;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.subtitle-timeline-controls button:hover {
  background: #f4f7fb;
}

.subtitle-timeline-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.subtitle-timeline-time {
  margin-left: 8px;
  color: #69768b;
  font-size: 12px;
  font-weight: 600;
}

.subtitle-timeline-ruler {
  position: relative;
  height: 30px;
  min-width: 100%;
  border-bottom: 1px solid #dfe4ec;
}

.subtitle-timeline-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.subtitle-timeline-tick-line {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 8px;
  background: #aeb7c5;
}

.subtitle-timeline-tick-label {
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);

  color: #7b8799;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* =========================
   SRT IMPORT / EXPORT
   ========================= */

.subtitle-srt-import-panel {
  margin-bottom: 22px;
  padding: 18px 20px;

  border: 1px solid #e1e6ef;
  border-radius: 14px;

  background: #ffffff;

  box-shadow:
    0 8px 24px
    rgba(30, 45, 75, 0.04);
}

.subtitle-srt-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.subtitle-srt-panel-info h3 {
  margin: 0;

  color: #172033;

  font-size: 15px;
  font-weight: 750;
}

.subtitle-srt-panel-info p {
  margin: 5px 0 0;

  color: #8a95a7;

  font-size: 12px;
}

.subtitle-srt-import-actions {
  display: flex;
  gap: 9px;
}

.subtitle-srt-button {
  min-height: 38px;
  padding: 0 15px;

  border-radius: 9px;

  font: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.subtitle-srt-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.subtitle-srt-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.subtitle-srt-import-button,
.subtitle-srt-confirm-button {
  border: 1px solid #245eea;

  background: #245eea;
  color: white;
}

.subtitle-srt-import-button:hover:not(:disabled),
.subtitle-srt-confirm-button:hover:not(:disabled) {
  background: #1e50ca;
}

.subtitle-srt-export-button,
.subtitle-srt-cancel-button {
  border: 1px solid #d8dfeb;

  background: white;
  color: #43516a;
}

.subtitle-srt-export-button:hover:not(:disabled),
.subtitle-srt-cancel-button:hover:not(:disabled) {
  border-color: #b9c5d8;
  background: #f6f8fb;
}

.subtitle-srt-file {
  display: flex;
  align-items: center;
  gap: 11px;

  margin-top: 16px;
  padding: 11px 13px;

  border: 1px solid #e3e8f1;
  border-radius: 10px;

  background: #f8faff;
}

.subtitle-srt-file-badge {
  padding: 5px 7px;

  border-radius: 6px;

  background: #e8efff;
  color: #245eea;

  font-size: 10px;
  font-weight: 800;
}

.subtitle-srt-file strong {
  display: block;

  color: #253047;

  font-size: 12px;
}

.subtitle-srt-file div span {
  display: block;

  margin-top: 2px;

  color: #929cad;

  font-size: 10px;
}

.subtitle-srt-status {
  margin-top: 14px;

  color: #657188;

  font-size: 12px;
}

.subtitle-srt-preview {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 15px;
}

.subtitle-srt-preview-stat {
  min-width: 72px;
  padding: 9px 12px;

  border: 1px solid #e2e7ef;
  border-radius: 9px;

  background: #fafbfc;
}

.subtitle-srt-preview-stat strong {
  display: block;

  color: #172033;

  font-size: 15px;
}

.subtitle-srt-preview-stat span {
  color: #8b96a8;

  font-size: 10px;
}

.subtitle-srt-ready {
  padding: 8px 11px;

  border-radius: 8px;

  background: #ecfbf3;
  color: #168252;

  font-size: 11px;
  font-weight: 700;
}

.subtitle-srt-invalid {
  padding: 8px 11px;

  border-radius: 8px;

  background: #fff1f1;
  color: #c74242;

  font-size: 11px;
  font-weight: 700;
}

.subtitle-srt-error,
.subtitle-srt-error-list {
  margin-top: 12px;

  color: #c74242;

  font-size: 12px;
}

.subtitle-srt-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  margin-top: 16px;
}

@media (max-width: 700px) {
  .subtitle-srt-panel-top {
    align-items: stretch;
    flex-direction: column;
  }

  .subtitle-srt-import-actions {
    width: 100%;
  }

  .subtitle-srt-import-actions .subtitle-srt-button {
    flex: 1;
  }

  .subtitle-srt-preview {
    align-items: stretch;
    flex-direction: column;
  }
}

.subtitle-cue-load-more {
  display: flex;
  justify-content: center;

  padding: 18px;
}

.subtitle-cue-load-more-button {
  padding: 9px 18px;

  border: 1px solid #d7dfec;
  border-radius: 9px;

  background: #ffffff;
  color: #53627a;

  font: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.subtitle-cue-load-more-button:hover {
  border-color: #245eea;

  background: #f5f8ff;
  color: #245eea;
}

/* =========================
   DICTIONARY TABLE
   ========================= */

.dictionary-table-panel {
  margin-top: 26px;
}

.dictionary-table-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dictionary-table-count {
  flex-shrink: 0;

  padding: 7px 11px;

  border: 1px solid #dce5f5;
  border-radius: 999px;

  background: #f5f8ff;

  color: #53627a;

  font-size: 12px;
  font-weight: 750;
}

.dictionary-table-scroll {
  max-height: 650px;

  overflow: auto;

  border: 1px solid #e4e9f1;
  border-radius: 14px;

  background: #ffffff;

  box-shadow:
    inset 0 1px 0
    rgba(255, 255, 255, 0.8);
}

.dictionary-table-row {
  display: grid;

  grid-template-columns:
    56px
    150px
    150px
    180px
    120px
    260px
    260px
    260px;

  min-width: 1436px;

  border-bottom: 1px solid #edf1f6;

  color: #263248;

  font-size: 12px;

  transition:
    background 0.14s ease;
}

.dictionary-table-row:last-child {
  border-bottom: 0;
}

.dictionary-table-row:not(.dictionary-table-header):hover {
  background: #f7f9fd;
}

.dictionary-table-row > div {
  display: flex;
  align-items: center;

  min-width: 0;
  min-height: 58px;

  padding: 11px 13px;

  border-right: 1px solid #f0f2f6;

  line-height: 1.5;

  overflow-wrap: anywhere;
}

.dictionary-table-row > div:last-child {
  border-right: 0;
}

.dictionary-table-header {
  position: sticky;

  top: 0;

  z-index: 12;

  border-bottom: 1px solid #dce3ee;

  background:
    linear-gradient(
      180deg,
      #f9fbff 0%,
      #f4f7fc 100%
    );

  color: #66758f;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.03em;

  text-transform: uppercase;

  box-shadow:
    0 4px 12px
    rgba(31, 48, 78, 0.05);
}

.dictionary-table-header > div {
  min-height: 43px;
}

/* è¡Œå·å›ºå®šåœ¨å·¦è¾¹ */
.dictionary-table-row > div:first-child {
  position: sticky;

  left: 0;

  z-index: 5;

  justify-content: center;

  background: #ffffff;

  color: #98a2b3;

  font-size: 11px;
  font-weight: 700;
}

.dictionary-table-row:not(.dictionary-table-header):hover
  > div:first-child {
  background: #f7f9fd;
}

.dictionary-table-header > div:first-child {
  z-index: 15;

  background: #f6f8fc;

  color: #66758f;
}

/* å›½è¯­å­— */
.dictionary-table-row > div:nth-child(2) {
  color: #172033;

  font-size: 13px;
  font-weight: 750;
}

/* å–ƒå­— */
.dictionary-table-row > div:nth-child(3) {
  color: #172033;

  font-size: 17px;
  font-weight: 600;
}

/* ä¸­æ–‡é‡Šä¹‰ */
.dictionary-table-row > div:nth-child(4) {
  color: #39465b;
}

/* è¯æ€§ */
.dictionary-table-row > div:nth-child(5) {
  color: #245eea;

  font-size: 11px;
  font-weight: 750;
}

/* ä¸‰ä¸ªä¾‹å¥ */
.dictionary-table-row > div:nth-child(6),
.dictionary-table-row > div:nth-child(7),
.dictionary-table-row > div:nth-child(8) {
  color: #657188;

  font-size: 11px;
}

.dictionary-load-more {
  display: flex;
  justify-content: center;

  padding-top: 20px;
}

.dictionary-load-more .import-button {
  min-width: 190px;

  border: 1px solid #d7e0f0;

  background: #ffffff;

  color: #41516c;

  box-shadow:
    0 4px 14px
    rgba(35, 50, 80, 0.05);
}

.dictionary-load-more .import-button:hover {
  border-color: #9fb8f5;

  background: #f5f8ff;

  color: #245eea;
}

@media (max-width: 800px) {
  .dictionary-table-panel .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dictionary-table-scroll {
    max-height: 560px;
  }
}

/* =========================================================
   DICTIONARY PAGE - POLISHED UI
   ========================================================= */

.dictionary-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.dictionary-page .page-heading {
  position: relative;
  margin-bottom: 28px;
  padding-left: 76px;
}

.dictionary-page .page-heading::before {
  content: "æ–‡";
  position: absolute;
  left: 0;
  top: 0;

  display: grid;
  place-items: center;

  width: 56px;
  height: 56px;

  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      #edf4ff,
      #dce9ff
    );

  color: #2468f2;

  font-size: 27px;
  font-weight: 800;

  box-shadow:
    inset 0 0 0 1px rgba(36, 94, 234, 0.08);
}

.dictionary-page .page-heading h1 {
  margin: 0;

  color: #111a2d;

  font-size: 38px;
  font-weight: 800;

  letter-spacing: -0.035em;
}

.dictionary-page .page-heading p {
  margin: 7px 0 0;

  color: #7a879f;

  font-size: 14px;
}


/* =========================================================
   DICTIONARY CARD
   ========================================================= */

.dictionary-table-panel {
  margin-top: 20px;

  border: 1px solid #e3eaf5;
  border-radius: 24px;

  background: rgba(255, 255, 255, 0.97);

  box-shadow:
    0 18px 50px rgba(42, 59, 92, 0.07);

  overflow: hidden;
}

.dictionary-table-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 24px 28px;

  border-bottom: 1px solid #edf1f7;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fcfdff 100%
    );
}

.dictionary-table-panel .panel-header h2 {
  margin: 0;

  color: #151f35;

  font-size: 20px;
  font-weight: 800;

  letter-spacing: -0.02em;
}

.dictionary-table-panel .panel-header p {
  margin: 6px 0 0;

  color: #8793a8;

  font-size: 13px;
}

.dictionary-table-count {
  display: inline-flex;
  align-items: center;

  padding: 8px 14px;

  border: 1px solid #d9e5fb;
  border-radius: 999px;

  background: #f4f8ff;

  color: #2468f2;

  font-size: 12px;
  font-weight: 800;

  box-shadow:
    0 4px 14px rgba(36, 94, 234, 0.06);
}

.dictionary-table-panel .panel-body {
  padding: 22px 26px 26px;

  background: #fbfcff;
}


/* =========================================================
   TABLE CONTAINER
   ========================================================= */

.dictionary-table-scroll {
  position: relative;

  max-height: calc(100vh - 330px);

  overflow: auto;

  border: 1px solid #e1e8f3;
  border-radius: 17px;

  background: #ffffff;

  box-shadow:
    0 8px 28px rgba(32, 48, 77, 0.04);
}

.dictionary-table-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.dictionary-table-scroll::-webkit-scrollbar-track {
  background: #f4f6fa;
}

.dictionary-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #f4f6fa;
  border-radius: 999px;

  background: #b8c2d2;
}

.dictionary-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #929fb4;
}


/* =========================================================
   TABLE ROW
   ========================================================= */

.dictionary-table-row {
  display: grid;

  grid-template-columns:
    108px
    175px
    175px
    190px
    145px
    275px
    275px
    275px;

  min-width: 1618px;

  border-bottom: 1px solid #edf1f6;

  background: #ffffff;

  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.dictionary-table-row:last-child {
  border-bottom: 0;
}

.dictionary-table-row:not(.dictionary-table-header):hover {
  position: relative;

  background: #f8faff;

  box-shadow:
    inset 3px 0 0 #3478f6;
}

.dictionary-table-row > div {
  display: flex;
  align-items: center;

  min-width: 0;
  min-height: 66px;

  padding: 10px 12px;

  border-right: 1px solid #eff2f7;
}

.dictionary-table-row > div:last-child {
  border-right: 0;
}


/* =========================================================
   TABLE HEADER
   ========================================================= */

.dictionary-table-header {
  position: sticky;
  top: 0;

  z-index: 20;

  background:
    linear-gradient(
      180deg,
      #f8faff 0%,
      #f3f7fd 100%
    );

  color: #5d6c85;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 0.02em;

  box-shadow:
    0 4px 14px rgba(37, 54, 83, 0.05);
}

.dictionary-table-header > div {
  min-height: 50px;

  padding-top: 8px;
  padding-bottom: 8px;
}

.dictionary-table-header > div:nth-child(5) {
  color: #2468f2;
}


/* =========================================================
   INDEX + SAVE CELL
   ========================================================= */

.dictionary-table-row > div:first-child {
  position: sticky;
  left: 0;

  z-index: 8;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  gap: 8px;

  background: inherit;
}

.dictionary-table-header > div:first-child {
  z-index: 30;

  background: #f5f8fd;
}

.dictionary-table-row > div:first-child > span:first-child {
  min-width: 18px;

  color: #91a0b6;

  font-size: 11px;
  font-weight: 750;

  text-align: center;
}


/* =========================================================
   EDIT INPUTS
   ========================================================= */

.dictionary-table-row input {
  width: 100%;
  min-width: 0;

  height: 39px;

  padding: 0 11px;

  border: 1px solid #d9e1ed;
  border-radius: 9px;

  background: #ffffff;

  color: #263348;

  font-family: inherit;
  font-size: 13px;
  font-weight: 500;

  outline: none;

  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.dictionary-table-row input:hover {
  border-color: #b5c4da;

  background: #fdfefe;
}

.dictionary-table-row input:focus {
  border-color: #3478f6;

  background: #ffffff;

  box-shadow:
    0 0 0 3px rgba(52, 120, 246, 0.11);
}

.dictionary-table-row > div:nth-child(2) input {
  color: #172033;

  font-size: 14px;
  font-weight: 700;
}

.dictionary-table-row > div:nth-child(3) input {
  color: #172033;

  font-size: 17px;
  font-weight: 650;
}

.dictionary-table-row > div:nth-child(5) input {
  color: #245eea;

  font-size: 12px;
  font-weight: 700;
}


/* =========================================================
   SAVE BUTTON
   ========================================================= */

.dictionary-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 56px;
  height: 36px;

  padding: 0 11px;

  border: 0;
  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      #347df7 0%,
      #1764ed 100%
    );

  color: #ffffff;

  font-family: inherit;
  font-size: 12px;
  font-weight: 750;

  cursor: pointer;

  box-shadow:
    0 5px 12px rgba(36, 94, 234, 0.20);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.dictionary-save-button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 7px 17px rgba(36, 94, 234, 0.28);
}

.dictionary-save-button:active {
  transform: translateY(0);
}

.dictionary-save-button:disabled {
  opacity: 0.55;

  cursor: wait;

  transform: none;

  box-shadow: none;
}

.dictionary-save-error {
  display: grid;
  place-items: center;

  width: 20px;
  height: 20px;

  border-radius: 999px;

  background: #fff0f0;

  color: #d84747;

  font-size: 11px;
  font-weight: 900;
}


/* =========================================================
   LOAD MORE
   ========================================================= */

.dictionary-load-more {
  display: flex;
  justify-content: center;

  padding-top: 22px;
}

.dictionary-load-more .import-button {
  min-width: 210px;

  padding: 11px 18px;

  border: 1px solid #d8e2f2;
  border-radius: 11px;

  background: #ffffff;

  color: #485a77;

  font-size: 13px;
  font-weight: 700;

  box-shadow:
    0 5px 16px rgba(35, 50, 80, 0.05);
}

.dictionary-load-more .import-button:hover {
  border-color: #a9c1fa;

  background: #f4f8ff;

  color: #2468f2;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .dictionary-page .page-heading {
    padding-left: 64px;
  }

  .dictionary-page .page-heading::before {
    width: 48px;
    height: 48px;

    border-radius: 14px;
  }

  .dictionary-page .page-heading h1 {
    font-size: 31px;
  }

  .dictionary-table-panel .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dictionary-table-panel .panel-body {
    padding: 16px;
  }

  .dictionary-table-scroll {
    max-height: 650px;
  }
}

/* CLYVEN_SUBTITLE_STUDIO_V2_START */

.subtitle-hub-v2,
.subtitle-editor-page {
  --sub-ink: #101828;
  --sub-muted: #667085;
  --sub-line: #e4e7ec;
  --sub-soft: #f7f8fa;
  --sub-brand: #2f5bea;
  --sub-brand-soft: #eef2ff;
  --sub-dark: #111827;
}

.subtitle-hub-v2 {
  width: min(1500px, calc(100% - 48px));
  margin: 32px auto 120px;
}

.subtitle-hub-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 24px;
  padding: 34px 38px;
  border: 1px solid #202938;
  border-radius: 28px;
  background: #111827;
  color: white;
  box-shadow: 0 22px 70px rgba(16, 24, 40, 0.18);
}

.subtitle-hub-kicker,
.subtitle-tool-kicker {
  margin: 0 0 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: #98a2b3;
}

.subtitle-hub-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: .96;
  letter-spacing: -.055em;
}

.subtitle-hub-lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.7;
}

.subtitle-hub-model {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 420px;
  justify-content: flex-end;
}

.subtitle-hub-model span {
  padding: 7px 10px;
  border: 1px solid #344054;
  border-radius: 999px;
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 700;
}

.subtitle-hub-model b { color: #667085; }

.subtitle-hub-grid {
  display: grid;
  grid-template-columns: 330px minmax(430px, 1fr) minmax(330px, .72fr);
  gap: 16px;
  align-items: start;
}

.subtitle-hub-section {
  min-width: 0;
  border: 1px solid var(--sub-line);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 40px rgba(16,24,40,.055);
  overflow: hidden;
}

.subtitle-section-heading {
  display: flex;
  gap: 13px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eef0f3;
}

.subtitle-section-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #111827;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.subtitle-section-heading h2 {
  margin: 0;
  color: var(--sub-ink);
  font-size: 16px;
  letter-spacing: -.02em;
}

.subtitle-section-heading p {
  margin: 4px 0 0;
  color: var(--sub-muted);
  font-size: 12px;
  line-height: 1.45;
}

.subtitle-video-stack {
  display: grid;
  gap: 8px;
  max-height: 610px;
  padding: 12px;
  overflow: auto;
}

.subtitle-video-choice,
.subtitle-language-choice,
.subtitle-script-choice {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.subtitle-video-choice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f8f9fb;
  text-align: left;
}

.subtitle-video-choice:hover { background: #f2f4f7; }
.subtitle-video-choice.is-selected {
  border-color: #aebcf7;
  background: var(--sub-brand-soft);
}

.subtitle-video-choice-index {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
}

.subtitle-video-choice-copy { min-width: 0; }
.subtitle-video-choice-copy strong,
.subtitle-video-choice-copy span { display: block; }
.subtitle-video-choice-copy strong {
  overflow: hidden;
  color: var(--sub-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subtitle-video-choice-copy span {
  margin-top: 3px;
  color: var(--sub-muted);
  font-size: 11px;
}

.subtitle-choice-check {
  opacity: 0;
  color: var(--sub-brand);
  font-weight: 900;
}
.subtitle-video-choice.is-selected .subtitle-choice-check { opacity: 1; }

.subtitle-language-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 0 12px;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  background: #fafbfc;
  color: #98a2b3;
}

.subtitle-language-search input {
  width: 100%;
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.subtitle-language-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 550px;
  padding: 0 12px 12px;
  overflow: auto;
}

.subtitle-language-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid #eceff3;
  border-radius: 13px;
  background: white;
  text-align: left;
}

.subtitle-language-choice:hover { border-color: #cbd3df; }
.subtitle-language-choice.is-selected {
  border-color: #9badf3;
  background: #f2f4ff;
  box-shadow: inset 0 0 0 1px rgba(47,91,234,.08);
}

.subtitle-language-flag { font-size: 20px; }
.subtitle-language-copy { min-width: 0; }
.subtitle-language-copy strong,
.subtitle-language-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subtitle-language-copy strong { color: var(--sub-ink); font-size: 12px; }
.subtitle-language-copy span { margin-top: 2px; color: #8a94a6; font-size: 10px; }
.subtitle-language-choice code,
.subtitle-script-choice code {
  color: #667085;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.subtitle-script-grid-v2 {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.subtitle-script-choice {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: white;
  text-align: left;
}

.subtitle-script-choice:hover { border-color: #bdc5d2; }
.subtitle-script-choice.is-selected {
  border-color: #8299ef;
  background: linear-gradient(135deg, #f7f8ff, #eef2ff);
  box-shadow: 0 8px 24px rgba(47,91,234,.08);
}

.subtitle-script-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.subtitle-script-sample {
  color: var(--sub-ink);
  font-size: 26px;
  font-weight: 650;
  line-height: 1.15;
}
.subtitle-script-choice > strong { color: var(--sub-ink); font-size: 13px; }
.subtitle-script-choice > span { color: var(--sub-muted); font-size: 10px; }

.subtitle-script-empty {
  display: grid;
  gap: 6px;
  margin: 12px;
  padding: 18px;
  border: 1px dashed #d8dde6;
  border-radius: 15px;
  color: var(--sub-muted);
  font-size: 12px;
}

.subtitle-variant-note {
  display: flex;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 13px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475467;
}
.subtitle-variant-note-icon { font-size: 18px; }
.subtitle-variant-note strong { font-size: 11px; }
.subtitle-variant-note p { margin: 4px 0; font-size: 10px; }
.subtitle-variant-note small { color: #98a2b3; font-size: 9px; line-height: 1.45; }

.subtitle-launch-dock {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 16px;
  padding: 14px 14px 14px 18px;
  border: 1px solid #d9dee8;
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 60px rgba(16,24,40,.18);
  backdrop-filter: blur(18px);
}

.subtitle-launch-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.subtitle-launch-summary span,
.subtitle-launch-summary strong { display: block; }
.subtitle-launch-summary span { color: #98a2b3; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.subtitle-launch-summary strong { margin-top: 4px; overflow: hidden; color: var(--sub-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.subtitle-launch-button {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 17px;
  border: 0;
  border-radius: 13px;
  background: #111827;
  color: white;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.subtitle-launch-button:hover { background: #1f2937; }
.subtitle-launch-button:disabled { opacity: .45; cursor: not-allowed; }

.subtitle-hub-state {
  padding: 24px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: white;
  color: #667085;
}
.subtitle-hub-state.is-error { color: #b42318; background: #fff7f6; }

/* Editor: tighter, professional subtitle workstation rather than stacked forms. */
.subtitle-editor-page {
  width: min(1520px, calc(100% - 36px));
  margin: 18px auto 90px;
}

.subtitle-editor-toolbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  border: 1px solid #2a3342 !important;
  border-radius: 15px !important;
  background: rgba(17,24,39,.96) !important;
  box-shadow: 0 14px 36px rgba(16,24,40,.16);
  backdrop-filter: blur(16px);
}
.subtitle-back-link { color: #d0d5dd !important; }
.subtitle-language-badge,
.subtitle-script-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #344054;
  border-radius: 8px;
  background: #1d2939;
  color: #f9fafb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.subtitle-script-badge { background: #243b72; border-color: #36539a; }

.subtitle-editor-heading {
  margin: 18px 0 12px !important;
  padding: 0 4px;
}
.subtitle-editor-heading h1 { letter-spacing: -.035em; }

.subtitle-srt-v2 {
  margin-bottom: 12px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
}
.subtitle-srt-v2 .subtitle-srt-panel-top { padding: 14px 16px !important; }
.subtitle-srt-script-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #475467;
  font-size: 10px;
  font-weight: 750;
}
.subtitle-srt-script-warning {
  margin: 0 16px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8eb;
  color: #8a5a12;
  font-size: 11px;
}
.subtitle-srt-v2 .subtitle-srt-script-field { display: none !important; }

.subtitle-editor-layout {
  grid-template-columns: minmax(0, 1fr) 270px !important;
  gap: 12px !important;
  align-items: start;
}

.subtitle-editor-main {
  border: 1px solid #e4e7ec !important;
  border-radius: 16px !important;
  background: #fff !important;
  overflow: hidden;
}

.subtitle-editor-list-header {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: #f8fafc !important;
  color: #667085 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subtitle-editor-row {
  border-color: #edf0f3 !important;
  background: white !important;
}
.subtitle-editor-row:hover { background: #fcfcfd !important; }
.subtitle-editor-row.is-selected {
  background: #f7f8ff !important;
  box-shadow: inset 3px 0 0 #4c6fff;
}
.subtitle-editor-row.is-active { background: #f0fdf8 !important; }

.subtitle-editor-text textarea,
.subtitle-timing-editor input {
  border-color: #dfe3e8 !important;
  border-radius: 9px !important;
  background: #fff !important;
}
.subtitle-editor-text textarea:focus,
.subtitle-timing-editor input:focus {
  border-color: #8096eb !important;
  box-shadow: 0 0 0 3px rgba(76,111,255,.09) !important;
}

.subtitle-inspector-v2 {
  position: sticky;
  top: 68px;
  display: grid;
  gap: 12px;
  padding: 16px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
}
.subtitle-inspector-head h3 { margin: 2px 0 0; color: #101828; font-size: 15px; }
.subtitle-inspector-eyebrow { color: #98a2b3; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.subtitle-inspector-language {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}
.subtitle-inspector-flag { font-size: 25px; }
.subtitle-inspector-language strong,
.subtitle-inspector-language span { display: block; }
.subtitle-inspector-language strong { font-size: 12px; }
.subtitle-inspector-language span { margin-top: 2px; color: #667085; font-size: 9px; }
.subtitle-inspector-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.subtitle-inspector-card { padding: 11px; border: 1px solid #edf0f3; border-radius: 11px; }
.subtitle-inspector-card span,
.subtitle-inspector-card strong,
.subtitle-inspector-card small,
.subtitle-inspector-card code { display: block; }
.subtitle-inspector-card span { color: #98a2b3; font-size: 8px; text-transform: uppercase; }
.subtitle-inspector-card strong { margin-top: 5px; color: #101828; font-size: 12px; }
.subtitle-inspector-card code,
.subtitle-inspector-card small { margin-top: 3px; color: #667085; font-size: 8px; }
.subtitle-inspector-sample { padding: 13px; border-radius: 12px; background: #111827; color: white; }
.subtitle-inspector-sample span { color: #98a2b3; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.subtitle-inspector-sample p { margin: 8px 0 0; font-size: 23px; line-height: 1.2; }
.subtitle-inspector-tip { padding: 12px; border-radius: 12px; background: #eef2ff; color: #344054; }
.subtitle-inspector-tip strong { font-size: 10px; }
.subtitle-inspector-tip p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; }

@media (max-width: 1180px) {
  .subtitle-hub-grid { grid-template-columns: 300px 1fr; }
  .subtitle-script-section { grid-column: 1 / -1; }
  .subtitle-script-grid-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .subtitle-hub-v2,
  .subtitle-editor-page { width: min(100% - 20px, 100%); }
  .subtitle-hub-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
  .subtitle-hub-model { justify-content: flex-start; }
  .subtitle-hub-grid { grid-template-columns: 1fr; }
  .subtitle-script-section { grid-column: auto; }
  .subtitle-language-grid-v2 { grid-template-columns: 1fr; }
  .subtitle-script-grid-v2 { grid-template-columns: 1fr; }
  .subtitle-launch-dock { position: static; grid-template-columns: 1fr; }
  .subtitle-launch-summary { grid-template-columns: 1fr; gap: 8px; }
  .subtitle-editor-layout { grid-template-columns: 1fr !important; }
  .subtitle-inspector-v2 { position: static; }
}

/* CLYVEN_SUBTITLE_STUDIO_V2_END */



/* CLYVEN_KARAOKE_EDITOR */
.subtitle-karaoke-editor {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(120, 120, 120, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.subtitle-karaoke-header,
.subtitle-karaoke-status,
.subtitle-karaoke-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.subtitle-karaoke-title {
  margin: 0;
  font-size: 18px;
}

.subtitle-karaoke-description {
  margin: 6px 0 0;
  opacity: 0.72;
  font-size: 13px;
}

.subtitle-karaoke-header-actions,
.subtitle-karaoke-footer {
  display: flex;
  gap: 8px;
  align-items: center;
}

.subtitle-karaoke-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(128, 128, 128, 0.08);
  font-size: 12px;
}

.subtitle-karaoke-current {
  opacity: 0.6;
}

.subtitle-karaoke-current.is-inside {
  opacity: 1;
  font-weight: 700;
}

.subtitle-karaoke-empty {
  margin: 14px 0;
  padding: 18px;
  border: 1px dashed rgba(128, 128, 128, 0.3);
  border-radius: 14px;
  opacity: 0.72;
}

.subtitle-karaoke-segments {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.subtitle-karaoke-segment-row {
  display: grid;
  grid-template-columns:
    34px minmax(180px, 1fr)
    118px auto 118px auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 12px;
  background: rgba(128, 128, 128, 0.06);
}

.subtitle-karaoke-index {
  align-self: center;
  text-align: center;
  font-weight: 800;
  opacity: 0.62;
}

.subtitle-karaoke-text-field,
.subtitle-karaoke-time-field {
  display: grid;
  gap: 4px;
  font-size: 11px;
  opacity: 0.9;
}

.subtitle-karaoke-text-field input,
.subtitle-karaoke-time-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(128, 128, 128, 0.28);
  border-radius: 9px;
  background: transparent;
  color: inherit;
}

.subtitle-karaoke-secondary-button,
.subtitle-karaoke-add-button,
.subtitle-karaoke-save-button,
.subtitle-karaoke-now-button,
.subtitle-karaoke-delete-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(128, 128, 128, 0.25);
  cursor: pointer;
}

.subtitle-karaoke-save-button {
  font-weight: 800;
}

.subtitle-karaoke-delete-button {
  opacity: 0.74;
}

.subtitle-karaoke-now-button:disabled,
.subtitle-karaoke-save-button:disabled {
  opacity: 0.42;
  cursor: default;
}

@media (max-width: 1100px) {
  .subtitle-karaoke-segment-row {
    grid-template-columns: 30px 1fr 110px auto;
  }

  .subtitle-karaoke-text-field {
    grid-column: 2 / -1;
  }
}

/* CLYVEN_KARAOKE_VISUAL_EDITOR_V2 */

.subtitle-karaoke-visual {
  margin: 16px 0 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(74, 118, 237, 0.18);
  border-radius: 14px;
  background: rgba(75, 118, 237, 0.035);
}

.subtitle-karaoke-visual-ruler {
  position: relative;
  height: 28px;
  margin: 0 4px 4px;
}

.subtitle-karaoke-ruler-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.subtitle-karaoke-ruler-mark:first-child {
  transform: none;
}

.subtitle-karaoke-ruler-mark:last-child {
  transform: translateX(-100%);
}

.subtitle-karaoke-ruler-line {
  display: block;
  width: 1px;
  height: 9px;
  margin: 0 auto 3px;
  background: rgba(80, 96, 125, 0.28);
}

.subtitle-karaoke-ruler-label {
  color: #7a879d;
  font-size: 10px;
  white-space: nowrap;
}

.subtitle-karaoke-visual-track {
  position: relative;
  height: 76px;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(
      to right,
      rgba(98, 116, 150, 0.08) 1px,
      transparent 1px
    );
  background-size: 10% 100%;
}

.subtitle-karaoke-visual-segment {
  position: absolute;
  top: 9px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 4px;
  padding: 0 8px;
  border: 1px solid #7f9ee9;
  border-radius: 9px;
  overflow: hidden;
  background: #dfe8ff;
  color: #1f438f;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.subtitle-karaoke-visual-segment:nth-child(even) {
  border-color: #8ac7ae;
  background: #e0f5eb;
  color: #22664d;
}

.subtitle-karaoke-visual-segment.is-invalid {
  display: none;
}

.subtitle-karaoke-visual-index {
  flex: 0 0 auto;
  opacity: 0.62;
  font-size: 10px;
}

.subtitle-karaoke-visual-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle-karaoke-playhead {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e45757;
  pointer-events: none;
}

.subtitle-karaoke-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e45757;
  transform: translate(-50%, -50%);
}

.subtitle-karaoke-visual-legend {
  margin-top: 8px;
  color: #77849a;
  font-size: 11px;
}

.subtitle-karaoke-segment-card {
  border: 1px solid rgba(128, 128, 128, 0.13);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(128, 128, 128, 0.035);
}

.subtitle-karaoke-segment-card
.subtitle-karaoke-segment-row {
  margin: 0;
  border-radius: 0;
  background: transparent;
}

.subtitle-karaoke-range-editor {
  padding: 8px 12px 12px 54px;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
}

.subtitle-karaoke-range-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #64718a;
  font-size: 11px;
  font-weight: 700;
}

.subtitle-karaoke-range-row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1fr) 56px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.subtitle-karaoke-range-label {
  color: #6e7b91;
  font-size: 11px;
  font-weight: 700;
}

.subtitle-karaoke-range {
  width: 100%;
  min-width: 0;
  accent-color: #4b76ed;
  cursor: ew-resize;
}

.subtitle-karaoke-range-value {
  color: #536178;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.subtitle-karaoke-range-error {
  padding: 8px 12px 12px 54px;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
  color: #b84c4c;
  font-size: 11px;
}

@media (max-width: 900px) {
  .subtitle-karaoke-visual-track {
    height: 68px;
  }

  .subtitle-karaoke-visual-segment {
    top: 8px;
    height: 50px;
    padding: 0 6px;
    font-size: 11px;
  }

  .subtitle-karaoke-range-editor,
  .subtitle-karaoke-range-error {
    padding-left: 12px;
  }

  .subtitle-karaoke-range-row {
    grid-template-columns: 40px minmax(100px, 1fr) 52px;
  }
}

/* CLYVEN_SUBTITLE_INTERACTION_V3 */

.subtitle-karaoke-visual-segment {
  cursor: pointer;
  transition:
    filter 0.14s ease,
    transform 0.14s ease;
}

.subtitle-karaoke-visual-segment:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.subtitle-cue-list-toggle {
  width: 100%;
  margin: 16px 0 12px;
  padding: 13px 16px;
  border: 1px solid #dce3ef;
  border-radius: 12px;
  background: #fff;
  color: #31405b;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.subtitle-cue-list-toggle:hover {
  border-color: #9fb5e9;
  background: #f7f9ff;
}

.subtitle-quick-editor {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  background: #fff;
}

.subtitle-quick-editor.is-empty {
  color: #7a879a;
  background: #fafbfd;
}

.subtitle-quick-editor.is-empty p {
  margin: 6px 0 0;
  font-size: 12px;
}

.subtitle-quick-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.subtitle-quick-editor-title {
  color: #26344d;
  font-size: 14px;
  font-weight: 850;
}

.subtitle-quick-editor-time {
  display: block;
  margin-top: 3px;
  color: #8995a8;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.subtitle-quick-editor-textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
}

.subtitle-quick-editor-textarea:focus {
  border-color: #4b76ed;
  box-shadow: 0 0 0 3px rgba(75, 118, 237, 0.10);
}

@media (max-width: 700px) {
  .subtitle-quick-editor-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* CLYVEN_TIMELINE_DIRECT_TEXT_EDIT_V1 */

.subtitle-timeline-cue {
  position: absolute;
}

.subtitle-timeline-cue-input {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 9px;
  bottom: 3px;
  left: 9px;
  width: calc(100% - 18px);
  min-width: 0;
  padding: 0 5px;
  border: 0;
  border-radius: 5px;
  outline: none;
  background: inherit;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
}

.subtitle-timeline-cue-input:focus {
  background: rgba(255, 255, 255, 0.94);
  color: #172033;
  box-shadow:
    inset 0 0 0 1px rgba(75, 118, 237, 0.55);
}

.subtitle-timeline-cue
.subtitle-resize-handle {
  z-index: 4;
}

/* CLYVEN_TIMELINE_SECOND_CLICK_EDIT_V1 */

.subtitle-timeline-cue-input {
  pointer-events: none;
  cursor: default;
}

.subtitle-timeline-cue-input.is-editable {
  pointer-events: auto;
  cursor: text;
}

/* CLYVEN_SUBTITLE_SAVE_STATUS_V1 */

.subtitle-save-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.subtitle-save-status.is-unsaved {
  background: #fff4d8;
  color: #8a5a00;
}

.subtitle-save-status.is-saving {
  background: #eaf1ff;
  color: #285fce;
}

.subtitle-save-status.is-saved {
  background: #edf8ef;
  color: #347345;
}


/* CLYVEN_SUBTITLE_PUBLISH_WORKFLOW_V1 */

.subtitle-publish-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subtitle-publish-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.subtitle-publish-state.is-loading {
  background: #eef1f6;
  color: #69768a;
}

.subtitle-publish-state.is-draft,
.subtitle-publish-state.is-dirty {
  background: #fff4d8;
  color: #8a5a00;
}

.subtitle-publish-state.is-published {
  background: #edf8ef;
  color: #347345;
}

.subtitle-publish-button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 9px;
  background: #275fe7;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.subtitle-publish-button[disabled] {
  opacity: 0.55;
  cursor: default;
}

.subtitle-publish-error {
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
}


/* Studio video + comment management v1 */
.studio-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.studio-page-heading h1 { margin: 0 0 6px; }
.studio-page-heading p { margin: 0; color: var(--text-muted, #6b7280); }
.sv-layout { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 20px; }
.sv-panel, .sc-video-list, .sc-comments-panel {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  padding: 20px;
}
.sv-panel h2, .sc-video-list h2, .sc-comments-panel h2 { margin-top: 0; }
.sv-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; min-width: 0; }
.sv-label { font-size: 12px; font-weight: 700; color: var(--text-muted, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
.sv-field input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border, #d1d5db);
  border-radius: 10px; padding: 10px 12px; background: transparent; color: inherit;
}
.sv-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sv-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sv-segment, .sv-secondary-button, .sv-primary-button, .sv-danger-button, .sv-link-button, .sv-link-danger {
  border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; font: inherit;
}
.sv-segment { background: #f3f4f6; color: #4b5563; }
.sv-segment.active { background: #111827; color: #fff; }
.sv-primary-button { width: 100%; background: #111827; color: #fff; font-weight: 700; margin-top: 14px; }
.sv-secondary-button { background: #f3f4f6; color: #111827; }
.sv-danger-button { background: #fee2e2; color: #991b1b; }
.sv-danger-button.confirm { background: #b91c1c; color: white; }
.sv-danger-button.compact { padding: 6px 9px; font-size: 12px; }
.sv-link-button { background: transparent; color: #6b7280; }
.sv-link-danger { background: transparent; color: #b91c1c; padding: 4px; font-size: 12px; }
button:disabled { opacity: .55; cursor: default; }
.sv-upload-box { border: 1px dashed #9ca3af; border-radius: 12px; padding: 14px; margin-top: 8px; }
.sv-file-meta, .sv-upload-message { color: var(--text-muted, #6b7280); font-size: 13px; overflow-wrap: anywhere; }
.sv-video-card { border-top: 1px solid var(--border, #e5e7eb); padding: 16px 0; display: flex; gap: 18px; justify-content: space-between; }
.sv-video-card:first-of-type { border-top: 0; }
.sv-video-card-main { min-width: 0; flex: 1; }
.sv-video-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-video-title-row h3 { margin: 0; }
.sv-video-meta, .sv-video-description { color: var(--text-muted, #6b7280); margin: 6px 0 0; overflow-wrap: anywhere; }
.sv-visibility { border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.sv-visibility.public { background: #dcfce7; color: #166534; }
.sv-visibility.private { background: #f3f4f6; color: #4b5563; }
.sv-video-actions { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.sv-alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.sv-alert-error { background: #fee2e2; color: #991b1b; }
.sv-empty { padding: 28px 12px; text-align: center; color: var(--text-muted, #6b7280); }
.sc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
.sc-video-list { display: flex; flex-direction: column; gap: 8px; align-self: start; }
.sc-video-item { border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; text-align: left; background: transparent; cursor: pointer; color: inherit; }
.sc-video-item strong, .sc-video-item span { display: block; }
.sc-video-item span { margin-top: 4px; font-size: 12px; color: var(--text-muted, #6b7280); }
.sc-video-item.active { background: #f3f4f6; border-color: #d1d5db; }
.sc-comment-card { border-top: 1px solid var(--border, #e5e7eb); padding: 18px 0; }
.sc-comment-card:first-of-type { border-top: 0; }
.sc-comment-head { display: flex; justify-content: space-between; gap: 12px; }
.sc-time { color: var(--text-muted, #6b7280); font-size: 12px; margin-left: 8px; }
.sc-comment-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-comment-meta { color: var(--text-muted, #6b7280); font-size: 12px; }
.sc-replies { border-left: 2px solid #e5e7eb; margin: 14px 0 0 14px; padding-left: 14px; }
.sc-reply { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
.sc-reply p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-reply-main { min-width: 0; flex: 1; }
.sc-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
@media (max-width: 980px) {
  .sv-layout, .sc-layout { grid-template-columns: 1fr; }
  .sv-video-card { flex-direction: column; }
  .sv-two-columns { grid-template-columns: 1fr; }
}


/* =========================
   GLOBAL VIDEO UPLOAD
   ========================= */

.studio-upload-global {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;

  width: min(380px, calc(100vw - 48px));

  display: flex;
  align-items: flex-start;
  gap: 14px;

  padding: 16px 18px;

  border: 1px solid #dfe5ef;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 44px rgba(23, 32, 51, 0.18);
}

.studio-upload-global.hidden {
  display: none;
}

.studio-upload-global-main {
  min-width: 0;
  flex: 1;
}

.studio-upload-global-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-upload-global-status {
  margin-top: 5px;
  color: #61708c;
  font-size: 12px;
}

.studio-upload-global-track {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf2;
}

.studio-upload-global-progress {
  height: 100%;
  border-radius: inherit;
  background: #172033;
  transition: width 120ms linear;
}

.studio-upload-global-error {
  margin-top: 8px;
  color: #b42318;
  font-size: 12px;
}

.studio-upload-global.completed {
  border-color: #b7e4c7;
}

.studio-upload-global.failed {
  border-color: #f4b8b8;
}

.studio-upload-global-close {
  border: 0;
  background: transparent;
  color: #61708c;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

/* =========================
   VIDEO MANAGEMENT REFRESH
   ========================= */

.sv-video-page-heading {
  align-items: center;
}

.sv-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-upload-open-button {
  width: auto;
  white-space: nowrap;
}

.sv-video-library-panel {
  padding: 0;
  overflow: hidden;
}

.sv-video-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.sv-video-library-header h2 {
  margin: 0;
}

.sv-video-library-header p {
  margin: 5px 0 0;
  color: var(--text-muted, #6b7280);
  font-size: 13px;
}

.sv-video-list-status {
  padding: 28px 24px;
  color: var(--text-muted, #6b7280);
}

.sv-video-grid {
  display: grid;
  gap: 0;
}

.sv-video-card-rich {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
}

.sv-video-thumbnail {
  position: relative;
  width: 190px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #111827, #334155);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.sv-video-thumbnail.no-cover {
  display: grid;
  place-items: center;
}

.sv-video-thumbnail-placeholder {
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}

.sv-video-duration-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .84);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.sv-video-card-rich .sv-video-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sv-video-empty {
  padding: 64px 24px;
  text-align: center;
}

.sv-video-empty h3 {
  margin: 0;
}

.sv-video-empty p {
  margin: 8px 0 20px;
  color: var(--text-muted, #6b7280);
}

.sv-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(4px);
}

.sv-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 20px;
  background: white;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

.sv-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: white;
}

.sv-modal-header h2 {
  margin: 0;
}

.sv-modal-header p {
  margin: 6px 0 0;
  color: var(--text-muted, #6b7280);
  font-size: 13px;
}

.sv-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sv-modal-body {
  padding: 22px 24px;
}

.sv-modal-upload-box {
  margin-top: 18px;
}

.sv-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border, #e5e7eb);
  background: white;
}

@media (max-width: 800px) {
  .sv-video-page-heading {
    align-items: flex-start;
  }

  .sv-page-actions {
    width: 100%;
  }

  .sv-page-actions button {
    flex: 1;
  }

  .sv-video-card-rich {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .sv-video-thumbnail {
    width: 150px;
  }

  .sv-video-card-rich .sv-video-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {
  .sv-modal-backdrop {
    padding: 0;
  }

  .sv-modal {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .sv-video-card-rich {
    grid-template-columns: 1fr;
  }

  .sv-video-thumbnail {
    width: 100%;
  }

  .sv-video-card-rich .sv-video-actions {
    grid-column: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* =========================
   VIDEO MANAGEMENT POLISH V2
   ========================= */

.sv-page-actions .sv-secondary-button,
.sv-page-actions .sv-primary-button,
.sv-video-actions .sv-secondary-button,
.sv-video-actions .sv-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  line-height: 1;
  white-space: nowrap;
}

.sv-page-actions .sv-upload-open-button {
  min-width: 142px;
  font-weight: 750;
}

.sv-page-actions .sv-secondary-button {
  min-width: 92px;
}

.sv-video-library-panel {
  border-radius: 20px;
  box-shadow:
    0 18px 46px rgba(15, 23, 42, 0.06);
}

.sv-video-library-header {
  padding: 24px 26px 20px;
  background:
    linear-gradient(
      180deg,
      rgba(248, 250, 252, 0.95),
      rgba(255, 255, 255, 0.98)
    );
}

.sv-video-library-header h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
}

.sv-video-library-header p {
  margin-top: 6px;
  font-size: 13px;
}

.sv-video-grid {
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
}

.sv-video-card-rich,
.sv-video-card-rich:first-of-type {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 16px;
  border: 1px solid #e7ebf2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.035);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.sv-video-card-rich:hover {
  transform: translateY(-1px);
  border-color: #d7deea;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.075);
}

.sv-video-thumbnail {
  width: 210px;
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 5px 16px rgba(15, 23, 42, 0.10);
}

.sv-video-card-main {
  min-width: 0;
  align-self: center;
}

.sv-video-title-row {
  gap: 9px;
  margin-bottom: 7px;
}

.sv-video-title-row h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.sv-visibility {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.sv-video-meta {
  margin: 0;
  font-size: 13px;
  color: #697386;
}

.sv-video-description {
  color: #7a8597;
  line-height: 1.5;
}

.sv-video-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sv-video-actions .sv-secondary-button {
  background: #f7f8fa;
  border: 1px solid #e7eaf0;
}

.sv-video-actions .sv-secondary-button:hover {
  background: #f0f2f5;
  border-color: #d9dee7;
}

.sv-video-actions .sv-danger-button {
  border: 1px solid #ffd8d8;
  background: #fff1f1;
}

.sv-video-actions .sv-danger-button:hover {
  background: #ffe7e7;
  border-color: #ffc8c8;
}

.sv-video-duration-badge {
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.sv-modal {
  border-radius: 22px;
  box-shadow:
    0 30px 90px rgba(15, 23, 42, .28);
}

.sv-modal-header {
  padding: 24px 26px 20px;
}

.sv-modal-body {
  padding: 24px 26px;
}

.sv-modal-footer {
  padding: 16px 26px 20px;
}

.sv-modal-footer .sv-secondary-button,
.sv-modal-footer .sv-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
}

@media (max-width: 900px) {
  .sv-video-card-rich,
  .sv-video-card-rich:first-of-type {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .sv-video-thumbnail {
    width: 180px;
  }

  .sv-video-card-rich .sv-video-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .sv-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sv-video-grid {
    padding: 10px;
    gap: 10px;
  }

  .sv-video-card-rich,
  .sv-video-card-rich:first-of-type {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }

  .sv-video-thumbnail {
    width: 100%;
  }

  .sv-video-actions {
    justify-content: flex-start;
  }
}


/* =========================
   VIDEO MANAGEMENT DESIGNER PASS V3
   Original Clyven Studio direction
   ========================= */

.sv-video-page-heading {
  align-items: end;
  gap: 24px;
}

.sv-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-page-actions .sv-secondary-button,
.sv-page-actions .sv-primary-button {
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  line-height: 1;
}

.sv-page-actions .sv-secondary-button {
  min-width: 92px;
  border: 1px solid #e3e8f0;
  background: rgba(255, 255, 255, .84);
}

.sv-page-actions .sv-upload-open-button {
  min-width: 146px;
  border: 1px solid #111827;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .10);
  font-weight: 760;
}

.sv-video-library-panel {
  border: 1px solid #e6eaf0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .045);
}

.sv-video-library-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}

.sv-video-library-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.sv-video-library-header p {
  margin: 6px 0 0;
  color: #8a94a5;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}

.sv-video-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(
      180deg,
      rgba(248, 250, 252, .8),
      rgba(250, 251, 253, .48)
    );
}

.sv-video-card-rich,
.sv-video-card-rich:first-of-type {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid #e8ecf2;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .025);
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.sv-video-card-rich::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
  transition: background .16s ease;
}

.sv-video-card-rich:hover {
  transform: translateY(-1px);
  border-color: #dbe2ed;
  box-shadow: 0 9px 24px rgba(15, 23, 42, .065);
}

.sv-video-card-rich:hover::before {
  background: #245eea;
}

.sv-video-thumbnail {
  width: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background-color: #111827;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 4px 12px rgba(15, 23, 42, .08);
}

.sv-video-thumbnail.no-cover {
  background:
    linear-gradient(145deg, #111827, #26354d);
}

.sv-video-thumbnail-placeholder {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.sv-video-duration-badge {
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  background: rgba(8, 15, 28, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  backdrop-filter: blur(4px);
}

.sv-video-card-main {
  min-width: 0;
}

.sv-video-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.sv-video-title-row h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.sv-visibility {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .02em;
}

.sv-video-meta {
  margin: 0;
  color: #778195;
  font-size: 13px;
  line-height: 1.5;
}

.sv-video-description {
  margin: 7px 0 0;
  color: #8b94a4;
  font-size: 13px;
  line-height: 1.5;
}

.sv-video-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sv-video-actions .sv-secondary-button,
.sv-video-actions .sv-danger-button {
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  line-height: 1;
  white-space: nowrap;
}

.sv-video-actions .sv-secondary-button {
  border: 1px solid #e4e8ee;
  background: #f8f9fb;
  color: #20293a;
}

.sv-video-actions .sv-secondary-button:hover {
  border-color: #d9dee7;
  background: #f2f4f7;
}

.sv-video-actions .sv-danger-button {
  border: 1px solid #ffdede;
  background: #fff3f3;
  color: #c93838;
}

.sv-video-actions .sv-danger-button:hover {
  border-color: #ffcaca;
  background: #ffeaea;
}

.sv-video-actions .sv-link-button {
  color: #6b7280;
}

.sv-video-empty {
  padding: 72px 24px;
  text-align: center;
}

.sv-video-empty h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.sv-video-empty p {
  margin: 8px 0 20px;
  color: #8791a2;
}

/* Upload modal: calm, product-like, not copied from other platforms */
.sv-modal-backdrop {
  background: rgba(17, 24, 39, .48);
  backdrop-filter: blur(5px);
}

.sv-modal {
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 22px;
  overflow: auto;
  box-shadow:
    0 30px 90px rgba(15, 23, 42, .24),
    0 0 0 1px rgba(255, 255, 255, .45);
}

.sv-modal-header {
  padding: 24px 26px 19px;
}

.sv-modal-header h2 {
  font-size: 23px;
  letter-spacing: -.025em;
}

.sv-modal-header p {
  max-width: 500px;
  color: #818b9c;
}

.sv-modal-close {
  flex: 0 0 auto;
  border: 1px solid #e7eaf0;
  background: #f8f9fb;
  color: #4b5563;
}

.sv-modal-close:hover {
  background: #f1f3f6;
}

.sv-modal-body {
  padding: 24px 26px 26px;
}

.sv-modal .sv-field + .sv-field,
.sv-modal .sv-field + .sv-two-columns,
.sv-modal .sv-two-columns + .sv-field {
  margin-top: 16px;
}

.sv-modal-upload-box {
  margin-top: 20px;
  padding: 18px;
  border-color: #cfd7e4;
  background: #fbfcfe;
}

.sv-modal-footer {
  padding: 15px 26px 19px;
  background: rgba(255, 255, 255, .96);
}

.sv-modal-footer .sv-secondary-button,
.sv-modal-footer .sv-primary-button {
  height: 42px;
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  line-height: 1;
}

@media (max-width: 900px) {
  .sv-video-card-rich,
  .sv-video-card-rich:first-of-type {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .sv-video-thumbnail {
    width: 170px;
  }

  .sv-video-card-rich .sv-video-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 2px;
  }
}

@media (max-width: 560px) {
  .sv-video-page-heading {
    align-items: stretch;
  }

  .sv-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .sv-page-actions .sv-secondary-button,
  .sv-page-actions .sv-primary-button {
    width: 100%;
    min-width: 0;
  }

  .sv-video-grid {
    gap: 10px;
    padding: 10px;
  }

  .sv-video-card-rich,
  .sv-video-card-rich:first-of-type {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 12px;
  }

  .sv-video-card-rich::before {
    display: none;
  }

  .sv-video-thumbnail {
    width: 100%;
  }

  .sv-video-card-rich .sv-video-actions {
    grid-column: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* =========================
   VIDEO METADATA EDIT V4
   ========================= */

.sv-edit-modal {
  width: min(660px, 100%);
}

.sv-edit-modal .sv-modal-body {
  display: grid;
  gap: 0;
}

.sv-edit-message {
  margin-top: 18px;
}

.sv-video-actions .sv-edit-button {
  border: 1px solid #dce5f7;
  background: #f5f8ff;
  color: #245eea;
  font-weight: 720;
}

.sv-video-actions .sv-edit-button:hover {
  border-color: #c7d6f4;
  background: #edf3ff;
}

/* =========================
   VIDEO LANGUAGE SELECT V5
   ========================= */

.sv-language-select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid #d7dfec;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
  cursor: pointer;
  outline: none;
}

.sv-language-select:hover {
  border-color: #bcc8d9;
}

.sv-language-select:focus {
  border-color: #4b76ed;
  box-shadow: 0 0 0 3px rgba(75, 118, 237, .10);
}

.sv-language-select:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* =========================
   SEARCHABLE LANGUAGE PICKER V6
   ========================= */

.sv-language-picker-field { min-width: 0; }
.sv-language-picker { position: relative; }

.sv-language-picker-trigger {
  width: 100%;
  min-height: 48px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7dfec;
  border-radius: 11px;
  background: #fff;
  color: #172033;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.sv-language-picker.open .sv-language-picker-trigger {
  border-color: #4b76ed;
  box-shadow: 0 0 0 3px rgba(75, 118, 237, .10);
}

.sv-language-picker-value {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-language-picker-flag,
.sv-language-option-flag {
  width: 28px;
  flex: 0 0 28px;
  font-size: 20px;
  text-align: center;
}

.sv-language-picker-copy,
.sv-language-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sv-language-picker-copy strong,
.sv-language-option-copy strong {
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-language-picker-copy span,
.sv-language-option-copy span {
  overflow: hidden;
  color: #8792a5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-language-picker-chevron {
  color: #8a94a5;
  font-size: 9px;
}

.sv-language-picker-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .15);
}

.sv-language-picker-search {
  padding: 10px;
  border-bottom: 1px solid #edf0f4;
  background: #fbfcfe;
}

.sv-language-picker-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d7dfec;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  outline: none;
}

.sv-language-picker-results {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
}

.sv-language-option {
  width: 100%;
  min-height: 52px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.sv-language-option:hover { background: #f4f7fb; }
.sv-language-option.selected { background: #eef3ff; }
.sv-language-option.selected .sv-language-option-copy strong { color: #245eea; }

.sv-language-picker-empty {
  padding: 24px 12px;
  color: #8994a6;
  text-align: center;
  font-size: 13px;
}

.sv-language-picker-hint {
  padding: 8px 12px 10px;
  border-top: 1px solid #edf0f4;
  color: #929bad;
  background: #fbfcfe;
  font-size: 11px;
}


/* =========================
   INLINE VIDEO EDITOR + PLAYER V7
   ========================= */

.sv-edit-workspace {
  margin: 18px 0;
  border: 1px solid #e1e7f0;
  border-radius: 20px;
  background: #fff;
  overflow: visible;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .055);
}

.sv-edit-workspace-header {
  padding: 22px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #edf0f4;
}

.sv-edit-workspace-header h2 {
  margin: 3px 0 5px;
  color: #121a2a;
  font-size: 25px;
  letter-spacing: -.03em;
}

.sv-edit-workspace-header p {
  margin: 0;
  color: #8490a2;
  font-size: 13px;
}

.sv-edit-kicker {
  color: #245eea;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.sv-edit-back-button {
  min-height: 40px;
  white-space: nowrap;
}

.sv-edit-workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
  gap: 24px;
  padding: 24px;
}

.sv-edit-preview-column,
.sv-edit-form-column {
  min-width: 0;
}

.sv-edit-player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #090d15;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 10px 28px rgba(15, 23, 42, .14);
}

.sv-edit-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.sv-edit-player-state {
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #d6deeb;
  text-align: center;
}

.sv-edit-player-state p {
  margin: 0;
  max-width: 420px;
  color: #8e9aaf;
  font-size: 12px;
  line-height: 1.5;
}

.sv-edit-player-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: #fff;
  border-radius: 999px;
  animation: sv-edit-spin .8s linear infinite;
}

@keyframes sv-edit-spin {
  to { transform: rotate(360deg); }
}

.sv-edit-preview-note {
  margin-top: 13px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #e7ebf2;
  border-radius: 12px;
  background: #f8fafc;
}

.sv-edit-preview-note strong {
  color: #273248;
  font-size: 12px;
}

.sv-edit-preview-note span {
  color: #8490a2;
  font-size: 11px;
  line-height: 1.45;
}

.sv-edit-form-column {
  display: flex;
  flex-direction: column;
}

.sv-edit-workspace .sv-field + .sv-field,
.sv-edit-workspace .sv-field + .sv-two-columns,
.sv-edit-workspace .sv-two-columns + .sv-field {
  margin-top: 15px;
}

.sv-edit-workspace-actions {
  margin-top: 20px;
  padding-top: 17px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #edf0f4;
}

.sv-edit-workspace-actions .sv-secondary-button,
.sv-edit-workspace-actions .sv-primary-button {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
}

@media (max-width: 1050px) {
  .sv-edit-workspace-grid {
    grid-template-columns: 1fr;
  }

  .sv-edit-preview-column {
    max-width: 760px;
  }
}

@media (max-width: 620px) {
  .sv-edit-workspace-header {
    padding: 18px;
    flex-direction: column;
  }

  .sv-edit-workspace-grid {
    padding: 14px;
    gap: 18px;
  }

  .sv-edit-workspace .sv-two-columns {
    grid-template-columns: 1fr;
  }

  .sv-edit-workspace-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* =========================
   VIDEO EDIT PAGE V1
   ========================= */

.sv-video-edit-page {
  width: min(1380px, 100%);
  margin: 0 auto;
}

.sv-video-edit-topbar {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.sv-edit-page-back {
  display: inline-flex;
  margin-bottom: 14px;
  color: #637083;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.sv-edit-page-back:hover {
  color: #245eea;
}

.sv-video-edit-topbar h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.sv-video-edit-topbar p {
  margin: 8px 0 0;
  color: #8791a2;
}

.sv-video-edit-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-video-edit-saved {
  color: #23834c;
  font-size: 12px;
  font-weight: 750;
}

.sv-video-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, .84fr);
  gap: 24px;
  align-items: start;
}

.sv-video-edit-player-column,
.sv-video-edit-form {
  min-width: 0;
}

.sv-video-edit-player-column {
  position: sticky;
  top: 22px;
}

.sv-video-edit-player-column .subtitle-video-panel {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}

.sv-video-edit-form {
  padding: 22px;
  border: 1px solid #e4e9f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}

.sv-video-edit-form .sv-field + .sv-field,
.sv-video-edit-form .sv-field + .sv-two-columns,
.sv-video-edit-form .sv-two-columns + .sv-field {
  margin-top: 16px;
}

.sv-edit-language-current {
  min-height: 44px;
  margin-bottom: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  background: #f8fafc;
}

.sv-edit-language-current > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sv-edit-language-current strong {
  color: #172033;
  font-size: 13px;
}

.sv-edit-language-current span:not(.sv-edit-language-flag) {
  color: #8a94a5;
  font-size: 11px;
}

.sv-edit-language-flag {
  font-size: 20px;
}

.sv-edit-language-field {
  position: relative;
}

.sv-edit-language-results {
  position: absolute;
  z-index: 80;
  top: 100%;
  right: 0;
  left: 0;
  max-height: 280px;
  margin-top: 6px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .14);
}

.sv-edit-language-option {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sv-edit-language-option:hover {
  background: #f3f6fb;
}

.sv-edit-language-option strong {
  color: #172033;
  font-size: 12px;
}

.sv-edit-language-option small {
  color: #8b95a6;
}

.sv-edit-language-empty,
.sv-edit-page-loading,
.sv-edit-page-error,
.sv-video-edit-player-error {
  padding: 28px;
  color: #7f8a9c;
  text-align: center;
}

.sv-video-edit-actions {
  margin-top: 20px;
  padding-top: 17px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #edf0f4;
}

.sv-video-edit-actions .sv-secondary-button,
.sv-video-edit-actions .sv-primary-button {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .sv-video-edit-layout {
    grid-template-columns: 1fr;
  }

  .sv-video-edit-player-column {
    position: static;
  }
}

@media (max-width: 620px) {
  .sv-video-edit-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .sv-video-edit-form {
    padding: 15px;
  }

  .sv-video-edit-form .sv-two-columns {
    grid-template-columns: 1fr;
  }

  .sv-video-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   Subtitle Studio language priority redesign
   ========================================================= */

.subtitle-language-priority-loading,
.subtitle-language-empty-priority {
  margin: 12px;
  padding: 18px;
  border: 1px dashed #d8deea;
  border-radius: 14px;
  background: #fafbfe;
  color: #7b879b;
  font-size: 12px;
  text-align: center;
}

.subtitle-language-priority {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.subtitle-language-priority-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid #e1e6ef;
  border-radius: 15px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.subtitle-language-priority-card:hover {
  transform: translateY(-1px);
  border-color: #b9c8e8;
  box-shadow: 0 8px 24px rgba(28, 42, 68, 0.06);
}

.subtitle-language-priority-card.is-source {
  background: linear-gradient(135deg, #f7faff, #ffffff);
}

.subtitle-language-priority-card.is-selected {
  border-color: #7ea1ff;
  background: #f3f6ff;
  box-shadow: 0 0 0 3px rgba(71, 111, 237, 0.08);
}

.subtitle-language-priority-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.subtitle-language-flag.large {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 12px;
  background: #f3f5f8;
  font-size: 20px;
}

.subtitle-language-priority-copy {
  min-width: 0;
}

.subtitle-language-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.subtitle-language-role {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.subtitle-language-role.is-source {
  background: #e7efff;
  color: #245eea;
}

.subtitle-language-role.is-translation {
  background: #edf7f1;
  color: #23744a;
}

.subtitle-language-role-row code {
  color: #9aa3b2;
  font-size: 10px;
  text-transform: uppercase;
}

.subtitle-language-priority-copy > strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.subtitle-language-priority-copy > span:last-child {
  display: block;
  margin-top: 2px;
  color: #8792a5;
  font-size: 11px;
}

.subtitle-priority-selected {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #245eea;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.subtitle-add-language-button {
  width: calc(100% - 24px);
  min-height: 44px;
  margin: 2px 12px 12px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #cfd8e8;
  border-radius: 12px;
  background: #fafbfe;
  color: #53627a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.subtitle-add-language-button:hover,
.subtitle-add-language-button.is-open {
  border-color: #8aa8ef;
  background: #f3f6ff;
  color: #245eea;
}

.subtitle-add-language-button > span {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.subtitle-language-browser {
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid #e2e7ef;
  border-radius: 14px;
  background: #f9fafc;
}

.subtitle-language-browser-heading {
  margin-bottom: 10px;
}

.subtitle-language-browser-heading strong,
.subtitle-language-browser-heading span {
  display: block;
}

.subtitle-language-browser-heading strong {
  color: #273247;
  font-size: 12px;
}

.subtitle-language-browser-heading span {
  margin-top: 2px;
  color: #98a1b0;
  font-size: 10px;
}

.subtitle-language-browser .subtitle-language-search {
  margin: 0 0 10px;
}

.subtitle-language-browser .subtitle-language-grid-v2 {
  max-height: 330px;
  overflow-y: auto;
  padding-right: 3px;
}

.subtitle-language-search-empty {
  padding: 24px 12px;
  color: #929daf;
  font-size: 12px;
  text-align: center;
}

/* =========================================================
   Subtitle Studio visual redesign v3 + cover preview
   ========================================================= */

.subtitle-hub-v3 {
  --sub-v3-line: #e6e9f0;
  --sub-v3-soft: #f7f8fb;
  --sub-v3-ink: #172033;
  --sub-v3-muted: #7b879b;
}

.subtitle-hub-v3 .subtitle-hub-grid {
  grid-template-columns:
    minmax(360px, 1.04fr)
    minmax(330px, .92fr)
    minmax(330px, .92fr);
  gap: 18px;
}

.subtitle-hub-v3 .subtitle-hub-section {
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(24, 33, 52, .055);
}

.subtitle-hub-v3 .subtitle-section-heading {
  padding: 18px 18px 15px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.subtitle-hub-v3 .subtitle-section-number {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.subtitle-selected-video-preview {
  margin: 14px 14px 8px;
  overflow: hidden;
  border: 1px solid var(--sub-v3-line);
  border-radius: 17px;
  background: #fff;
}

.subtitle-selected-video-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, #e9edf5, #f4f6fa);
  background-position: center;
  background-size: cover;
}

.subtitle-selected-video-cover.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(10, 15, 24, .58),
      rgba(10, 15, 24, 0) 45%
    );
}

.subtitle-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #7f899a;
}

.subtitle-cover-placeholder span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  font-size: 22px;
  font-weight: 850;
}

.subtitle-cover-placeholder small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.subtitle-selected-video-overlay {
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
}

.subtitle-selected-video-id,
.subtitle-selected-video-language {
  min-height: 24px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 750;
}

.subtitle-selected-video-copy {
  padding: 12px 13px 14px;
}

.subtitle-selected-video-copy strong,
.subtitle-selected-video-copy span {
  display: block;
}

.subtitle-selected-video-copy strong {
  color: var(--sub-v3-ink);
  font-size: 14px;
  line-height: 1.35;
}

.subtitle-selected-video-copy span {
  margin-top: 4px;
  color: var(--sub-v3-muted);
  font-size: 11px;
}

.subtitle-hub-v3 .subtitle-video-stack {
  max-height: 430px;
  gap: 7px;
  padding: 6px 14px 14px;
}

.subtitle-video-choice-v3 {
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 68px;
  padding: 7px;
  border-color: transparent;
  background: transparent;
}

.subtitle-video-choice-v3:hover {
  background: #f6f8fb;
}

.subtitle-video-choice-v3.is-selected {
  border-color: #b9c8f7;
  background: #f3f6ff;
}

.subtitle-video-thumb {
  position: relative;
  width: 86px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #e8ecf3, #f2f4f8);
  background-position: center;
  background-size: cover;
  color: #7b8798;
  font-size: 16px;
  font-weight: 850;
}

.subtitle-video-choice-v3 .subtitle-video-choice-copy strong {
  font-size: 12px;
}

.subtitle-video-choice-v3 .subtitle-video-choice-copy > span {
  margin-top: 3px;
  font-size: 10px;
}

.subtitle-video-choice-meta {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.subtitle-video-choice-meta small {
  min-height: 20px;
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef1f6;
  color: #68758a;
  font-size: 9px;
  font-weight: 750;
}

.subtitle-hub-v3 .subtitle-language-priority {
  padding-top: 14px;
}

.subtitle-hub-v3 .subtitle-language-priority-card {
  border-radius: 14px;
}

.subtitle-hub-v3 .subtitle-script-grid-v2 {
  padding: 14px;
}

.subtitle-hub-v3 .subtitle-script-choice {
  min-height: 104px;
  border-radius: 15px;
}

@media (max-width: 1180px) {
  .subtitle-hub-v3 .subtitle-hub-grid {
    grid-template-columns: 1fr 1fr;
  }

  .subtitle-hub-v3 .subtitle-script-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .subtitle-hub-v3 .subtitle-hub-grid {
    grid-template-columns: 1fr;
  }

  .subtitle-hub-v3 .subtitle-script-section {
    grid-column: auto;
  }

  .subtitle-video-choice-v3 {
    grid-template-columns: 92px minmax(0, 1fr) auto;
  }
}

/* =========================================================
   Subtitle Studio full interface redesign
   ========================================================= */

.subtitle-studio-redesign {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 28px 90px;
  color: #172033;
}

.subtitle-studio-redesign-head {
  margin-bottom: 24px;
}

.subtitle-studio-redesign-head h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.subtitle-studio-redesign-head p:last-child {
  margin: 8px 0 0;
  color: #7b879b;
  font-size: 14px;
}

.subtitle-studio-kicker {
  margin: 0 0 8px;
  color: #6f7d94;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.subtitle-redesign-card {
  overflow: hidden;
  border: 1px solid #e4e8ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(27, 39, 63, .045);
}

.subtitle-redesign-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #eef0f4;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.subtitle-redesign-step {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  border-radius: 10px;
  background: #edf3ff;
  color: #245eea;
  font-size: 11px;
  font-weight: 850;
}

.subtitle-redesign-card-head h2 {
  margin: 0;
  font-size: 17px;
}

.subtitle-redesign-card-head p {
  margin: 4px 0 0;
  color: #8a95a8;
  font-size: 11px;
}

.subtitle-video-workspace {
  margin-bottom: 18px;
}

.subtitle-current-video {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(260px, .8fr);
  gap: 0;
  border-bottom: 1px solid #eef0f4;
}

.subtitle-current-cover {
  position: relative;
  min-height: 260px;
  background: #e9edf4 center / cover no-repeat;
}

.subtitle-current-cover.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 15, 24, .55), transparent 48%);
}

.subtitle-current-cover-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #7f8a9c;
}

.subtitle-current-cover-empty strong {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  font-size: 24px;
}

.subtitle-current-cover-empty span {
  font-size: 11px;
  font-weight: 700;
}

.subtitle-current-cover-badges {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.subtitle-current-cover-badges span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15,23,42,.78);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.subtitle-current-video-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.subtitle-current-video-label {
  color: #8490a4;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
}

.subtitle-current-video-info h2 {
  margin: 10px 0 0;
  font-size: 27px;
  line-height: 1.18;
}

.subtitle-current-video-info > p {
  margin: 8px 0 0;
  color: #7d899c;
  font-size: 13px;
}

.subtitle-current-video-meta {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.subtitle-current-video-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #647186;
  font-size: 10px;
  font-weight: 700;
}

.subtitle-video-library-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px 9px;
}

.subtitle-video-library-head strong {
  font-size: 12px;
}

.subtitle-video-library-head span {
  color: #98a2b2;
  font-size: 10px;
}

.subtitle-video-library {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 10px;
  overflow-x: auto;
  padding: 0 18px 18px;
}

.subtitle-video-tile {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 8px;
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-video-tile:hover {
  border-color: #b9c8e7;
  background: #fafcff;
}

.subtitle-video-tile.is-selected {
  border-color: #7fa2ff;
  background: #f3f6ff;
  box-shadow: 0 0 0 3px rgba(36,94,234,.07);
}

.subtitle-video-tile-cover {
  aspect-ratio: 16/9;
  border-radius: 9px;
  background: #edf1f6 center / cover no-repeat;
  display: grid;
  place-items: center;
  color: #718096;
  font-size: 16px;
  font-weight: 850;
}

.subtitle-video-tile-copy {
  min-width: 0;
}

.subtitle-video-tile-copy strong,
.subtitle-video-tile-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-video-tile-copy strong {
  font-size: 11px;
}

.subtitle-video-tile-copy span {
  margin-top: 4px;
  color: #8a95a7;
  font-size: 9px;
}

.subtitle-video-tile-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #245eea;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.subtitle-studio-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.subtitle-priority-language-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.subtitle-priority-language {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #e4e8ef;
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-priority-language:hover {
  background: #fafcff;
}

.subtitle-priority-language.is-selected {
  border-color: #7fa2ff;
  background: #f3f6ff;
}

.subtitle-priority-language-flag {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f3f5f8;
  font-size: 20px;
}

.subtitle-priority-language-copy {
  min-width: 0;
}

.subtitle-priority-language-role {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3ff;
  color: #245eea;
  font-size: 9px;
  font-weight: 800;
}

.subtitle-priority-language-copy strong,
.subtitle-priority-language-copy small {
  display: block;
}

.subtitle-priority-language-copy strong {
  font-size: 13px;
}

.subtitle-priority-language-copy small {
  margin-top: 2px;
  color: #909bad;
  font-size: 9px;
}

.subtitle-priority-language code {
  color: #8d97a8;
  font-size: 10px;
}

.subtitle-priority-language-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #245eea;
  color: #fff;
  font-size: 10px;
}

.subtitle-redesign-add-language {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  min-height: 44px;
  border: 1px dashed #cfd7e4;
  border-radius: 13px;
  background: #fafbfe;
  color: #5f6d82;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.subtitle-redesign-add-language.is-open {
  border-color: #8aa8ef;
  background: #f3f6ff;
  color: #245eea;
}

.subtitle-redesign-add-language span {
  margin-right: 7px;
  font-size: 16px;
}

.subtitle-redesign-language-browser {
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px solid #e4e8ef;
  border-radius: 14px;
  background: #f8fafc;
}

.subtitle-redesign-search {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #fff;
}

.subtitle-redesign-search input {
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.subtitle-redesign-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 300px;
  overflow-y: auto;
}

.subtitle-redesign-language-choice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-redesign-language-choice strong {
  font-size: 11px;
}

.subtitle-redesign-language-choice small {
  color: #97a1b1;
  font-size: 9px;
}

.subtitle-redesign-script-grid {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.subtitle-redesign-script {
  min-height: 112px;
  padding: 15px;
  border: 1px solid #e4e8ef;
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-redesign-script:hover {
  background: #fafcff;
}

.subtitle-redesign-script.is-selected {
  border-color: #7fa2ff;
  background: #f3f6ff;
}

.subtitle-redesign-script-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.subtitle-redesign-script-top span {
  font-size: 24px;
  line-height: 1.15;
}

.subtitle-redesign-script-top code {
  color: #909bad;
  font-size: 9px;
}

.subtitle-redesign-script > strong {
  display: block;
  margin-top: 13px;
  font-size: 13px;
}

.subtitle-redesign-script > small {
  display: block;
  margin-top: 4px;
  color: #8d98aa;
  font-size: 9px;
}

.subtitle-redesign-variant-note {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.subtitle-redesign-variant-note strong,
.subtitle-redesign-variant-note span {
  display: block;
}

.subtitle-redesign-variant-note strong {
  font-size: 10px;
}

.subtitle-redesign-variant-note span {
  margin-top: 4px;
  color: #7e899c;
  font-size: 10px;
}

.subtitle-redesign-launch {
  position: sticky;
  bottom: 16px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(215,222,233,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(23,32,51,.11);
}

.subtitle-redesign-launch-summary {
  display: flex;
  gap: 22px;
  min-width: 0;
}

.subtitle-redesign-launch-summary div {
  min-width: 0;
}

.subtitle-redesign-launch-summary span,
.subtitle-redesign-launch-summary strong {
  display: block;
}

.subtitle-redesign-launch-summary span {
  color: #97a1b1;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.subtitle-redesign-launch-summary strong {
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  color: #273247;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-redesign-launch-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #245eea;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.subtitle-redesign-launch-button:disabled {
  opacity: .45;
  cursor: default;
}

.subtitle-redesign-launch-button b {
  margin-left: 8px;
}

.subtitle-studio-state {
  padding: 28px;
  color: #7d899c;
  text-align: center;
}

.subtitle-studio-state.compact {
  padding: 22px 16px;
  font-size: 11px;
}

.subtitle-studio-state.is-error {
  color: #c74242;
}

@media (max-width: 980px) {
  .subtitle-current-video {
    grid-template-columns: 1fr;
  }

  .subtitle-current-cover {
    min-height: 320px;
  }

  .subtitle-studio-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .subtitle-studio-redesign {
    padding: 24px 14px 80px;
  }

  .subtitle-current-cover {
    min-height: 220px;
  }

  .subtitle-current-video-info {
    padding: 20px;
  }

  .subtitle-video-library {
    grid-auto-columns: minmax(200px, 230px);
  }

  .subtitle-redesign-language-grid {
    grid-template-columns: 1fr;
  }

  .subtitle-redesign-launch {
    align-items: stretch;
    flex-direction: column;
  }

  .subtitle-redesign-launch-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* =========================================================
   Subtitle Manager — clean professional redesign
   ========================================================= */

.subtitle-manager-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 28px 80px;
  color: #172033;
}

.subtitle-manager-header {
  margin-bottom: 22px;
}

.subtitle-manager-header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.subtitle-manager-header > div > p:last-child {
  margin: 8px 0 0;
  color: #7b879b;
  font-size: 13px;
}

.subtitle-manager-kicker {
  margin: 0 0 8px;
  color: #6f7d94;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.subtitle-manager-current-video {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e3e7ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 33, 52, .04);
}

.subtitle-manager-current-cover {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #edf1f6 center / cover no-repeat;
  color: #7d899b;
  font-size: 24px;
  font-weight: 850;
}

.subtitle-manager-current-label {
  color: #97a1b1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
}

.subtitle-manager-current-copy h2 {
  margin: 6px 0 0;
  font-size: 19px;
}

.subtitle-manager-current-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.subtitle-manager-current-meta span {
  color: #7e899b;
  font-size: 10px;
}

.subtitle-manager-switch-video {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dce2ea;
  border-radius: 10px;
  background: #fff;
  color: #40506a;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.subtitle-manager-switch-video b {
  margin-left: 8px;
}

.subtitle-manager-video-picker {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e3e7ee;
  border-radius: 16px;
  background: #fff;
}

.subtitle-manager-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subtitle-manager-video-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-manager-video-item:hover,
.subtitle-manager-video-item.is-selected {
  border-color: #9cb3ee;
  background: #f6f8ff;
}

.subtitle-manager-video-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1f5 center / cover no-repeat;
  color: #7a8698;
  font-weight: 800;
}

.subtitle-manager-video-item strong,
.subtitle-manager-video-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-manager-video-item strong {
  font-size: 11px;
}

.subtitle-manager-video-item span {
  margin-top: 4px;
  color: #8f99aa;
  font-size: 9px;
}

.subtitle-manager-tracks {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e3e7ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 33, 52, .04);
}

.subtitle-manager-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f4;
}

.subtitle-manager-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.subtitle-manager-section-head p {
  margin: 5px 0 0;
  color: #8a95a7;
  font-size: 11px;
}

.subtitle-manager-add-track {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d9e1ef;
  border-radius: 10px;
  background: #fff;
  color: #245eea;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.subtitle-manager-add-track span {
  margin-right: 6px;
}

.subtitle-manager-track-group-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 8px;
}

.subtitle-manager-track-group-title strong {
  font-size: 12px;
}

.subtitle-manager-track-group-title span {
  color: #a0a8b6;
  font-size: 9px;
}

.subtitle-manager-track-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr) 180px auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e8ebf0;
  border-radius: 12px;
  background: #fff;
}

.subtitle-manager-track-row + .subtitle-manager-track-row {
  margin-top: 8px;
}

.subtitle-manager-track-flag {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f2f4f8;
  font-size: 20px;
}

.subtitle-manager-track-language {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subtitle-manager-track-language strong,
.subtitle-manager-track-language span {
  display: block;
}

.subtitle-manager-track-language strong {
  font-size: 12px;
}

.subtitle-manager-track-language > div > span {
  margin-top: 2px;
  color: #929cad;
  font-size: 9px;
}

.subtitle-manager-track-badge {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.subtitle-manager-track-badge.is-source {
  background: #edf3ff;
  color: #245eea;
}

.subtitle-manager-track-badge.is-translation {
  background: #edf7f1;
  color: #2c7a4d;
}

.subtitle-manager-script-button {
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  background: #fafbfc;
  color: #4f5e73;
  font: inherit;
  font-size: 10px;
}

.subtitle-manager-script-button:not(:disabled) {
  cursor: pointer;
}

.subtitle-manager-script-button code {
  color: #98a1b1;
  font-size: 9px;
}

.subtitle-manager-edit-track {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #245eea;
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.subtitle-manager-edit-track b {
  margin-left: 7px;
}

.subtitle-manager-language-picker {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  background: #f8fafc;
}

.subtitle-manager-language-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #fff;
}

.subtitle-manager-language-search input {
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.subtitle-manager-language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.subtitle-manager-language-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subtitle-manager-language-item:hover {
  border-color: #a6b8e8;
  background: #f6f8ff;
}

.subtitle-manager-language-item strong,
.subtitle-manager-language-item small {
  display: block;
}

.subtitle-manager-language-item strong {
  font-size: 10px;
}

.subtitle-manager-language-item small {
  margin-top: 2px;
  color: #929cad;
  font-size: 8px;
}

.subtitle-manager-language-item code {
  color: #98a1b1;
  font-size: 9px;
}

.subtitle-manager-state {
  padding: 28px;
  color: #7f8a9d;
  text-align: center;
}

.subtitle-manager-state.compact {
  padding: 18px;
  font-size: 10px;
}

.subtitle-manager-state.is-error {
  color: #c74242;
}

@media (max-width: 900px) {
  .subtitle-manager-current-video {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .subtitle-manager-switch-video {
    grid-column: 1 / -1;
  }

  .subtitle-manager-video-grid,
  .subtitle-manager-language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subtitle-manager-track-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .subtitle-manager-script-button {
    grid-column: 2 / 3;
  }

  .subtitle-manager-edit-track {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }
}

@media (max-width: 640px) {
  .subtitle-manager-page {
    padding: 24px 14px 70px;
  }

  .subtitle-manager-current-video {
    grid-template-columns: 1fr;
  }

  .subtitle-manager-current-cover {
    width: 100%;
  }

  .subtitle-manager-video-grid,
  .subtitle-manager-language-grid {
    grid-template-columns: 1fr;
  }

  .subtitle-manager-track-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .subtitle-manager-script-button,
  .subtitle-manager-edit-track {
    grid-column: 1 / -1;
  }

  .subtitle-manager-edit-track {
    grid-row: auto;
  }
}
