:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ink: #02040a;
  --glass-tint: rgba(6, 12, 28, 0.72);
  --rim-a: rgba(103, 64, 209, 0.85);
  --rim-b: rgba(180, 170, 255, 0.45);
  --rim-c: rgba(255, 255, 255, 0.92);
  --text: #f1f5f9;
  --muted: rgba(186, 198, 214, 0.92);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  margin: 0;
  background: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  min-width: 0;
  margin: 8px auto;
  padding: 12px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 58% 48% at 6% 12%, rgba(56, 170, 255, 0.26) 0%, transparent 52%),
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(56, 100, 180, 0.16) 0%, transparent 45%),
    radial-gradient(ellipse 70% 55% at 100% 100%, rgba(88, 60, 160, 0.12) 0%, transparent 42%),
    radial-gradient(ellipse 50% 40% at 0% 90%, rgba(30, 90, 140, 0.1) 0%, transparent 40%),
    linear-gradient(165deg, rgba(1, 1, 8, 0.95) 0%, rgba(5, 8, 20, 0.95) 40%, rgba(2, 3, 6, 0.95) 100%);
}

.app-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  --pattern-tile: 108px;
  overflow: visible;
  pointer-events: none;
  opacity: 1;
  contain: layout paint style;
  filter: blur(0) saturate(1.14) contrast(1.08) brightness(1.04);
}

.app-pattern__rotor {
  position: absolute;
  inset: -7%;
  transform: rotate(-27deg) scale(1.8);
  transform-origin: 50% 50%;
}

.app-pattern__track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: pattern-drift-x var(--drift-duration, 120s) linear infinite;
}

.app-pattern__track svg {
  display: block;
  flex: 0 0 auto;
}

.pattern-wave {
  transform-box: fill-box;
  transform-origin: center center;
  overflow: visible;
}

.pattern-wave {
  animation-timing-function: cubic-bezier(0.42, 0, 0.22, 1);
  animation-iteration-count: infinite;
  animation-delay: var(--wave-delay, 0s);
  animation-duration: var(--wave-duration, 9s);
  will-change: transform;
}

.pattern-wave--left {
  animation-name: pattern-wave-left;
}

.pattern-wave--right {
  animation-name: pattern-wave-right;
}

.pattern-wave--up {
  animation-name: pattern-wave-up;
}

.pattern-wave--down {
  animation-name: pattern-wave-down;
}

.pattern-pulse {
  transform-box: fill-box;
  transform-origin: center center;
  overflow: visible;
}

.pattern-pulse {
  animation-name: pattern-pulse;
  animation-duration: var(--pulse-duration, 6s);
  animation-delay: var(--pulse-delay, 0s);
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: cubic-bezier(0.42, 0, 0.2, 1);
  will-change: transform;
}

@keyframes pattern-drift-x {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-1 * var(--pattern-tile)), 0, 0);
  }
}

@keyframes pattern-pulse {
  0% {
    transform: scale(var(--pulse-min, 0.92));
  }

  55% {
    transform: scale(var(--pulse-max, 1.08));
  }

  100% {
    transform: scale(var(--pulse-min, 0.92));
  }
}

@keyframes pattern-wave-left {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  16% {
    transform: translate3d(calc(-0.18 * var(--wave-amp-x, 3px)), calc(-0.12 * var(--wave-amp-y, 2px)), 0) scale(0.992);
  }

  34% {
    transform: translate3d(calc(-0.82 * var(--wave-amp-x, 3px)), calc(0.18 * var(--wave-amp-y, 2px)), 0) scale(1.012);
  }

  54% {
    transform: translate3d(calc(0.42 * var(--wave-amp-x, 3px)), calc(0.08 * var(--wave-amp-y, 2px)), 0) scale(1.022);
  }

  72% {
    transform: translate3d(calc(0.08 * var(--wave-amp-x, 3px)), calc(-0.05 * var(--wave-amp-y, 2px)), 0) scale(0.996);
  }

  86% {
    transform: translate3d(calc(-0.04 * var(--wave-amp-x, 3px)), calc(0.02 * var(--wave-amp-y, 2px)), 0) scale(0.989);
  }
}

