/* src/css/00-base.css */
:root {
  --bg: #071018;
  --bg2: #0a1520;
  --panel: #0d1a26;
  --panel2: #112231;
  --line: rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.14);
  --text: #eef2f7;
  --muted: #8b98a8;
  --accent: #38bdf8;
  --accent2: #7c3aed;
  --grad:
    linear-gradient(
      135deg,
      #38bdf8,
      #7c3aed);
  --main: #2563eb;
  --txt: #f59e0b;
  --aud: #10b981;
  --danger: #ef4444;
  --head-w: 56px;
  --r: 12px;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
body.editing {
  overflow: hidden;
}
html {
  overflow-x: hidden;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .3);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--accent);
}

/* src/css/01-header.css */
.top {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}
.brand > span:not(.logo) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand .logo {
  flex-shrink: 0;
}
.brand .logo-img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}
.top > *:not(.brand):not(.sp) {
  flex-shrink: 0;
}
.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #021018;
  font-size: 15px;
}
.brand small {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}
.top .sp {
  flex: 1;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  display: grid;
  place-items: center;
  color: var(--text);
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--line2);
  background: rgba(255, 255, 255, .07);
}
.icon-btn:disabled {
  opacity: .35;
  cursor: default;
}
.btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}
.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .08);
}
.btn:disabled {
  opacity: .45;
  cursor: default;
}
.btn-main {
  background: var(--grad);
  border: 0;
  color: #031019;
  font-weight: 700;
}
.btn-main:hover:not(:disabled) {
  filter: brightness(1.08);
  background: var(--grad);
}
.btn-big {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
  border-radius: 14px;
}
.ratio-pick {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ratio-pick select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0 10px;
}
.menu-wrap {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 230px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.menu a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.menu a:hover {
  background: rgba(255, 255, 255, .06);
}
.menu a i {
  width: 18px;
  color: var(--accent);
  text-align: center;
}
.menu-h {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu a.menu-ext {
  white-space: nowrap;
}
#toolsMenu {
  min-width: 260px;
}
.menu a.menu-ext i.ext {
  width: auto;
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.menu-legal {
  padding: 6px 12px 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.menu .menu-legal a,
.menu-legal button {
  display: inline;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.menu .menu-legal a:hover,
.menu-legal button:hover {
  color: var(--text);
  background: none;
}

/* src/css/02-start.css */
.start {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 64px;
}
.start-hero {
  width: 100%;
  max-width: 880px;
  text-align: center;
}
.start h1 {
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.12;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.start h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.beta {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(250, 204, 21, .12);
  border: 1px solid rgba(250, 204, 21, .45);
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.3;
  flex-shrink: 0;
}
.start-brand .beta {
  font-size: 12px;
  padding: 3px 9px;
  align-self: flex-start;
  margin-top: 2px;
}
.beta-note {
  font-size: 13px;
  color: var(--muted);
  margin: -16px 0 26px;
}
.beta-note b {
  color: #fde68a;
  font-weight: 700;
}
.legal-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.6;
}
.legal-note a,
.legal-note button {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.legal-note a:hover,
.legal-note button:hover {
  color: var(--text);
}
:root {
  --ck-bottom: var(--rail-h, 0px);
}
body:has(.cpck:not([hidden])) .tip {
  display: none !important;
}
.start-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  text-decoration: none;
}
.start-brand img {
  width: 64px;
  height: 64px;
  border-radius: 17px;
  display: block;
  box-shadow: 0 12px 34px rgba(124, 58, 237, .35), 0 0 0 1px rgba(255, 255, 255, .08);
}
.start-brand b {
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 760px) {
  .start-brand {
    gap: 11px;
    margin-bottom: 16px;
  }
  .start-brand img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
}
.start .lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 auto 30px;
  max-width: 640px;
}
.drop {
  border: 2px dashed rgba(56, 189, 248, .35);
  border-radius: 22px;
  padding: 44px 20px;
  background:
    radial-gradient(
      ellipse at top,
      rgba(56, 189, 248, .08),
      transparent 70%),
    var(--bg2);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.drop:hover,
.drop.over {
  border-color: var(--accent);
  background:
    radial-gradient(
      ellipse at top,
      rgba(56, 189, 248, .16),
      transparent 70%),
    var(--bg2);
}
.drop .ico {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--grad);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 30px;
  color: #031019;
}
.drop p {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 13px;
}
.feats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 26px;
  text-align: left;
}
.feat {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.feat i {
  color: var(--accent);
  font-size: 18px;
}
.feat b {
  display: block;
  margin: 8px 0 2px;
  font-size: 14px;
}
.feat span {
  color: var(--muted);
  font-size: 12.5px;
}
@media (max-width: 760px) {
  .feats {
    grid-template-columns: 1fr 1fr;
  }
  .start {
    padding-top: 28px;
  }
}

/* src/css/03-editor.css */
.app {
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
}
.work {
  display: grid;
  grid-template-columns: 72px 300px minmax(0, 1fr) 290px;
  min-height: 0;
  min-width: 0;
}
.rail {
  background: var(--bg2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
  gap: 4px;
}
.rail button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}
.rail button i {
  font-size: 18px;
}
.rail button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}
.rail button.rl2 span {
  line-height: 1.12;
  text-align: center;
}
.rail button.on {
  color: var(--accent);
  background: rgba(56, 189, 248, .1);
}
.rail button.edit-tab {
  display: none;
}
.panel,
.insp {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  min-height: 0;
}
.insp {
  border-right: 0;
  border-left: 1px solid var(--line);
}
.pane {
  padding: 16px;
  display: none;
}
.pane.on {
  display: block;
}
.pane h3 {
  margin: 0 0 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pane .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin: -4px 0 12px;
}
.sheet-close {
  display: none;
}
.bin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.bin-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/10;
  border: 1px solid var(--line);
  cursor: pointer;
}
.bin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bin-item .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 22px;
  background: var(--panel2);
}
.bin-item .dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: rgba(0, 0, 0, .7);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.bin-item .nm {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 4px 6px;
  font-size: 10.5px;
  background: linear-gradient(rgba(0, 0, 0, .75), transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mediaHost video {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.bin-item .bin-acts {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity .15s;
}
.bin-item .add {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #031019;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.bin-item .add.ovb {
  background: #a855f7;
  color: #fff;
}
.bin-item .del {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  z-index: 2;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.bin-item .del:hover {
  background: var(--danger);
}
.bin-item .nm {
  padding-right: 30px;
}
.bin-item:hover .bin-acts,
.bin-item:focus-within .bin-acts,
.bin-item:hover .del,
.bin-item:focus-within .del {
  opacity: 1;
}
.bin-item.err {
  outline: 1px solid var(--danger);
}
.bin-item .spin {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
}
.empty-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 18px 6px;
}
.presets {
  display: grid;
  gap: 8px;
}
.preset {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  color: #fff;
  min-height: 58px;
  display: grid;
  place-items: center;
}
.preset:hover {
  border-color: var(--accent);
}
.ratios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ratio {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.ratio .shape {
  border: 2px solid currentColor;
  border-radius: 4px;
}
.ratio.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, .08);
}
.ratio b {
  color: var(--text);
  font-size: 12.5px;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sw {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid transparent;
  outline: 1px solid var(--line2);
}
.sw.on {
  border-color: var(--accent);
}
.sw.blur {
  background:
    linear-gradient(
      135deg,
      #38bdf8,
      #7c3aed);
  filter: blur(.4px);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
}
.sw input {
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.sw.pick {
  background:
    conic-gradient(
      red,
      yellow,
      lime,
      cyan,
      blue,
      magenta,
      red);
}
.f {
  margin-bottom: 16px;
}
.f > label,
.f .lbl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.f .val {
  color: var(--text);
  text-transform: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
input[type=range] {
  width: 100%;
  accent-color: var(--accent);
}
textarea,
.inp,
select.inp {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
}
textarea {
  min-height: 76px;
  resize: vertical;
}
textarea:focus,
.inp:focus {
  border-color: var(--accent);
}
.seg {
  display: flex;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 7px 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.seg button.on {
  background: var(--panel2);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line2);
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.colorrow {
  display: flex;
  gap: 8px;
  align-items: center;
}
.colorrow input[type=color] {
  width: 44px;
  height: 36px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--bg2);
  padding: 3px;
}
.times {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  font-size: 12px;
}
.times div {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}
.times span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
}
.times b {
  font-variant-numeric: tabular-nums;
}
.insp-empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 18px;
}
.insp-empty i {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, .2);
}
.warn {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  color: #fecaca;
  margin-bottom: 12px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.actions .btn {
  height: 36px;
  font-size: 13px;
  padding: 0 8px;
}
.snd-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--txt, #e5e7eb);
  text-transform: uppercase;
  letter-spacing: .4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 4px 0 10px;
}
.snd-h i {
  color: var(--accent);
  font-size: 12px;
}
.snd-box {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin: 2px 0 6px;
}
.snd-box .row-chk {
  margin-bottom: 2px;
}
.snd-note {
  margin: 0 0 10px 24px;
  font-size: 12px;
}
.vfx-box .lbl {
  margin-bottom: 8px;
}
.vfx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.vfx-box .snd-note {
  margin-top: 6px;
}

/* src/css/04-stage.css */
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #050b11;
}
.viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}
#cv {
  display: block;
  flex-shrink: 0;
  background: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
  touch-action: none;
  border-radius: 2px;
}
.transport {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
  flex-shrink: 0;
}
.play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #031019;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.tc {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
  min-width: 128px;
  text-align: center;
}
.tc b {
  color: var(--text);
  font-weight: 600;
}

