* {
  box-sizing: border-box;
}

@font-face {
  font-family: "PrajavaniTextRegular";
  src: url("https://fea.assettype.com/tpml/assets/PrajavaniTextRegular.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PvHeadlineSemibold3";
  src: url("https://fea.assettype.com/tpml/assets/PvHeadlineSemibold3.woff2")
    format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  font-family: "Roboto Slab", serif;
  background: #f2f4f6;
  color: #1c1c1c;
  height: 100vh;
  overflow: hidden;
}

.editor-home-button {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 95;
  border: 1px solid #cdd3d8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(6px);
}

.editor-home-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.app {
  display: grid;
  grid-template-columns: clamp(300px, 25vw, 420px) 1fr;
  height: 100vh;
}

.panel {
  padding: 20px 22px;
  background: #ffffff;
  border-right: 1px solid #e4e7ea;
  overflow-y: auto;
}

.preview {
  position: relative;
}

.preview-export {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c1c1c;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
}

.preview-export:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.panel h1 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 24px;
}

.hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: #4c4c4c;
}


.panel-group {
  border-top: 1px solid #e0e0e0;
  padding-top: 10px;
  margin-top: 6px;
  margin-bottom: 4px;
}

.panel-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 10px 0;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #4c4c4c;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.label-row label {
  margin-bottom: 0;
}

.field-link {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #006a7e;
  text-decoration: none;
}

.field-link:hover {
  text-decoration: underline;
}

.field label input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.field label.inline-check {
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
  color: #1c1c1c;
  margin-top: 8px;
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea,
.field button {
  width: 100%;
  font-family: inherit;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #cdd3d8;
  background: #ffffff;
}

.input-with-arrow {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #cdd3d8;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.input-with-arrow input {
  border: none;
  background: transparent;
  padding-right: 10px;
  flex: 1 1 auto;
}

.input-with-arrow .input-arrow {
  border: none;
  background: transparent;
  padding: 0;
  width: 36px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #6b7280;
  border-radius: 0;
  border-left: 1px solid #cdd3d8;
}

.input-with-arrow .input-arrow:hover {
  color: #1f2937;
  background: #f3f4f6;
}

.field textarea {
  resize: vertical;
  min-height: 60px;
}

.field button {
  margin-top: 6px;
  background: #f5f5f5;
  cursor: pointer;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #4c4c4c;
  margin: 4px 0 6px;
}

.setting-row span:last-child {
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

.status-line {
  font-size: 12px;
  margin-bottom: 6px;
  color: #4c4c4c;
}

.status-line.ok {
  color: #006a7e;
}

.status-line.error {
  color: #b00020;
}

.status-line.warning {
  color: #8b5e00;
}

.status-login-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.status-login-link:hover {
  opacity: 0.85;
}

.status-line-detail {
  font-size: 11px;
  color: #6c7883;
}

.instagram-post-progress-shell {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #d9e2e8;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfd 0%, #f2f7fa 100%);
}

.instagram-post-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #4b6372;
}

.instagram-post-progress-percent {
  font-variant-numeric: tabular-nums;
}

.instagram-post-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #d8e2e8;
}

.instagram-post-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0091ac 0%, #47b8cd 100%);
  transition: width 220ms ease;
}

.instagram-post-progress-detail {
  margin: 0;
  min-height: 16px;
}

