.timeline-context-menu {
  position: fixed;
  z-index: 130;
  min-width: 184px;
  padding: 6px;
  background: rgba(20, 21, 27, .98);
  border: 1px solid #363842;
  border-radius: 11px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .58);
  backdrop-filter: blur(14px);
  direction: rtl;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.timeline-context-menu::-webkit-scrollbar { display: none; }

@media (min-width: 701px) {
  #clipContextMenu { width: 206px; min-width: 0; }
  #clipContextMenu > button { height: 33px; gap: 7px; padding-inline: 8px; }
  #clipContextMenu > button b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 700px) {
  .timeline-context-menu {
    width: min(210px, calc(100vw - 16px));
    min-width: 0;
    padding: 5px;
  }
  .timeline-context-menu > button { height: 34px; gap: 7px; padding-inline: 8px; }
  .timeline-context-menu > button b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.timeline-context-menu[hidden],
.context-speed-options[hidden],
.timeline-context-menu [hidden] {
  display: none !important;
}

.timeline-context-menu > button {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d9dae0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  cursor: pointer;
  text-align: right;
}

.timeline-context-menu > button:hover,
.timeline-context-menu > button:focus-visible {
  background: #292a34;
  color: #fff;
  outline: 0;
}

.timeline-context-menu > button:disabled {
  opacity: .48;
  cursor: default;
  background: transparent;
}

#mediaContextMenu > button[data-locked="true"],
#mediaContextMenu > button[data-locked="true"]:hover { color: #838b96; background: #222831; cursor: not-allowed; }

.timeline-context-menu > button span {
  width: 18px;
  color: #9b86f7;
  text-align: center;
  font-size: 13px;
}

.timeline-context-menu > button b {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
}

.timeline-context-menu > button i {
  color: #757782;
  font-size: 16px;
  font-style: normal;
}

.timeline-context-menu kbd {
  border: 1px solid #40414a;
  background: #111217;
  color: #777984;
  border-radius: 4px;
  padding: 2px 5px;
  font: 8px monospace;
}

.timeline-context-menu .context-danger {
  color: #f09aa7;
}

.timeline-context-menu .context-danger span {
  color: #ef7185;
}

.context-separator {
  display: block;
  height: 1px;
  margin: 5px 4px;
  background: #30313a;
}

.visual-effects {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #292a32;
}

.clip-properties h3 {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
  unicode-bidi: plaintext;
  white-space: nowrap;
}

#inspectorPanel {
  padding-top: 8px;
  padding-inline: 2px;
  scrollbar-width: none;
  scrollbar-gutter: auto;
  -ms-overflow-style: none;
}
#inspectorPanel::-webkit-scrollbar,
#inspectorPanel > :is(#emptySelection, #clipProperties, #exportPanel)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#inspectorPanel .inspector-head { padding: 0 12px 7px; }
#inspectorPanel .inspector-head h2 { font-size: 13px; line-height: 1.35; }
#inspectorPanel .clip-properties { padding-top: 10px; }
.property-label { font-size: 11px; }
.clip-properties h3 { font-size: 13px; }
.clip-properties > label { font-size: 12px; }

