* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:root {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color-scheme: dark;
  --bg: #151518;
  --panel: #1c1c20;
  --elevated: #25252b;
  --hover: #2c2c33;
  --border: #303037;
  --text: #efeff3;
  --muted: #93939f;
  --faint: #62626e;
  --accent: #9a7cff;
  --accent-strong: #8863f6;
  --accent-soft: #29223e;
  --green: #8ed1af;
  --canvas: #111114;
  font-size: 13px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef2;
  --panel: #fafbfc;
  --elevated: #eff1f6;
  --hover: #e4e7ee;
  --border: #dce0e8;
  --text: #222735;
  --muted: #717a8b;
  --faint: #929aab;
  --accent: #6b62dd;
  --accent-strong: #6556d9;
  --accent-soft: #eeeafe;
  --canvas: #dfe3eb;
}
:root[data-theme="warm"] {
  --bg: #211f1c;
  --panel: #292622;
  --elevated: #35312c;
  --hover: #403a33;
  --border: #474139;
  --text: #f1eae0;
  --muted: #afa294;
  --faint: #7d7265;
  --accent: #efb078;
  --accent-strong: #b87342;
  --accent-soft: #453025;
  --canvas: #171614;
}
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    color 0.15s,
    opacity 0.15s;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
input,
select,
textarea {
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}
input[type="text"],
input[type="number"],
textarea,
select {
  padding: 9px 10px;
}
input[type="range"] {
  appearance: none;
  height: 3px;
  outline: 0;
  background: var(--border);
  border: 0;
  border-radius: 20px;
  accent-color: var(--accent);
  padding: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
input[type="color"] {
  height: 32px;
  width: 35px;
  padding: 3px;
  cursor: pointer;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  width: 100%;
}
i[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
h1,
h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 12px;
  font-weight: 600;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  color: var(--muted);
  background: var(--elevated);
  padding: 2px 5px;
  border-radius: 4px;
}
.topbar {
  height: 66px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  background: var(--panel);
}
.brand {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -1px;
  white-space: nowrap;
}
.brand-dot {
  color: var(--accent);
}
.studio-label {
  font-size: 9px;
  color: var(--faint);
  letter-spacing: 1.6px;
  font-weight: 600;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.project-name {
  margin: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.project-name input {
  width: 145px;
  border: 0;
  background: none;
  text-align: center;
  padding: 8px 0;
  color: #c9c9d2;
  font-weight: 500;
}
.project-name svg {
  width: 12px;
  color: var(--faint);
}
.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.save-state {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.save-state svg {
  color: var(--green);
  width: 16px;
}
.primary {
  background: var(--accent-strong);
  color: white;
  border: 1px solid #ffffff15;
  border-radius: 7px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 3px #0002;
}
.primary:hover {
  filter: brightness(1.12);
}
.primary svg {
  width: 16px;
}
.export-button {
  gap: 9px;
  min-width: 112px;
  height: 35px;
}
.export-button svg:last-child {
  width: 12px;
}
.icon-button {
  height: 30px;
  width: 30px;
  border-radius: 5px;
  color: var(--muted);
  padding: 6px;
}
.icon-button:hover {
  background: var(--hover);
  color: var(--text);
}
.quiet-button {
  font-size: 11px;
  color: var(--muted);
  border-radius: 5px;
  padding: 7px 8px;
  gap: 7px;
  white-space: nowrap;
}
.quiet-button:hover {
  background: var(--hover);
  color: var(--text);
}
.quiet-button svg {
  width: 15px;
}
.divider {
  height: 17px;
  width: 1px;
  background: var(--border);
  margin: 0 7px;
  display: inline-block;
}
.workspace {
  height: calc(100dvh - 66px);
  display: grid;
  grid-template-columns: 76px 246px minmax(300px, 1fr) 262px;
  grid-template-rows: minmax(0, 1fr) 235px;
}
.tool-rail {
  grid-row: 1/3;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 16px;
  gap: 6px;
}
.rail-button {
  flex-direction: column;
  gap: 7px;
  width: 58px;
  height: 62px;
  font-size: 10px;
  border-radius: 8px;
  color: var(--muted);
  position: relative;
}
.rail-button svg {
  height: 21px;
  width: 21px;
}
.rail-button:hover {
  background: var(--hover);
  color: var(--text);
}
.rail-button.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.rail-button.active:before {
  content: "";
  position: absolute;
  left: -8px;
  height: 25px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.rail-spacer {
  flex: 1;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b344f;
  color: #ddd2fc;
  font-size: 11px;
  display: grid;
  place-items: center;
  margin-top: 10px;
  border: 2px solid var(--panel);
  outline: 1px solid var(--border);
}
.asset-panel {
  grid-column: 2;
  grid-row: 1/3;
  border-right: 1px solid var(--border);
  background: var(--panel);
  padding: 22px 18px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
  gap: 10px;
}
.small-pill {
  font-size: 10px;
  color: var(--muted);
  background: var(--elevated);
  padding: 4px 7px;
  border-radius: 5px;
}
.panel-heading h1 {
  font-size: 14px;
}
.panel-heading #mediaCount {
  margin-left: auto;
}
#panelContent {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.upload-button {
  width: 100%;
  height: 39px;
  background: var(--accent-strong);
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-weight: 500;
}
.upload-button svg {
  width: 16px;
}
.upload-button:hover {
  filter: brightness(1.1);
}
.upload-hint {
  font-size: 10px;
  color: var(--faint);
  text-align: center;
  margin: 9px 0 21px;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 9px;
  height: 34px;
  gap: 7px;
  margin-bottom: 18px;
}
.search-box input {
  border: 0;
  background: none;
  width: 100%;
  font-size: 11px;
  outline: 0;
  padding: 8px 0;
}
.search-box svg {
  width: 14px;
  color: var(--faint);
}
.library-tabs {
  display: flex;
  gap: 16px;
  font-size: 11px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 17px;
  height: 30px;
}
.library-tabs button {
  padding: 0 1px 10px;
  color: var(--muted);
  position: relative;
  font-size: 11px;
}
.library-tabs button.active {
  color: var(--text);
}
.library-tabs button.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.section-label {
  font-size: 10px;
  letter-spacing: 0.9px;
  color: var(--faint);
  font-weight: 550;
  margin: 19px 0 11px;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 9px;
}
.media-card {
  display: block;
  text-align: left;
  padding: 0;
  width: 100%;
  min-width: 0;
}
.media-thumb {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1.35;
  background: var(--elevated);
  border: 1px solid var(--border);
}
.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-thumb .add-media {
  position: absolute;
  right: 5px;
  top: 5px;
  border-radius: 4px;
  background: #17171ad9;
  color: white;
  width: 21px;
  height: 21px;
  opacity: 0;
  display: grid;
  place-items: center;
}
.media-card:hover .add-media {
  opacity: 1;
}
.media-thumb .file-type {
  position: absolute;
  left: 5px;
  bottom: 5px;
  background: #111a;
  color: white;
  font-size: 8px;
  padding: 3px 4px;
  border-radius: 3px;
}
.media-card strong {
  display: block;
  font-size: 10px;
  font-weight: 450;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 7px;
  color: #c3c3cf;
}
.media-card small {
  display: block;
  font-size: 9px;
  color: var(--faint);
  margin-top: 3px;
}
.drop-zone {
  border: 1px dashed var(--border);
  border-radius: 7px;
  padding: 20px 9px;
  margin-top: 21px;
  width: 100%;
  display: flex;
  flex-direction: column;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
  gap: 7px;
}
.drop-zone svg {
  width: 21px;
  height: 21px;
}
.drop-zone strong {
  color: var(--muted);
  font-weight: 450;
}
.local-note {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 16px 0 1px;
  align-items: flex-start;
}
.local-note .privacy-icon {
  width: 29px;
  height: 29px;
  background: var(--elevated);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.local-note svg {
  width: 15px;
}
.local-note strong {
  font-size: 10px;
  font-weight: 500;
  color: #b6b6c3;
}
.local-note p {
  font-size: 10px;
  color: var(--faint);
  line-height: 1.7;
  margin-top: 5px;
}
.editor {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 58px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 19px;
  gap: 10px;
}
.mode-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #101013;
  border: 1px solid #27272e;
  border-radius: 7px;
  white-space: nowrap;
}
.mode-switch button {
  color: var(--muted);
  font-size: 11px;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 4px;
}
.mode-switch button.active {
  color: var(--text);
  background: var(--elevated);
  box-shadow: 0 1px 3px #0003;
}
.mode-switch svg {
  width: 14px;
  height: 14px;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.canvas-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px 8px;
  font-size: 10px;
  color: var(--faint);
  flex-shrink: 0;
}
.canvas-meta > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
.canvas-meta .quiet-button {
  font-size: 10px;
  padding: 4px 7px;
}
.canvas-meta .quiet-button svg {
  width: 12px;
  height: 12px;
}
.viewport {
  flex: 1;
  min-height: 0;
  padding: 12px 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
}
.canvas-wrap {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 10px 45px #0005;
  line-height: 0;
  max-width: 100%;
  max-height: 100%;
}
#canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: var(--canvas);
  outline: 1px solid #ffffff0c;
}
.canvas-selection {
  position: absolute;
  border: 1px solid #c5b5ff;
  pointer-events: none;
  z-index: 1;
}
.canvas-selection:before,
.canvas-selection:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: white;
  border: 1px solid #9772ff;
}
.canvas-selection:before {
  left: -3px;
  top: -3px;
}
.canvas-selection:after {
  right: -3px;
  bottom: -3px;
}
.drop-overlay {
  position: absolute;
  inset: 15px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #28203ee8;
  z-index: 5;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  font-size: 20px;
}
.drop-overlay.show {
  display: flex;
}
.preview-controls {
  height: 62px;
  padding: 4px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  color: var(--muted);
}
.preview-left {
  display: flex;
  align-items: center;
  gap: 3px;
}
.preview-left select {
  font-size: 10px;
  border: 0;
  background: none;
  width: 57px;
  padding: 4px;
}
.transport {
  display: flex;
  align-items: center;
  gap: 9px;
}
.transport .icon-button {
  width: 25px;
}
.transport svg {
  width: 15px;
}
.play-button {
  width: 32px;
  height: 32px;
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  margin: 0 2px;
}
.play-button svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke-width: 1px;
}
.time-display {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  margin-left: 10px;
  color: var(--faint);
}
.time-display b {
  font-weight: 450;
  color: #c0c0cc;
}
.image-hint {
  padding: 4px 20px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  color: var(--faint);
}
.image-hint svg {
  width: 12px;
}
.inspector {
  grid-column: 4;
  grid-row: 1;
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.inspector-heading {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}
.inspector-heading h2 {
  font-size: 13px;
}
.inspector-heading .quiet-button {
  font-size: 10px;
}
.inspector-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  height: 43px;
  padding: 0 17px;
  gap: 22px;
}
.inspector-tabs button {
  font-size: 11px;
  color: var(--muted);
  padding: 0 0 1px;
  position: relative;
  gap: 5px;
}
.inspector-tabs button.active {
  color: var(--accent);
}
.inspector-tabs button.active:after {
  position: absolute;
  content: "";
  height: 2px;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
}
.inspector-tabs span {
  font-size: 9px;
  color: var(--faint);
  background: var(--elevated);
  border-radius: 4px;
  padding: 1px 4px;
}
.prop-section {
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
}
.prop-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 550;
}
.prop-title svg {
  width: 12px;
  height: 12px;
  color: var(--faint);
}
.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  font-size: 10px;
  color: var(--muted);
}
.prop-row label {
  min-width: 52px;
}
.prop-row input[type="range"] {
  width: 105px;
  flex: 1;
}
.prop-row output {
  font-size: 10px;
  min-width: 34px;
  text-align: right;
  color: #b5b5c2;
  font-variant-numeric: tabular-nums;
}
.prop-row select {
  font-size: 10px;
  padding: 6px 8px;
  width: 123px;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}