/* src/css/05-timeline.css */
.tl {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 300px;
}
.tl-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.tl-bar .tool {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.tl-bar .tool:hover:not(:disabled) {
  border-color: var(--line2);
  background: rgba(255, 255, 255, .07);
}
.tl-bar .tool:disabled {
  opacity: .35;
  cursor: default;
}
.tl-bar .tool.mag {
  color: var(--muted);
}
.tl-bar .tool.mag.on {
  color: var(--accent);
  border-color: rgba(56, 189, 248, .5);
  background: rgba(56, 189, 248, .1);
}
.tl-bar .sp {
  flex: 1;
}
.zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom input {
  width: 120px;
}
.tl-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}
.tl-inner {
  position: relative;
  min-height: 100%;
}
.tl-row {
  display: flex;
  position: relative;
}
.tl-head {
  position: sticky;
  left: 0;
  z-index: 6;
  width: var(--head-w);
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
}
.tl-head button {
  border: 0;
  background: transparent;
  color: inherit;
  width: 100%;
  height: 100%;
}
.tl-head button:hover {
  color: var(--text);
}
.tl-lane {
  position: relative;
  flex: 1;
  border-bottom: 1px solid var(--line);
}
.ruler-row {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 26px;
  background: var(--bg2);
}
.ruler-row .tl-head {
  border-bottom: 1px solid var(--line);
}
.ruler {
  position: relative;
  flex: 1;
  height: 26px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
}
.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, .14);
}
.tick.minor {
  top: 18px;
  border-color: rgba(255, 255, 255, .08);
}
.tick span {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lane-text {
  min-height: 34px;
}
.lane-main {
  height: 68px;
}
.lane-audio {
  min-height: 46px;
}
.lane-empty {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line2);
  border-radius: 8px;
  padding: 4px 10px;
  background: transparent;
  white-space: nowrap;
}
.lane-empty:hover {
  color: var(--text);
  border-color: var(--accent);
}
.clip {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  border: 2px solid transparent;
  touch-action: none;
}
.clip.main {
  top: 5px;
  height: 58px;
  background: #0d1b2a;
  border-color: rgba(37, 99, 235, .65);
}
.clip.ov {
  height: 42px;
  background: #1a1030;
  border-color: rgba(168, 85, 247, .8);
}
.clip.ov .lbl {
  position: absolute;
  left: 6px;
  top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, .6);
  padding: 0 5px;
  border-radius: 4px;
  max-width: calc(100% - 12px);
}
.lane-ov {
  min-height: 40px;
}
.clip.text {
  height: 26px;
  background: rgba(245, 158, 11, .22);
  border-color: rgba(245, 158, 11, .75);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.lane-fx {
  min-height: 26px;
}
.clip.fx {
  height: 18px;
  background: rgba(236, 72, 153, .2);
  border-color: rgba(236, 72, 153, .75);
  color: #fbcfe8;
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 6px;
  border-width: 1.5px;
}
.clip.fx .h {
  width: 10px;
}
.clip.fx:not(.sel) .kf {
  display: none;
}
.stk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.stk {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: repeating-conic-gradient(#1a2330 0 25%, #121a25 0 50%) 0 0 / 14px 14px;
  border-radius: 10px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 6px;
}
.stk {
  position: relative;
}
.stk img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  pointer-events: none;
}
.stk:hover,
.emo:hover {
  border-color: var(--accent);
}
.emo-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}
.emo {
  border: 1px solid transparent;
  background: var(--bg2);
  border-radius: 8px;
  aspect-ratio: 1;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}
