* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #101011;
  --panel: #19191b;
  --line: #303033;
  --muted: #a2a2a7;
  --red: #d62828;
  --yellow: #f5d94e;
  font:
    14px/1.42 'Segoe UI',
    Arial,
    sans-serif;
  color: #f3f3f3;
  background: var(--bg);
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.filepick {
  cursor: pointer;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #242426;
  padding: 8px 12px;
  font-weight: 600;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:hover {
  background: #303034;
  border-color: #666;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
svg {
  flex-shrink: 0;
}
input,
select,
textarea {
  background: #121214;
  border: 1px solid #39393d;
  border-radius: 5px;
  padding: 7px 9px;
  min-width: 0;
}
input[type='range'],
input[type='checkbox'],
progress {
  accent-color: var(--yellow);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
.identity b {
  letter-spacing: -0.045em;
}
small,
.hint {
  color: var(--muted);
}
.home {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: #101011;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 18px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 2px 43px;
}
.identity img {
  width: 48px;
  height: 49px;
  object-fit: contain;
}
.identity b {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.025em;
}
.identity small {
  color: #d3d3d3;
  font-size: 9px;
  letter-spacing: 0.17em;
  font-weight: 700;
}
.nav-group {
  margin-bottom: 26px;
}
.nav-group > small,
.eyebrow,
.hero small,
.paneltitle small,
.selection small,
.sidefoot > small {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.nav-group > small {
  display: block;
  margin: 0 12px 10px;
  color: #929297;
}
.nav {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  justify-content: flex-start;
  color: #b8b8bc;
  font-size: 13px;
  padding: 10px 12px;
  gap: 12px;
}
.nav.current {
  color: #fff;
  background: #292224;
  border-color: #3d292b;
}
.nav.current svg {
  color: #f26057;
}
.sidefoot {
  margin-top: auto;
}
.sidefoot > small {
  display: block;
  letter-spacing: 0.045em;
  font-size: 8px;
  margin: 14px 8px 0;
}
.main {
  min-width: 0;
  background: #151516;
}
.homebar {
  height: 62px;
  border-bottom: 1px solid #2b2b2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 3.5vw, 64px);
  font-size: 11px;
  color: #a2a2a7;
  letter-spacing: 0.035em;
}
.homebar em {
  font-style: normal;
  margin: 0 11px;
  color: #555;
}
.homebar b {
  font-weight: 550;
  color: #d6d6d8;
}
.local {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b0b0b2;
}
.content {
  max-width: 1490px;
  margin: auto;
  padding: 27px clamp(22px, 3.5vw, 64px) 48px;
}
.eyebrow,
.hero small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
}
.eyebrow i {
  width: 17px;
  height: 2px;
  background: #e0443e;
}
.heading {
  margin-bottom: 19px;
}
.heading h1,
.content h1 {
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1.14;
  font-weight: 680;
}
.heading h1 {
  margin-top: 7px;
}
h1 > span,
.hero h2 > span {
  color: #e84137;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid #593030;
  border-radius: 11px;
  display: flex;
  align-items: center;
  background: #220f13 url('./art/hero.svg') center 16% / cover no-repeat;
}
.hero:before {
  content: '';
  z-index: -1;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #130e10b0, transparent 62%);
}
.hero > div {
  padding: 22px 3.6%;
}
.hero small {
  color: #e1bcaa;
  font-size: 9px;
}
.hero h2 {
  margin: 8px 0 16px;
  font-size: clamp(36px, 3.6vw, 57px);
  font-weight: 750;
  line-height: 0.99;
  letter-spacing: -0.06em;
}
.primary {
  background: #ce2927;
  color: white;
  border-color: #ed4740;
  box-shadow: 0 2px 5px #34000055;
}
.primary:hover {
  background: #e13531;
  border-color: #ff7d72;
}
.sectiontitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 12px;
}
.sectiontitle h2 {
  font-size: 21px;
  letter-spacing: -0.035em;
  font-weight: 650;
}
.link {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #c9c9cd;
  padding: 4px;
  flex-direction: row-reverse;
}
.modegrid,
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.mode {
  justify-content: flex-start;
  text-align: left;
  gap: 13px;
  padding: 17px 15px;
  background: linear-gradient(115deg, #242224, #1c1c1e);
  border-color: #383537;
  border-radius: 9px;
}
.mode > svg {
  margin-left: auto;
  align-self: flex-start;
  color: #999;
}
.mode i,
.asset i,
.empty > span,
.project i {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #452425;
  color: #ff7670;
}
.mode.m1 i {
  color: #efd463;
  background: #3e3826;
}
.mode.m2 i {
  color: #bca0f0;
  background: #332b40;
}
.mode b,
.mode small,
.template small,
.template b,
.project small,
.project b,
.asset small,
.asset b {
  display: block;
}
.mode b {
  font-size: 15px;
}
.mode small,
.template small,
.project small,
.asset small {
  font-size: 11px;
  font-weight: 450;
  margin-top: 2px;
}
.template {
  display: block;
  overflow: hidden;
  text-align: left;
  padding: 0 0 8px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}
.template:hover {
  background: #222;
}
.thumb {
  aspect-ratio: 2.04;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff16;
  border-radius: 8px;
  background: #252525;
  margin-bottom: 9px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.template:hover .thumb img {
  transform: scale(1.035);
}
.thumb span {
  position: absolute;
  top: 9px;
  right: 9px;
  background: #101012bb;
  color: white;
  padding: 2px 6px;
  border: 1px solid #ffffff30;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.05em;
}
.thumb strong {
  position: absolute;
  left: 5%;
  bottom: 9%;
  max-width: 80%;
  font:
    900 clamp(16px, 2.4vw, 44px) / 0.94 Impact,
    'Arial Black',
    sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 12px #000a;
}
.template b,
.template small {
  margin-left: 2px;
}
.template b {
  font-size: 14px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 430px;
  margin: 16px 0 24px;
}
.search input {
  width: 100%;
}
.empty,
.project {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 18px;
  background: #1b1b1d;
}
.empty > span,
.project i {
  background: #2d2d30;
  color: #bbb;
}
.empty p {
  color: #aaa;
  font-size: 12px;
  margin-top: 3px;
}
.project {
  margin-bottom: 8px;
  padding: 6px 14px;
  justify-content: space-between;
}
.project button {
  background: transparent;
  border: 0;
  text-align: left;
}
.project button:first-child {
  flex: 1;
  justify-content: flex-start;
}
.project b {
  font-weight: 600;
}
.editor {
  height: 100dvh;
  min-height: 530px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.editorbar,
.timelinebar,
.transport,
.paneltitle,
.bar-actions,
.mobile-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.editorbar {
  min-height: 59px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #151516;
}
.editorbar img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.editorbar > b {
  font-size: 11px;
  letter-spacing: 0.11em;
  margin-right: 8px;
}
.editorbar input {
  background: transparent;
  border-color: transparent;
  border-left-color: #444;
  border-radius: 0;
  max-width: 270px;
  flex: 1;
}
.editorbar input:hover {
  border-color: #444;
}
.editorbar small {
  font-size: 10px;
  color: #aaa;
}
.bar-actions {
  margin-left: auto;
}
.iconbtn span {
  display: none;
}
.iconbtn {
  padding: 7px;
  background: transparent;
}
.mobile-tabs {
  display: none;
}
.workarea {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: clamp(175px, 17vw, 260px) minmax(0, 1fr) clamp(215px, 20vw, 310px);
}
#left,
#right {
  padding: 15px;
  overflow: auto;
  background: var(--panel);
}
#left {
  border-right: 1px solid var(--line);
}
#right {
  border-left: 1px solid var(--line);
}
.paneltitle {
  justify-content: space-between;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.015em;
  margin-bottom: 14px;
}
.paneltitle svg {
  color: #888;
}
.paneltitle small {
  font-size: 8px;
}
.import,
.ai-btn {
  width: 100%;
  border: 1px dashed #76514b;
  background: #2e2021;
  color: #ffc2bc;
}
.toolshead {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
}
.toolgrid,
.choices {
  display: grid;
  gap: 8px;
}
.toolgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.toolgrid button {
  font-size: 11px;
  gap: 5px;
  padding: 9px 3px;
}
.assets {
  margin-top: 10px;
}
.hint {
  font-size: 12px;
  padding: 8px 0;
}
.asset {
  width: 100%;
  max-width: 100%;
  padding: 6px;
  margin-bottom: 5px;
  text-align: left;
  justify-content: flex-start;
  font-size: 11px;
}
.asset i {
  width: 28px;
  height: 30px;
  flex-shrink: 0;
}
.asset div {
  min-width: 0;
  flex: 1;
}
.asset b,
.selection b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #0c0c0d;
}
.monitor > .paneltitle {
  padding: 12px 16px;
  margin: 0;
  background: #151516;
}
.stagebox {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  padding: 14px;
  container-type: size;
}
#stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  height: min(100cqh, calc(100cqw / var(--aspect, 1.77778)));
  touch-action: none;
  background: repeating-conic-gradient(#393939 0 25%, #2c2c2c 0 50%) 0 0 / 15px 15px;
  box-shadow: 0 2px 12px #0005;
}
#preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#stage.guide:after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 9%;
  border: 1px dashed #f5d94ea0;
}
.transport {
  justify-content: center;
  min-height: 44px;
  background: #151516;
}
.transport button {
  padding: 4px 8px;
  font-size: 11px;
}
.transport code {
  font:
    11px Consolas,
    monospace;
  color: #d4d4d6;
}
.selection {
  margin: 12px 0 6px;
  border-left: 2px solid var(--yellow);
  padding: 3px 8px;
}
.selection b,
.selection small {
  display: block;
}
.selection small {
  font-size: 8px;
  color: #bfad67;
}
.selection b {
  font-size: 12px;
}
.fields {
  display: grid;
  gap: 7px;
  padding: 8px 0 12px;
}
.fields label,
dialog label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #bebec3;
  font-size: 12px;
}
.fields label > input,
.fields select {
  width: 44%;
  padding: 3px 5px;
}
.fields .check {
  justify-content: flex-start;
}
.fields .check input {
  width: auto;
}
.fields label:has(textarea) {
  display: grid;
}
.fields textarea {
  width: 100%;
}
details {
  border-top: 1px solid var(--line);
}
summary {
  padding: 10px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.ai-btn {
  font-size: 11px;
  margin-top: 10px;
}
.timelinebar {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-block: 1px solid var(--line);
  background: #1c1c1e;
}
.timelinebar > b,
.timelinebar > div,
.timelinebar label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timelinebar b {
  font-size: 12px;
}
.timelinebar label {
  font-size: 11px;
  color: #bbb;
}
.timelinebar input[type='range'] {
  width: 72px;
}
.trackbody {
  display: flex;
  height: clamp(140px, 23vh, 250px);
  overflow: auto;
  background: #111113;
}
.tracklabels {
  width: 112px;
  flex-shrink: 0;
  background: #1a1a1c;
}
.tracklabel,
.lane {
  height: 41px;
  border-bottom: 1px solid #333;
}
.tracklabel {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 2px 8px;
}
.tracklabel b {
  font-size: 11px;
}
.tracklabel button {
  padding: 0 4px;
  font-size: 9px;
  margin-right: 3px;
}
.trackscroll {
  overflow-x: auto;
  flex: 1;
}
.trackcontent {
  position: relative;
  min-width: 100%;
}
.ruler {
  height: 24px;
  position: relative;
  background: #18181a;
  border-bottom: 1px solid var(--line);
  touch-action: none;
}
.ruler small {
  position: absolute;
  bottom: 2px;
  font:
    9px Consolas,
    monospace;
  border-left: 1px solid #777;
  padding-left: 3px;
}
.lane {
  position: relative;
  background: repeating-linear-gradient(90deg, transparent 0 66px, #ffffff08 67px 68px);
}
.clip {
  touch-action: none;
  display: block;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  position: absolute;
  height: 32px;
  top: 4px;
  background: #4a2629;
  border: 1px solid #875358;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
}
.clip span {
  position: relative;
  text-shadow: 0 1px 4px #000;
}
.clip.audio {
  background: #26423e;
  border-color: #527e71;
}
.clip.text,
.clip.caption,
.clip.shape {
  background: #383042;
  border-color: #7b628b;
}
.clip.selected {
  border: 2px solid var(--yellow);
}
.wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #76b5a7;
  opacity: 0.55;
}
#playhead {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--yellow);
}
#playhead:before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 9px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
dialog {
  position: fixed;
  background: #202022;
  color: #f3f3f3;
  border: 1px solid #49494d;
  border-radius: 13px;
  padding: 28px;
  width: min(410px, 92vw);
  max-height: 90dvh;
  box-shadow: 0 24px 90px #000a;
}
dialog::backdrop {
  background: #050507b5;
  backdrop-filter: blur(3px);
}
dialog .close {
  position: absolute;
  right: 10px;
  top: 9px;
  font-size: 20px;
  background: transparent;
  border: 0;
  padding: 1px 8px;
}
dialog h2 {
  margin-bottom: 14px;
  font-size: 26px;
}
dialog h3 {
  margin: 14px 0 4px;
}
dialog p {
  color: #c8c8ca;
  font-size: 13px;
  margin-bottom: 12px;
}
dialog .eyebrow {
  margin-bottom: 8px;
  color: var(--yellow);
}
dialog label {
  margin: 9px 0;
}
dialog .choices {
  margin-top: 14px;
}
dialog .choices button {
  justify-content: flex-start;
}
dialog progress {
  width: 100%;
  margin: 10px 0;
}
.filepick {
  padding: 10px;
  border: 1px dashed #777;
  border-radius: 6px;
  position: relative;
}
.filepick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
#export-preview {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background: #151515;
}
#status {
  pointer-events: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 99;
  transform: translate(-50%, 14px);
  background: #f3f1e8;
  color: #191919;
  border-radius: 8px;
  box-shadow: 0 3px 20px #0008;
  padding: 10px 18px;
  opacity: 0;
  transition: 0.2s;
  font-size: 13px;
  max-width: min(640px, 92vw);
}
#status.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1600px) {
  .hero {
    min-height: 280px;
  }
}
@media (max-width: 1050px) {
  .home {
    grid-template-columns: 174px 1fr;
  }
  .sidebar {
    padding: 23px 10px;
  }
  .content {
    padding-inline: 22px;
  }
  .mode {
    padding: 11px;
    gap: 8px;
  }
  .mode small {
    display: none;
  }
  .mode > svg {
    display: none;
  }
  .workarea {
    grid-template-columns: 158px 1fr 210px;
  }
  #left,
  #right {
    padding: 10px;
  }
}
@media (max-width: 760px) {
  .home {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
  }
  .identity {
    margin: 0;
    gap: 5px;
  }
  .identity img {
    width: 29px;
    height: 32px;
  }
  .identity b {
    font-size: 15px;
  }
  .identity small {
    font-size: 6px;
  }
  .nav-group {
    display: flex;
    margin: 0;
    gap: 2px;
  }
  .nav-group > small,
  .nav-group:nth-of-type(3),
  .sidefoot {
    display: none;
  }
  .nav {
    width: auto;
    padding: 7px;
    font-size: 11px;
    gap: 4px;
  }
  .nav svg {
    width: 14px;
  }
  .homebar {
    display: none;
  }
  .content {
    padding: 20px 14px;
  }
  .hero {
    min-height: 185px;
  }
  .hero h2 {
    font-size: 39px;
  }
  .hero > div {
    padding: 16px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cards .template:nth-child(3):last-child {
    grid-column: 1/-1;
    max-width: 50%;
  }
  .modegrid {
    gap: 6px;
  }
  .mode {
    padding: 9px 3px;
    flex-direction: column;
    text-align: center;
  }
  .mode b {
    font-size: 12px;
  }
  .mode i {
    height: 30px;
    width: 30px;
  }
  .sectiontitle {
    margin-top: 21px;
  }
  .sectiontitle h2 {
    font-size: 19px;
  }
  .editorbar {
    min-height: 50px;
    gap: 4px;
    padding: 6px;
  }
  .editorbar img,
  .editorbar > b,
  .editorbar > small {
    display: none;
  }
  .editorbar input {
    width: 50px;
  }
  .editorbar button {
    padding: 6px;
  }
  .bar-actions {
    gap: 3px;
  }
  .mobile-tabs {
    display: flex;
    padding: 4px 8px;
    background: #1d1d20;
  }
  .mobile-tabs button {
    flex: 1;
    padding: 5px;
    font-size: 12px;
  }
  .workarea {
    display: block;
  }
  .workarea > #left,
  .workarea > #right,
  .workarea > .monitor {
    display: none;
    height: 100%;
  }
  .workarea[data-mobile='media'] > #left,
  .workarea[data-mobile='inspect'] > #right {
    display: block;
  }
  .workarea[data-mobile='preview'] > .monitor {
    display: flex;
  }
  .timelinebar {
    padding: 5px;
  }
  .timelinebar > div {
    gap: 3px;
  }
  .timelinebar label {
    gap: 0;
  }
  .timelinebar input[type='range'] {
    width: 42px;
  }
  .timelinebar .iconbtn {
    padding: 4px;
  }
  .tracklabels {
    width: 70px;
  }
  .tracklabel {
    padding: 1px 3px;
  }
  .trackbody {
    height: 135px;
  }
  .thumb strong {
    font-size: 19px;
  }
  .editor {
    min-height: 460px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.clip.selected:before,
.clip.selected:after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #f5d94e66;
  cursor: ew-resize;
}
.clip.selected:before {
  left: 0;
}
.clip.selected:after {
  right: 0;
}

[hidden] {
  display: none !important;
}

.beta-note {
  color: #aaa;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 22px;
}
.beta-note a { color: #f5d94e; }