@keyframes pattern-wave-right {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  16% {
    transform: translate3d(calc(0.18 * var(--wave-amp-x, 3px)), calc(-0.12 * var(--wave-amp-y, 2px)), 0) scale(0.992);
  }

  34% {
    transform: translate3d(calc(0.82 * var(--wave-amp-x, 3px)), calc(0.18 * var(--wave-amp-y, 2px)), 0) scale(1.012);
  }

  54% {
    transform: translate3d(calc(-0.42 * var(--wave-amp-x, 3px)), calc(0.08 * var(--wave-amp-y, 2px)), 0) scale(1.022);
  }

  72% {
    transform: translate3d(calc(-0.08 * var(--wave-amp-x, 3px)), calc(-0.05 * var(--wave-amp-y, 2px)), 0) scale(0.996);
  }

  86% {
    transform: translate3d(calc(0.04 * var(--wave-amp-x, 3px)), calc(0.02 * var(--wave-amp-y, 2px)), 0) scale(0.989);
  }
}

@keyframes pattern-wave-up {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  16% {
    transform: translate3d(calc(-0.12 * var(--wave-amp-x, 3px)), calc(-0.18 * var(--wave-amp-y, 2px)), 0) scale(0.992);
  }

  34% {
    transform: translate3d(calc(0.18 * var(--wave-amp-x, 3px)), calc(-0.82 * var(--wave-amp-y, 2px)), 0) scale(1.012);
  }

  54% {
    transform: translate3d(calc(0.08 * var(--wave-amp-x, 3px)), calc(0.42 * var(--wave-amp-y, 2px)), 0) scale(1.022);
  }

  72% {
    transform: translate3d(calc(-0.05 * var(--wave-amp-x, 3px)), calc(0.08 * var(--wave-amp-y, 2px)), 0) scale(0.996);
  }

  86% {
    transform: translate3d(calc(0.02 * var(--wave-amp-x, 3px)), calc(-0.04 * var(--wave-amp-y, 2px)), 0) scale(0.989);
  }
}