.pane h4 {
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--text);
}
.voice-btn {
  width: 100%;
  margin-top: 8px;
}
.voice-btn i {
  color: #ef4444;
}
#audioVidBtn i {
  color: var(--muted);
}
.pane-tip {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}
.anim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.anim-chips button {
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}
.anim-chips button.on {
  border-color: #a78bfa;
  color: var(--text);
  background: rgba(167, 139, 250, .14);
}
.anim-chips button:hover {
  color: var(--text);
}
.sec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sec-h i {
  color: #a78bfa;
}
.sec-h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.clip.fx .kf {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: #fff;
  border: 1.5px solid #db2777;
  transform: rotate(45deg);
  z-index: 3;
  cursor: pointer;
}
.lane-empty.sm {
  font-size: 11px;
  padding: 1px 8px;
}
.kf-bar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 6px;
}
.kf-bar .btn {
  height: 34px;
  padding: 0 8px;
  justify-content: center;
}
.kf-bar .btn.on {
  border-color: #db2777;
  color: #fbcfe8;
}
.fx-sel {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(236, 72, 153, .1);
  border: 1px solid rgba(236, 72, 153, .4);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 10px;
  font-size: 12.5px;
}
.fx-sel span {
  flex: 1;
  min-width: 0;
}
.fx-sel button {
  flex-shrink: 0;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
.face-card {
  border: 1px solid rgba(236, 72, 153, .45);
  background:
    linear-gradient(
      135deg,
      rgba(236, 72, 153, .12),
      rgba(124, 58, 237, .1));
  border-radius: 12px;
  padding: 11px 12px;
  margin: 0 0 12px;
}
.face-card .fc-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 3px;
}
.face-card .fc-h i {
  color: #f472b6;
  font-size: 16px;
}
.face-card p {
  margin: 0 0 9px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.face-card .row {
  display: flex;
  gap: 8px;
}
.face-card .seg {
  flex: 1;
}
.face-card .btn {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
}
.btn-rec {
  height: 40px;
  justify-content: center;
  font-weight: 700;
}
.btn-rec i {
  color: #ef4444;
}
.rec-bar {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 14, 20, .88);
  border: 1px solid rgba(239, 68, 68, .6);
  color: #fff;
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  max-width: calc(100% - 20px);
}
.rec-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: recblink 1s infinite;
}
.rec-bar button {
  border: 0;
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  flex-shrink: 0;
}
@keyframes recblink {
  50% {
    opacity: .25;
  }
}
.crop-bar,
.cut-bar {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(10, 14, 20, .92);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  width: max-content;
  max-width: calc(100% - 16px);
}
.crop-bar button,
.cut-bar button {
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.crop-bar .crop-ratios {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.crop-bar .crop-ratios button.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, .1);
}
.crop-bar .crop-acts,
.cut-bar .cut-acts {
  display: flex;
  gap: 6px;
}
.crop-bar .main,
.cut-bar .main {
  background:
    linear-gradient(
      135deg,
      #38bdf8,
      #7c3aed);
  border-color: transparent;
  color: #fff;
}
.cut-bar .cut-info {
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
  white-space: nowrap;
}
.cut-bar .cut-info i {
  color: #f87171;
  margin-right: 4px;
}
.cut-range {
  position: absolute;
  top: 26px;
  bottom: 0;
  z-index: 6;
  background: rgba(239, 68, 68, .18);
  border-left: 2px solid #ef4444;
  border-right: 2px solid #ef4444;
  cursor: grab;
  touch-action: none;
}
.cut-range .ch {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  cursor: ew-resize;
  touch-action: none;
  display: grid;
  place-items: center;
}
.cut-range .ch::after {
  content: "";
  width: 6px;
  height: 34px;
  border-radius: 3px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .4);
}
.cut-range .ch.l {
  left: -9px;
}
.cut-range .ch.r {
  right: -9px;
}
@media (pointer: coarse) {
  .cut-range .ch {
    width: 30px;
  }
  .cut-range .ch.l {
    left: -16px;
  }
  .cut-range .ch.r {
    right: -16px;
  }
}
.fmt-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.chk input {
  width: 16px;
  height: 16px;
  accent-color: #db2777;
}
.clip.audio {
  height: 38px;
  background: rgba(16, 185, 129, .16);
  border-color: rgba(16, 185, 129, .7);
}
.clip .lbl {
  position: relative;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.clip.main .lbl,
.clip.audio .lbl {
  position: absolute;
  left: 6px;
  top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, .6);
  padding: 0 5px;
  border-radius: 4px;
  max-width: calc(100% - 12px);
}
.clip .strip {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}
.clip .strip i {
  flex-shrink: 0;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-right: 1px solid rgba(0, 0, 0, .35);
}
.clip canvas.wave {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.clip .mute-badge {
  position: absolute;
  right: 5px;
  top: 3px;
  z-index: 2;
  font-size: 10px;
  background: rgba(0, 0, 0, .6);
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}
.clip.sel {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 4px 16px rgba(0, 0, 0, .5);
  z-index: 3;
  touch-action: none;
}
.clip.drag {
  opacity: .85;
  z-index: 9;
  cursor: grabbing;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
}
.clip .h {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 4;
  display: none;
  cursor: ew-resize;
  touch-action: none;
  background: #fff;
  align-items: center;
  justify-content: center;
}
.clip .h::after {
  content: "";
  width: 2px;
  height: 40%;
  border-radius: 2px;
  background: #0b1720;
}
.clip .h.l {
  left: 0;
  border-radius: 6px 0 0 6px;
}
.clip .h.r {
  right: 0;
  border-radius: 0 6px 6px 0;
}
.clip.sel .h {
  display: flex;
}
.clip.lift {
  box-shadow: 0 0 0 2px #facc15, 0 10px 26px rgba(0, 0, 0, .6);
}
.clip.drag {
  pointer-events: none;
}
.tl-lane.drop-ov {
  background: rgba(250, 204, 21, .08);
  box-shadow: inset 0 0 0 2px #facc15;
}
.tl-lane.drop-ov .lane-empty {
  visibility: hidden;
}
.tl-lane.drop-ov::after {
  content: "Отпустите — станет слоем поверх видео";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  font-weight: 700;
  color: #facc15;
  pointer-events: none;
  white-space: nowrap;
}
.tl-lane.drop-main {
  background: rgba(56, 189, 248, .08);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.clip {
  -webkit-touch-callout: none;
}
.row-guide {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px dashed rgba(250, 204, 21, .55);
  border-radius: 6px;
  background: rgba(250, 204, 21, .05);
  pointer-events: none;
  z-index: 1;
}
.row-guide.new {
  border-color: #facc15;
  background: rgba(250, 204, 21, .1);
}
.row-guide.new::after {
  content: "Новый ряд";
  position: absolute;
  left: var(--lx, 8px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #facc15;
}
.tr-btn {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  z-index: 6;
  border-radius: 8px;
  transform: rotate(45deg);
  border: 2px solid #0b1720;
  background: #e2e8f0;
  color: #0b1720;
  display: grid;
  place-items: center;
  font-size: 10px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  touch-action: manipulation;
}
.tr-btn i {
  transform: rotate(-45deg);
}
.tr-btn.on {
  background: #facc15;
}
.tr-btn.sel {
  box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0, 0, 0, .6);
}
.tr-btn:hover {
  filter: brightness(1.1);
}
.tr-btn.hid {
  top: 3px;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  font-size: 9px;
}
.tr-zone {
  position: absolute;
  top: 5px;
  height: 58px;
  z-index: 4;
  pointer-events: none;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(250, 204, 21, .28) 0 6px,
      rgba(250, 204, 21, .12) 6px 12px);
  border: 1px solid rgba(250, 204, 21, .7);
}
.tr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.tr-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.tr-cats::-webkit-scrollbar {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .tr-cats {
    flex-wrap: wrap;
    overflow: visible;
  }
}
.tr-cats button {
  flex-shrink: 0;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}
.tr-cats button.on {
  background: rgba(250, 204, 21, .12);
  border-color: #facc15;
  color: var(--text);
}
.tr-tile {
  border: 2px solid transparent;
  background: var(--bg2);
  border-radius: 10px;
  padding: 3px 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  min-width: 0;
}
.tr-tile canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: #0b1220;
  display: block;
}
.tr-tile span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-tile:hover {
  border-color: rgba(250, 204, 21, .45);
}
.tr-tile.on {
  border-color: #facc15;
  color: var(--text);
}
.tr-dir {
  margin: 10px 0 0;
}
.tr-dir .seg button {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.tr-opt {
  border: 1px solid var(--line2);
  background: var(--bg2);
  border-radius: 10px;
  padding: 9px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
}
.tr-opt i {
  font-size: 16px;
  color: var(--text);
}
.tr-opt.on {
  border-color: #facc15;
  background: rgba(250, 204, 21, .1);
  color: var(--text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.chips button {
  border: 1px solid var(--line2);
  background: var(--bg2);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.chips button.on {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(56, 189, 248, .1);
}
.insert-mark {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: #fff;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, .7);
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  z-index: 7;
  pointer-events: none;
}
.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  border: 7px solid transparent;
  border-top: 10px solid #fff;
}
.snapline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #facc15;
  z-index: 7;
  pointer-events: none;
}

/* src/css/06-modals.css */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 14, .78);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}
.dlg {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.dlg h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.dlg .sub {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 13px;
}
.dlg .btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.dlg .btns .btn {
  flex: 1;
  height: 44px;
}
.opt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.opt-grid.c2 {
  grid-template-columns: 1fr 1fr;
}
.opt-grid.c3 {
  grid-template-columns: repeat(3, 1fr);
}
.opt {
  border: 1px solid var(--line2);
  background: var(--bg2);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}
.opt b {
  display: block;
  font-size: 14px;
}
.opt span {
  font-size: 11px;
  color: var(--muted);
}
.opt.on {
  border-color: var(--accent);
  background: rgba(56, 189, 248, .09);
}
.opt:disabled {
  opacity: .35;
}
.summary {
  margin-top: 16px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.summary b {
  color: var(--text);
}
.bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
  margin: 18px 0 10px;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width .25s;
}
.prog-info {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.prog-info b {
  color: var(--text);
  font-size: 22px;
}
.note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(250, 204, 21, .07);
  border: 1px solid rgba(250, 204, 21, .25);
  border-radius: 10px;
  padding: 9px 11px;
}
.done-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #10b981;
  color: #031019;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 12px;
}
#resultVideo {
  width: 100%;
  max-height: 44vh;
  border-radius: 12px;
  background: #000;
  margin: 6px 0 4px;
  display: block;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  z-index: 400;
  background: #f8fafc;
  color: #031019;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  transition: .25s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.err {
  background: #fecaca;
}
.drop-veil {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7, 16, 24, .85);
  border: 3px dashed var(--accent);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  pointer-events: none;
}

