/* ==========================================================================
   Captioniz Studio — Power Add-Ons Stylesheet (studio_power_addons_dev.css)
   Strictly adheres to BRAND_BIBLE.md:
   - Warm Obsidian (#0f0f0e / #141413 / #1b1a18 / #252421)
   - Warm Alabaster (#ebe8e0 / #f4f2ed / #fbfaf7 / #ffffff)
   - Signature Terracotta (#d9714b / #ec9a74 / #c65e38)
   - Typography: var(--sans), var(--serif), var(--mono)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Left Rail Automation Button & Pane Container
   -------------------------------------------------------------------------- */
#railTabAutomation {
  position: relative;
}

.cz-auto-emblem-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cz-auto-emblem-halo {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 113, 75, 0.34) 0%, rgba(217, 113, 75, 0) 70%);
  opacity: 0.45;
  transform: scale(0.86);
  pointer-events: none;
  will-change: transform, opacity;
  animation: czAutoHaloPulse 3.2s ease-in-out infinite;
}

.cz-auto-emblem-svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: block;
  overflow: visible;
}

.cz-auto-orbit-grp {
  transform-origin: 12px 12px;
  will-change: transform;
  animation: czAutoOrbitSpin 10.5s linear infinite;
}

.cz-auto-bolt-core {
  transform-origin: 12px 12px;
  will-change: transform, opacity;
  animation: czAutoBoltPulse 3.2s ease-in-out infinite;
  transition: stroke 0.18s ease, fill 0.18s ease;
}

#railTabAutomation:hover .cz-auto-emblem-halo,
#railTabAutomation.active .cz-auto-emblem-halo {
  opacity: 0.85;
  background: radial-gradient(circle, rgba(217, 113, 75, 0.48) 0%, rgba(217, 113, 75, 0) 72%);
}