.number-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  height: 31px;
}
.number-field span {
  font-size: 9px;
  color: var(--faint);
}
.number-field input {
  font-size: 10px;
  border: 0;
  padding: 4px 0;
  width: 100%;
  background: none;
}
.number-field input::-webkit-inner-spin-button {
  opacity: 0;
}
.prop-buttons {
  display: flex;
  gap: 7px;
}
.prop-buttons button {
  height: 30px;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
}
.prop-buttons svg {
  width: 14px;
}
.prop-buttons button:hover {
  background: var(--hover);
  color: var(--text);
}
.info-line {
  font-size: 9px;
  color: var(--faint);
  line-height: 1.7;
  margin-top: 13px;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 13px;
}
.toggle {
  width: 27px;
  height: 15px;
  border-radius: 12px;
  background: var(--border);
  padding: 2px;
  display: flex;
  justify-content: flex-start;
}
.toggle:after {
  content: "";
  width: 11px;
  height: 11px;
  background: #9999a8;
  border-radius: 50%;
}
.toggle.active {
  background: var(--accent-strong);
  justify-content: flex-end;
}
.toggle.active:after {
  background: white;
}
.timeline {
  grid-column: 3/5;
  grid-row: 2;
  background: var(--panel);
  border-top: 1px solid var(--border);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  height: 47px;
  flex-shrink: 0;
}
.timeline-toolbar > div {
  display: flex;
  align-items: center;
  gap: 3px;
}
.timeline-toolbar .quiet-button {
  font-size: 10px;
}
.timeline-toolbar .icon-button {
  width: 29px;
  height: 26px;
}
.timeline-toolbar svg {
  width: 14px;
  height: 14px;
}
.timeline-toolbar input {
  width: 65px;
  margin: 0 3px;
}
.timeline-toolbar .timeline-label {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--faint);
  margin-right: 12px;
}
.timeline-scroll {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  position: relative;
}
.track-labels {
  width: 105px;
  flex-shrink: 0;
  background: var(--panel);
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid var(--border);
}
.track-labels > div {
  display: flex;
  gap: 8px;
  font-size: 9px;
  color: var(--faint);
  align-items: center;
  padding-left: 15px;
  height: 36px;
}
.track-labels > div svg {
  width: 13px;
  height: 13px;
}
.track-labels > div:nth-child(2) {
  height: 49px;
}
.track-labels > .ruler-spacer {
  height: 28px;
  border-bottom: 1px solid var(--border);
}
.tracks {
  position: relative;
  min-width: calc(100% - 105px);
  flex-shrink: 0;
}
.ruler {
  height: 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
  cursor: crosshair;
}
.ruler .tick {
  position: absolute;
  top: 8px;
  font-size: 8px;
  color: var(--faint);
  height: 20px;
  pointer-events: none;
}
.ruler .tick:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 4px;
  background: var(--border);
}
.visual-track {
  height: 49px;
  display: flex;
  gap: 0;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
}
.clip {
  position: relative;
  flex-shrink: 0;
  border: 1px solid #474452;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #303139;
  height: 39px;
  cursor: pointer;
}
.clip.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px #9576f52a;
}
.clip.selected:before,
.clip.selected:after {
  content: "";
  position: absolute;
  top: 10px;
  width: 2px;
  height: 15px;
  border-radius: 1px;
  background: white;
  z-index: 2;
}
.clip.selected:before {
  left: 3px;
}
.clip.selected:after {
  right: 3px;
}
.clip img {
  height: 100%;
  width: 65px;
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0.65;
}
.clip > span {
  position: absolute;
  left: 10px;
  top: 5px;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #16161b99;
  color: white;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overlay-track,
.audio-track {
  height: 36px;
  padding: 3px 0;
  position: relative;
  border-top: 1px solid #ffffff03;
}
.overlay-block {
  position: absolute;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #66518e;
  background: #342940;
  color: #bba4dd;
  font-size: 9px;
  padding: 5px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
}
.audio-block {
  height: 26px;
  position: absolute;
  background: #1f3832;
  border: 1px solid #3b6154;
  border-radius: 4px;
  color: #8ec6ae;
  font-size: 9px;
  padding: 5px 9px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.empty-track {
  width: calc(100% - 16px);
  height: 26px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--faint);
  font-size: 9px;
  justify-content: flex-start;
  padding: 5px 10px;
}
.empty-track svg {
  width: 12px;
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d4bdff;
  pointer-events: none;
  z-index: 2;
  left: 0;
}
.playhead > div {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 13px;
  background: #d4bdff;
  clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
}
.timeline-footer {
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  color: var(--faint);
  font-size: 9px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.timeline-footer > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.timeline-footer .tiny-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}
.timeline-footer span span {
  color: var(--faint);
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 12px 20px;
  box-shadow: 0 8px 30px #0006;
  border-radius: 8px;
  z-index: 100;
  font-size: 12px;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 460px;
  max-width: calc(100vw - 30px);
  padding: 0;
  box-shadow: 0 20px 90px #0008;
}
dialog::backdrop {
  background: #09090da8;
  backdrop-filter: blur(5px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 15px;
}
.dialog-header h2 {
  font-size: 19px;
  letter-spacing: -0.6px;
}
.dialog-body {
  padding: 0 24px 24px;
}
.dialog-body > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 20px;
}
.dialog-body label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.dialog-body input:not([type="checkbox"]),
.dialog-body select {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px;
}
.dialog-body .two-columns input {
  margin-bottom: 16px;
}
.dialog-body .primary {
  width: 100%;
  height: 42px;
}
.dialog-note {
  font-size: 10px;
  color: var(--faint);
  line-height: 1.7;
  margin: 13px 0;
}
.dialog-body progress {
  width: 100%;
  accent-color: var(--accent);
  height: 7px;
  margin-bottom: 12px;
}
.shortcut {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.shortcut kbd {
  font-size: 11px;
}
.panel-button {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  text-align: left;
  gap: 12px;
  padding: 15px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 7px;
  margin-bottom: 10px;
}
.panel-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.panel-button > svg,
.panel-button > i svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.panel-button strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.panel-button small {
  display: block;
  font-size: 10px;
  color: var(--faint);
  line-height: 1.6;
  margin-top: 3px;
}
.text-preset {
  padding: 20px 10px;
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 7px 0;
  font-size: 25px;
  letter-spacing: -1px;
}
.text-preset.subtitle {
  font-size: 17px;
  letter-spacing: -0.5px;
}
.text-preset.caption {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.shape-button {
  height: 64px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  flex-direction: column;
  gap: 7px;
  font-size: 9px;
}
.shape-button svg {
  width: 22px;
  height: 22px;
}
.shape-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 8px;
}
.filter-button {
  display: block;
  padding: 0;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.filter-button img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 7px;
  border: 2px solid transparent;
}
.filter-button.active img {
  border-color: var(--accent);
}
.filter-button.active {
  color: var(--accent);
}
.panel-description {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 18px;
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-top: 7px;
  background: var(--bg);
  font-size: 10px;
}
.layer-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.layer-select {
  flex: 1;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  padding: 0;
}
.layer-row .icon-button {
  width: 22px;
  height: 22px;
}
.layer-row svg {
  width: 13px;
  height: 13px;
}
.danger-button {
  color: #efa1a1;
  font-size: 11px;
  padding: 10px 12px;
  border: 1px solid #614047;
  border-radius: 6px;
}
.template-card {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 12px;
}
.template-card .template-preview {
  height: 96px;
  background: #222;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.template-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}
.template-preview span {
  position: relative;
  color: white;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -1px;
}
.template-card > strong {
  font-size: 11px;
  padding: 11px 12px 0;
  font-weight: 500;
}
.template-card > small {
  font-size: 9px;
  color: var(--faint);
  padding: 4px 12px 11px;
}
.theme-card {
  width: 100%;
  height: 49px;
  padding: 10px;
  margin-bottom: 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  justify-content: flex-start;
  font-size: 11px;
}
.theme-card.active {
  border-color: var(--accent);
}
.theme-swatch {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 4px;
  border: 1px solid #8884;
}
.appearance-label {
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.row-action {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.row-action button {
  flex: 1;
}
.range-field {
  margin: 15px 0;
}
.range-field label {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.range-field input {
  width: 100%;
}
.mobile-only {
  display: none;
}
.status-card {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  margin: 14px 0;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.checkbox-label {
  display: flex !important;
  gap: 9px;
  align-items: center;
}
.checkbox-label input {
  width: auto !important;
  margin: 0 !important;
}
body.image-mode .timeline {
  display: none;
}
body.image-mode .workspace {
  grid-template-rows: minmax(0, 1fr);
}
body.image-mode .transport {
  visibility: hidden;
}
body.image-mode .tool-rail,
body.image-mode .asset-panel {
  grid-row: 1;
}
body.image-mode .preview-controls {
  height: 45px;
}
body.inspector-hidden .workspace {
  grid-template-columns: 76px 246px minmax(300px, 1fr);
}
body.inspector-hidden .inspector {
  display: none;
}
body.inspector-hidden .timeline {
  grid-column: 3;
}
@media (min-width: 1650px) {
  .workspace {
    grid-template-columns: 80px 280px minmax(300px, 1fr) 290px;
    grid-template-rows: minmax(0, 1fr) 265px;
  }
  .asset-panel {
    padding: 25px 22px;
  }
  .viewport {
    padding: 20px 50px;
  }
  .preview-controls {
    height: 75px;
  }
  .prop-section {
    padding: 20px 22px;
  }
  .track-labels > div:nth-child(2),
  .visual-track {
    height: 60px;
  }
  .clip {
    height: 48px;
  }
  .track-labels > div,
  .overlay-track,
  .audio-track {
    height: 42px;
  }
  .overlay-block,
  .audio-block {
    height: 31px;
  }
  .timeline-footer {
    height: 29px;
  }
}
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 64px 214px minmax(280px, 1fr) 228px;
    grid-template-rows: minmax(0, 1fr) 215px;
  }
  .tool-rail {
    padding-left: 5px;
    padding-right: 5px;
  }
  .rail-button {
    width: 52px;
    height: 57px;
    font-size: 9px;
  }
  .asset-panel {
    padding: 20px 14px 13px;
  }
  .studio-label {
    display: none;
  }
  .save-state span {
    display: none;
  }
  .topbar {
    padding: 0 17px;
  }
  .editor-toolbar {
    padding: 0 12px;
  }
  .mode-switch button {
    font-size: 10px;
    padding: 6px 8px;
  }
  .toolbar-actions .divider {
    display: none;
  }
  .viewport {
    padding: 8px 23px;
  }
  .prop-section {
    padding: 14px;
  }
  .inspector-tabs {
    gap: 18px;
  }
  .prop-row {
    gap: 7px;
  }
  .prop-row label {
    min-width: 48px;
  }
  .timeline-footer > span:first-child {
    display: none;
  }
  .timeline-footer {
    justify-content: flex-end;
  }
  .timeline-toolbar .timeline-label {
    display: none;
  }
  body.inspector-hidden .workspace {
    grid-template-columns: 64px 214px minmax(280px, 1fr);
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 64px 214px minmax(280px, 1fr);
  }
  .inspector {
    display: none;
  }
  .timeline {
    grid-column: 3;
  }
  .inspector.mobile-open {
    display: block;
    position: fixed;
    right: 0;
    top: 66px;
    bottom: 0;
    width: 265px;
    z-index: 10;
    box-shadow: -12px 0 35px #0007;
  }
  .timeline-toolbar {
    padding: 8px 10px;
  }
  .timeline-toolbar .quiet-button {
    gap: 5px;
  }
  .timeline-toolbar input {
    width: 45px;
  }
  .timeline-toolbar kbd {
    display: none;
  }
  .preview-controls {
    padding: 4px 15px;
  }
  .preview-left {
    gap: 0;
  }
  .transport {
    gap: 4px;
  }
  .time-display {
    margin-left: 5px;
    gap: 6px;
  }
  .brand {
    font-size: 20px;
  }
  .top-actions {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 59px;
    padding: 0 12px;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .project-name {
    margin-left: auto;
    margin-right: 0;
  }
  .project-name input {
    font-size: 10px;
    width: 95px;
  }
  .project-name > i {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions > .icon-button {
    display: none;
  }
  .save-state {
    display: none;
  }
  .export-button {
    height: 32px;
    min-width: 0;
    padding: 7px 10px;
    font-size: 11px;
  }
  .export-button svg:first-child {
    display: none;
  }
  .workspace,
  body.inspector-hidden .workspace {
    height: calc(100dvh - 59px);
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 215px;
  }
  .tool-rail {
    grid-column: 1;
    grid-row: 1/3;
    padding: 10px 4px;
    gap: 3px;
  }
  .rail-button {
    width: 48px;
    height: 55px;
    font-size: 8px;
    gap: 6px;
  }
  .rail-button svg {
    width: 19px;
    height: 19px;
  }
  .avatar {
    width: 25px;
    height: 25px;
  }
  .asset-panel {
    display: none;
    position: fixed;
    left: 58px;
    top: 59px;
    bottom: 0;
    width: 238px;
    z-index: 9;
    box-shadow: 12px 0 40px #0009;
  }
  .asset-panel.mobile-open {
    display: flex;
  }
  .mobile-only {
    display: inline-flex;
  }
  .panel-heading #mediaCount {
    display: none;
  }
  .editor {
    grid-column: 2;
  }
  .timeline,
  body.inspector-hidden .timeline {
    grid-column: 2;
  }
  .editor-toolbar {
    height: 52px;
    padding: 0 10px;
    gap: 5px;
  }
  .mode-switch button {
    font-size: 9px;
    padding: 7px 6px;
    gap: 4px;
  }
  .mode-switch svg {
    width: 12px;
  }
  .toolbar-actions .icon-button {
    width: 24px;
    padding: 4px;
  }
  .toolbar-actions #redoBtn {
    display: none;
  }
  .canvas-meta {
    padding: 12px 16px 2px;
  }
  .viewport {
    padding: 10px 16px;
  }
  .preview-controls {
    padding: 4px 10px;
    height: 55px;
  }
  .preview-left .icon-button {
    display: none;
  }
  .preview-left select {
    width: 44px;
  }
  .transport {
    gap: 0;
  }
  .transport > .icon-button {
    display: none;
  }
  .time-display {
    font-size: 9px;
    gap: 5px;
    margin-left: 8px;
  }
  .timeline-toolbar {
    padding: 6px 7px;
    height: 44px;
  }
  .timeline-toolbar .quiet-button span {
    display: none;
  }
  .timeline-toolbar .quiet-button {
    padding: 5px;
  }
  .timeline-toolbar .icon-button {
    width: 25px;
  }
  .timeline-toolbar .divider {
    margin: 0 3px;
  }
  .timeline-toolbar input {
    width: 35px;
  }
  .track-labels {
    width: 44px;
  }
  .track-labels > div {
    padding-left: 14px;
  }
  .track-labels > div span {
    display: none;
  }
  .tracks {
    min-width: calc(100% - 44px);
  }
  .inspector.mobile-open {
    top: 59px;
  }
  .image-hint {
    font-size: 9px;
    line-height: 1.6;
    text-align: center;
    gap: 4px;
    padding: 4px 12px 10px;
  }
  .image-hint span {
    display: none;
  }
  .image-hint svg {
    display: none;
  }
  .timeline-footer {
    height: 23px;
    font-size: 8px;
  }
  dialog {
    width: 380px;
  }
  .dialog-header {
    padding: 18px 20px 14px;
  }
  .dialog-body {
    padding: 0 20px 20px;
  }
}
@media (max-height: 700px) and (min-width: 701px) {
  .workspace {
    grid-template-rows: minmax(0, 1fr) 200px;
  }
  .canvas-meta {
    padding-top: 8px;
    padding-bottom: 2px;
  }
  .editor-toolbar {
    height: 48px;
  }
  .preview-controls {
    height: 48px;
  }
  .rail-button {
    height: 51px;
    gap: 5px;
  }
  .tool-rail {
    gap: 3px;
  }
  .local-note {
    padding-top: 11px;
  }
  .timeline-toolbar {
    height: 41px;
  }
  .timeline-footer {
    height: 20px;
  }
}