/* src/css/07-tips-autosave.css */
.lane-hint {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--muted);
  opacity: .7;
  white-space: nowrap;
  pointer-events: none;
}
.lane-hint i {
  margin-right: 6px;
  color: #a855f7;
}
.main-plus {
  position: absolute;
  top: 5px;
  height: 58px;
  width: 46px;
  border-radius: 8px;
  border: 1px dashed var(--line2);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 16px;
  z-index: 2;
}
.main-plus:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(56, 189, 248, .06);
}
.ov-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(168, 85, 247, .12);
  border: 1px solid rgba(168, 85, 247, .55);
  font-size: 12.5px;
  line-height: 1.35;
}
.ov-banner > i {
  color: #c084fc;
}
.ov-banner span {
  flex: 1;
}
.ov-banner button {
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}
.bin.ov-mode .bin-item {
  outline: 2px solid rgba(168, 85, 247, .75);
  outline-offset: -1px;
}
.stage-empty {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  z-index: 3;
}
.stage-empty[hidden] {
  display: none;
}
.stage-empty .box {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 28px 22px;
  border: 2px dashed var(--line2);
  border-radius: 18px;
  background: rgba(7, 16, 24, .82);
}
.stage-empty .ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
  color: #031019;
}
.stage-empty b {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}
.stage-empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}
.projects {
  max-width: 880px;
  margin: 0 auto 22px;
  text-align: left;
}
.projects[hidden] {
  display: none;
}
.projects .ph {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.projects .ph b {
  font-size: 16px;
}
.projects .ph span {
  color: var(--muted);
  font-size: 12px;
}
.plist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pcard {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 9px;
  border-radius: 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .15s;
  min-width: 0;
}
.pcard:hover,
.pcard:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.pcard .pth {
  position: relative;
  width: 86px;
  height: 52px;
  border-radius: 9px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.pcard .pth img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pcard .pdur {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 10px;
  background: rgba(0, 0, 0, .7);
  padding: 0 5px;
  border-radius: 4px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.pcard .pinfo {
  flex: 1;
  min-width: 0;
  padding-right: 24px;
}
.pcard .pinfo b {
  display: block;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard .pinfo span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}
.pcard .pinfo em {
  display: inline-block;
  margin-top: 5px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.pcard .pdel {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.pcard .pdel:hover {
  background: rgba(239, 68, 68, .15);
  color: #fca5a5;
}
.pmore {
  grid-column: 1 / -1;
  border: 1px dashed var(--line2);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 9px;
  font-weight: 600;
}
.open-proj {
  margin: 12px 0 0;
  text-align: center;
}
.linkbtn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 8px;
}
.linkbtn:hover {
  text-decoration: underline;
}
.btn-save {
  height: 36px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  gap: 7px;
}
.btn-save.ok,
.btn-save.part {
  color: var(--text);
}
.btn-save.ok i {
  color: #10b981;
}
.btn-save.part i {
  color: #facc15;
}
.save-st {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  margin: 4px 0 12px;
  line-height: 1.4;
}
.save-st i {
  margin-right: 6px;
  color: var(--accent);
}
.flt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}
.flt {
  border: 2px solid transparent;
  background: var(--bg2);
  border-radius: 10px;
  padding: 3px 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.flt canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: #000;
  display: block;
}
.flt.on {
  border-color: var(--accent);
  color: var(--text);
}
.col-h {
  margin: 6px 0 10px;
}
[data-colcmp] {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.clip .lbl .fa-palette {
  color: #f0abfc;
  margin-left: 3px;
}
.menu button.mi {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
}
.menu button.mi:hover {
  background: rgba(255, 255, 255, .06);
}
.menu button.mi i {
  width: 18px;
  color: var(--accent);
  text-align: center;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 4px;
}
.relink-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  max-height: 40vh;
  overflow-y: auto;
}
.relink-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  font-size: 13px;
}
.relink-list div span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relink-list div small {
  color: var(--muted);
}
.relink-list div.ok {
  border-color: rgba(16, 185, 129, .6);
}
.relink-list div.ok i {
  color: #10b981;
}
.tip {
  position: fixed;
  z-index: 250;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  background: #f8fafc;
  color: #031019;
  border-radius: 12px;
  padding: 12px 14px 10px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  animation: tipIn .2s ease-out;
  pointer-events: none;
}
.tip .tb button {
  pointer-events: auto;
}
.tip[hidden] {
  display: none;
}
.tip::after {
  content: "";
  position: absolute;
  left: var(--ax, 24px);
  width: 12px;
  height: 12px;
  background: #f8fafc;
  transform: translateX(-50%) rotate(45deg);
}
.tip.up::after {
  bottom: -6px;
}
.tip.down::after {
  top: -6px;
}
.tip .tb {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 9px;
}
.tip .tb button {
  border: 0;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  background: #031019;
  color: #fff;
}
.tip .tb button.ghost {
  background: transparent;
  color: #475569;
  font-weight: 600;
}
@keyframes tipIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.help-list {
  display: grid;
  gap: 10px;
  font-size: 13.5px;
}
.help-list div {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.help-list i {
  width: 20px;
  text-align: center;
  color: var(--accent);
  margin-top: 2px;
}
.keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}
.keys kbd {
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--text);
  white-space: nowrap;
  justify-self: start;
}
body.editing .drop-veil {
  background: rgba(7, 16, 24, .4);
  align-items: start;
  padding-top: 16vh;
}
body.editing .drop-veil > div {
  background: var(--panel);
  border: 1px solid var(--line2);
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 17px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

/* src/css/08-subtitles.css */
.lane-sub {
  min-height: 34px;
}
.clip.sub {
  top: 4px;
  height: 26px;
  background: rgba(6, 182, 212, .18);
  border-color: rgba(6, 182, 212, .8);
  color: #a5f3fc;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.asr-card {
  background:
    linear-gradient(
      135deg,
      rgba(56, 189, 248, .1),
      rgba(124, 58, 237, .12));
  border: 1px solid rgba(56, 189, 248, .35);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.asr-h {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 12px;
}
.asr-h > i {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad);
  color: #031019;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.asr-h b {
  display: block;
  font-size: 14px;
}
.asr-h span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.asr-note {
  font-size: 11.5px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.4;
}
.chk {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin: 0 0 12px;
  cursor: pointer;
}
.chk input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.ss-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.ss-pre {
  border: 2px solid transparent;
  background: #1e293b;
  border-radius: 10px;
  padding: 12px 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
}
.ss-pre .pv {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.3;
  padding: 0 4px;
  border-radius: 4px;
}
.ss-pre .pv em {
  font-style: normal;
  border-radius: 3px;
  padding: 0 2px;
}
.ss-pre.on {
  border-color: var(--accent);
  color: var(--text);
}
.sub-list {
  display: grid;
  gap: 5px;
  max-height: 46vh;
  overflow-y: auto;
  margin: 4px 0 12px;
  padding-right: 2px;
}
.sl {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
}
.sl.on {
  border-color: rgba(6, 182, 212, .8);
}
.sl-t {
  border: 0;
  background: rgba(6, 182, 212, .14);
  color: #a5f3fc;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 6px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.sl textarea {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  font-size: 13px;
  line-height: 1.35;
  padding: 4px 2px;
  field-sizing: content;
  min-height: 24px;
}
.sl-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}
.sl-x:hover {
  background: rgba(239, 68, 68, .15);
  color: #fca5a5;
}
.row-chk {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dmd {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
  flex: none;
}
.on > .dmd,
.ckf-main.on .dmd {
  background: currentColor;
}
.kf-r {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kfd {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.kfd:hover {
  color: var(--text);
}
.kfd.on {
  color: #fbbf24;
  border-color: #fbbf24;
}
.ckf {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, .02);
}
.ckf-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 6px;
}
.ckf-row .btn {
  height: 36px;
  padding: 0 8px;
  justify-content: center;
  gap: 8px;
}
.ckf-main.on {
  border-color: #fbbf24;
  color: #fde68a;
}
.ckf-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.ckf-row2 .seg {
  flex: 1 1 170px;
  margin: 0;
}
.ckf-info {
  font-size: 12px;
  color: var(--muted);
}
.ckf-reset {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  margin-left: auto;
}
.ckf-hidden {
  margin: 8px 0 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ckf-hidden .btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.clip .ckm {
  position: absolute;
  bottom: 3px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  background: #fbbf24;
  border: 1.5px solid #111;
  transform: rotate(45deg);
  z-index: 3;
  cursor: pointer;
}
@media (max-width: 900px) {
  .kfd {
    width: 34px;
    height: 34px;
  }
  .clip .ckm {
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
  }
}
.chroma-box {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 4px;
}
.chroma-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.chroma-row .btn {
  padding: 7px 10px;
  font-size: 12.5px;
}
.chroma-row .btn.on {
  border-color: var(--accent);
  color: var(--accent);
}
.chroma-sw {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  flex: none;
}
.chroma-row .chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.chroma-row .chip:hover {
  border-color: var(--accent);
}

/* src/css/09-chroma-auto.css */
.bin {
  align-items: start;
}
.bin-item.has-key {
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  background: var(--panel2);
}
.bin-item .bin-th {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #000;
  flex: none;
}
.bin-item .key-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 6px;
}
.bin-item .key-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #052e16;
  background: #86efac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.bin-item .key-badge.blue {
  color: #0b1d4a;
  background: #93c5fd;
}
.bin-item .key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #031019;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.bin-item .key-btn:hover {
  filter: brightness(1.08);
}
.key-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .12);
  font-size: 13px;
}
.key-hint.blue {
  border-color: rgba(59, 130, 246, .5);
  background: rgba(59, 130, 246, .12);
}
.key-hint span {
  flex: 1 1 150px;
  min-width: 0;
}
.key-hint i {
  color: #4ade80;
}
.key-hint.blue i {
  color: #60a5fa;
}
.key-hint .btn {
  padding: 7px 12px;
  font-size: 12.5px;
  flex: none;
}
.chroma-box.flash {
  animation: keyFlash 1.6s ease-out;
  border-radius: 10px;
}
@keyframes keyFlash {
  0%, 40% {
    box-shadow: 0 0 0 2px var(--accent);
  }
  100% {
    box-shadow: 0 0 0 2px transparent;
  }
}
.seg-box {
  margin: 4px 0 6px;
}
.seg-box .seg-go {
  width: 100%;
  justify-content: center;
}
.seg-box .seg-key {
  margin-bottom: 10px;
}
.seg-on {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 13px;
}
.seg-on span {
  flex: 1 1 140px;
  min-width: 0;
}
.seg-on i {
  color: #4ade80;
}
.seg-on .btn {
  padding: 7px 12px;
  font-size: 12.5px;
  flex: none;
}
.seg-note {
  margin: 8px 0 10px !important;
  font-size: 12px;
}

