:root {
  --editor-wallpaper: url("../assets/optimized/background-2200.jpg");
  --timeline-label-width: 76px;
  --timeline-content-width: 1920px;
  --timeline-duration-width: 1920px;
  --timeline-ruler-label-reserve: 42px;
  --timeline-row-height: 54px;
  --editor-pixel-small-font-size: 11px;
  --editor-pixel-small-line-height: 14px;
  --effect-yellow: #ffff00;
  --effect-navy: #000080;
  --effect-teal: #008080;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body.video-editor-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #006b6b var(--editor-wallpaper) center / cover no-repeat fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

.pixelarticon {
  display: block;
  flex: none;
  image-rendering: pixelated;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desktop-required-window {
  display: none;
}

/* Authentication gate */

.video-editor-auth-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.32);
  overscroll-behavior: contain;
}

.video-editor-auth-overlay[hidden],
.video-editor-page[data-video-editor-auth-state="authenticated"]
  .video-editor-auth-overlay {
  display: none;
}

.video-editor-auth-dialog {
  width: min(368px, 100%);
  max-height: 100%;
}

.video-editor-auth-dialog > .title-bar {
  cursor: default;
  user-select: none;
}

.video-editor-auth-dialog > .title-bar .title-bar-text {
  margin: 0;
}

.video-editor-auth-dialog__body {
  display: grid;
  min-width: 0;
  gap: 12px;
  margin: 12px;
}