.instagram-post-progress-shell[data-state="ok"] .instagram-post-progress-fill {
  background: linear-gradient(90deg, #006a7e 0%, #2ca58d 100%);
}

.instagram-post-progress-shell[data-state="error"] .instagram-post-progress-fill {
  background: linear-gradient(90deg, #b00020 0%, #d64a5f 100%);
}

.instagram-post-progress-shell[data-state="warning"] .instagram-post-progress-fill {
  background: linear-gradient(90deg, #8b5e00 0%, #d6a73d 100%);
}

.actions-group {
  border-top: 1px solid #e0e0e0;
  padding-top: 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.actions-group button {
  padding: 10px;
  background: #0091ac;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.actions-admin {
  opacity: 0.75;
}

.btn-danger {
  background: #c0392b !important;
  color: #fff !important;
}

.btn-danger:hover {
  background: #a93226 !important;
}

.carousel-policy-modal-card {
  width: min(620px, 92vw);
  max-height: min(82vh, 740px);
}

.carousel-policy-modal-body {
  gap: 14px;
}

.carousel-policy-modal-message {
  border: 1px solid #e2d2a8;
  border-radius: 10px;
  background: #fff8e8;
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #6d4c00;
}

.carousel-policy-modal-status {
  margin: 0;
  min-height: 16px;
}

.carousel-policy-modal-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.carousel-policy-modal-actions button {
  border-radius: 8px;
  border: 1px solid #cdd3d8;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#carouselPolicyModalUpload {
  background: #0091ac;
  border-color: #0091ac;
  color: #ffffff;
}

.carousel-policy-modal-dismiss {
  min-width: 86px;
  background: #f3f4f6;
  color: #1c1c1c;
}

.post-confirmation-modal-card {
  width: min(520px, 92vw);
  max-height: min(88vh, 760px);
}

#postConfirmationModal {
  align-items: flex-start;
  overflow-y: auto;
  padding: 16px;
}

.reel-preview-modal-card {
  width: min(860px, 94vw);
  max-height: min(90vh, 920px);
}

.reel-preview-modal-body {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow-y: auto;
}

.reel-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #d8e2e8;
}

.reel-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0091ac 0%, #47b8cd 100%);
  transition: width 220ms ease;
}

.reel-preview-player-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: min(62vh, 680px);
  padding: 20px 16px;
  border: 1px solid #d9e2e8;
  border-radius: 12px;
  overflow: auto;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 48%),
    linear-gradient(180deg, #18242c 0%, #0d1419 100%);
}

.reel-preview-video {
  width: auto;
  max-width: min(100%, 360px);
  max-height: min(58vh, 620px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.reel-preview-footer {
  display: grid;
  gap: 10px;
}

.reel-preview-meta {
  min-height: 16px;
  font-size: 12px;
  line-height: 1.45;
  color: #4c4c4c;
}

.reel-preview-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.reel-preview-actions button {
  border-radius: 8px;
  border: 1px solid #cdd3d8;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#reelPreviewDownload {
  background: #0091ac;
  border-color: #0091ac;
  color: #ffffff;
}

#reelPreviewDownload:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .reel-preview-modal-card {
    width: min(96vw, 640px);
  }

  .reel-preview-player-shell {
    padding: 14px 10px;
  }

  .reel-preview-video {
    max-width: min(100%, 280px);
    max-height: min(52vh, 500px);
  }

  .reel-preview-actions {
    justify-content: stretch;
  }

  .reel-preview-actions button {
    flex: 1 1 160px;
  }
}

.post-confirmation-modal-body {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.post-confirmation-modal-scroll {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.post-confirmation-modal-message {
  border: 1px solid #d9e2e8;
  border-radius: 10px;
  background: #f8fbfc;
  padding: 14px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #23313d;
}

.post-confirmation-preview {
  display: grid;
  gap: 14px;
}

.post-confirmation-preview-meta {
  font-size: 12px;
  line-height: 1.45;
  color: #4c4c4c;
}

.post-confirmation-preview-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d9e2e8;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(0, 145, 172, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%),
    #f8fbfc;
  padding: 14px;
}

.post-confirmation-preview-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #006a7e;
}

.post-confirmation-preview-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.55;
  color: #23313d;
  font-family: inherit;
}

.post-confirmation-preview-field {
  display: grid;
  gap: 6px;
}

.post-confirmation-preview-field span {
  font-size: 12px;
  font-weight: 700;
  color: #23313d;
}

.post-confirmation-preview-input {
  width: 100%;
  min-height: 0;
  resize: vertical;
  border: 1px solid #cdd3d8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #1c1c1c;
  background: #ffffff;
}

.post-confirmation-preview-input:focus {
  outline: 2px solid rgba(0, 145, 172, 0.18);
  border-color: #0091ac;
}

.post-confirmation-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #e9edf1;
  background: #ffffff;
}