/* src/css/10-mobile.css */
@media (max-width: 900px) {
  .top {
    padding: 0 10px;
    gap: 8px;
  }
  .top .ratio-pick {
    display: none;
  }
  .brand small,
  .top .hide-m {
    display: none;
  }
  .btn-export span {
    display: none;
  }
  .app {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .work {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
  }
  .rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    flex-direction: row;
    justify-content: space-around;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .rail {
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 2px;
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  .rail button {
    flex: 1 0 auto;
    min-width: 40px;
    padding: 6px 3px;
    font-size: 10.5px;
    white-space: nowrap;
  }
  .rail button.edit-tab {
    display: flex;
  }
  .rail button.edit-tab:disabled {
    opacity: .3;
  }
  .panel,
  .insp {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    max-height: 62vh;
    border: 0;
    border-top: 1px solid var(--line2);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, .55);
    transform: translateY(105%);
    transition: transform .25s;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.open,
  .insp.open {
    transform: translateY(0);
  }
  .panel,
  .insp,
  .panel.col-mode {
    max-height: 46vh;
    max-height: 46dvh;
  }
  body.sheet-open .app {
    height: calc(100vh - 56px - var(--sheet-h, 0px));
    height: calc(100dvh - 56px - var(--sheet-h, 0px));
  }
  body.sheet-open .tl {
    display: none;
  }
  .pane {
    padding: 8px 12px 14px;
  }
  .pane h3 {
    font-size: 14px;
    margin: 4px 0 8px;
  }
  .pane .sub {
    font-size: 12px;
    margin: -2px 0 8px;
  }
  .sheet-close {
    width: 30px;
    height: 30px;
    margin: 6px 8px 0 0;
    font-size: 13px;
  }
  .f {
    margin-bottom: 10px;
  }
  .f > label,
  .f .lbl {
    font-size: 10.5px;
    margin-bottom: 4px;
  }
  textarea {
    min-height: 44px;
  }
  textarea,
  .inp,
  select.inp {
    padding: 6px 10px;
  }
  .seg {
    padding: 2px;
  }
  .seg button {
    padding: 6px 2px;
    font-size: 12px;
  }
  .colorrow input[type=color] {
    width: 40px;
    height: 30px;
  }
  .actions {
    gap: 6px;
  }
  .actions .btn {
    height: 34px;
    font-size: 12.5px;
  }
  .times div {
    padding: 4px 6px;
  }
  .insp-empty {
    padding: 16px 12px;
  }
  .tr-opt {
    padding: 6px 2px 5px;
  }
  .tr-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }
  .tr-tile {
    font-size: 10px;
  }
  .chips {
    margin-top: 6px;
  }
  .chips button {
    padding: 4px 8px;
  }
  .asr-card {
    padding: 11px;
  }
  .ss-pre {
    padding: 9px 4px 6px;
  }
  .sheet-close {
    display: grid;
    position: sticky;
    top: 0;
    float: right;
    margin: 10px 10px 0 0;
    z-index: 2;
  }
  .viewport {
    padding: 8px;
  }
  .transport {
    height: 46px;
  }
  .tl {
    height: 250px;
    margin-bottom: var(--rail-h, calc(58px + env(safe-area-inset-bottom)));
  }
  .rail button.rl2 span {
    font-size: .95em;
    line-height: 1.05;
  }
  .tl-bar .tool span {
    display: none;
  }
  .tl-bar .tool {
    padding: 0 10px;
  }
  .zoom input {
    width: 80px;
  }
  :root {
    --head-w: 42px;
  }
  .bin {
    grid-template-columns: 1fr 1fr 1fr;
  }
  #mediaHost video {
    width: 96px;
    height: 96px;
    object-fit: contain;
  }
  .bin-item .bin-acts,
  .bin-item .del {
    opacity: 1;
  }
  .ratios {
    grid-template-columns: repeat(5, 1fr);
  }
  .rail button {
    font-size: 9px;
    letter-spacing: -.1px;
  }
  .rail button i {
    font-size: 17px;
  }
  .stage-empty {
    inset: 8px;
  }
  .stage-empty .box {
    padding: 20px 16px;
  }
  .plist {
    grid-template-columns: 1fr;
  }
  .btn-save span {
    display: none;
  }
  .btn-save {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .flt-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stk-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .emo {
    font-size: 20px;
  }
  .panel.col-mode {
    max-height: 50vh;
  }
  .keys-desk {
    display: none;
  }
}
@media (max-width: 400px) {
  .rail {
    gap: 0;
    padding-left: 2px;
    padding-right: 2px;
  }
  .rail button {
    min-width: 0;
    padding: 6px 2px;
    font-size: 8.6px;
    letter-spacing: -.25px;
  }
}
@media (max-width: 420px) {
  .ratio-pick {
    display: none;
  }
  .brand small {
    display: none;
  }
  .zoom input {
    display: none;
  }
}

/* src/css/11-bugreport.css */
.toast.act {
  pointer-events: auto;
}
.toast .toast-rep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px auto 0;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(3, 16, 25, .35);
  background: rgba(255, 255, 255, .55);
  color: #031019;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.toast .toast-rep:hover {
  background: #fff;
}
.toast .toast-msg {
  display: block;
}
#bugModal {
  z-index: 450;
}
#bugModal .dlg {
  max-width: 480px;
}
#bugModal textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  box-sizing: border-box;
}
#bugModal .inp {
  width: 100%;
  box-sizing: border-box;
}
.bug-cnt {
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  margin-top: 3px;
}
.bug-chk {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13.5px;
  cursor: pointer;
  margin: 2px 0 6px;
}
.bug-chk input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}
.bug-chk.off {
  opacity: .5;
  cursor: default;
}
.bug-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.bug-legal {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}
.bug-legal a {
  color: var(--accent);
}
.bug-err {
  margin-top: 10px;
  font-size: 13px;
  color: #fecaca;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 10px;
  padding: 8px 11px;
}
.bug-done {
  text-align: center;
}
.bug-done .done-ico {
  background: var(--grad);
}
.bug-done .rid {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .03em;
  margin: 6px 0 2px;
  user-select: all;
}
@media (max-width: 900px) {
  #bugModal .dlg {
    padding: 18px 16px;
  }
  #bugModal textarea {
    min-height: 96px;
    font-size: 16px;
  }
  #bugModal .inp {
    font-size: 16px;
  }
}

