:root {
  color-scheme: dark;
  --bg: #141619;
  --panel: #1b1e22;
  --line: #2e3238;
  --muted: #929ba7;
  --text: #e8ecf0;
  --accent: #30dcc2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    12px "Segoe UI",
    Arial,
    sans-serif;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
button:hover {
  background: #30353b;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.symbols {
  display: none;
}
header {
  height: 66px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 34px;
  border-bottom: 1px solid var(--line);
  background: #191c20;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand img {
  width: 33px;
  height: 33px;
}
.brand b {
  font-size: 20px;
  letter-spacing: -0.5px;
  display: flex;
  gap: 5px;
  align-items: baseline;
}
.brand span {
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--muted);
}
.project-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.project-title input {
  border: 0;
  background: transparent;
  width: 190px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
}
.project-title span {
  font-size: 10px;
  color: var(--muted);
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 5px;
  align-items: center;
}
.primary {
  background: var(--accent);
  color: #0b2723;
  font-weight: 650;
  padding: 10px 20px;
}
.primary:hover {
  background: #79ecd9;
}
.primary span {
  margin-left: 12px;
  font-size: 17px;
}
main {
  height: calc(100dvh - 66px);
  display: grid;
  grid-template-columns: 76px 270px minmax(320px, 1fr) 270px;
  grid-template-rows: minmax(310px, 1fr) 310px;
}
.rail {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--line);
  background: #191c20;
  padding: 12px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail button {
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  padding: 12px 0;
  color: var(--muted);
  border-radius: 8px;
}
.rail svg {
  width: 21px;
  height: 21px;
}
.rail .active {
  background: #243c39;
  color: var(--accent);
}
.rail .help {
  margin-top: auto;
  font-size: 19px;
}
.rail .help span {
  font-size: 10px;
}
.library,
.inspector {
  background: var(--panel);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.panel-heading {
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 17px;
  flex-shrink: 0;
}
h2 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
}
.panel-heading span {
  font-size: 10px;
  color: var(--muted);
}
#libraryContent {
  overflow: auto;
  padding: 17px;
  flex: 1;
}
.import {
  width: 100%;
  background: #2a3035;
  margin-bottom: 18px;
  padding: 10px;
}
.search {
  width: 100%;
  background: #15181c;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 6px;
  color: var(--text);
  margin-bottom: 17px;
}
.eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.4px;
  margin: 6px 0 11px;
}
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 10px;
}
.asset {
  border: 0;
  padding: 0;
  display: block;
  text-align: left;
  background: none;
  min-width: 0;
}
.asset:hover {
  background: none;
}
.asset .thumb {
  height: 72px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff08;
  background: #2c3543;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb span {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: #151619b5;
  color: white;
  border-radius: 3px;
  font-size: 9px;
  padding: 2px 4px;
}
.asset b {
  display: block;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 7px 0 3px;
}
.asset small {
  color: var(--muted);
  font-size: 9px;
}
.asset .thumb:after {
  content: "+";
  position: absolute;
  right: 5px;
  top: 5px;
  background: var(--accent);
  color: #123d33;
  opacity: 0;
  border-radius: 4px;
  font-size: 16px;
  padding: 0 5px;
}
.asset:hover .thumb:after {
  opacity: 1;
}
.library-foot {
  font-size: 10px;
  color: var(--muted);
  padding: 13px 17px;
  border-top: 1px solid var(--line);
}
.dot {
  display: inline-block;
  background: var(--accent);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 7px;
}
.viewer {
  padding: 0 22px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #121417;
}
.viewer-top {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
.viewer-top div {
  display: flex;
  align-items: center;
}
.viewer-top select {
  background: transparent;
  border: 0;
  color: var(--muted);
}
.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #20242a, #121417);
}
canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: 16/9;
  box-shadow: 0 9px 45px #0008;
}
.preview-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  letter-spacing: 2px;
  font-size: 8px;
  color: #ffffff65;
  pointer-events: none;
}
.transport {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-shrink: 0;
}
#timeDisplay {
  font:
    11px Consolas,
    monospace;
  color: var(--accent);
}
#timeDisplay small {
  color: var(--muted);
  font-size: 11px;
}
.play-controls {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
#play {
  width: 38px;
  height: 34px;
}
#play svg {
  fill: currentColor;
  stroke-width: 1;
}
input[type="range"] {
  accent-color: var(--accent);
  height: 3px;
  cursor: pointer;
}
#seek {
  width: 100%;
  margin: 0;
}
.inspector {
  border-right: 0;
  border-left: 1px solid var(--line);
}
#inspectorContent {
  overflow: auto;
  padding: 16px;
}
.clip-name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-size: 12px;
}
.clip-name svg {
  color: var(--accent);
}
.section-label {
  font-weight: 600;
  font-size: 11px;
  padding: 13px 0 10px;
  border-top: 1px solid var(--line);
  margin-top: 13px;
}
.field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #b4bdc7;
  font-size: 11px;
}
.field input:not([type="range"]):not([type="color"]),
.field select {
  background: #252a30;
  border: 1px solid #343b42;
  color: var(--text);
  border-radius: 4px;
  padding: 6px;
  width: 95px;
}
.field input[type="color"] {
  width: 50px;
  border: 0;
  background: none;
}
.field input[type="range"] {
  width: 115px;
}
.field output {
  color: var(--text);
  font:
    10px Consolas,
    monospace;
  min-width: 30px;
  text-align: right;
}
.field textarea {
  width: 100%;
  min-height: 70px;
  background: #252a30;
  color: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
}
.field:has(textarea) {
  flex-direction: column;
  align-items: start;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.timeline {
  grid-column: 1/-1;
  grid-row: 2;
  background: #1a1d21;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.timeline-tools {
  height: 45px;
  padding: 0 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.timeline-tools > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.timeline-tools button {
  padding: 6px 8px;
}
.timeline-tools i {
  height: 18px;
  width: 1px;
  background: var(--line);
  margin: 0 5px;
}
.on {
  color: var(--accent);
}
#timelineInfo {
  font-size: 10px;
  color: var(--muted);
  margin-right: 16px;
}
.zoom-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
#zoom {
  width: 95px;
}
.timeline-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: auto;
}
#trackLabels {
  width: 132px;
  flex-shrink: 0;
  background: #1a1d21;
  padding-top: 27px;
  border-right: 1px solid var(--line);
  z-index: 2;
}
.track-label {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  color: #a7b1bb;
  font-size: 10px;
  border-bottom: 1px solid #ffffff05;
}
.track-label svg {
  width: 14px;
  height: 14px;
}
.track-label button {
  margin-left: auto;
  padding: 4px;
  font-size: 10px;
}
.track-label.muted {
  opacity: 0.45;
}
.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  flex: 1;
}
#timelineCanvas {
  position: relative;
  min-width: 100%;
  height: 227px;
}
#ruler {
  height: 27px;
  position: relative;
  border-bottom: 1px solid var(--line);
  cursor: crosshair;
}
.tick {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid #59616c50;
  padding: 6px 0 0 5px;
  font:
    9px Consolas,
    monospace;
  color: var(--muted);
}
.track {
  height: 40px;
  position: relative;
  border-bottom: 1px solid #ffffff07;
  background-image: linear-gradient(to right, #ffffff03 1px, transparent 1px);
  background-size: 55px 100%;
  cursor: crosshair;
}
.clip {
  position: absolute;
  top: 3px;
  height: 34px;
  border-radius: 5px;
  border: 1px solid #7496ae66;
  background: #29445d;
  color: #c9dff4;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  min-width: 5px;
}
.clip.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px #0a221e;
}
.clip.audio {
  background: #243e37;
  color: #bde1d5;
  border-color: #4d89766b;
}
.clip.text {
  background: #47324f;
  color: #e8caef;
  border-color: #9b69a86b;
}
.clip .clip-title {
  position: relative;
  padding: 4px 9px;
  display: block;
  font-size: 9px;
  white-space: nowrap;
  z-index: 1;
  text-shadow: 0 1px 3px #000;
}
.clip-poster {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: auto 100%;
  opacity: 0.5;
}
.wave {
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 100%;
  height: 12px;
  opacity: 0.45;
}
.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  z-index: 3;
  cursor: ew-resize;
}
.handle.left {
  left: 0;
}
.handle.right {
  right: 0;
}
.selected .handle {
  background: #30dcc255;
}
.transition-marker {
  position: absolute;
  right: 5px;
  bottom: 3px;
  font-size: 9px;
  color: #9dffe9;
}
#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #30dcc2;
  pointer-events: none;
  z-index: 5;
}
#playhead > div {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
}
footer {
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #7f8995;
  flex-shrink: 0;
}
kbd {
  font: inherit;
  color: #a5aeb9;
}
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.preset {
  background: #242a30;
  flex-direction: column;
  padding: 14px 7px;
  gap: 10px;
  font-size: 11px;
  border: 1px solid #ffffff07;
}
.preset.active {
  border-color: var(--accent);
  color: var(--accent);
}
.preset-art {
  width: 100%;
  height: 52px;
  border-radius: 4px;
  background: linear-gradient(145deg, #63786e, #d9b988 45%, #294d58);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
.empty {
  padding: 24px 7px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.wide {
  width: 100%;
  margin-top: 10px;
  background: #2a3035;
}
dialog {
  width: 530px;
  max-width: 94vw;
  max-height: 88vh;
  background: #20242a;
  color: var(--text);
  border: 1px solid #414851;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 30px 100px #000a;
}
dialog::backdrop {
  background: #07090cb5;
  backdrop-filter: blur(4px);
}
.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-title h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.modal-title button {
  font-size: 21px;
  padding: 0 5px;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
dialog label {
  display: block;
  margin: 15px 0 6px;
  color: #bac3cd;
  font-size: 11px;
}
dialog input:not([type="checkbox"]),
dialog select {
  width: 100%;
  background: #14181d;
  border: 1px solid #3a424b;
  border-radius: 6px;
  padding: 10px;
  color: white;
}
dialog .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
dialog progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}
.provider-tabs {
  display: flex;
  gap: 7px;
  margin: 20px 0;
}
.provider-tabs button {
  background: #2a3037;
  flex: 1;
  padding: 12px;
}
.provider-tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}
a {
  color: var(--accent);
}
.remote-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2a3035;
  margin: 7px 0;
  padding: 9px;
  border-radius: 5px;
}
.remote-file span {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 20px;
  max-width: 80vw;
  background: #303c3b;
  color: #dbfff8;
  border: 1px solid #4d746c;
  border-radius: 7px;
  z-index: 10;
  transition: 0.2s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
[hidden] {
  display: none !important;
}
.meter {
  height: 7px;
  border-radius: 3px;
  background: #11181b;
  overflow: hidden;
  margin-top: 8px;
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2edaaf 60%, #e3bd61 85%, #ec6969);
}
.chip {
  display: inline-block;
  font-size: 10px;
  background: #283e37;
  color: #87d9bd;
  padding: 5px 9px;
  border-radius: 20px;
}
.note {
  background: #171d22;
  border-left: 2px solid var(--accent);
  padding: 12px;
  margin-top: 17px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
@media (min-width: 1600px) {
  main {
    grid-template-columns: 80px 310px minmax(400px, 1fr) 310px;
    grid-template-rows: minmax(400px, 1fr) 360px;
  }
  .timeline-body .track,
  .track-label {
    height: 48px;
  }
  .clip {
    height: 40px;
  }
  #timelineCanvas {
    height: 267px;
  }
  .asset .thumb {
    height: 90px;
  }
}
@media (max-width: 1100px) {
  main {
    grid-template-columns: 64px 220px minmax(280px, 1fr) 230px;
  }
  .header-actions {
    gap: 0;
  }
  header {
    padding: 0 12px;
    gap: 15px;
  }
  .brand span {
    display: none;
  }
  .header-actions button {
    padding: 8px;
  }
  #saveProject {
    display: none;
  }
  .project-title input {
    width: 150px;
  }
  .asset .thumb {
    height: 58px;
  }
  #timelineInfo {
    display: none;
  }
  .viewer {
    padding: 0 12px 12px;
  }
}
@media (max-width: 850px) {
  body {
    overflow: auto;
    min-width: 640px;
  }
  main {
    grid-template-columns: 60px 200px 1fr;
    grid-template-rows: 360px 300px 400px;
    height: auto;
  }
  .inspector {
    grid-column: 1/-1;
    grid-row: 3;
  }
  #inspectorContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
  }
  .project-title {
    display: none;
  }
  .header-actions span {
    display: none;
  }
  .header-actions button {
    font-size: 10px;
  }
  .timeline {
    grid-row: 2;
  }
  header {
    gap: 10px;
  }
  .stage {
    min-height: 200px;
  }
  .rail .help {
    margin-top: 0;
  }
}

.rail {
  overflow-y: auto;
}
.rail button {
  flex-shrink: 0;
  padding: 9px 0;
}

.keyframe-row{display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.keyframe-row button{font-size:10px;padding:5px}.keyframe-list{max-height:130px;overflow:auto}.key-marker{position:absolute;bottom:1px;color:#e8d780;font-size:7px;pointer-events:none;z-index:2}.section-label .chip{margin-left:9px;font-size:9px;padding:2px 5px}

.key-diamond{padding:3px;width:20px;flex-shrink:0;font-size:11px;color:#73828d}.field:has(.key-diamond){gap:6px}.field:has(.key-diamond) input[type=range]{width:90px}.field:has(.key-diamond) input[type=number]{width:76px}.field:has(.key-diamond) output{min-width:24px}.key-diamond.on{color:var(--accent)}