.video-editor-auth-intro {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.video-editor-auth-intro img {
  image-rendering: pixelated;
}

.video-editor-auth-intro p {
  min-width: 0;
  margin: 0;
  line-height: 1.35;
}

.video-editor-auth-form {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.video-editor-auth-field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.video-editor-auth-field label,
.video-editor-auth-field input {
  min-width: 0;
}

.video-editor-auth-field input {
  width: 100%;
}

.video-editor-auth-field input[type="password"] {
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: normal;
  letter-spacing: 1px;
  -webkit-font-smoothing: auto;
}

.video-editor-auth-field input:focus-visible {
  outline: 2px solid var(--dialog-blue);
  outline-offset: 1px;
}

.video-editor-auth-status {
  min-height: 15px;
  margin: 0;
  color: #222;
  line-height: 15px;
  overflow-wrap: anywhere;
}

.video-editor-auth-status[data-state="error"] {
  color: #800000;
}

.video-editor-auth-form[aria-busy="true"] {
  cursor: wait;
}

.video-editor-auth-form[aria-busy="true"]
  .video-editor-auth-field,
.video-editor-auth-form[aria-busy="true"]
  .video-editor-auth-actions {
  opacity: 0.72;
}

.video-editor-auth-actions {
  display: flex;
  justify-content: flex-end;
}

.video-editor-auth-actions button {
  min-width: 82px;
}

.video-editor {
  --video-editor-media-panel-width: 260px;
  --video-editor-effects-panel-width: 300px;

  display: grid;
  grid-template-columns:
    var(--video-editor-media-panel-width)
    7px
    minmax(0, 1fr)
    7px
    var(--video-editor-effects-panel-width);
  gap: 2px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 8px;
}

.video-editor-side-separator {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 7px;
  min-height: 0;
  background: transparent;
  box-shadow: none;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.video-editor-side-separator:focus,
.video-editor-side-separator:focus-visible {
  outline: none;
}

.video-editor-side-separator__grip {
  width: 5px;
  height: 56px;
  background:
    repeating-linear-gradient(
      135deg,
      var(--button-shadow) 0 1px,
      transparent 1px 3px
    );
  box-shadow: 1px 1px var(--button-highlight);
  pointer-events: none;
}

.video-editor-side-separator:hover .video-editor-side-separator__grip,
.video-editor-side-separator:focus .video-editor-side-separator__grip,
.video-editor-side-separator:focus-visible .video-editor-side-separator__grip {
  background:
    repeating-linear-gradient(
      135deg,
      var(--dialog-blue) 0 1px,
      transparent 1px 3px
    );
}

.video-editor-side-separator:focus .video-editor-side-separator__grip,
.video-editor-side-separator:focus-visible .video-editor-side-separator__grip {
  outline: 1px dotted var(--dialog-blue);
  outline-offset: 1px;
}

.editor-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.editor-window > .title-bar {
  min-width: 0;
  user-select: none;
}

.editor-window > .title-bar .title-bar-text {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-window > .window-body {
  min-width: 0;
  min-height: 0;
  margin: 6px;
}

.editor-heading {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
}

.item-count,
.preview-clip-name {
  min-width: 0;
  overflow: hidden;
  color: #333;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sunken-panel {
  min-width: 0;
  min-height: 0;
}

/* Project media */

.media-panel__body {
  display: grid;
  grid-template-rows: auto minmax(110px, 1fr) auto;
  gap: 9px;
}

.import-section,
.media-bin-section,
.effects-library {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 6px;
}

.import-media-button {
  width: 100%;
  min-width: 0;
}

.media-drop-zone {
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 7px;
  border: 1px dashed #666;
  background: #efefef;
  color: #222;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.media-drop-zone.is-drag-over,
.media-drop-zone:focus-visible {
  border-color: #fff;
  outline: 2px solid var(--dialog-blue);
  outline-offset: -3px;
  background: #dfe8ff;
}

.media-drop-zone__arrow {
  width: 24px;
  height: 24px;
}

.media-drop-zone small,
.media-empty-state small {
  display: block;
  color: #555;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
}

.media-bin-section {
  grid-template-rows: auto minmax(0, 1fr);
}

.media-bin-scroll {
  overflow: auto;
  background: #fff;
}

.media-bin {
  min-height: 100%;
  padding: 4px;
  margin: 0;
  list-style: none;
}

.empty-state {
  color: #555;
  text-align: center;
}

.media-empty-state {
  display: grid;
  align-content: center;
  min-height: 88px;
  padding: 8px;
  gap: 4px;
}

.media-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  margin-bottom: 2px;
}

.media-item__select,
.media-item__insert {
  min-width: 0;
  min-height: 42px;
}

.media-item__select {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  padding: 4px 5px;
  box-shadow: none;
  background: transparent;
  text-align: left;
}

.media-item__select:hover,
.media-item__select:focus-visible,
.media-item.is-selected .media-item__select {
  background: var(--dialog-blue);
  color: #fff;
  text-shadow: none;
}

.media-item__icon {
  display: block;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.media-item__details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.media-item__name,
.media-item__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-item__meta {
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  font-weight: normal;
}

.media-item__insert {
  min-width: 42px;
  padding: 0 5px;
}

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

.effect-launcher {
  display: grid;
  grid-template-rows: 36px minmax(26px, auto);
  place-items: center;
  min-width: 0;
  min-height: 70px;
  padding: 5px 2px 3px;
  line-height: 11px;
  text-align: center;
}

.effect-launcher img {
  display: block;
  image-rendering: pixelated;
}

.effect-launcher span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Preview and timeline */

.compose-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.compose-panel__body {
  --video-editor-preview-split: 44fr;
  --video-editor-timeline-split: 56fr;

  display: grid;
  grid-template-rows:
    minmax(190px, var(--video-editor-preview-split))
    9px
    minmax(0, var(--video-editor-timeline-split));
  gap: 4px;
}

.preview-section {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  gap: 5px;
}

.preview-heading-row {
  min-height: 14px;
}

.video-editor-preview-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 5px 8px;
}

.video-editor-frame-size {
  display: flex;
  flex: 1 1 210px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.video-editor-frame-size > label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-editor-frame-size > select {
  flex: 1 1 174px;
  width: 100%;
  min-width: 118px;
  max-width: 230px;
}

.video-editor-frame-custom-size {
  display: flex;
  flex: 1 1 244px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 4px;
}

.video-editor-frame-custom-size[hidden] {
  display: none;
}

.video-editor-frame-custom-size label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-editor-frame-custom-size input {
  flex: 0 1 66px;
  width: 66px;
  min-width: 48px;
}

.video-editor-workspace-layout {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.video-editor-workspace-layout__label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-editor-workspace-layout__buttons {
  display: flex;
  min-width: 0;
  gap: 2px;
}

.video-editor-workspace-layout__buttons button {
  min-width: 62px;
  padding-right: 7px;
  padding-left: 7px;
  white-space: nowrap;
}

.video-editor-workspace-layout__buttons button[aria-pressed="true"] {
  padding: 3px 6px 2px 8px;
  background: #fff;
  box-shadow: var(--border-sunken-outer), var(--border-sunken-inner);
  font-weight: bold;
}

.video-editor-guidelines-block {
  position: relative;
  display: block;
  flex: 0 1 245px;
  min-width: 0;
}

.video-editor-guidelines-controls {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px 5px;
}

.video-editor-guidelines-controls > label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-editor-guidelines-controls > select {
  flex: 1 1 112px;
  width: 100%;
  min-width: 100px;
  max-width: 132px;
}

.video-editor-guidelines-info {
  flex: 0 0 20px;
  min-width: 20px;
  width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
}

.video-editor-guidelines-info__icon {
  width: 12px;
  height: 12px;
  margin: auto;
}

.video-editor-guidelines-info:focus,
.video-editor-guidelines-info:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.video-editor-guidelines-controls__note {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  width: min(280px, 100%);
  padding: 6px;
  border: 1px solid #000;
  background: #ffffe1;
  box-shadow: 1px 1px #777;
  color: #000;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-editor-guidelines-info:hover + .video-editor-guidelines-controls__note,
.video-editor-guidelines-info:focus + .video-editor-guidelines-controls__note,
.video-editor-guidelines-info:focus-visible + .video-editor-guidelines-controls__note {
  opacity: 1;
  visibility: visible;
}

.preview-stage-viewport {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #252525;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: auto;
  max-width: none;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: var(--video-editor-frame-aspect-ratio, 9 / 16);
  overflow: hidden;
  border: 3px solid;
  border-color: #555 #fff #fff #555;
  background: #101010;
  color: #d8d8d8;
}

.preview-stage.is-frame-flexible {
  aspect-ratio: auto;
}

.video-editor-social-guidelines {
  --guideline-top-left: 0%;
  --guideline-top-right: 0%;
  --guideline-top-coverage: 13.5%;
  --guideline-right-start: 40%;
  --guideline-right-end: 89%;
  --guideline-right-edge: 0%;
  --guideline-right-coverage: 18%;
  --guideline-bottom-coverage: 32%;
  --guideline-safe-polygon: polygon(
    5.5% 14%,
    94.5% 14%,
    94.5% 39%,
    80% 39%,
    80% 65%,
    5.5% 65%
  );
  --guideline-safe-label-x: 42.75%;
  --guideline-safe-label-y: 15.7%;

  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  color: #fff;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  pointer-events: none;
  user-select: none;
}

.video-editor-social-guidelines[data-guideline-platform="tiktok"] {
  --guideline-top-left: 0%;
  --guideline-top-right: 0%;
  --guideline-top-coverage: 13%;
  --guideline-right-start: 41%;
  --guideline-right-end: 90%;
  --guideline-right-edge: 0%;
  --guideline-right-coverage: 18%;
  --guideline-bottom-coverage: 31%;
  --guideline-safe-polygon: polygon(
    5% 13%,
    95% 13%,
    95% 40%,
    81% 40%,
    81% 68%,
    5% 68%
  );
  --guideline-safe-label-x: 43%;
  --guideline-safe-label-y: 14.7%;
}

.video-editor-social-guidelines__zone {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.55);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.52) 0 4px,
      rgba(255, 255, 255, 0.16) 4px 6px
    );
}

.video-editor-social-guidelines__zone > span,
.video-editor-social-guidelines__safe-area > span {
  position: absolute;
  padding: 2px 3px;
  border: 1px solid #fff;
  background: var(--dialog-blue);
  color: #fff;
  text-shadow: none;
  white-space: nowrap;
}

.video-editor-social-guidelines__zone--top {
  top: 0;
  right: var(--guideline-top-right);
  left: var(--guideline-top-left);
  height: var(--guideline-top-coverage);
  border-bottom-style: dashed;
  border-bottom-width: 1px;
}

.video-editor-social-guidelines__zone--top > span,
.video-editor-social-guidelines__zone--bottom > span,
.video-editor-social-guidelines__safe-area > span {
  left: 50%;
  transform: translateX(-50%);
}

.video-editor-social-guidelines__zone--top > span {
  top: 3px;
}

.video-editor-social-guidelines__zone--right {
  top: var(--guideline-right-start);
  right: var(--guideline-right-edge);
  bottom: calc(100% - var(--guideline-right-end));
  width: var(--guideline-right-coverage);
  overflow: visible;
  border-left-style: dashed;
  border-left-width: 1px;
}

.video-editor-social-guidelines__zone--right > span {
  bottom: calc(100% + 3px);
  right: 0;
  transform: none;
  writing-mode: horizontal-tb;
}

.video-editor-social-guidelines__zone--bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--guideline-bottom-coverage);
  border-top-style: dashed;
  border-top-width: 1px;
}

.video-editor-social-guidelines__zone--bottom > span {
  bottom: 3px;
}

.video-editor-social-guidelines__safe-area {
  position: absolute;
  z-index: 2;
  inset: 0;
  clip-path: var(--guideline-safe-polygon);
  background: rgba(255, 255, 0, 0.025);
}

.video-editor-social-guidelines__safe-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.video-editor-social-guidelines__safe-outline polygon {
  fill: none;
  stroke: #ffff00;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.video-editor-social-guidelines[data-guideline-platform="instagram-reels"]
  .video-editor-social-guidelines__safe-outline
  [data-guideline-safe-outline="tiktok"],
.video-editor-social-guidelines[data-guideline-platform="tiktok"]
  .video-editor-social-guidelines__safe-outline
  [data-guideline-safe-outline="instagram-reels"] {
  display: none;
}

.video-editor-social-guidelines[data-guideline-platform="tiktok"]
  .video-editor-social-guidelines__safe-outline
  [data-guideline-safe-outline="tiktok"] {
  display: block;
}

.video-editor-social-guidelines__safe-area > span {
  z-index: 1;
  top: var(--guideline-safe-label-y);
  left: var(--guideline-safe-label-x);
  border-color: #ffff00;
  transform: translateX(-50%);
}

.audio-sync-flash {
  position: absolute;
  z-index: 4;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.audio-sync-flash[data-flash-active="true"]:not([hidden]) {
  opacity: 0.78;
}

#preview-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #101010;
  object-fit: contain;
  object-position: center;
}

#preview-video[hidden] {
  display: none;
}

.preview-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
  color: #ddd;
  text-align: center;
}

.preview-empty-state img {
  image-rendering: pixelated;
}

.playback-controls {
  display: grid;
  grid-template-columns: 32px minmax(70px, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.transport-button {
  min-width: 32px;
  width: 32px;
  padding: 0;
}

.transport-button__icon {
  width: 24px;
  height: 24px;
  margin: auto;
}

.playback-controls input[type="range"] {
  min-width: 0;
  margin: 0;
}

.video-editor input[type="range"] {
  --video-editor-range-thumb-width: 11px;

  height: 23px;
  padding: 0;
  background:
    linear-gradient(
        to bottom,
        var(--button-shadow) 0 25%,
        #000 25% 50%,
        var(--button-highlight) 50% 75%,
        var(--surface) 75% 100%
      )
      center / calc(100% - var(--video-editor-range-thumb-width)) 4px no-repeat;
  cursor: pointer;
}

.video-editor input[type="range"]::-webkit-slider-runnable-track {
  height: 23px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.video-editor input[type="range"]::-webkit-slider-thumb {
  transform: none;
}

.video-editor input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.video-editor input[type="range"]::-moz-range-thumb {
  transform: none;
}

.video-editor input[type="range"]:focus-visible {
  outline: 2px solid var(--dialog-blue);
  outline-offset: 1px;
}

.time-readout {
  display: flex;
  min-width: 108px;
  justify-content: flex-end;
  gap: 4px;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.video-editor-preview-timeline-separator {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 9px;
  background: transparent;
  box-shadow: none;
  cursor: row-resize;
  touch-action: none;
  user-select: none;
}

.video-editor-preview-timeline-separator:hover
  .video-editor-preview-timeline-separator__grip,
.video-editor-preview-timeline-separator:focus
  .video-editor-preview-timeline-separator__grip,
.video-editor-preview-timeline-separator:focus-visible
  .video-editor-preview-timeline-separator__grip {
  background:
    repeating-linear-gradient(
      135deg,
      var(--dialog-blue) 0 1px,
      transparent 1px 3px
    );
}

.video-editor-preview-timeline-separator:focus,
.video-editor-preview-timeline-separator:focus-visible {
  outline: none;
}

.video-editor-preview-timeline-separator__grip {
  width: 56px;
  height: 5px;
  background:
    repeating-linear-gradient(
      135deg,
      var(--button-shadow) 0 1px,
      transparent 1px 3px
    );
  box-shadow: 1px 1px var(--button-highlight);
  pointer-events: none;
}

.video-editor-preview-timeline-separator:focus
  .video-editor-preview-timeline-separator__grip,
.video-editor-preview-timeline-separator:focus-visible
  .video-editor-preview-timeline-separator__grip {
  outline: 1px dotted var(--dialog-blue);
  outline-offset: 1px;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"] {
  grid-template-columns:
    minmax(180px, var(--video-editor-preview-split))
    9px
    minmax(200px, var(--video-editor-timeline-split));
  grid-template-rows: minmax(0, 1fr);
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .preview-section {
  grid-area: 1 / 1;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-preview-timeline-separator {
  grid-area: 1 / 2;
  min-width: 9px;
  min-height: 0;
  cursor: col-resize;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-preview-timeline-separator__grip {
  width: 5px;
  height: 56px;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .timeline-section {
  grid-area: 1 / 3;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .playback-controls {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-frame-custom-size {
  display: grid;
  grid-template-columns: auto minmax(48px, 1fr);
  justify-content: stretch;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-frame-custom-size[hidden] {
  display: none;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-frame-custom-size > span {
  display: none;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-frame-custom-size input {
  width: 100%;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-guidelines-block {
  display: grid;
  width: 100%;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-guidelines-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-guidelines-controls > select {
  max-width: none;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .time-readout {
  grid-column: 1 / -1;
  justify-content: center;
  min-width: 0;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .timeline-toolbar {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .timeline-zoom-control {
  grid-column: 1 / -1;
}

.timeline-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  gap: 5px;
}

.timeline-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(96px, 1fr);
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.timeline-tier-controls {
  display: flex;
  min-width: 0;
  gap: 3px;
}

.timeline-tier-controls button {
  min-width: 58px;
  padding: 0 5px;
}

.timeline-zoom-control {
  display: grid;
  grid-template-columns: auto minmax(50px, 1fr);
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.timeline-zoom-control input {
  min-width: 0;
  margin: 0;
}

.timeline-scroll {
  overflow: auto;
  background: #9b9b9b;
  overscroll-behavior: contain;
}

.timeline-scroll:focus-visible {
  outline: 2px solid var(--dialog-blue);
  outline-offset: -3px;
}

.timeline-canvas {
  --playhead-x: 0px;
  position: relative;
  width: calc(var(--timeline-label-width) + var(--timeline-content-width));
  min-height: 100%;
  background: #777;
}

.timeline-ruler-row {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: var(--timeline-label-width) var(--timeline-content-width);
  height: 28px;
}

.timeline-tier,
.effects-tier {
  display: grid;
  grid-template-columns: var(--timeline-label-width) var(--timeline-duration-width);
  min-height: var(--timeline-row-height);
}

.timeline-corner,
.timeline-tier__label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  margin: 0;
  border-right: 1px solid #333;
  border-bottom: 1px solid #555;
  background: var(--surface);
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
}

.timeline-corner {
  z-index: 5;
  font-weight: bold;
}

.timeline-ruler {
  position: relative;
  background-color: #d4d4d4;
  box-shadow: inset 0 -1px #333;
}

.timeline-ruler__tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 50%;
  background: #777;
  pointer-events: none;
}

.timeline-ruler__tick[data-ruler-tick="major"] {
  height: 100%;
  background: #444;
}

.timeline-ruler__tick[data-ruler-tick="minor"] {
  height: 50%;
}

.timeline-ruler__label {
  position: absolute;
  top: 2px;
  left: 4px;
  color: #222;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.timeline-track,
.effects-track {
  position: relative;
  min-width: 0;
  min-height: var(--timeline-row-height);
  overflow: hidden;
  border-bottom: 1px solid #555;
  background-color: #a6a6a6;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: var(--timeline-second-width, 64px) 100%;
}

.timeline-track[data-kind="audio"] {
  background-color: #aaa89f;
}

.timeline-track.is-drop-target,
.effects-track.is-drop-target {
  outline: 3px solid #fff;
  outline-offset: -4px;
  background-color: #999fc2;
}

.timeline-track.is-drop-invalid {
  outline: 3px solid #9c0000;
  outline-offset: -4px;
}

.timeline-track__empty {
  position: absolute;
  left: 8px;
  top: 50%;
  overflow: hidden;
  max-width: calc(100% - 16px);
  color: #3f3f3f;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.timeline-track:not(:has(.timeline-clip)) > [data-track-empty],
.effects-track:not(:has(.effect-item)) > [data-effects-empty] {
  display: block;
}

.timeline-track:has(.timeline-clip) > [data-track-empty],
.effects-track:has(.effect-item) > [data-effects-empty] {
  display: none;
}

.timeline-clip,
.effect-item {
  position: absolute;
  top: 5px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 20px 7px;
  align-items: center;
  min-width: 34px;
  height: calc(var(--timeline-row-height) - 10px);
  overflow: hidden;
  border: 1px solid #111;
  background: #d9e5ff;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #777;
  cursor: grab;
}

.timeline-clip[data-kind="audio"] {
  background: #d9f1d2;
}

.timeline-clip:active,
.effect-item:active {
  cursor: grabbing;
}

.timeline-clip:focus-visible,
.effect-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.timeline-item__label {
  min-width: 0;
  overflow: hidden;
  padding: 0 3px;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trim-handle,
.timeline-item__delete {
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.trim-handle {
  background: #666;
  box-shadow: inset 1px 0 #fff, inset -1px 0 #222;
  cursor: ew-resize;
}

.timeline-item__delete {
  align-self: start;
  height: 18px;
}

.timeline-item__delete-icon {
  width: 12px;
  height: 12px;
  margin: auto;
}

.effect-item {
  grid-template-columns: 7px 18px minmax(0, 1fr) 20px 7px;
  color: #000;
  background: var(--effect-yellow);
}

.effect-item[data-effect="windows-98"] {
  color: #fff;
  background: var(--effect-navy);
}

.effect-item[data-effect="transitions"] {
  color: #fff;
  background: var(--effect-teal);
}

.effect-item__icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.timeline-playhead {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  left: calc(var(--timeline-label-width) + var(--playhead-x));
  width: 1px;
  background: #ff1b1b;
  box-shadow: 1px 0 rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.audio-sync-guide-layer {
  position: absolute;
  z-index: 5;
  top: 28px;
  bottom: 0;
  left: var(--timeline-label-width);
  width: var(--timeline-content-width);
  overflow: hidden;
  pointer-events: none;
}

.audio-sync-guidepost-group {
  position: absolute;
  inset: 0;
  color: var(--guidepost-color, #ff00ff);
  pointer-events: none;
}

.audio-sync-guidepost {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--guidepost-x, 0);
  width: 2px;
  background: currentColor;
  box-shadow: 1px 0 rgba(255, 255, 255, 0.72);
}

.audio-sync-guidepost::before {
  position: absolute;
  top: 1px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: "";
}

.timeline-playhead::before {
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 8px;
  background: #ff1b1b;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: "";
}

.compose-panel > .status-bar {
  min-width: 0;
}

.compose-panel .status-bar-field {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-bar-field--mode {
  max-width: 82px;
}

/* Browser-like effect tabs */

.effects-panel {
  grid-template-rows: minmax(0, 1fr);
}

.effects-panel > .window-body {
  margin: 0;
}

.effects-panel__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
}

.effect-tab-scroll {
  min-width: 0;
  padding-top: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #989898;
}

.effect-tab-list {
  min-width: min-content;
  min-height: 29px;
  margin-bottom: -2px;
  border-bottom: 2px solid var(--button-highlight);
  background: #989898;
}

.effect-tab {
  --effect-tab-title-scroll-distance: 24px;
  --effect-tab-title-scroll-duration: 4s;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  width: 118px;
  min-width: 82px;
  max-width: 150px;
  height: 26px;
  margin-right: 3px;
}

.effect-tab.is-active,
.effect-tab[aria-selected="true"] {
  height: 28px;
  background: var(--surface);
}

.effect-tab.is-drag-target {
  outline: 2px solid var(--dialog-blue);
  outline-offset: -2px;
}

.effect-tab-list > .effect-tab.effect-tab--default {
  position: sticky;
  z-index: 3;
  left: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  background: var(--surface);
}

.effect-tab-list > .effect-tab > .effect-tab__face {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 0;
  margin: 3px 0 3px 4px;
  color: #222;
  background: transparent;
  cursor: default;
  text-decoration: none;
  text-align: left;
}

.effect-tab-list > .effect-tab.effect-tab--default > .effect-tab__face {
  grid-template-columns: 16px;
  justify-content: center;
  margin-right: 5px;
  margin-left: 5px;
}

.effect-tab__face img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.effect-tab__title-viewport {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.effect-tab__title-track {
  display: inline-block;
  min-width: max-content;
}

.effect-tab.is-title-overflowing:hover .effect-tab__title-track,
.effect-tab.is-title-overflowing:focus-within .effect-tab__title-track {
  animation: effect-tab-title-marquee
    var(--effect-tab-title-scroll-duration) ease-in-out infinite;
}

@keyframes effect-tab-title-marquee {
  0%,
  20% {
    transform: translateX(0);
  }

  80%,
  100% {
    transform: translateX(calc(-1 * var(--effect-tab-title-scroll-distance)));
  }
}

.effect-tab__close {
  align-self: center;
  min-width: 16px;
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  outline-offset: 0;
  background: transparent;
  box-shadow: none;
}

.effect-tab__close-icon {
  width: 12px;
  height: 12px;
  margin: auto;
}

.effect-tab__close:hover,
.effect-tab__close:focus,
.effect-tab__close:focus-visible {
  background: transparent;
  box-shadow: none;
}

.effect-tab__close:focus-visible {
  outline: 1px dotted #000;
}

.effect-tab__close:active {
  background: var(--surface);
  box-shadow: var(--border-sunken-outer), var(--border-sunken-inner);
  transform: translate(1px, 1px);
}

.effect-editor-well {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.effect-editor-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100%;
  padding: 18px;
  gap: 8px;
  color: #555;
  text-align: center;
}

.effect-editor-empty p {
  max-width: 190px;
  margin: 0;
}

.effect-editor-empty img,
.effect-editor__header img {
  image-rendering: pixelated;
}

.effect-editor {
  min-width: 0;
  padding: 10px;
}

.effect-editor__header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  margin-bottom: 12px;
  gap: 6px;
}

.effect-editor__header h3,
.effect-editor__header p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.effect-editor__header h3 {
  font-size: 14px;
  line-height: 1.2;
}

.effect-editor__header p {
  margin-top: 3px;
  color: #555;
}

.effect-editor fieldset {
  display: grid;
  gap: 6px;
}

.effect-editor textarea,
.effect-editor select {
  width: 100%;
}

.effect-placeholder-note {
  padding: 7px;
  border: 1px dotted #555;
  background: #f1f1f1;
  line-height: 1.35;
}

.effect-editor > button[data-add-effect] {
  width: 100%;
}

/* Compact audio effect editors */

.audio-sync-editor,
.audio-editor {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 8px;
  padding: 8px;
}

.audio-sync-editor > .effect-editor__header,
.audio-editor > .effect-editor__header {
  margin-bottom: 0;
}

.compact-effect-fieldset {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 7px;
  gap: 5px;
}

.compact-effect-fieldset > input,
.compact-effect-fieldset > select,
.compact-effect-fieldset > button,
.compact-effect-field input,
.compact-effect-search input,
.compact-effect-search button {
  width: 100%;
  min-width: 0;
}

.compact-effect-field {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.compact-effect-label-row,
.compact-effect-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
}

.compact-effect-label-row output,
.compact-effect-section-heading output {
  flex: 0 0 auto;
}

.compact-effect-status,
.compact-effect-note,
.compact-effect-empty {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.compact-effect-status {
  min-height: 28px;
  padding: 5px;
  border: 1px dotted #555;
  background: #f1f1f1;
}

.compact-effect-note {
  color: #444;
}

.audio-sync-graphs {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: #111;
}

.audio-sync-graph {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 72px;
  overflow: hidden;
  color: #c8c8c8;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
  text-align: center;
  pointer-events: none;
}

.audio-sync-graph + .audio-sync-graph {
  border-top: 1px solid #777;
}

.audio-sync-graph canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.audio-sync-graph > span {
  z-index: 1;
  max-width: 85%;
}

.audio-sync-graph--waveform {
  background:
    linear-gradient(transparent 49%, #555 49% 51%, transparent 51%),
    repeating-linear-gradient(90deg, transparent 0 19px, #252525 19px 20px),
    #111;
}

.audio-sync-graph--spectrum {
  background:
    linear-gradient(180deg, transparent, rgba(0, 128, 128, 0.24)),
    repeating-linear-gradient(90deg, transparent 0 19px, #252525 19px 20px),
    #111;
}

.audio-sync-frequency-range,
.audio-local-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 6px;
}

.audio-sync-recommendations {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.audio-sync-recommendations__buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  gap: 2px;
}

.audio-sync-recommendations__buttons button,
.audio-sync-rule__actions button,
.sound-effect-presets button,
.compact-effect-actions button {
  min-width: 0;
  padding-right: 4px;
  padding-left: 4px;
}

.audio-sync-rules {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.compact-effect-section-heading h4 {
  margin: 0;
  font-size: 11px;
}

#audio-sync-rules {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 5px;
  list-style: none;
}

.compact-effect-empty,
.audio-sync-rule {
  padding: 6px;
  border: 1px solid #777;
  background: #e6e6e6;
}

.audio-sync-rule {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.audio-sync-rule__heading {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  min-width: 0;
  gap: 4px;
}

.audio-sync-rule__heading input[type="color"] {
  width: 25px;
  min-width: 25px;
  height: 23px;
  padding: 1px;
}

.audio-sync-rule__heading input[type="text"] {
  width: 100%;
  min-width: 0;
}

.audio-sync-rule__heading output {
  grid-column: 2;
}

.audio-sync-rule__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: 3px;
}

.audio-sync-rule__actions select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.audio-sync-rule__actions [data-audio-sync-rule-delete] {
  grid-column: 1 / -1;
}

.audio-sync-marker-list {
  display: grid;
  max-height: 116px;
  min-width: 0;
  overflow: auto;
  gap: 2px;
}

.audio-sync-marker-list button {
  width: 100%;
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-effect-search {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.compact-effect-search__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 3px;
}

.compact-effect-search__row button {
  width: auto;
}

#audio-local-file,
#audio-local-preview {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.audio-local-range output {
  justify-self: end;
}

.sound-effect-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 3px;
}

.sound-effect-presets button {
  display: grid;
  place-items: center;
  min-height: 50px;
  white-space: normal;
}

.sound-effect-presets button[aria-pressed="true"] {
  padding: 3px 3px 2px 5px;
  background: #fff;
  box-shadow: var(--border-sunken-outer), var(--border-sunken-inner);
}

.sound-effect-presets span {
  color: #444;
  font-size: var(--editor-pixel-small-font-size);
  line-height: var(--editor-pixel-small-line-height);
}

.sound-effect-options {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 4px 6px;
}

.sound-effect-options > input[type="checkbox"] {
  margin: 0;
}

.sound-effect-options > div {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.sound-effect-options input[type="number"] {
  width: 100%;
  min-width: 0;
}

.compact-effect-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 3px;
}

/* Shared custom cursor semantics */

:where(
    .window[data-no-drag] > .title-bar,
    .window[data-no-drag] > .title-bar *
  ) {
  cursor: var(--cursor-normal) !important;
  user-select: none;
}

.video-editor-page :is(
    input[type="checkbox"],
    input[type="color"],
    input[type="file"],
    input[type="radio"],
    input[type="range"]
  ) {
  cursor: var(--cursor-select) !important;
}

#playhead-scrubber:not(:disabled),
#timeline-ruler,
#timeline-ruler *,
.timeline-track,
.timeline-track > .timeline-track__empty,
.effects-track,
.effects-track > [data-effects-empty],
#timeline-playhead {
  cursor: var(--cursor-precision) !important;
}

#timeline-scale:not(:disabled) {
  cursor: var(--cursor-select) !important;
}

:where(
    #effect-tab-default,
    [data-effect-default-tab-face],
    [data-effect-default-tab-face] *
  ) {
  cursor: var(--cursor-select) !important;
}

.video-editor-side-separator,
.video-editor-side-separator * {
  cursor: var(--cursor-resize-ew) !important;
}

.video-editor-preview-timeline-separator,
.video-editor-preview-timeline-separator * {
  cursor: var(--cursor-resize-ns) !important;
}

.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-preview-timeline-separator,
.compose-panel__body[data-video-editor-workspace-layout="side-by-side"]
  .video-editor-preview-timeline-separator * {
  cursor: var(--cursor-resize-ew) !important;
}

.media-item[draggable="true"],
.timeline-clip[draggable="true"],
.timeline-clip[draggable="true"] > .timeline-item__label,
.effect-item[draggable="true"],
.effect-item[draggable="true"] > :is(.effect-item__icon, .timeline-item__label),
.effect-tab[data-effect-tab-wrapper][draggable="true"],
.effect-tab[data-effect-tab-wrapper][draggable="true"] > .effect-tab__face,
.effect-tab[data-effect-tab-wrapper][draggable="true"]
  > .effect-tab__face
  :is(img, .effect-tab__title-viewport, .effect-tab__title-track) {
  cursor: var(--cursor-move) !important;
}

.media-item[draggable="true"]:active,
.timeline-clip[draggable="true"]:active,
.timeline-clip[draggable="true"]:active > .timeline-item__label,
.effect-item[draggable="true"]:active,
.effect-item[draggable="true"]:active > :is(.effect-item__icon, .timeline-item__label),
.effect-tab[data-effect-tab-wrapper][draggable="true"]:active,
.effect-tab[data-effect-tab-wrapper][draggable="true"]:active > .effect-tab__face,
.effect-tab[data-effect-tab-wrapper][draggable="true"].is-drag-target,
.timeline-track.is-drop-target,
.effects-track.is-drop-target,
.media-drop-zone.is-drag-over {
  cursor: var(--cursor-pressed) !important;
}

.video-editor-page .trim-handle,
.video-editor-page .trim-handle * {
  cursor: var(--cursor-resize-ew) !important;
}

.video-editor-auth-form[aria-busy="true"],
.video-editor-auth-form[aria-busy="true"] *,
[data-audio-sync-status][data-state="analyzing"],
[data-audio-sync-status][data-state="analyzing"] * {
  cursor: var(--cursor-working) !important;
}

.video-editor-page :is(
    button:disabled,
    input:disabled,
    select:disabled,
    textarea:disabled,
    [aria-disabled="true"],
    .is-disabled,
    .is-unavailable
  ),
.video-editor-page :is(
    button:disabled,
    input:disabled,
    select:disabled,
    textarea:disabled,
    [aria-disabled="true"],
    .is-disabled,
    .is-unavailable
  ) * {
  cursor: var(--cursor-unavailable) !important;
}

body.video-editor-page.is-custom-cursor-loading,
body.video-editor-page.is-custom-cursor-loading
  *:not(#custom-cursor-loading-override),
body.video-editor-page.is-custom-cursor-loading
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required),
body.video-editor-page.is-custom-cursor-loading
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required)
  *:not(#custom-cursor-loading-override) {
  cursor: var(--cursor-working) !important;
}

body.video-editor-page.is-holding-pointer-item,
body.video-editor-page.is-holding-pointer-item *,
body.video-editor-page.is-holding-pointer-item
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required),
body.video-editor-page.is-holding-pointer-item
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required)
  * {
  cursor: var(--cursor-pressed) !important;
}

body.video-editor-page.is-video-editor-resizing-ew,
body.video-editor-page.is-video-editor-resizing-ew *,
body.video-editor-page.is-video-editor-resizing-ew
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required),
body.video-editor-page.is-video-editor-resizing-ew
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required)
  * {
  cursor: var(--cursor-resize-ew) !important;
}

body.video-editor-page.is-video-editor-resizing-ns,
body.video-editor-page.is-video-editor-resizing-ns *,
body.video-editor-page.is-video-editor-resizing-ns
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required),
body.video-editor-page.is-video-editor-resizing-ns
  :is(#video-editor-app, #video-editor-auth-overlay, #desktop-required)
  * {
  cursor: var(--cursor-resize-ns) !important;
}

@media (min-width: 1024px) and (max-width: 1120px) {
  .audio-sync-recommendations__buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-effect-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 680px) and (min-width: 1024px) {
  .compose-panel__body[data-video-editor-workspace-layout="standard"] {
    --video-editor-preview-split: 39fr;
    --video-editor-timeline-split: 61fr;

    grid-template-rows:
      minmax(160px, var(--video-editor-preview-split))
      9px
      minmax(0, var(--video-editor-timeline-split));
  }

  .media-drop-zone {
    min-height: 52px;
  }

  .effect-launcher {
    min-height: 59px;
    grid-template-rows: 32px minmax(20px, auto);
  }

  .effect-launcher img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 1023px) {
  body.video-editor-page {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 16px;
  }

  .video-editor {
    display: none;
  }

  .video-editor-auth-overlay {
    display: none;
  }

  .desktop-required-window {
    display: block;
    width: min(420px, 100%);
  }

  .desktop-required-window__body {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin: 14px 12px;
  }

  .desktop-required-window__body img {
    image-rendering: pixelated;
  }

  .desktop-required-window__body p {
    margin: 0;
    line-height: 1.4;
  }

  .desktop-required-window__body p + p {
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
  }

  .effect-tab__title-track {
    animation: none !important;
    transform: none !important;
  }
}

body [hidden] {
  display: none;
}