@keyframes pattern-wave-down {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  16% {
    transform: translate3d(calc(-0.12 * var(--wave-amp-x, 3px)), calc(0.18 * var(--wave-amp-y, 2px)), 0) scale(0.992);
  }

  34% {
    transform: translate3d(calc(0.18 * var(--wave-amp-x, 3px)), calc(0.82 * var(--wave-amp-y, 2px)), 0) scale(1.012);
  }

  54% {
    transform: translate3d(calc(0.08 * var(--wave-amp-x, 3px)), calc(-0.42 * var(--wave-amp-y, 2px)), 0) scale(1.022);
  }

  72% {
    transform: translate3d(calc(-0.05 * var(--wave-amp-x, 3px)), calc(-0.08 * var(--wave-amp-y, 2px)), 0) scale(0.996);
  }

  86% {
    transform: translate3d(calc(0.02 * var(--wave-amp-x, 3px)), calc(0.04 * var(--wave-amp-y, 2px)), 0) scale(0.989);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-pattern__rotor svg,
  .pattern-wave,
  .pattern-pulse {
    animation: none !important;
  }
}

.liquid-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  border-radius: 22px;
  padding: 2px;
  background:
    radial-gradient(120% 85% at 12% 8%, rgba(72, 0, 50, 0.2) 0%, transparent 46%),
    radial-gradient(92% 74% at 88% 92%, rgba(125, 70, 255, 0.16) 0%, transparent 58%),
    linear-gradient(158deg, rgba(89, 0, 255, 0.18) 0%, rgba(46, 74, 128, 0.2) 46%, rgba(88, 76, 170, 0.22) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 0 1px rgba(144, 184, 255, 0.2),
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(96, 114, 255, 0.18),
    inset 0 1px 0 rgba(190, 208, 255, 0.24),
    inset 0 -2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.liquid-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  backdrop-filter: blur(18px) saturate(185%) contrast(112%) brightness(98%);
  -webkit-backdrop-filter: blur(18px) saturate(185%) contrast(112%) brightness(98%);
  background:
    linear-gradient(
      148deg,
      rgba(170, 205, 255, 0.34) 0%,
      rgba(112, 178, 255, 0.16) 34%,
      rgba(170, 116, 255, 0.2) 74%,
      rgba(255, 132, 214, 0.26) 100%
    );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.liquid-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(28% 9% at 9% 5%, rgba(164, 206, 255, 0.18) 0%, rgba(164, 206, 255, 0) 74%),
    radial-gradient(34% 13% at 86% 9%, rgba(175, 121, 255, 0.24) 0%, rgba(175, 121, 255, 0) 82%),
    radial-gradient(36% 12% at 83% 91%, rgba(255, 126, 208, 0.2) 0%, rgba(255, 126, 208, 0) 82%);
  mix-blend-mode: screen;
  opacity: 0.56;
}

.liquid-shell__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  isolation: isolate;
  border-radius: 20px;
  padding: 12px;
  background: linear-gradient(175deg, rgba(80, 120, 188, 0.18) 0%, rgba(14, 20, 38, 0.2) 44%, rgba(8, 8, 26, 0.3) 100%);
  backdrop-filter: blur(11px) saturate(160%);
  -webkit-backdrop-filter: blur(11px) saturate(160%);
  box-shadow:
    inset 0 2px 0 rgba(164, 198, 255, 0.18),
    inset 0 -10px 26px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(126, 162, 255, 0.12);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.video-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(14, 19, 33, 0.72), rgba(3, 5, 12, 0.92)),
    #05060a;
  border: 1px solid rgba(143, 182, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(240, 248, 255, 0.08),
    inset 0 -16px 28px rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  background: #000;
}

.video-wrap.audio-mode {
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 201, 28, 0.12), transparent 28%),
    radial-gradient(circle at 76% 78%, rgba(108, 155, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(12, 16, 29, 0.92), rgba(4, 7, 16, 0.98));
}

.video-wrap.audio-mode .media {
  opacity: 0;
  pointer-events: none;
}

.audio-visualizer {
  position: absolute;
  inset: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  color: rgba(244, 248, 255, 0.94);
}

.audio-visualizer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(236, 241, 255, 0.78);
}

.audio-waveform-shell {
  position: relative;
  width: 100%;
  min-height: 96px;
  padding: 22px 14px 20px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(rgba(8, 12, 24, 0.56), rgba(8, 12, 24, 0.46)) padding-box,
    linear-gradient(135deg, rgba(255, 201, 28, 0.28), rgba(118, 164, 255, 0.24)) border-box;
  border: 1px solid transparent;
}

.audio-waveform {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 58px;
}

.audio-waveform-rail {
  position: absolute;
  inset: 0 14px;
  --selection-start: 0%;
  --selection-end: 100%;
  cursor: pointer;
}

.audio-waveform-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(128, minmax(0, 1fr));
  align-items: center;
  column-gap: 1px;
  pointer-events: none;
  overflow: hidden;
}

.audio-waveform-layer-base {
  z-index: 1;
}

.audio-waveform-layer-selected {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--selection-end)) 0 var(--selection-start));
}

.audio-bar {
  width: 100%;
  border-radius: 999px;
  background: rgba(205, 215, 240, 0.18);
}

.audio-waveform-layer-selected .audio-bar {
  background: rgba(255, 220, 96, 0.96);
  box-shadow: 0 0 10px rgba(255, 205, 44, 0.18);
}

.audio-range-highlight {
  position: absolute;
  top: -12px;
  bottom: -12px;
  z-index: 4;
  width: 0;
  border-radius: 12px;
  pointer-events: none;
  background: rgba(255, 208, 48, 0.14);
  border: 2px solid rgba(255, 201, 28, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 203, 0.22),
    0 0 0 1px rgba(33, 25, 0, 0.38),
    0 10px 26px rgba(255, 189, 18, 0.18);
}