.post-confirmation-modal-actions button {
  border-radius: 8px;
  border: 1px solid #cdd3d8;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#postConfirmationModalConfirm {
  background: #0091ac;
  border-color: #0091ac;
  color: #ffffff;
}

.post-confirmation-modal-cancel {
  min-width: 86px;
  background: #f3f4f6;
  color: #1c1c1c;
}

.mobile-share-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #cdd3d8;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.mobile-share-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4c4c4c;
}

.mobile-share-link {
  font-size: 12px;
  line-height: 1.35;
  color: #006a7e;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mobile-share-link:hover {
  text-decoration: underline;
}

.mobile-share-qr {
  width: 180px;
  height: 180px;
  margin: 2px auto 0;
  border: 1px solid #d7dde4;
  border-radius: 6px;
  background: #ffffff;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: min(760px, 92vw);
  max-height: min(80vh, 720px);
  min-height: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: auto 1fr;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  border-bottom: 1px solid #e4e7ea;
}

.modal-header h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 20px;
}

.modal-close {
  border: none;
  background: #e9eef2;
  color: #1c1c1c;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.modal-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

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

.modal-tab {
  border: 1px solid #cdd3d8;
  background: #f8fafc;
  color: #1c1c1c;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.modal-tab.is-active {
  background: #0091ac;
  color: #ffffff;
  border-color: #0091ac;
}

.modal-tab-panel {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

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

.modal-body input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cdd3d8;
  font-family: inherit;
}

.modal-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-field {
  margin-bottom: 0;
}

.modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #1c1c1c;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 4px;
}

.modal-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.modal-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d6dce1;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
}

.modal-item-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.modal-item-text {
  min-width: 0;
  user-select: text;
}

.modal-item-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.modal-item-article-id {
  font-size: 12px;
  color: #23313d;
  overflow-wrap: anywhere;
}

.modal-item-meta {
  font-size: 12px;
  color: #4c4c4c;
}

.modal-item-load {
  border-radius: 8px;
  border: 1px solid #0091ac;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #0091ac;
  cursor: pointer;
}

.modal-item-load:hover {
  background: #006a7e;
  border-color: #006a7e;
}

.modal-item:hover {
  border-color: #0091ac;
  box-shadow: 0 8px 20px rgba(0, 145, 172, 0.18);
}

body.pub-pv {
  background: #fff6e6;
}

body.pub-pv .panel {
  background: #fffdf8;
  border-right-color: #f1d6b3;
}

body.pub-pv .status-line.ok {
  color: #b82831;
}

body.pub-pv .actions-group button {
  background: #b82831;
}

body.pub-pv .mobile-share-link {
  color: #b82831;
}

body.pub-pv .carousel-policy-modal-message {
  border-color: #efc7cb;
  background: #fff2f3;
  color: #7a1d23;
}

body.pub-pv .instagram-post-progress-shell {
  background: linear-gradient(180deg, #fff7f8 0%, #fff1f2 100%);
  border-color: #efcfd2;
}

body.pub-pv .post-confirmation-modal-message {
  border-color: #efc7cb;
  background: #fff2f3;
  color: #7a1d23;
}

body.pub-pv #carouselPolicyModalUpload {
  background: #b82831;
  border-color: #b82831;
}

body.pub-pv #postConfirmationModalConfirm {
  background: #b82831;
  border-color: #b82831;
}

body.pub-pv #reelPreviewDownload {
  background: #b82831;
  border-color: #b82831;
}