.clip-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 5px 0 12px;
}
.clip-identity h3 { flex: 1 1 auto; min-width: 0; margin: 0; }
.clip-identity-actions { display: none; min-width: 0; }
.clip-identity-actions:has(> button:not([hidden])) {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
}
.clip-identity .clip-trim-open {
  flex: 0 0 auto;
  min-height: 28px;
  margin: 0;
  padding: 4px 8px;
  white-space: nowrap;
}
.clip-identity .audio-speed-button {
  flex: 0 0 auto;
  min-height: 28px;
  gap: 6px;
  padding: 4px 9px;
  border-color: rgba(150, 125, 235, .42);
  background: rgba(116, 87, 238, .12);
  color: #ddd4ff;
  white-space: nowrap;
}
.clip-identity .audio-speed-button:hover { border-color: #ab91fa; background: rgba(116, 87, 238, .22); }
.clip-identity .audio-speed-button[hidden] { display: none !important; }
.clip-properties.is-video-selected > .property-label { display: none; }
.clip-properties.is-video-selected .clip-identity {
  margin: 0 0 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid #302c3a;
}
.clip-properties.is-video-selected .clip-identity h3 { font-size: 12px; color: #f4f0fb; }

.image-duration-property {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 9px 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(132, 105, 239, .25);
  border-radius: 8px;
  background: rgba(116, 87, 238, .07);
}
.image-duration-property[hidden] { display: none !important; }
.image-duration-property > label { color: #ded7f2; font-size: 11px; font-weight: 700; }
.image-duration-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline: 5px;
  border: 1px solid #41365e;
  border-radius: 6px;
  background: #17151f;
  direction: ltr;
}
.image-duration-input-wrap:focus-within { border-color: #a688f4; }
.image-duration-input-wrap input { width: 54px; height: 27px; padding: 0; border: 0; outline: 0; background: transparent; color: #f3eeff; font: 700 12px ui-monospace, Consolas, monospace; text-align: center; appearance: textfield; }
.image-duration-input-wrap input:disabled { color: #817c8f; }
.image-duration-input-wrap span { color: #a89dbd; font-size: 10px; font-weight: 700; }

.visual-effects[hidden] {
  display: none !important;
}

.empty-selection[hidden],
.clip-properties[hidden],
.export-panel[hidden] {
  display: none !important;
}

.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.export-button b {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.export-glyph {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.export-glyph svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.export-panel {
  padding-top: 0;
}

.export-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.export-summary {
  min-width: 0;
}

.export-summary > div {
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #373246;
  border-radius: 11px;
  background: linear-gradient(145deg, #211c2d, #12111b);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  text-align: start;
}

.export-summary span {
  color: #bcb3ca;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.export-summary b {
  color: #f7f1ff;
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  direction: ltr;
  text-align: end;
}

.export-quality-picker {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid #51416c;
  border-radius: 11px;
  background: linear-gradient(145deg, #2b2141, #17131f);
}

.export-quality-picker[open] {
  z-index: 10;
  border-color: #9a7ce9;
}

.export-quality-picker summary {
  min-height: 40px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  list-style: none;
  color: #f0eafa;
  font-size: 11px;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.export-quality-picker summary::-webkit-details-marker { display: none; }
.export-quality-picker summary:focus-visible { outline: 2px solid #c8b6ff; outline-offset: -2px; }

.export-quality-current { display: inline-flex; align-items: center; gap: 4px; color: #d8c8ff; white-space: nowrap; }
.export-quality-current b { font: 700 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.export-quality-current svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .15s; }
.export-quality-picker[open] .export-quality-current svg { transform: rotate(180deg); }

.export-quality-menu {
  position: absolute;
  inset-inline: -1px;
  top: calc(100% + 6px);
  width: auto;
  padding: 6px 5px 9px;
  border: 1px solid #4b3d64;
  border-radius: 10px;
  background: #16131f;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .48);
}

.export-quality-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  border: 0;
}

.export-quality-options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.export-quality-option {
  position: relative;
  min-height: 35px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #d4cedf;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

label.export-quality-option { cursor: pointer; }
label.export-quality-option:hover { background: #252032; }

.export-quality-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.export-quality-option:has(input:checked) {
  border-color: #a284ff;
  background: #3a2c61;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(162, 132, 255, .25);
}

.export-quality-option:has(input:focus-visible) {
  outline: 2px solid #c8b6ff;
  outline-offset: 2px;
}

.export-quality-option.is-locked { color: #898397; background: #18171f; cursor: not-allowed; }
.export-quality-lock { display: inline-flex; align-items: center; gap: 4px; color: #a69ab8; font: 600 10px/1.2 sans-serif; }
.export-quality-lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.export-plan-card {
  margin-top: 10px;
  padding: 0;
}

.export-plan-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.export-plan-column {
  min-width: 0;
  padding: 8px 9px 6px;
  border: 1px solid #393943;
  border-radius: 9px;
  background: #1a1b22;
  color: #a9aab6;
}

.export-plan-column.is-pro {
  border-color: #9470ed;
  background: linear-gradient(150deg, #34234c, #211b34 78%);
  color: #e5d9ff;
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 0 18px rgba(142, 93, 234, .11);
}

.export-plan-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 31px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(181, 176, 204, .13);
}

.export-plan-column-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d0d0d9;
  font-size: 11px;
}

.export-plan-column.is-pro .export-plan-column-head b { color: #fff; }
.export-plan-column-head > span { flex: none; color: #93939f; font-size: 9px; font-weight: 700; }
.export-plan-column.is-pro .export-plan-column-head > span { color: #e5adff; font-size: 15px; }

.export-plan-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  min-height: 24px;
  border-bottom: 1px solid rgba(181, 176, 204, .08);
  font-size: 10px;
}
.export-plan-feature:last-child { border-bottom: 0; }
.export-plan-feature > span { min-width: 0; white-space: nowrap; }
.export-plan-feature > b { flex: none; white-space: nowrap; color: #d3d3da; font-size: 10px; }
.export-plan-column.is-pro .export-plan-feature > b { color: #fff; }

.export-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
  margin-top: 12px;
}

.export-actions-row > button {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.export-local-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(120deg, #7053e9, #9258ed);
  color: #fff;
}

.export-local-action:disabled {
  background: #282a30;
  color: #aeb0b9;
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px #3d3f48;
}

.export-local-action .export-glyph svg {
  width: 14px;
  height: 14px;
}

.export-local-action b,
.export-save-action b {
  font-size: 11px;
  white-space: nowrap;
}

.export-save-action {
  background: linear-gradient(125deg, #29243b, #493570);
  color: #f1eaff;
}

.export-save-action:not(:disabled):hover { filter: brightness(1.15); }
.export-saved-link { display: block; margin: 9px 0 0; color: #b9a4f5; font-size: 10px; text-align: center; text-decoration: none; }
.export-saved-link:hover { color: #d5c8ff; text-decoration: none; }

.export-save-action:disabled {
  background: #1b1c22;
  color: #a6a1b3;
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px #282a31;
}

.export-lock-note {
  margin: 9px 0 0;
  padding: 7px 5px;
  border: 1px solid rgba(225, 144, 102, .35);
  border-radius: 8px;
  background: rgba(225, 144, 102, .1);
  color: #f0c6b1;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.export-lock-note > span,
.export-watermark-note > span { display: block; white-space: nowrap; }

.export-watermark-note {
  margin: 9px 0 0;
  padding: 7px 5px;
  border: 1px solid rgba(103, 193, 149, .32);
  border-radius: 9px;
  background: rgba(77, 172, 119, .1);
  color: #c5ecd6;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.export-watermark-note.is-watermarked { border-color: rgba(151, 117, 235, .32); background: rgba(116, 81, 215, .12); color: #e3d9ff; }
.export-watermark-note[hidden] { display: none; }
.export-progress-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid #554773;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 0, rgba(112, 76, 193, .18), transparent 55%), #15131d;
  color: #f4f0ff;
  text-align: center;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(177, 139, 255, .06) inset;
}
.export-preview-freeze {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.export-progress-dialog::backdrop { background: rgba(5, 4, 11, .75); backdrop-filter: blur(4px); }
.export-progress-brand { position: relative; display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 10px; }
.export-progress-brand::before { content: ''; position: absolute; inset: 0; border: 2px solid rgba(167, 130, 242, .2); border-top-color: #c386f1; border-right-color: #785df0; border-radius: 50%; animation: export-brand-spin 2.4s linear infinite; }
.export-progress-brand::after { content: ''; position: absolute; inset: 9px; border-radius: 16px; background: rgba(142, 97, 242, .35); filter: blur(14px); animation: export-brand-glow 2s ease-in-out infinite alternate; }
.export-progress-brand img { position: relative; z-index: 1; display: block; width: 44px; height: 44px; filter: drop-shadow(0 3px 9px rgba(110, 73, 229, .4)); animation: export-brand-breathe 2s ease-in-out infinite alternate; }
@keyframes export-brand-spin { to { transform: rotate(360deg); } }
@keyframes export-brand-glow { to { opacity: .45; transform: scale(.85); } }
@keyframes export-brand-breathe { to { transform: scale(.93); } }
.export-progress-dialog h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.export-progress-dialog p { margin: 5px 0 16px; color: #c5bad8; font-size: 11px; line-height: 1.5; }
.export-progress-track { position: relative; height: 7px; overflow: hidden; border-radius: 99px; background: #292438; }
.export-progress-dialog progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 99px; accent-color: #9c79f7; }
.export-progress-dialog progress::-webkit-progress-bar { background: #292438; border-radius: 99px; }
.export-progress-dialog progress::-webkit-progress-value { background: linear-gradient(90deg, #7257ec, #bd7ce9); border-radius: 99px; }
.export-progress-activity { display: none; position: absolute; top: 0; left: -35%; width: 35%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, transparent, #9d7af5 38%, #d697ed 70%, transparent); pointer-events: none; }
.export-progress-dialog progress:not([value]) + .export-progress-activity { display: block; animation: export-progress-travel 1.7s ease-in-out infinite; }
@keyframes export-progress-travel { from { left: -35%; } to { left: 100%; } }
.export-progress-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 0 16px; }
.export-progress-dialog output { display: block; margin: 0; color: #e3d7ff; font: 700 12px/1.4 Consolas, monospace; }
#exportProgressElapsed { color: #a89db9; font-size: 11px; }
.export-progress-dialog button { min-width: 86px; padding: 7px 14px; border: 1px solid #554666; border-radius: 8px; background: #272332; color: #eee8f9; cursor: pointer; }
.export-progress-dialog button:hover { border-color: #856aba; background: #322a43; }
@media (prefers-reduced-motion: reduce) { .export-progress-brand::before, .export-progress-brand::after, .export-progress-brand img { animation: none; } }

.export-footer-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 8px; }
.export-footer-actions.has-upgrade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.export-footer-actions .export-panel-back { min-width: 0; min-height: 34px; margin-top: 0; }

@media (max-width: 800px) {
  .export-button b { display: none; }
  .export-button { padding: 9px 11px; }
}

.audio-properties {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #292a32;
}

.audio-properties-head,
.audio-properties-head > div,
.audio-main-slider,
.audio-dual-sliders label,
.audio-select-grid label,
.audio-effect-field {
  display: flex;
}

.audio-properties-head {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.audio-properties-head > div {
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.audio-properties-head b { font-size: 12px; color: #e2e0e9; }
.audio-properties-head small { font-size: 9.5px; color: #70727d; line-height: 1.5; }
.clip-properties.is-video-selected .audio-properties-head small { display: none; }

.audio-mute-button {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #343640;
  border-radius: 8px;
  background: #181920;
  color: #a9abb4;
  cursor: pointer;
}

.audio-mute-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #b9a8ff;
}
.audio-mute-icon svg { width: 18px; height: 18px; overflow: visible; }
.audio-mute-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.audio-mute-icon .audio-speaker { fill: rgba(185, 168, 255, .15); }
.audio-mute-icon .audio-muted-mark { display: none; }
.audio-mute-button[aria-pressed="true"] .audio-waves { display: none; }
.audio-mute-button[aria-pressed="true"] .audio-muted-mark { display: block; }
.audio-mute-button b { font-size: 10px; }
.audio-mute-button[aria-pressed="true"] { border-color: #9a5264; background: #2a1920; color: #f0a1b1; }
.audio-mute-button[aria-pressed="true"] .audio-mute-icon { color: #ff8fa6; }

.audio-main-slider,
.audio-dual-sliders label {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px;
  color: #9698a1;
  font-size: 10.5px;
}

.audio-main-slider { margin-bottom: 12px; }
.audio-main-slider output,
.audio-dual-sliders output { color: #d9d5e8; font: 700 10px/1 ui-monospace, Consolas, monospace; direction: ltr; }
.audio-main-slider input,
.audio-dual-sliders input { width: 100%; accent-color: #8062ed; }

.audio-dual-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}

.clip-properties.is-video-selected .audio-properties { margin-top: 13px; padding-top: 12px; }
.clip-properties.is-video-selected .audio-properties-head { margin-bottom: 9px; }
.clip-properties.is-video-selected .audio-properties-head b { color: #f0eafc; }
.clip-properties.is-video-selected :is(.audio-main-slider, .audio-dual-sliders label) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 4px;
  min-width: 0;
  margin-bottom: 0;
  padding: 8px 9px;
  border: 1px solid #343044;
  border-radius: 9px;
  background: linear-gradient(145deg, #1d1a28, #16161e);
  color: #d4cde1;
  font-size: 10px;
}
.clip-properties.is-video-selected :is(.audio-main-slider, .audio-dual-sliders label) output {
  justify-self: end;
  color: #e4d9ff;
  white-space: nowrap;
}
.clip-properties.is-video-selected :is(.audio-main-slider, .audio-dual-sliders label) input[type="range"] {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}
.clip-properties.is-video-selected .audio-properties > .audio-main-slider { margin-bottom: 7px; }
.clip-properties.is-video-selected .audio-dual-sliders { gap: 6px; margin-bottom: 9px; }

.audio-advanced { min-width: 0; }
.audio-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 29px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 5px 12px;
  border: 1px solid #393449;
  border-radius: 7px;
  background: #1b1924;
  color: #d9d0eb;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  list-style: none;
  cursor: pointer;
}
.audio-advanced > summary::-webkit-details-marker { display: none; }
.audio-advanced > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid #bdacf1;
  border-bottom: 1.5px solid #bdacf1;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.audio-advanced[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
.audio-advanced > summary:hover,
.audio-advanced > summary:focus-visible { border-color: #8d70e5; background: #242035; outline: none; }
.audio-advanced-body {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px 2px 2px;
}
.audio-advanced-body > :is(.audio-main-slider, .audio-select-grid, .audio-option-row, .audio-ducking-row, .audio-ducking-panel, .audio-actions-row) { margin: 0; }
.clip-properties.is-video-selected .audio-advanced-body > .audio-main-slider { margin: 0; }
.clip-properties.is-video-selected .audio-advanced-body .audio-select-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.clip-properties.is-video-selected .audio-advanced-body .audio-effect-field { grid-column: 1 / -1; }

.audio-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.inspector-select-field { min-width: 0; }

.audio-select-grid label,
.audio-effect-field {
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #aaa7b7;
  font-size: 10px;
  line-height: 1.45;
  white-space: normal;
}

.audio-select-grid .inspector-select-field > label { min-height: 29px; }

.audio-select-grid select,
.audio-effect-field select {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 5px;
  border: 1px solid #30313b;
  border-radius: 7px;
  outline: 0;
  background: #15161c;
  color: #dedee5;
  font-size: 10px;
  margin-top: auto;
}

.audio-effect-field { margin-bottom: 9px; }
.audio-select-grid .audio-effect-field { margin-bottom: 0; }
.audio-select-grid select:focus,
.audio-effect-field select:focus { border-color: #7b64d3; }

.audio-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.audio-speed-button,
.audio-switch,
.audio-ducking-row,
.audio-actions-row button {
  min-height: 34px;
  border: 1px solid #30313b;
  border-radius: 8px;
  background: #17181e;
  color: #b8bac3;
}

.audio-speed-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  cursor: pointer;
}

.audio-speed-button span,
.audio-speed-button b,
.audio-switch b,
.audio-ducking-row b,
.audio-actions-row b { font-size: 10px; }
.audio-speed-button b { color: #b6a4fb; direction: ltr; }

.audio-switch,
.audio-ducking-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px;
  cursor: pointer;
}

.audio-option-row > * { min-width: 0; }
.audio-option-row b { white-space: nowrap; }

.audio-switch input,
.audio-ducking-row input { position: absolute; opacity: 0; pointer-events: none; }
.audio-switch span,
.audio-ducking-row span {
  position: relative;
  width: 25px;
  height: 14px;
  flex: 0 0 25px;
  border-radius: 999px;
  background: #343640;
  transition: .18s ease;
}
.audio-switch span::after,
.audio-ducking-row span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9b9da7;
  transition: .18s ease;
}
.audio-switch input:checked + span,
.audio-ducking-row input:checked + span { background: #6e55cf; }
.audio-switch input:checked + span::after,
.audio-ducking-row input:checked + span::after { transform: translateX(11px); background: #fff; }
[dir="ltr"] .audio-switch input:checked + span::after,
[dir="ltr"] .audio-ducking-row input:checked + span::after { transform: translateX(11px); }
[dir="rtl"] .audio-switch input:checked + span::after,
[dir="rtl"] .audio-ducking-row input:checked + span::after { transform: translateX(-11px); }

.audio-ducking-row {
  margin-top: 8px;
  border-style: dashed;
  color: #9d9faa;
}

.audio-ducking-row:has(input:checked) {
  border-color: rgba(124, 97, 224, .62);
  background: rgba(112, 82, 218, .1);
  color: #e2dcfb;
}

.audio-ducking-panel {
  margin-top: 7px;
  padding: 9px;
  border: 1px solid rgba(116, 91, 207, .38);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(33, 29, 48, .96), rgba(20, 20, 27, .96));
}

.audio-ducking-panel[hidden] { display: none; }

.audio-ducking-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.audio-ducking-selects label,
.audio-ducking-timing label {
  min-width: 0;
  color: #9d9aa9;
  font-size: 9.5px;
}

.audio-ducking-selects label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.inspector-select-field select[hidden] { display: none !important; }
.inspector-select-field--text > .text-property-field { padding: 0; border: 0; background: none; }
.inspector-select-field--text > .inspector-select-trigger { margin-top: 4px; }
.inspector-select-trigger {
  width: 100%;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 0 6px;
  border: 1px solid #3c3a4b;
  border-radius: 8px;
  background: linear-gradient(145deg, #1b1b26, #14151c);
  color: #f0ecf7;
  font-size: 10px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.inspector-select-trigger:hover,
.inspector-select-trigger[aria-expanded="true"] {
  border-color: #8c72ec;
  background: #242035;
  box-shadow: 0 0 0 2px rgba(137, 104, 242, .12);
}
.inspector-select-trigger:focus-visible {
  outline: 2px solid #ac95ff;
  outline-offset: 2px;
}
.inspector-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.inspector-select-trigger > i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid #b8a8ee;
  border-bottom: 1.5px solid #b8a8ee;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.inspector-select-trigger[aria-expanded="true"] > i { transform: rotate(225deg) translateY(-1px); }
.inspector-select-menu {
  position: fixed;
  z-index: 160;
  max-height: min(270px, calc(100vh - 16px));
  display: grid;
  gap: 2px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(153, 128, 244, .42);
  border-radius: 11px;
  background: rgba(23, 23, 32, .98);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.inspector-select-menu[hidden] { display: none !important; }
.inspector-select-group {
  position: sticky;
  top: -5px;
  z-index: 1;
  padding: 7px 10px 4px;
  background: #171720;
  color: #bba9f1;
  font-size: 10px;
  font-weight: 800;
}
.inspector-select-option {
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d9d5e3;
  font-size: 11px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.inspector-select-option:hover,
.inspector-select-option:focus-visible {
  outline: none;
  background: #30294b;
  color: #fff;
}
.inspector-select-option[aria-selected="true"] {
  background: linear-gradient(110deg, rgba(120, 88, 230, .3), rgba(120, 88, 230, .12));
  color: #f8f5ff;
}
.inspector-select-option[aria-selected="true"]::after {
  content: "✓";
  color: #c7b8ff;
  font-size: 13px;
}

.audio-ducking-selects select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #373343;
  border-radius: 7px;
  outline: 0;
  background: #15151c;
  color: #e2e0e8;
  font-size: 9.5px;
}

.audio-ducking-selects select:focus { border-color: #7b64d3; }

.audio-ducking-timing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.audio-ducking-timing label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px;
}

.audio-ducking-timing output {
  color: #d9d2f6;
  font: 700 9px/1 ui-monospace, Consolas, monospace;
  direction: ltr;
}

.audio-ducking-timing input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #8062ed;
}

.audio-actions-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 5px;
  margin-top: 9px;
}

.audio-actions-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 0 4px;
  cursor: pointer;
}
.audio-actions-row button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-actions-row button:hover { border-color: #6755a4; background: #211e2c; color: #eeeaff; }
.audio-actions-row button span { color: #aa95fb; font-size: 13px; }
.detach-audio-button { border-color: rgba(122, 99, 216, .48) !important; background: rgba(110, 82, 210, .1) !important; }

[dir="ltr"] .audio-properties { direction: ltr; }

.visual-effects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.visual-effects-head b {
  color: #d9dae0;
  font-size: 12px;
  font-weight: 650;
}

.visual-effects-head small {
  color: #777985;
  font-size: 10px;
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.effect-grid button {
  min-width: 0;
  padding: 3px 3px 5px;
  border: 1px solid #2c2d36;
  border-radius: 8px;
  background: #15161c;
  color: #898b96;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.effect-grid button:hover {
  transform: translateY(-1px);
  border-color: #625399;
  color: #d8d4e7;
}

.effect-grid button.active {
  border-color: #8669f2;
  background: #251f3d;
  color: #eeeaff;
  box-shadow: 0 0 0 1px rgba(134, 105, 242, .18);
}

.effect-grid button > span {
  display: block;
  height: 31px;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 5px;
  background:
    radial-gradient(circle at 72% 25%, #ffd09c 0 9%, transparent 10%),
    linear-gradient(145deg, #233a61 0 43%, #bc668c 44% 68%, #f0b26d 69% 100%);
  filter: var(--effect-filter, none);
}

.effect-grid button b {
  display: block;
  overflow: hidden;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-back {
  width: 100%;
  min-height: 34px;
  margin-top: 13px;
  padding: 7px 10px;
  border: 1px solid #343640;
  border-radius: 8px;
  background: #1a1b22;
  color: #aaa9b5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

#backToProjectProperties {
  display: inline-flex;
  width: auto;
  min-width: 80px;
  padding-inline: 14px;
}

.inspector-back:hover,
.inspector-back:focus-visible {
  border-color: #6655a3;
  background: #24202f;
  color: #eeeaff;
  outline: 0;
}

.inspector-back span {
  color: #9d89f3;
  font-size: 13px;
}

.inspector-back b {
  font-size: 11px;
  font-weight: 600;
}

[dir="ltr"] .visual-effects,
[dir="ltr"] .effect-grid {
  direction: ltr;
}

.clip-transition-properties {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #292a32;
}

.clip-transition-properties[hidden] { display: none !important; }

.clip-transition-properties-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.clip-transition-properties-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.clip-transition-properties-head b { color: #e2e0e9; font-size: 12px; }
.clip-transition-properties-head small { color: #777985; font-size: 9.5px; }

.clip-transition-card {
  overflow: hidden;
  border: 1px solid #2b2d36;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(31, 30, 40, .72), rgba(19, 20, 26, .94));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.clip-transition-property {
  min-height: 50px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(96px, .9fr) minmax(82px, 1fr) 27px;
  align-items: center;
  gap: 8px;
}

.clip-transition-property + .clip-transition-property { border-top: 1px solid #292b34; }
.clip-transition-property[hidden] { display: none !important; }
.clip-transition-property:first-child[hidden] + .clip-transition-property { border-top: 0; }

.clip-transition-property-title,
.clip-transition-property-title > span,
.clip-transition-property label {
  display: flex;
  align-items: center;
}

.clip-transition-property-title {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.clip-transition-property-title > span { gap: 6px; min-width: 0; }
.clip-transition-property-title b { color: #d7d8df; font-size: 10px; white-space: nowrap; }
.clip-transition-property-title strong {
  max-width: 100%;
  padding-inline-start: 13px;
  min-width: 0;
  overflow: hidden;
  color: #ad9cf2;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transition-edge-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #46c984;
  box-shadow: 0 0 0 3px rgba(70, 201, 132, .12);
}

.transition-edge-dot--out {
  background: #a77aff;
  box-shadow: 0 0 0 3px rgba(167, 122, 255, .12);
}

.clip-transition-property label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39px;
  gap: 6px;
  color: #92949f;
  font-size: 10px;
}

.clip-transition-property output {
  color: #eeebfb;
  font: 700 11px/1 ui-monospace, Consolas, monospace;
  direction: ltr;
}

.clip-transition-property input {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: #8062ed;
}

.clip-transition-property input:disabled { opacity: .36; }

.remove-clip-transition {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #3b3542;
  border-radius: 8px;
  background: rgba(30, 27, 34, .86);
  color: #c78e9c;
  cursor: pointer;
}

.remove-clip-transition svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.remove-clip-transition:hover:not(:disabled) {
  border-color: #815164;
  background: #2b1d24;
  color: #f0acbb;
}

.remove-clip-transition:disabled {
  opacity: .28;
  cursor: default;
}

[dir="ltr"] .clip-transition-properties { direction: ltr; }

.context-speed-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 4px 5px 7px;
}

.context-speed-options button {
  height: 28px;
  border: 1px solid #343641;
  border-radius: 6px;
  background: #17181e;
  color: #92949e;
  font-size: 9px;
  cursor: pointer;
}

.context-speed-options button:hover,
.context-speed-options button.active {
  border-color: #8065f4;
  background: #28213f;
  color: #cfc7ff;
}

[dir="ltr"] .timeline-context-menu {
  direction: ltr;
}

[dir="ltr"] .timeline-context-menu > button {
  text-align: left;
}

.clip-speed-dialog {
  width: min(410px, calc(100% - 16px));
  max-height: calc(100dvh - 16px);
  padding: 15px;
  overflow-y: auto;
  border: 1px solid #373944;
  border-radius: 13px;
  background: #13141a;
  color: #f3f3f6;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
  direction: rtl;
  scrollbar-width: none;
}
.clip-speed-dialog::-webkit-scrollbar { display: none; }

.clip-speed-dialog::backdrop {
  background: rgba(4, 5, 8, .72);
  backdrop-filter: blur(5px);
}

.speed-dialog-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 27px;
  height: 27px;
  border: 1px solid #393b48;
  border-radius: 7px;
  background: #202128;
  color: #c7c8d1;
  cursor: pointer;
}

.speed-dialog-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0 0 9px;
  padding-inline-end: 34px;
  border-bottom: 1px solid #2d2e38;
}

.speed-dialog-heading h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.speed-dialog-heading p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #aaa7b6;
  font-size: 10px;
  text-overflow: ellipsis;
  text-align: start;
  white-space: nowrap;
}

.speed-presets {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}

.speed-presets button {
  --speed-rgb: 132, 105, 242;
  --speed-ink: #cbbaff;
  min-width: 0;
  height: 29px;
  padding: 0 1px;
  border: 1px solid rgba(var(--speed-rgb), .4);
  border-radius: 7px;
  background: rgba(var(--speed-rgb), .11);
  color: var(--speed-ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.speed-presets button[data-speed-percent="25"] { --speed-rgb: 234, 71, 104; --speed-ink: #ff879b; }
.speed-presets button[data-speed-percent="50"] { --speed-rgb: 233, 91, 116; --speed-ink: #ff9aab; }
.speed-presets button[data-speed-percent="75"] { --speed-rgb: 232, 122, 105; --speed-ink: #ffab98; }
.speed-presets button[data-speed-percent="125"] { --speed-rgb: 76, 179, 134; --speed-ink: #9be1bc; }
.speed-presets button[data-speed-percent="150"] { --speed-rgb: 56, 191, 122; --speed-ink: #7ce1a5; }
.speed-presets button[data-speed-percent="200"] { --speed-rgb: 42, 205, 111; --speed-ink: #70e7a0; }

.speed-presets button:hover,
.speed-presets button.active {
  border-color: rgba(var(--speed-rgb), .95);
  background: rgba(var(--speed-rgb), .25);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--speed-rgb), .28);
}
.speed-presets button:focus-visible { outline: 2px solid var(--speed-ink); outline-offset: 2px; }

.speed-percent-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 10px auto 0;
  color: #cac5d4;
  font-size: 10px;
  white-space: nowrap;
}

.speed-percent-field > div {
  width: 74px;
  height: 30px;
  display: flex;
  align-items: center;
  border: 1px solid #343640;
  border-radius: 9px;
  background: #0d0e12;
}

.speed-percent-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f3f3f6;
  outline: 0;
  padding: 0 4px;
  text-align: center;
  font: 700 11px monospace;
  appearance: textfield;
}
.speed-percent-field input::-webkit-inner-spin-button,
.speed-percent-field input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.speed-percent-field b {
  padding-inline: 7px;
  color: #8d7ae3;
  font-size: 9px;
}

.speed-duration-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.speed-duration-preview span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid #33343f;
  border-radius: 8px;
  background: #17181f;
  text-align: center;
}
.speed-duration-preview span:last-child { border-color: #51436f; background: #211b30; }

.speed-duration-preview small {
  color: #a8a2b5;
  font-size: 9px;
  white-space: nowrap;
}

.speed-duration-preview b {
  font: 700 11px monospace;
}
.speed-duration-preview span:last-child b { color: #e0d2ff; }

.speed-duration-preview i {
  color: #7160c3;
  font-style: normal;
}

.speed-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.speed-dialog-actions button {
  height: 33px;
  border: 1px solid #33353e;
  border-radius: 9px;
  background: #1b1c22;
  color: #c5c6cd;
  cursor: pointer;
  font-size: 10px;
}

.speed-dialog-actions button:last-child {
  border-color: transparent;
  background: linear-gradient(120deg, #7055e6, #925af0);
  color: #fff;
  font-weight: 700;
}

[dir="ltr"] .clip-speed-dialog {
  direction: ltr;
}

[dir="ltr"] .speed-dialog-close {
  right: 10px;
  left: auto;
}
[dir="ltr"] .speed-duration-preview i { transform: scaleX(-1); }

@media (max-width: 480px) {
  .clip-speed-dialog { padding: 12px; }
}

.track.active-track {
  background-color: rgba(116, 87, 238, .055);
  box-shadow: inset 0 0 0 1px rgba(133, 103, 241, .16);
}

.track-labels > [data-track-label].active-track-label {
  background: linear-gradient(90deg, rgba(116, 87, 238, .13), rgba(116, 87, 238, .025));
}

.track-labels > [data-track-label].active-track-label > span {
  color: #a894ff;
}