/* src/css/12-inspector-tabs.css */
.qacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 12px;
}
.qacts .qa {
  flex: 1 1 28%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 7px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  text-align: center;
}
.qacts .qa i {
  font-size: 15px;
}
.qacts .qa:hover {
  border-color: var(--line2);
  background: var(--panel2);
}
.qacts .qa span {
  white-space: nowrap;
}
.itabs {
  display: flex;
  gap: 2px;
  margin: 0 -2px 14px;
  padding: 3px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 3;
}
.itabs::-webkit-scrollbar {
  display: none;
}
.itabs button {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 7px 4px 6px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.itabs button i {
  font-size: 15px;
}
.itabs button:hover {
  color: var(--text);
}
.itabs button.on {
  background: var(--panel2);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line2);
}
.itabs button.on i {
  color: var(--accent);
}
.itab[hidden] {
  display: none !important;
}
.itab > .sec-h:first-child {
  margin-top: 2px;
}
.itab-color .flt-grid {
  margin-top: 4px;
}
@media (max-width: 900px) {
  .itabs {
    margin: 0 -12px 10px;
    padding: 4px 8px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: var(--panel);
    top: -8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .itabs button {
    min-width: 64px;
    flex: 0 0 auto;
    padding: 6px 8px 5px;
    font-size: 10.5px;
  }
  .itabs button i {
    font-size: 17px;
  }
  .qacts {
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .qacts::-webkit-scrollbar {
    display: none;
  }
  .qacts .qa {
    flex: 1 0 auto;
    min-width: 60px;
    padding: 6px 4px 5px;
    font-size: 10.5px;
  }
  .qacts .qa span {
    white-space: nowrap;
  }
  .qacts .qa i {
    font-size: 14px;
  }
  .qacts .qa[data-act=more] {
    position: sticky;
    right: 0;
    min-width: 52px;
    background: var(--panel2);
    box-shadow: -10px 0 12px var(--panel);
  }
}

/* src/css/13-ctx-menu.css */
.cm {
  position: fixed;
  z-index: 400;
  min-width: 228px;
  max-width: 320px;
  max-height: calc(100vh - 8px);
  overflow-y: auto;
  padding: 5px;
  background: #0f1d2b;
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .4);
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.cm-it {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  outline: none;
}
.cm-it:focus-visible,
.cm-it:focus,
.cm-it[aria-expanded=true] {
  background: rgba(56, 189, 248, .14);
}
@media (hover: hover) {
  .cm-it:hover {
    background: rgba(56, 189, 248, .14);
  }
}
.cm-it:active {
  background: rgba(56, 189, 248, .2);
}
.cm-it.danger {
  color: #fca5a5;
}
.cm-ic {
  width: 16px;
  text-align: center;
  color: var(--muted);
  flex: none;
  font-size: 13px;
}
.cm-it.on .cm-ic {
  color: var(--accent);
}
.cm-it.danger .cm-ic {
  color: #fca5a5;
}
.cm-l {
  flex: 1;
  min-width: 0;
}
.cm-l small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}
.cm-it kbd {
  font:
    600 11px/1 Inter,
    system-ui,
    sans-serif;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
  flex: none;
}
.cm-arr {
  color: var(--muted);
  font-size: 11px;
  flex: none;
}
.cm-it.on .cm-arr {
  color: var(--accent);
}
.cm-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}
.cm.cm-sheet,
.cm.cm-sheet-sub {
  left: 0 !important;
  right: 0;
  bottom: 0;
  top: auto !important;
  max-width: none;
  width: 100%;
  max-height: 60vh;
  max-height: 60dvh;
  border-radius: 18px 18px 0 0;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
  font-size: 15px;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .6);
}
.cm.cm-sheet .cm-it,
.cm.cm-sheet-sub .cm-it {
  padding: 11px 10px;
}
.cm.cm-sheet-sub {
  z-index: 401;
}
.cm-grab {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line2);
  margin: 4px auto 6px;
}
.cm.cm-sheet kbd,
.cm.cm-sheet-sub kbd {
  display: none;
}
.cm.cm-sheet .cm-it:focus:not(:focus-visible),
.cm.cm-sheet-sub .cm-it:focus:not(:focus-visible) {
  background: transparent;
}