body.pub-pv .reel-progress-fill {
  background: linear-gradient(90deg, #b82831 0%, #df6d74 100%);
}

body.pub-pv .instagram-post-progress-fill {
  background: linear-gradient(90deg, #b82831 0%, #df6d74 100%);
}

body.pub-pv .preview {
  background: #fff6e6;
}

body.pub-pv .modal-item:hover {
  border-color: #b82831;
  box-shadow: 0 8px 20px rgba(184, 40, 49, 0.18);
}

body.pub-pv .modal-tab.is-active {
  background: #b82831;
  border-color: #b82831;
}

.preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #f2f4f6;
  padding: 20px;
  height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.canvas-strip {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 0 8px;
  transition: none;
}

:root {
  --preview-width: clamp(300px, 60vw, 520px);
  --preview-height: calc(var(--preview-width) * 1.15);
}

.canvas-wrap {
  position: relative;
  flex: 0 0 auto;
  width: var(--preview-width);
  height: var(--preview-height);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
}

.canvas-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
  z-index: 0;
  pointer-events: none;
}

.canvas-video-preview.is-active {
  display: block;
}

.canvas-wrap.ghost {
  opacity: 0.6;
}

.canvas-strip.strip-anim {
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

canvas {
  width: var(--preview-width);
  height: var(--preview-height);
  display: block;
  position: relative;
  z-index: 1;
}

.drag-handle {
  position: absolute;
  left: 40px;
  right: 40px;
  height: 80px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  opacity: 0;
  pointer-events: auto;
  z-index: 2;
}

.drag-handle.active {
  display: flex;
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.preview-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.preview-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.preview-nav-left {
  left: 24px;
}

.preview-nav-right {
  right: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.row {
  display: grid;
  gap: 8px;
}

.row .pair {
  display: grid;
  gap: 6px;
}

.story-slide-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.video-background-details {
  border: 1px solid #d6dce1;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.video-background-summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.video-background-summary::-webkit-details-marker {
  display: none;
}

.video-background-panel {
  display: grid;
  gap: 12px;
  padding: 4px 14px 14px;
}

.video-background-playback {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #5a6672;
}

.video-background-timeline {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce4ea;
  border-radius: 12px;
  background: #ffffff;
}

.video-background-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.video-background-toolbar button {
  margin-top: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d3dbe2;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  color: #23404a;
  box-shadow: none;
}

.video-background-toolbar button:hover:not(:disabled) {
  background: #eef6f8;
  border-color: #a8ced6;
}

.video-background-toolbar button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.video-background-visual-timeline {
  display: grid;
  gap: 8px;
}

.video-background-visual-rail {
  position: relative;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #d5dee6;
  background: linear-gradient(90deg, #edf2f6 0%, #e5edf3 100%);
  overflow: visible;
  cursor: pointer;
  touch-action: none;
}

.video-background-visual-rail.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-background-visual-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f7f95 0%, #23a7c0 100%);
  pointer-events: none;
  z-index: 1;
}

.video-background-visual-playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  border-radius: 999px;
  background: #142530;
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 2;
}

.video-background-visual-rail .video-background-visual-handle {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid #0f7f95;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  cursor: ew-resize;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #0f7f95;
  font-size: 9px;
  font-weight: 700;
  margin-top: 0;
  z-index: 3;
  touch-action: none;
}

.video-background-visual-rail .video-background-visual-handle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-background-visual-rail .video-background-visual-handle::before {
  content: "";
  position: absolute;
  inset: -10px -6px;
}

.video-background-visual-handle-label {
  line-height: 1;
  pointer-events: none;
}

.video-background-visual-handle-grip {
  display: block;
  width: 6px;
  height: 12px;
  background:
    linear-gradient(#0f7f95 0 0) left center / 1px 100% no-repeat,
    linear-gradient(#0f7f95 0 0) center center / 1px 100% no-repeat,
    linear-gradient(#0f7f95 0 0) right center / 1px 100% no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

.video-background-slider-row {
  display: grid;
  gap: 6px;
}

.video-background-slider-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.video-background-slider-value {
  color: #4b5967;
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.video-background-timeline input[type="range"] {
  width: 100%;
}

.video-background-trim-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-background-actions {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.story-slide-actions button {
  margin-top: 0;
  background: #eef2f5;
  border: 1px solid #cdd3d8;
  font-size: 12px;
  font-weight: 600;
}

.story-slide-actions button.danger {
  background: #fff1f2;
  border-color: #f3c5cb;
  color: #8b1d2b;
}

.stat-item {
  border: 1px solid #d6dce1;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #f8fafc;
  cursor: grab;
}

.stat-item:active {
  cursor: grabbing;
}

.stat-item-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4c4c4c;
  cursor: grab;
  user-select: none;
}

.stat-item-header:active {
  cursor: grabbing;
}