.audio-playhead {
  position: absolute;
  top: -8px;
  bottom: -8px;
  z-index: 5;
  width: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.24),
    0 0 16px rgba(255, 255, 255, 0.26);
}

.audio-handle-marker {
  position: absolute;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
}

.audio-handle-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(10, 13, 24, 0.94);
  border: 2px solid rgba(255, 201, 28, 0.96);
  box-shadow: 0 0 14px rgba(255, 196, 24, 0.16);
}

.audio-handle-marker.end .audio-handle-dot {
  border-color: rgba(255, 220, 120, 0.96);
}

.audio-handle-label {
  display: none;
}

.audio-waveform-note {
  min-height: 12px;
  color: rgba(236, 241, 255, 0.58);
  font-size: 11px;
  text-align: center;
}

.icon-button {
  position: absolute;
  z-index: 6;
  border: 0;
  color: #f8fbff;
  cursor: pointer;
  line-height: 1;
}

.mute-toggle {
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    linear-gradient(rgba(19, 24, 41, 0.36), rgba(19, 24, 41, 0.34)) padding-box,
    linear-gradient(135deg, rgba(179, 198, 255, 0.42), rgba(208, 218, 255, 0.14)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

.mute-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.48);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.trim-panel {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(37, 39, 45, 0.94);
  background:
    linear-gradient(
      180deg,
      rgba(130, 131, 138, 0.98) 0%,
      rgba(118, 120, 128, 0.98) 38%,
      rgba(101, 103, 111, 0.99) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(47, 49, 56, 0.4),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.timeline-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  border: 0;
  border-right: 3px solid rgba(47, 49, 55, 0.92);
  color: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  background:
    linear-gradient(
      180deg,
      rgba(136, 137, 145, 0.98) 0%,
      rgba(122, 124, 132, 0.98) 48%,
      rgba(108, 110, 118, 0.99) 100%
    );
}

.timeline-play svg {
  width: 100px;
  height: 100px;
  display: block;
}

.timeline-play.playing {
  color: rgba(255, 240, 190, 0.98);
}

.timeline-viewport {
  position: relative;
  min-width: 0;
  min-height: 82px;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(126, 127, 135, 0.98) 0%,
      rgba(112, 114, 122, 0.98) 45%,
      rgba(101, 103, 111, 0.99) 100%
    );
  cursor: pointer;
}

.timeline-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(57, 59, 66, 0.18);
  pointer-events: none;
}

.timeline-preview {
  position: absolute;
  inset: 6px 28px;
  display: grid;
  align-items: stretch;
  overflow: hidden;
  border-radius: 7px;
  filter: saturate(0.72) brightness(0.54);
  background: rgba(33, 33, 33, 0.92);
}

.timeline-preview-video {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.timeline-thumbnail {
  position: relative;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(111, 118, 132, 0.42), rgba(82, 88, 102, 0.52)),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 58%);
  background-size: cover;
  background-position: center center;
}

.timeline-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
}

.timeline-thumbnail + .timeline-thumbnail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(23, 26, 33, 0.32);
}

.timeline-preview-audio {
  grid-template-columns: repeat(56, minmax(0, 1fr));
  align-items: center;
  column-gap: 1px;
  padding: 12px 10px;
  background:
    linear-gradient(180deg, rgba(121, 126, 139, 0.92), rgba(101, 105, 116, 0.92));
}

.timeline-audio-bar {
  align-self: center;
  width: 100%;
  border-radius: 999px;
  background: rgba(228, 233, 244, 0.72);
}

.timeline-shade {
  position: absolute;
  top: 6px;
  bottom: 6px;
  z-index: 2;
  background: transparent;
  pointer-events: none;
}

.timeline-shade-start {
  left: 0;
  border-radius: 7px 0 0 7px;
}

.timeline-shade-end {
  right: 0;
  border-radius: 0 7px 7px 0;
}