/* src/css/14-templates.css */
.tpls {
  max-width: 880px;
  margin: 0 auto 22px;
  text-align: left;
}
.tpls[hidden] {
  display: none;
}
.tpls .ph {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tpls .ph b {
  font-size: 16px;
}
.tpls .ph span {
  color: var(--muted);
  font-size: 12px;
}
.tcats {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tcats::-webkit-scrollbar {
  display: none;
}
.tcat {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--muted);
  font:
    600 12.5px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.tcat.on {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(56, 189, 248, .1);
}
.tgrid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.tcard {
  flex: none;
  width: 156px;
  scroll-snap-align: start;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, transform .15s;
  outline: none;
}
.tcard:focus-visible {
  border-color: var(--accent);
}
@media (hover: hover) {
  .tcard:hover {
    border-color: var(--line2);
    transform: translateY(-2px);
  }
}
.tc-pv {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}
.tc-pv canvas {
  display: block;
  width: 100%;
  height: auto;
}
.tc-play {
  position: absolute;
  inset: auto 8px 8px auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  transition: opacity .2s;
}
.tcard.playing .tc-play {
  opacity: 0;
}
.tc-season {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, .92);
  color: #111827;
  font:
    700 10.5px/1.2 Inter,
    system-ui,
    sans-serif;
  line-height: 1.2;
}
.tc-info {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}
.tc-info b {
  font-size: 13.5px;
}
.tc-info span {
  color: var(--muted);
  font-size: 11.5px;
}
.tc-use {
  height: 32px;
  font-size: 13px;
  width: 100%;
  padding: 0 8px;
}
.dlg-tpl {
  max-width: 640px;
  position: relative;
}
.dlg-x {
  position: absolute;
  top: 14px;
  right: 14px;
}
.dlg-tpl h2,
.dlg-tw h2 {
  padding-right: 44px;
}
.dlg-tw {
  max-width: 560px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tw-body {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  margin: 0 -4px;
  padding: 0 4px 2px;
  overscroll-behavior: contain;
}
.dlg-tw .btns {
  flex: none;
}
.tw-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.tw-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tw-steps span b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  border: 1px solid var(--line2);
}
.tw-steps span.on {
  color: var(--text);
  font-weight: 700;
}
.tw-steps span.on b {
  background: var(--accent);
  border-color: var(--accent);
  color: #031019;
}
.tw-steps span.done b {
  background: rgba(56, 189, 248, .18);
  border-color: rgba(56, 189, 248, .5);
  color: var(--accent);
}
.tw-steps i {
  flex: 1;
  height: 1px;
  background: var(--line2);
  min-width: 10px;
}
.tw-ratio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.tw-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tw-pick span {
  color: var(--muted);
  font-size: 12.5px;
}
.tw-hint {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 0;
}
.tw-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.tw-f {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel2);
  border: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  -webkit-touch-callout: none;
}
.tw-f img,
.tw-f video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.tw-f.drag {
  z-index: 5;
  cursor: grabbing;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  border-color: var(--accent);
  opacity: .9;
}
.tw-f.over {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tw-n {
  position: absolute;
  left: 5px;
  top: 5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.tw-k {
  position: absolute;
  left: 6px;
  bottom: 6px;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 3px #000;
}
.tw-x {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tw-txt {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.tw-txt input {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--text);
  padding: 0 12px;
  font:
    500 15px Inter,
    system-ui,
    sans-serif;
}
.tw-txt input:focus {
  outline: none;
  border-color: var(--accent);
}
.tw-each {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 10px;
}
.tw-each .tw-txt {
  margin-bottom: 10px;
  min-width: 0;
}
.tw-each .tw-txt input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.tw-beat small a {
  color: var(--accent);
}
.tw-music .opt {
  cursor: pointer;
  padding: 12px 8px;
}
.tw-music .opt span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.tw-beat {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg2);
  cursor: pointer;
}
.tw-beat input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: none;
}
.tw-beat b {
  display: block;
  font-size: 14px;
}
.tw-beat small {
  color: var(--muted);
  font-size: 12px;
}
.tw-beat.off {
  opacity: .45;
  cursor: default;
}
.tw-busy {
  margin-top: 14px;
  color: var(--accent);
  font-size: 13px;
}
.tw-busy[hidden] {
  display: none;
}
@media (max-width: 560px) {
  .dlg-tw,
  .dlg-tpl {
    padding: 18px 16px;
  }
  .tw-steps {
    font-size: 11.5px;
    gap: 4px;
  }
  .tw-files {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .tcard {
    width: 140px;
    padding: 10px;
  }
}

/* src/css/app.css */