#railTabAutomation:hover .cz-auto-bolt-core,
#railTabAutomation.active .cz-auto-bolt-core {
  stroke: var(--acc-ink, #ec9a74);
  fill: var(--acc, #d9714b);
  fill-opacity: 0.28;
}

[data-theme="light"] #railTabAutomation:hover .cz-auto-bolt-core,
[data-theme="light"] #railTabAutomation.active .cz-auto-bolt-core {
  stroke: var(--acc, #c85f39);
}

@keyframes czAutoOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes czAutoHaloPulse {
  0%, 100% { transform: scale(0.84); opacity: 0.34; }
  50% { transform: scale(1.14); opacity: 0.78; }
}

@keyframes czAutoBoltPulse {
  0%, 100% { transform: scale(0.97); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-auto-emblem-halo,
  .cz-auto-orbit-grp,
  .cz-auto-bolt-core {
    animation: none !important;
  }
}

.cz-rail-auto-badge {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 3;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--acc, #d9714b);
  color: #ffffff;
  font: 700 9.5px/16px var(--mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.cz-rail-auto-badge[hidden] {
  display: none !important;
}

#paneAutomation {
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

#czAutomationTabMount {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 12px 18px;
  width: 100%;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Automation Tab — Live Project Action Tracker & Personal Automations
   -------------------------------------------------------------------------- */
.cz-auto-hero {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--r-md, 10px);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--acc-soft, rgba(217, 113, 75, 0.16)) 0%, transparent 62%),
    var(--panel, #1b1a18);
  border: 1px solid var(--line, #2f2d29);
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.05));
}

.cz-auto-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.cz-auto-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--mute, #8f897d);
  font: 600 9.5px/1.1 var(--mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.cz-auto-live-pill.is-live {
  background: var(--acc-soft, rgba(217, 113, 75, 0.16));
  border-color: color-mix(in srgb, var(--acc, #d9714b) 42%, var(--line, #2f2d29));
  color: var(--acc-ink, #ec9a74);
}

.cz-auto-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mute, #8f897d);
}

.cz-auto-live-pill.is-live .cz-auto-live-dot {
  background: #3ecf8e;
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.18);
  animation: czLiveRecPulse 1.8s ease-in-out infinite;
}

@keyframes czLiveRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

.cz-auto-hero-title {
  margin: 0;
  font: 600 14.5px/1.22 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  letter-spacing: -0.01em;
}

.cz-auto-hero-title em {
  font-family: var(--serif, 'Instrument Serif', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  color: var(--acc-ink, #ec9a74);
}

.cz-auto-hero-desc {
  margin: 0;
  font: 400 11.5px/1.4 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
}

.cz-auto-card {
  padding: 10px 11px;
  border-radius: var(--r-md, 10px);
  background: var(--panel, #1b1a18);
  border: 1px solid var(--line, #2f2d29);
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.05));
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cz-auto-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cz-auto-hdr-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cz-auto-reset-link {
  border: 1px solid var(--line, #2f2d29);
  background: var(--raised, #252421);
  color: var(--mute, #8f897d);
  border-radius: 5px;
  padding: 2px 6px;
  font: 600 10px/1.2 var(--sans, 'Inter', sans-serif);
  cursor: pointer;
}

.cz-auto-reset-link:hover {
  color: var(--ink, #f1eee7);
  border-color: var(--acc, #d9714b);
}

.cz-auto-sec-title {
  font: 600 10.5px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cz-auto-sec-sub {
  font: 500 10px/1.2 var(--mono, 'JetBrains Mono', monospace);
  color: var(--mute, #8f897d);
  white-space: nowrap;
}

/* 3-Step Clear Onboarding Guide when 0 edits have been made */
.cz-auto-onboarding {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--bg, #141413);
  border: 1px dashed var(--line, #2f2d29);
}

.cz-auto-onb-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.cz-auto-onb-num {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--acc-soft, rgba(217, 113, 75, 0.16));
  color: var(--acc-ink, #ec9a74);
  font: 700 10px/18px var(--mono, 'JetBrains Mono', monospace);
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.cz-auto-onb-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cz-auto-onb-txt b {
  font: 600 11.5px/1.25 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
}

.cz-auto-onb-txt span {
  font: 400 11px/1.35 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
}

/* Chronological Tracked Action Feed */
.cz-auto-action-feed {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}

.cz-auto-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6.5px 8px;
  border-radius: 8px;
  background: var(--raised, #252421);
  border: 1px solid color-mix(in srgb, var(--acc, #d9714b) 32%, var(--line, #2f2d29));
  min-width: 0;
}

.cz-auto-act-idx {
  font: 700 10px/1 var(--mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  color: var(--acc-ink, #ec9a74);
  background: var(--acc-soft, rgba(217, 113, 75, 0.16));
  padding: 3px 5.5px;
  border-radius: 5px;
  flex-shrink: 0;
}

.cz-auto-act-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cz-auto-act-copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.cz-auto-act-title {
  font: 600 11.5px/1.25 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-auto-act-detail {
  font: 500 10px/1.25 var(--mono, 'JetBrains Mono', monospace);
  color: var(--mute, #8f897d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-auto-act-rm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute, #8f897d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 11px;
}

.cz-auto-act-rm:hover {
  background: rgba(224, 82, 82, 0.14);
  color: #e05252;
  border-color: rgba(224, 82, 82, 0.3);
}

.cz-auto-empty-saved {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--bg, #141413);
  border: 1px dashed var(--line, #2f2d29);
  font: 400 11.5px/1.4 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
}

.cz-auto-empty-saved b {
  color: var(--ink, #f1eee7);
  font-weight: 600;
}

.cz-auto-save-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cz-auto-input {
  flex: 1 1 0;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
  font: 500 12px/1 var(--sans, 'Inter', sans-serif);
  outline: none;
  transition: border-color 0.18s ease;
}

.cz-auto-input:focus {
  border-color: var(--acc, #d9714b);
  box-shadow: 0 0 0 2px var(--acc-soft, rgba(217, 113, 75, 0.18));
}

.cz-auto-pri-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--acc, #d9714b);
  background: linear-gradient(180deg, var(--acc2, #ec9a74), var(--acc, #d9714b));
  color: #ffffff;
  font: 600 11.5px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 5px 14px -7px rgba(217, 113, 75, 0.72);
  transition: transform 0.14s ease, filter 0.18s ease;
}

.cz-auto-pri-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.cz-auto-pri-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.cz-auto-pri-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cz-auto-tpl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 176px;
  overflow-y: auto;
  padding-right: 2px;
}

.cz-auto-apply-bar {
  padding-top: 2px;
}

.cz-auto-apply-cta {
  width: 100%;
  height: 36px;
  font-size: 12.5px;
}

.cz-auto-tpl-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.cz-auto-tpl-item:hover {
  border-color: color-mix(in srgb, var(--acc, #d9714b) 42%, var(--line, #2f2d29));
}

.cz-auto-tpl-item.is-selected {
  border-color: var(--acc, #d9714b);
  background: color-mix(in srgb, var(--acc-soft, rgba(217, 113, 75, 0.18)) 26%, var(--raised, #252421));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc, #d9714b) 32%, transparent);
}

.cz-auto-tpl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cz-auto-tpl-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cz-auto-tpl-name {
  font: 600 12px/1.25 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-auto-tpl-kind {
  flex-shrink: 0;
  padding: 1.5px 5.5px;
  border-radius: 999px;
  font: 600 9px/1.2 var(--mono, 'JetBrains Mono', monospace);
  text-transform: uppercase;
  background: var(--bg, #141413);
  color: var(--mute, #8f897d);
  border: 1px solid var(--line, #2f2d29);
}

.cz-auto-tpl-kind.is-account {
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  color: var(--acc-ink, #ec9a74);
  border-color: color-mix(in srgb, var(--acc, #d9714b) 40%, transparent);
}

.cz-auto-tpl-del {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute, #8f897d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.cz-auto-tpl-del:hover {
  background: rgba(224, 82, 82, 0.14);
  color: #e05252;
  border-color: rgba(224, 82, 82, 0.3);
}

.cz-auto-tpl-meta {
  font: 500 10px/1.3 var(--mono, 'JetBrains Mono', monospace);
  color: var(--mute, #8f897d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-auto-apply-bar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
}

.cz-auto-apply-cta {
  width: 100%;
  height: 38px;
  font-size: 13px;
}

.cz-auto-progress-box {
  padding: 8px 10px;
  border-radius: var(--r-sm, 8px);
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cz-auto-progress-lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 11px/1.2 var(--mono, 'JetBrains Mono', monospace);
  color: var(--acc-ink, #ec9a74);
}

.cz-auto-progress-track {
  height: 5px;
  border-radius: 999px;
  background: var(--raised, #252421);
  overflow: hidden;
}

.cz-auto-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--acc, #d9714b), var(--acc2, #ec9a74));
  transition: width 0.24s var(--ease, cubic-bezier(.22, 1, .36, 1));
}

/* --------------------------------------------------------------------------
   2. Custom .CUBE 3D LUT & Selective Highlights/Shadows/Vibrance (Adjust)
   -------------------------------------------------------------------------- */
.cz-lut-addon-sec {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cz-lut-upload-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cz-lut-upload-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm, 8px);
  background: var(--raised, #252421);
  border: 1px dashed color-mix(in srgb, var(--acc, #d9714b) 55%, var(--line, #2f2d29));
  color: var(--ink, #f1eee7);
  font: 600 11.5px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.cz-lut-upload-btn:hover {
  border-style: solid;
  border-color: var(--acc, #d9714b);
  background: color-mix(in srgb, var(--acc-soft, rgba(217, 113, 75, 0.18)) 35%, var(--raised, #252421));
}

.cz-lut-upload-btn.has-lut {
  border-style: solid;
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
}

.cz-lut-remove-btn {
  height: 30px;
  padding: 0 9px;
  border-radius: var(--r-sm, 8px);
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--mute, #8f897d);
  font: 600 11px/1 var(--sans, 'Inter', sans-serif);
  cursor: pointer;
  flex-shrink: 0;
}

.cz-lut-remove-btn:hover {
  color: #e05252;
  border-color: rgba(224, 82, 82, 0.38);
}

/* --------------------------------------------------------------------------
   3. CapCut Inline Per-Property Keyframes (‹ ◆ ›) + Floating 6-Curve Popover
   -------------------------------------------------------------------------- */
.cz-sec-hdr-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.cz-hdr-kf-group,
.cz-row-kf-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.cz-kf-diamond-btn,
.cz-kf-mini-nav,
.cz-kf-curve-btn {
  width: 17px;
  height: 18px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--mute, #8f897d);
  font: 600 11.5px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.cz-kf-mini-nav {
  width: 13px;
  font-size: 12.5px;
}

.cz-kf-curve-btn {
  width: 16px;
  font-size: 11px;
}

.cz-kf-diamond-btn[hidden],
.cz-kf-mini-nav[hidden],
.cz-kf-curve-btn[hidden] {
  display: none !important;
}

.cz-kf-mini-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.cz-kf-diamond-btn:hover,
.cz-kf-mini-nav:hover:not(:disabled),
.cz-kf-curve-btn:hover,
.cz-kf-curve-btn.is-open {
  background: var(--raised, #252421);
  border-color: var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
}

.cz-kf-diamond-btn.has-kfs {
  color: var(--acc-ink, #ec9a74);
}

.cz-kf-diamond-btn.is-at-kf {
  color: var(--acc, #d9714b);
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  border-color: color-mix(in srgb, var(--acc, #d9714b) 48%, transparent);
  text-shadow: 0 0 8px rgba(217, 113, 75, 0.42);
}

[data-theme="light"] .cz-kf-diamond-btn.has-kfs,
[data-theme="light"] .cz-kf-diamond-btn.is-at-kf {
  color: var(--acc, #c85f39);
}

/* Floating Anchored CapCut Easing Curve Popover */
.cz-kf-curve-pop {
  position: fixed;
  z-index: 9880;
  width: 224px;
  padding: 9px 10px 10px;
  border-radius: 10px;
  background: #171614;
  border: 1px solid var(--line, #2f2d29);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cz-kf-curve-pop[hidden] {
  display: none !important;
}

[data-theme="light"] .cz-kf-curve-pop {
  background: #fbfaf7;
  border-color: #dcd7cc;
  box-shadow: 0 16px 36px rgba(20, 20, 19, 0.18);
}

.cz-kf-curve-pop-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 600 10.5px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cz-kf-curve-pop-close {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--mute, #8f897d);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cz-kf-curve-pop-close:hover {
  background: var(--raised, #252421);
  color: var(--ink, #f1eee7);
}

.cz-kf-curve-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.cz-kf-curve-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  border-radius: 7px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--mute, #8f897d);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cz-kf-curve-tile:hover {
  border-color: color-mix(in srgb, var(--acc, #d9714b) 50%, var(--line, #2f2d29));
  color: var(--ink, #f1eee7);
}

.cz-kf-curve-tile.active {
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

.cz-kf-curve-tile svg {
  width: 26px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.cz-kf-curve-lbl {
  font: 600 9.5px/1.15 var(--sans, 'Inter', sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Timeline Clip Keyframe Diamond Markers (◆) */
.cz-tl-kf-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 11px;
  pointer-events: none;
  z-index: 6;
}

.cz-tl-kf-diamond {
  position: absolute;
  top: 2px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--acc2, #ec9a74);
  border: 1px solid #141413;
  transform: rotate(45deg);
  border-radius: 1px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  transition: transform 0.12s ease, background 0.12s ease;
}

.cz-tl-kf-diamond:hover,
.cz-tl-kf-diamond.is-at-playhead {
  background: #ffffff;
  border-color: var(--acc, #d9714b);
  transform: rotate(45deg) scale(1.28);
}

/* Speed Curve Presets & SVG Graph */
.cz-spcurve-sec {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cz-spcurve-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.cz-spcurve-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 8px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cz-spcurve-tile:hover {
  border-color: color-mix(in srgb, var(--acc, #d9714b) 50%, var(--line, #2f2d29));
}

.cz-spcurve-tile.active {
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

.cz-spcurve-tile svg {
  width: 38px;
  height: 18px;
  display: block;
}

.cz-spcurve-tile span {
  font: 600 10.5px/1.15 var(--sans, 'Inter', sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cz-spcurve-graph-box {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cz-spcurve-graph-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 10px/1.2 var(--mono, 'JetBrains Mono', monospace);
  color: var(--mute, #8f897d);
}

.cz-spcurve-svg {
  width: 100%;
  height: 54px;
  display: block;
}

/* --------------------------------------------------------------------------
   4. Studio Pro Export Modal (#czExportPopover.cz-pro-export-backdrop -> #czStudioExportModal)
   -------------------------------------------------------------------------- */
#czExportPopover.cz-pro-export-backdrop[hidden] {
  display: none !important;
}

#czExportPopover.cz-pro-export-backdrop:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 16px !important;
  background: rgba(15, 15, 14, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 9500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

:root[data-theme="light"] #czExportPopover.cz-pro-export-backdrop:not([hidden]) {
  background: rgba(31, 29, 26, 0.44) !important;
}

#czStudioExportModal {
  width: min(820px, 100%);
  max-height: calc(100dvh - 32px);
  background: var(--panel, #1b1a18);
  border: 1px solid var(--line, #2f2d29);
  border-radius: 16px;
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.06)), 0 28px 72px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink, #f1eee7);
}

:root[data-theme="light"] #czStudioExportModal {
  box-shadow: var(--hi), 0 24px 64px rgba(31, 29, 26, 0.22);
}

.cz-sexp-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line, #2f2d29);
  background: color-mix(in srgb, var(--bg, #141413) 45%, var(--panel, #1b1a18));
}

.cz-sexp-hdr-title {
  margin: 0;
  font: 600 16px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cz-sexp-hdr-title em {
  font-family: var(--serif, 'Instrument Serif', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  color: var(--acc-ink, #ec9a74);
}

.cz-sexp-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line, #2f2d29);
  background: var(--raised, #252421);
  color: var(--mute, #8f897d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
}

.cz-sexp-close-btn:hover {
  color: var(--ink, #f1eee7);
  border-color: var(--acc, #d9714b);
}

.cz-sexp-body {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 0;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 720px) {
  .cz-sexp-body {
    grid-template-columns: 1fr;
  }
}

.cz-sexp-left {
  padding: 16px;
  background: var(--stage, #0f0f0e);
  border-right: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cz-sexp-cover-stage {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: 10px;
  background: #0a0a09;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#czExpCoverCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.cz-sexp-cover-tc {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(20, 20, 19, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1eee7;
  font: 600 10.5px/1 var(--mono, 'JetBrains Mono', monospace);
}

.cz-sexp-scrub-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cz-sexp-scrub-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 11px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
}

.cz-sexp-cur-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line, #2f2d29);
  background: var(--raised, #252421);
  color: var(--ink, #f1eee7);
  font: 600 10.5px/1 var(--sans, 'Inter', sans-serif);
  cursor: pointer;
}

.cz-sexp-cur-btn:hover {
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

#czExpCoverScrubber {
  width: 100%;
  accent-color: var(--acc, #d9714b);
  cursor: pointer;
}

.cz-sexp-right {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cz-sexp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cz-sexp-lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 11px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cz-sexp-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
}

.cz-sexp-pill {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute, #8f897d);
  font: 600 11.5px/1 var(--sans, 'Inter', sans-serif);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cz-sexp-pill:hover {
  color: var(--ink, #f1eee7);
}

.cz-sexp-pill.on,
.cz-sexp-pill.active {
  background: var(--raised, #252421);
  border-color: var(--acc, #d9714b);
  color: var(--ink, #f1eee7);
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.06));
}

.cz-sexp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .cz-sexp-grid-2 {
    grid-template-columns: 1fr;
  }
}

.cz-sexp-preflight {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cz-sexp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cz-sexp-fx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7.5px;
  border-radius: 999px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
  font: 500 10.5px/1.2 var(--mono, 'JetBrains Mono', monospace);
}

.cz-sexp-fx-badge.is-on {
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  border-color: color-mix(in srgb, var(--acc, #d9714b) 45%, transparent);
  color: var(--acc-ink, #ec9a74);
}

.cz-sexp-ftr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line, #2f2d29);
}

.cz-sexp-est {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cz-sexp-est b {
  font: 600 12.5px/1.2 var(--mono, 'JetBrains Mono', monospace);
  color: var(--ink, #f1eee7);
}

.cz-sexp-est span {
  font: 400 10.5px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
}

#czStudioExportModal #czExportGoBtn {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--acc, #d9714b);
  background: linear-gradient(180deg, var(--acc2, #ec9a74), var(--acc, #d9714b));
  color: #ffffff;
  font: 600 13px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 22px -8px rgba(217, 113, 75, 0.82);
}

#czStudioExportModal #czExportGoBtn:hover {
  filter: brightness(1.06);
}

/* --------------------------------------------------------------------------
   5. Muted Clip Unmute Guide Arrow (#czUnmuteGuideArrow) & Toolbar Pins
   -------------------------------------------------------------------------- */
#czUnmuteGuideArrow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9800;
}

.cz-unmute-target-ring {
  position: fixed;
  border-radius: 10px;
  border: 2px solid var(--acc, #d9714b);
  box-shadow: 0 0 0 4px rgba(217, 113, 75, 0.25), 0 0 18px rgba(217, 113, 75, 0.65);
  pointer-events: none;
  animation: czUnmutePulse 1.35s ease-in-out infinite;
}

.cz-unmute-callout {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--panel, #1b1a18);
  border: 1.5px solid var(--acc, #d9714b);
  color: var(--ink, #f1eee7);
  font: 600 12px/1.25 var(--sans, 'Inter', sans-serif);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(217, 113, 75, 0.22);
  pointer-events: auto;
  white-space: nowrap;
  animation: czUnmuteFloat 1.5s ease-in-out infinite;
}

.cz-unmute-callout-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc, #d9714b);
  flex-shrink: 0;
}

.cz-unmute-callout-close {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--raised, #252421);
  color: var(--mute, #8f897d);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
}

.cz-unmute-arrow-svg {
  position: fixed;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

@keyframes czUnmutePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.78; }
}

@keyframes czUnmuteFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Customizable Timeline Toolbar Pins */
.cz-tl-pinned-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cz-tl-pin-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--ink, #f1eee7);
  font: 600 11px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.cz-tl-pin-btn:hover {
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

.cz-tl-pin-btn.is-active {
  background: var(--acc-soft, rgba(217, 113, 75, 0.18));
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

.cz-tl-customize-sec {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line, #2f2d29);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 196px;
}

.cz-tl-customize-trigger {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink, #f1eee7);
  font: 600 11.5px/1 var(--sans, 'Inter', sans-serif);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
}

.cz-tl-customize-trigger > span {
  white-space: nowrap;
}

/* Keep .cz-tl-tools strictly inside its flex lane so pinned buttons NEVER overlap #czVolMuteBtn in Vertical Theater / narrow timelines */
#viewEditor .cz-tl-tools {
  overflow: hidden;
  max-width: 100%;
}

@container cztl (max-width: 1480px) {
  #viewEditor #czTlClipMoreBtn .cz-tl-btn-lbl {
    display: none !important;
  }
}

@container cztl (max-width: 1320px) {
  #viewEditor .cz-tl-pinned-group {
    display: none !important;
  }
}

.cz-tl-customize-trigger:hover {
  background: var(--raised, #252421);
  border-color: var(--line, #2f2d29);
}

.cz-tl-customize-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px 2px;
}

.cz-tl-customize-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  font: 500 11.5px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  cursor: pointer;
}

.cz-tl-customize-item:hover {
  background: var(--raised, #252421);
}

.cz-tl-customize-item input[type="checkbox"] {
  accent-color: var(--acc, #d9714b);
  cursor: pointer;
}

.cz-tl-fallback-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cz-tl-fallback-more-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 220;
  padding: 8px;
  border-radius: 10px;
  background: var(--panel, #1b1a18);
  border: 1px solid var(--line, #2f2d29);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   6. CapCut-Style Clip-Join Transition Popover (#czJoinTransitionPopover)
   -------------------------------------------------------------------------- */
#czJoinTransitionPopover {
  position: fixed;
  z-index: 9800;
  width: min(316px, calc(100vw - 20px));
  padding: 11px 12px 12px;
  border-radius: 12px;
  background: #171614;
  border: 1px solid color-mix(in srgb, var(--line, #2f2d29) 64%, var(--acc, #d9714b) 36%);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.65), var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.06));
  color: var(--ink, #f1eee7);
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-sizing: border-box;
  animation: czJtPopIn 0.15s cubic-bezier(.22, 1, .36, 1);
}

#czJoinTransitionPopover[hidden] {
  display: none !important;
}

:root[data-theme="light"] #czJoinTransitionPopover {
  background: #fbfaf7;
  border-color: #dcd6ca;
  color: #1f1d1a;
  box-shadow: 0 20px 46px rgba(31, 29, 26, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

@keyframes czJtPopIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cz-jt-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line, #2f2d29);
}

.cz-jt-hdr-title {
  margin: 0;
  font: 600 12.5px/1.2 var(--sans, 'Inter', sans-serif);
  color: var(--ink, #f1eee7);
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.cz-jt-hdr-title em {
  font-family: var(--serif, 'Instrument Serif', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: var(--acc-ink, #ec9a74);
}

.cz-jt-close-btn {
  appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line, #2f2d29);
  background: var(--raised, #252421);
  color: var(--mute, #8f897d);
  font: 600 14px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.cz-jt-close-btn:hover {
  color: var(--ink, #f1eee7);
  border-color: var(--acc, #d9714b);
}

.cz-jt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.cz-jt-card {
  appearance: none;
  padding: 6px 5px 5px;
  border-radius: 8px;
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  color: var(--mute, #8f897d);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  cursor: pointer;
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.06));
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

:root[data-theme="light"] .cz-jt-card {
  background: #ffffff;
}

.cz-jt-card:hover {
  color: var(--ink, #f1eee7);
  border-color: color-mix(in srgb, var(--acc, #d9714b) 55%, var(--line, #2f2d29));
}

.cz-jt-card:active {
  transform: scale(0.97);
}

.cz-jt-card.is-active {
  background: color-mix(in srgb, var(--acc-soft, rgba(217, 113, 75, 0.18)) 60%, var(--raised, #252421));
  border-color: var(--acc, #d9714b);
  color: var(--ink, #f1eee7);
  box-shadow: inset 0 0 0 1px rgba(217, 113, 75, 0.26), var(--hi);
}

:root[data-theme="light"] .cz-jt-card.is-active {
  background: color-mix(in srgb, var(--acc-soft, rgba(217, 113, 75, 0.14)) 55%, #ffffff);
}

.cz-jt-lbl {
  font: 600 9.5px/1.15 var(--sans, 'Inter', sans-serif);
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Animated CSS Mini-Preview Boxes (Zero Emojis) */
.cz-jt-prev {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 5px;
  background: #10100f;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

:root[data-theme="light"] .cz-jt-prev {
  background: #1b1a18;
  border-color: rgba(31, 29, 26, 0.2);
}

.cz-jt-prev-a,
.cz-jt-prev-b,
.cz-jt-prev-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cz-jt-prev-a {
  background: linear-gradient(135deg, #d9714b 0%, #8b3b20 100%);
}

.cz-jt-prev-b {
  background: linear-gradient(135deg, #e8dfd1 0%, #9b9384 100%);
}

/* 1. None: clean hard cut seam */
.cz-jt-prev[data-prev="none"] .cz-jt-prev-a {
  right: 50%;
  opacity: 0.72;
}
.cz-jt-prev[data-prev="none"] .cz-jt-prev-b {
  left: 50%;
  opacity: 0.55;
}
.cz-jt-prev[data-prev="none"] .cz-jt-prev-fx {
  left: 50%;
  right: auto;
  width: 1px;
  background: rgba(255, 255, 255, 0.42);
}

/* 2. Cross Dissolve */
.cz-jt-prev[data-prev="dissolve"] .cz-jt-prev-b {
  opacity: 0.48;
  animation: czJtDissolve 2.2s ease-in-out infinite;
}

/* 3. Fade to Black */
.cz-jt-prev[data-prev="fade_black"] .cz-jt-prev-b {
  animation: czJtSwitchHalf 2.4s steps(1, end) infinite;
}
.cz-jt-prev[data-prev="fade_black"] .cz-jt-prev-fx {
  background: #0b0b0a;
  opacity: 0;
  animation: czJtPeakMid 2.4s ease-in-out infinite;
}

/* 4. White Flash */
.cz-jt-prev[data-prev="flash_white"] .cz-jt-prev-b {
  animation: czJtSwitchHalf 2.1s steps(1, end) infinite;
}
.cz-jt-prev[data-prev="flash_white"] .cz-jt-prev-fx {
  background: #fbfaf7;
  opacity: 0;
  animation: czJtFlashPeak 2.1s cubic-bezier(.22, 1, .36, 1) infinite;
}

/* 5. Slide Left */
.cz-jt-prev[data-prev="slide_left"] .cz-jt-prev-a {
  animation: czJtSlideOutL 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}
.cz-jt-prev[data-prev="slide_left"] .cz-jt-prev-b {
  animation: czJtSlideInL 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}

/* 6. Slide Right */
.cz-jt-prev[data-prev="slide_right"] .cz-jt-prev-a {
  animation: czJtSlideOutR 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}
.cz-jt-prev[data-prev="slide_right"] .cz-jt-prev-b {
  animation: czJtSlideInR 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}

/* 7. Whip Pan */
.cz-jt-prev[data-prev="whip_left"] .cz-jt-prev-a {
  animation: czJtWhipOut 1.8s cubic-bezier(.7, 0, .2, 1) infinite;
}
.cz-jt-prev[data-prev="whip_left"] .cz-jt-prev-b {
  animation: czJtWhipIn 1.8s cubic-bezier(.7, 0, .2, 1) infinite;
}
.cz-jt-prev[data-prev="whip_left"] .cz-jt-prev-fx {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.32) 0 2px, transparent 2px 6px);
  opacity: 0;
  animation: czJtPeakMid 1.8s ease-in-out infinite;
}

/* 8. Zoom Through */
.cz-jt-prev[data-prev="zoom_in"] .cz-jt-prev-a {
  animation: czJtZoomOutLayer 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}
.cz-jt-prev[data-prev="zoom_in"] .cz-jt-prev-b {
  animation: czJtZoomInLayer 2.2s cubic-bezier(.22, 1, .36, 1) infinite;
}

/* 9. Blur Dissolve */
.cz-jt-prev[data-prev="blur"] .cz-jt-prev-a,
.cz-jt-prev[data-prev="blur"] .cz-jt-prev-b {
  animation: czJtBlurPulse 2.3s ease-in-out infinite;
}
.cz-jt-prev[data-prev="blur"] .cz-jt-prev-b {
  animation-name: czJtBlurIn;
}

@keyframes czJtDissolve {
  0%, 15% { opacity: 0; }
  50%, 70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes czJtSwitchHalf {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
@keyframes czJtPeakMid {
  0%, 20%, 80%, 100% { opacity: 0; }
  50% { opacity: 0.96; }
}
@keyframes czJtFlashPeak {
  0%, 30%, 72%, 100% { opacity: 0; }
  50% { opacity: 0.92; }
}
@keyframes czJtSlideOutL {
  0%, 18% { transform: translateX(0); }
  62%, 100% { transform: translateX(-100%); }
}
@keyframes czJtSlideInL {
  0%, 18% { transform: translateX(100%); }
  62%, 100% { transform: translateX(0); }
}
@keyframes czJtSlideOutR {
  0%, 18% { transform: translateX(0); }
  62%, 100% { transform: translateX(100%); }
}
@keyframes czJtSlideInR {
  0%, 18% { transform: translateX(-100%); }
  62%, 100% { transform: translateX(0); }
}
@keyframes czJtWhipOut {
  0%, 28% { transform: translateX(0) scaleX(1); }
  50% { transform: translateX(-55%) scaleX(1.35); }
  68%, 100% { transform: translateX(-105%) scaleX(1); }
}
@keyframes czJtWhipIn {
  0%, 28% { transform: translateX(105%) scaleX(1); }
  50% { transform: translateX(45%) scaleX(1.35); }
  68%, 100% { transform: translateX(0) scaleX(1); }
}
@keyframes czJtZoomOutLayer {
  0%, 18% { transform: scale(1); opacity: 1; }
  65%, 100% { transform: scale(1.65); opacity: 0; }
}
@keyframes czJtZoomInLayer {
  0%, 18% { transform: scale(0.62); opacity: 0; }
  65%, 100% { transform: scale(1); opacity: 1; }
}
@keyframes czJtBlurPulse {
  0%, 18% { filter: blur(0px); opacity: 1; }
  50% { filter: blur(3px); opacity: 0.6; }
  75%, 100% { filter: blur(0px); opacity: 0; }
}
@keyframes czJtBlurIn {
  0%, 22% { filter: blur(3px); opacity: 0; }
  50% { filter: blur(2.5px); opacity: 0.65; }
  78%, 100% { filter: blur(0px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-jt-prev-a,
  .cz-jt-prev-b,
  .cz-jt-prev-fx {
    animation: none !important;
  }
}

/* Duration Slider Row */
.cz-jt-dur-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg, #141413);
  border: 1px solid var(--line, #2f2d29);
}

.cz-jt-dur-lbl {
  font: 600 11px/1 var(--sans, 'Inter', sans-serif);
  color: var(--mute, #8f897d);
  white-space: nowrap;
}

#czJoinTransDurSlider {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: var(--acc, #d9714b);
  cursor: pointer;
}

.cz-jt-dur-val {
  font: 600 10.5px/1 var(--mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  color: var(--acc-ink, #ec9a74);
  background: var(--raised, #252421);
  border: 1px solid var(--line, #2f2d29);
  border-radius: 5px;
  padding: 4px 6px;
  min-width: 44px;
  text-align: center;
}

/* Footer Action Buttons */
.cz-jt-ftr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-top: 2px;
}

.cz-jt-btn {
  appearance: none;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--line, #2f2d29);
  background: var(--raised, #252421);
  color: var(--ink, #f1eee7);
  font: 600 11px/1 var(--sans, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--hi, inset 0 1px 0 rgba(255, 255, 255, 0.06));
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

:root[data-theme="light"] .cz-jt-btn {
  background: #ffffff;
}

.cz-jt-btn:hover {
  border-color: var(--acc, #d9714b);
  color: var(--acc-ink, #ec9a74);
}

.cz-jt-btn.is-pri {
  background: linear-gradient(180deg, var(--acc2, #ec9a74), var(--acc, #d9714b));
  border-color: var(--acc, #d9714b);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 5px 14px -6px rgba(217, 113, 75, 0.72);
}

.cz-jt-btn.is-pri:hover {
  filter: brightness(1.06);
  color: #ffffff;
}