.timeline-selection-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  min-width: 80px;
  overflow: visible;
  border-radius: 9px;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.timeline-selection-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 6px solid #d9b22a;
  border-radius: 9px;
  pointer-events: none;
}

.timeline-selection-frame.disabled {
  opacity: 1;
}

.timeline-selection-body {
  position: relative;
  min-width: 0;
  height: calc(100% - 12px);
  align-self: center;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  touch-action: none;
}

.timeline-selection-body::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0;
  pointer-events: none;
}

.timeline-selection-grip {
  display: none;
}

.timeline-handle {
  --trim-handle-shift-x: 0px;
  --trim-handle-scale-x: 1;
  --trim-handle-scale-y: 1;
  --trim-handle-tilt: 0deg;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: rgba(10, 9, 4, 1);
  cursor: ew-resize;
  background: #d9b22a;
  transform:
    translateX(var(--trim-handle-shift-x))
    scaleX(var(--trim-handle-scale-x))
    scaleY(var(--trim-handle-scale-y))
    rotate(var(--trim-handle-tilt));
  transform-origin: center center;
  transition:
    transform 180ms cubic-bezier(0.22, 1.3, 0.32, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 180ms ease;
  will-change: transform;
  pointer-events: auto;
  touch-action: none;
}

.timeline-handle.is-active {
  filter: saturate(1.03) brightness(1.01);
}

.timeline-handle svg {
  width: 22px;
  height: 34px;
  display: block;
  pointer-events: none;
}

.timeline-handle-start {
  border-radius: 9px 0 0 9px;
  border-right: 1px solid rgba(120, 90, 0, 0.18);
  box-shadow: none;
}

.timeline-handle-end {
  border-radius: 0 9px 9px 0;
  border-left: 1px solid rgba(120, 90, 0, 0.18);
  box-shadow: none;
}

.timeline-playhead {
  --trim-playhead-shift-x: 0px;
  --trim-playhead-scale-x: 1;
  --trim-playhead-scale-y: 1;
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 5;
  width: 5px;
  transform:
    translateX(-50%)
    translateX(var(--trim-playhead-shift-x))
    scaleX(var(--trim-playhead-scale-x))
    scaleY(var(--trim-playhead-scale-y));
  transform-origin: center center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(97, 97, 97, 0.22),
    0 0 0 2px rgba(255, 255, 255, 0.22);
  transition:
    transform 170ms cubic-bezier(0.22, 1.32, 0.3, 1),
    box-shadow 170ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  pointer-events: none;
}

.timeline-playhead.is-active {
  box-shadow:
    0 0 0 1px rgba(97, 97, 97, 0.24),
    0 0 0 2px rgba(255, 255, 255, 0.24),
    0 3px 10px rgba(255, 255, 255, 0.18);
}

.timeline-viewport.audio-mode .timeline-selection-frame {
  top: 5px;
  bottom: 5px;
}

.actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action {
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background:
    linear-gradient(var(--glass-tint), var(--glass-tint)) padding-box,
    linear-gradient(135deg, rgba(170, 205, 255, 0.36), rgba(180, 170, 255, 0.24), rgba(255, 132, 214, 0.3)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(214, 238, 255, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.3);
}

.action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  margin-top: 8px;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

body.dragging-trim,
body.dragging-trim * {
  user-select: none;
}

@media (max-width: 560px) {
  .app {
    width: calc(100vw - 10px);
    margin: 5px auto;
    padding: 10px;
    border-radius: 24px;
  }

  .liquid-shell {
    border-radius: 19px;
  }

  .liquid-shell__inner {
    border-radius: 18px;
    padding: 10px;
  }

  .trim-panel {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .timeline-play,
  .timeline-viewport {
    min-height: 82px;
  }

  .timeline-play svg {
    width: 46px;
    height: 46px;
  }

  .timeline-selection-frame {
    min-width: 78px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .timeline-preview {
    inset: 6px 38px;
  }

  .timeline-handle svg {
    width: 16px;
    height: 16px;
  }
}
