/* Synced from the Mootionblue app by design/build.mjs. Do not edit. */

/* ── src/app/globals.css ── */
/* Mootionblue design system: iOS system palette, spring motion, 18px cards. */
:root {
  --brand: oklch(0.683 0.211 37.698);
  --brand-2: oklch(0.726 0.178 43.189);
  --bg: oklch(0.963 0.007 286.274);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.945 0.007 286.271);
  --surface-3: oklch(0.917 0.007 286.266);
  --board: oklch(0.935 0.007 286.27);
  --ink: oklch(0.227 0.004 286.092);
  --ink-2: oklch(0.227 0.004 286.092 / 0.62);
  --ink-3: oklch(0.227 0.004 286.092 / 0.62);
  --ink-4: oklch(0.227 0.004 286.092 / 0.22);
  --line: oklch(0 0 0 / 0.059);
  --line-2: oklch(0 0 0 / 0.102);
  --accent: oklch(0.603 0.218 257.424);
  /* Behind white text: a deeper blue that keeps 4.5:1 or more. */
  --accent-fill: oklch(0.56 0.218 257.424);
  --accent-2: oklch(0.685 0.17 252.993);
  --accent-soft: oklch(0.603 0.218 257.424 / 0.122);
  --on-accent: oklch(1 0 0);
  --danger: oklch(0.654 0.232 28.659);
  --good: oklch(0.611 0.162 148.827);
  --warn: oklch(0.57 0.138 57.053);
  --field-bg: oklch(0.569 0.015 285.906 / 0.102);
  --card-shadow: 0 1px 2px oklch(0 0 0 / 0.031), 0 8px 26px -14px oklch(0 0 0 / 0.122);
  --pop-shadow: 0 1px 2px oklch(0 0 0 / 0.059), 0 24px 60px -20px oklch(0 0 0 / 0.322);
  --glass: oklch(1 0 0 / 0.722);
  --glass-edge: oklch(1 0 0 / 0.902);
  --menu: oklch(1 0 0);
  --key-face: oklch(0.945 0.007 286.271);
  --key-face-hover: oklch(0.923 0.007 286.267);
  --key-edge: oklch(0.862 0.007 286.255);
  --dot: oklch(0 0 0 / 0.11);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
:root:not([data-theme="light"]) {
  --bg: oklch(0 0 0);
  --surface: oklch(0.227 0.004 286.092);
  --surface-2: oklch(0.294 0.004 286.177);
  --surface-3: oklch(0.349 0.003 286.221);
  --board: oklch(0.227 0.004 286.092);
  --ink: oklch(0.965 0.003 286.35);
  --ink-2: oklch(0.965 0.003 286.35 / 0.639);
  --ink-3: oklch(0.965 0.003 286.35 / 0.55);
  --ink-4: oklch(0.965 0.003 286.35 / 0.2);
  --line: oklch(1 0 0 / 0.071);
  --line-2: oklch(1 0 0 / 0.122);
  --accent: oklch(0.625 0.206 255.486);
  --accent-fill: oklch(0.57 0.206 255.486);
  --accent-soft: oklch(0.625 0.206 255.486 / 0.2);
  --danger: oklch(0.663 0.224 28.292);
  --good: oklch(0.755 0.208 146.984);
  --warn: oklch(0.825 0.149 73.346);
  --field-bg: oklch(0.569 0.015 285.906 / 0.22);
  --card-shadow: 0 1px 2px oklch(0 0 0 / 0.302), 0 12px 32px -14px oklch(0 0 0 / 0.6);
  --pop-shadow: 0 1px 2px oklch(0 0 0 / 0.4), 0 24px 60px -20px oklch(0 0 0 / 0.8);
  --glass: oklch(0.227 0.004 286.092 / 0.761);
  --glass-edge: oklch(1 0 0 / 0.071);
  --menu: oklch(0.294 0.004 286.177);
  --key-face: oklch(0.294 0.004 286.177);
  --key-face-hover: oklch(0.322 0.005 286.101);
  --key-edge: oklch(0.197 0.004 286.029);
  --dot: oklch(1 0 0 / 0.102);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "cv11", "ss01";
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
  text-rendering: inherit;
  font-synthesis: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.35;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--field-bg);
  padding: 1px 5px;
  border-radius: 5px;
}
.icon {
  flex-shrink: 0;
  display: block;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}
@keyframes pop-up {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.96);
  }
}
@keyframes wave-drift {
  to {
    background-position-x: 160px;
  }
}
@keyframes blink-dot {
  50% {
    opacity: 0.25;
  }
}
@keyframes eyes-look {
  0%,
  70%,
  100% {
    transform: translateX(0);
  }
  78%,
  90% {
    transform: translateX(2px);
  }
}
@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

/* ── Fields ─────────────────────────────────────────── */
.field,
textarea,
.num,
.select select,
.hex-field {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  outline: none;
  transition:
    box-shadow 0.15s var(--ease),
    background 0.15s;
}
.field,
textarea {
  padding: 9px 11px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
  display: block;
}
textarea.code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  min-height: 180px;
  white-space: pre;
  tab-size: 2;
}
.field:focus,
textarea:focus,
.num:focus-within,
.select select:focus,
.hex-field:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
::placeholder {
  color: var(--ink-3);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.row-label {
  width: 72px;
  flex-shrink: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.row-control {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.row.pair .row-control > * {
  flex: 1;
}
.unit {
  color: var(--ink-3);
}
.num {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  gap: 8px;
}
.num input {
  border: 0;
  background: none;
  width: 100%;
  min-width: 0;
  outline: none;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.num-prefix {
  color: var(--ink-3);
  font-size: 11px;
  cursor: ew-resize;
  user-select: none;
  width: 10px;
}
.select {
  position: relative;
  flex: 1;
  min-width: 0;
}
.select select {
  appearance: none;
  height: 36px;
  padding: 0 32px 0 11px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.select .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--ink-3);
}
.slider-row {
  gap: 12px;
}
.slider-row .row-label {
  width: auto;
  min-width: 44px;
}
.slider {
  --p: 0.5;
  appearance: none;
  flex: 1;
  min-width: 40px;
  height: 22px;
  margin: 0;
  background: none;
  cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) calc(var(--p) * 100%), var(--line-2) calc(var(--p) * 100%));
}
.slider::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
}
.slider::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
.slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: oklch(1 0 0);
  box-shadow:
    0 0.5px 4px oklch(0 0 0 / 0.122),
    0 3px 8px oklch(0 0 0 / 0.149);
  transition: transform 0.15s var(--spring);
}
.slider:active::-webkit-slider-thumb {
  transform: scale(1.08);
}
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: oklch(1 0 0);
  box-shadow: 0 3px 8px oklch(0 0 0 / 0.251);
}
.slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 3px 8px oklch(0 0 0 / 0.2);
}
.slider.mini {
  flex: 0 0 90px;
}
.slider.mini::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
}
.slider-value {
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: 13px;
  border-radius: 6px;
  padding: 2px 0;
}
.slider-value small {
  margin-left: 2px;
  font-size: 10px;
  color: var(--ink-3);
}
button.slider-value:hover {
  color: var(--ink);
}
input.slider-value {
  width: 56px;
  flex: 0 0 56px;
  background: var(--field-bg);
  border: 0;
  outline: 2px solid var(--accent);
  padding: 3px 6px;
}
.segmented {
  flex: 1;
  display: flex;
  padding: 2px;
  gap: 2px;
  border-radius: 10px;
  background: var(--field-bg);
  min-width: 0;
}
.segmented button {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition:
    background 0.18s var(--ease),
    color 0.18s;
  min-width: 0;
  padding: 0 6px;
}
.segmented button:hover {
  color: var(--ink);
}
.segmented button.on {
  background: var(--surface-3);
  color: var(--ink);
  font-weight: 600;
  box-shadow:
    0 3px 8px oklch(0 0 0 / 0.122),
    0 1px 1px oklch(0 0 0 / 0.039);
}
:root[data-theme="light"] .segmented button.on {
  background: oklch(1 0 0);
}
.color-field {
  display: grid;
  gap: 10px;
}
.hex-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 5px;
}
.hex-field input {
  border: 0;
  background: none;
  outline: none;
  font-family: var(--mono);
  font-size: 12px;
  width: 100%;
  text-transform: uppercase;
}
.chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: pointer;
  background-image: linear-gradient(45deg, oklch(0.627 0 0 / 0.267) 25%, transparent 25%, transparent 75%, oklch(0.627 0 0 / 0.267) 75%);
}
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.swatches button {
  aspect-ratio: 1;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.2s var(--spring);
}
.swatches button:hover {
  transform: scale(1.08);
}
.swatches button.on {
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 0 0 2px var(--surface),
    0 0 0 4px var(--accent);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  cursor: pointer;
}
.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
  padding: 0 2px;
}
.hint strong {
  color: var(--ink-2);
  font-weight: 600;
}
h4 {
  margin: 6px 0 -2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.link {
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.text-button {
  color: var(--accent);
  font-weight: 500;
  align-self: flex-start;
  padding: 4px 2px;
}
.icon-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.icon-button:hover {
  color: var(--ink);
  background: var(--field-bg);
}
.icon-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── Keys: the raised button ─────────────────────────── */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 600;
  background: var(--key-face);
  color: var(--ink);
  box-shadow:
    0 3px 0 var(--key-edge),
    0 4px 10px -2px oklch(0 0 0 / 0.251);
  transition:
    transform 0.12s var(--ease),
    box-shadow 0.12s var(--ease),
    background 0.15s;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
}
.key:hover {
  background: var(--key-face-hover);
}
.key:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 var(--key-edge),
    0 2px 6px -2px oklch(0 0 0 / 0.251);
}
.key.small {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}
.key.wide {
  width: 100%;
}
.key.accent {
  background: var(--accent-fill);
  color: var(--on-accent);
  box-shadow:
    0 3px 0 oklch(0.509 0.184 257.479),
    0 6px 14px -4px oklch(0.625 0.206 255.486 / 0.502);
}
.key.accent:hover {
  background: oklch(0.643 0.195 254.133);
}
.key.on {
  color: var(--good);
}
.key input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.upload:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.upload.busy {
  opacity: 0.6;
  pointer-events: none;
}
.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.button-pair {
  display: flex;
  gap: 8px;
}
.danger-button {
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
}
.danger-button:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.tool {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s var(--spring);
  flex-shrink: 0;
}
.tool:hover:not(:disabled) {
  background: var(--field-bg);
  color: var(--ink);
}
.tool:active:not(:disabled) {
  transform: scale(0.94);
}
.tool.primary-tool.active {
  background: var(--accent-fill);
  color: oklch(1 0 0);
  box-shadow:
    0 3px 0 oklch(0.509 0.184 257.479),
    0 6px 14px -4px oklch(0.625 0.206 255.486 / 0.533);
}
.divider {
  width: 1px;
  height: 22px;
  background: var(--line-2);
  flex-shrink: 0;
  margin: 0 4px;
}
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    inset 0 0 0 1px var(--glass-edge),
    var(--pop-shadow);
}

/* ── Menus, modals, toast ────────────────────────────── */
.menu-anchor {
  position: relative;
}
.menu {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: var(--menu);
  box-shadow:
    inset 0 0 0 1px var(--line),
    var(--pop-shadow);
  animation: pop-up 0.22s var(--spring);
  transform-origin: top;
}
.menu.left {
  left: 0;
}
.menu.right {
  right: 0;
}
.menu.center {
  left: 50%;
  translate: -50% 0;
}
.menu.up {
  top: auto;
  bottom: calc(100% + 8px);
  animation-name: pop-in;
  transform-origin: bottom;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  font-weight: 500;
}
.menu-item > span {
  flex: 1;
}
.menu-item small {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
}
.menu-item:hover {
  background: var(--accent-fill);
  color: oklch(1 0 0);
}
.menu-item:hover small {
  color: oklch(1 0 0 / 0.69);
}
.menu-item.on .icon:last-child {
  color: var(--accent);
}
.menu-item.on:hover .icon:last-child {
  color: oklch(1 0 0);
}
.menu-note {
  margin: 6px 10px 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 260px;
}
.modal-shade {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: oklch(0 0 0 / 0.42);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.2s;
}
.modal {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--surface);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--pop-shadow);
  animation: panel-in 0.36s var(--spring);
  display: grid;
  gap: 14px;
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.modal-heading button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--field-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
}
.modal p {
  margin: 0;
}
.modal-hint {
  color: var(--ink-3);
  line-height: 1.5;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-weight: 500;
}
.form-error {
  color: var(--danger);
}
.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.project-card {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 6px;
  border-radius: 14px;
  transition: background 0.15s;
}
.project-card:hover,
.project-card.on {
  background: var(--field-bg);
}
.project-card .thumb {
  border-radius: 10px;
  max-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  margin-bottom: 4px;
}
.project-card .thumb span {
  font-family: "Sunghyun Sans", Inter, sans-serif;
  font-weight: 900;
  font-size: 15px;
  padding: 8px;
  text-align: center;
}
.project-card small {
  color: var(--ink-3);
  font-size: 11px;
}
.export-progress {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 8px 0;
}
.export-progress strong {
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.export-progress .bar {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: var(--field-bg);
  overflow: hidden;
}
.export-progress .bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 0.2s linear;
}
.export-progress p {
  color: var(--ink-3);
}
.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  translate: 0 0;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--menu);
  box-shadow:
    inset 0 0 0 1px var(--line),
    var(--pop-shadow);
  font-weight: 500;
  max-width: min(560px, calc(100vw - 24px));
  animation: toast-in 0.3s var(--spring);
}
.toast button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}
.loading {
  height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--bg);
  color: var(--ink-3);
}
.loading-mark {
  font-family: "Sunghyun Sans", Inter, sans-serif;
  font-weight: 900;
  font-size: 30px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

/* ── Editor chrome ──────────────────────────────────── */
.editor {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.banner {
  height: 44px;
  flex-shrink: 0;
  background: var(--brand);
  color: oklch(1 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 500;
}
.banner button {
  background: oklch(1 0 0);
  color: oklch(0.205 0 0);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px oklch(0 0 0 / 0.133);
}
.topbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.project-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34vw;
  margin-left: 4px;
}
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  padding: 4px 8px;
  border-radius: 8px;
}
.save-state .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
}
.save-state.busy .dot {
  background: var(--warn);
  animation: blink-dot 1s infinite;
}
.save-state.error {
  color: var(--danger);
}
.save-state.error .dot {
  background: var(--danger);
}
.spacer {
  flex: 1;
}
.ratio-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px;
  border-radius: 11px;
  color: var(--ink-2);
}
.ratio-button:hover {
  background: var(--field-bg);
  color: var(--ink);
}
.ratio-button small {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--field-bg);
  font-weight: 600;
}
.split-key {
  display: flex;
}
.split-key > .key:first-child {
  border-radius: 12px 0 0 12px;
}
.split-key .key.caret {
  border-radius: 0 12px 12px 0;
  padding: 0 10px;
  margin-left: 1px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--field-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-2);
  margin-left: 2px;
}
.avatar:hover {
  color: var(--ink);
}
.workspace {
  display: flex;
  gap: 12px;
  padding: 0 12px;
  min-height: 0;
  flex-shrink: 0;
}
.resizer {
  height: 22px;
  flex-shrink: 0;
  cursor: row-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.resizer span {
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  transition: background 0.15s;
}
.resizer:hover span {
  background: var(--ink-3);
}

/* ── Inspector ──────────────────────────────────────── */
.inspector {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  padding: 4px;
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.tab-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--n));
  transform: translateX(calc(var(--i) * 100%));
  border-radius: 12px;
  background: var(--surface-3);
  box-shadow:
    0 3px 8px oklch(0 0 0 / 0.122),
    0 1px 1px oklch(0 0 0 / 0.039);
  transition: transform 0.38s var(--spring);
}
:root[data-theme="light"] .tab-pill {
  background: var(--bg);
}
.tabs button {
  position: relative;
  z-index: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.2s;
}
.tabs button.on {
  color: var(--ink);
  font-weight: 600;
}
.tabs button:hover {
  color: var(--ink);
}
.inspector-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  overscroll-behavior: contain;
}
.panel-heading,
.layer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 12px;
  animation: panel-in 0.42s var(--spring) both;
}
.panel-heading > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.panel-heading strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-heading small {
  color: var(--ink-3);
  font-size: 12px;
}
.title-input {
  border: 1px solid transparent;
  background: none;
  font-weight: 600;
  font-size: 15px;
  padding: 5px 8px;
  margin-left: -8px;
  border-radius: 8px;
  outline: none;
  width: 100%;
}
.title-input:hover {
  border-color: var(--line-2);
}
.title-input:focus {
  border-color: var(--accent);
  background: var(--field-bg);
}
.panel-heading small {
  margin-left: 0;
}
.badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.green {
  background: oklch(0.755 0.208 146.984 / 0.149);
  color: var(--good);
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.layer-heading .field {
  flex: 1;
  height: 38px;
  font-weight: 500;
}
.layer-heading .count {
  color: var(--ink-3);
}
.card {
  --i: 0;
  background: var(--surface);
  border-radius: 18px;
  padding: 2px 14px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  animation: panel-in 0.42s var(--spring) both;
  animation-delay: calc(var(--i) * 35ms + 20ms);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 50px;
}
.card-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  text-align: left;
  color: var(--ink);
}
.card-title .icon {
  color: var(--ink-2);
}
.card-title strong {
  font-size: 14px;
  font-weight: 600;
}
.card-fold {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-3);
  transition: transform 0.3s var(--spring);
  transform: rotate(0deg);
}
.card.open .card-fold {
  transform: rotate(180deg);
}
.card-fold:hover {
  background: var(--field-bg);
  color: var(--ink);
}
.key-toggle {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}
.key-toggle:hover {
  color: var(--ink);
  background: var(--field-bg);
}
.key-toggle.on {
  color: oklch(0.887 0.181 94.784);
}
.card-body {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
  animation: pop-in 0.28s var(--spring);
}
.well {
  background: var(--field-bg);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
.score-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-head > div {
  flex: 1;
  min-width: 0;
  display: grid;
}
.score-head small {
  color: var(--ink-3);
  font-size: 12px;
}
.lines {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--field-bg);
  border-radius: 14px;
  overflow: hidden;
}
.lines li {
  padding: 10px 12px 2px;
  border-bottom: 1px solid var(--line);
  animation: pop-in 0.28s var(--spring);
}
.lines li:last-child {
  border: 0;
}
.line-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.line-head > div {
  flex: 1;
  min-width: 0;
}
.line-head p {
  margin: 1px 0 2px;
}
.line-head small {
  color: var(--ink-3);
}
.line-head .link {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  padding-top: 2px;
}
.moment {
  display: flex;
  align-items: center;
  gap: 8px;
}
.moment .select {
  flex: 1;
}
.moment small,
.moment .link {
  font-variant-numeric: tabular-nums;
  min-width: 44px;
}
.key-props {
  color: var(--ink-3);
  font-size: 11px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--field-bg);
}
.font-row span {
  flex: 1;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-row small {
  color: var(--ink-3);
}
.snippet {
  background: var(--field-bg);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.snippet code {
  background: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
  font-size: 12px;
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 10px;
  margin-top: 4px;
}
.tile {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--ink-3);
}
.tile-art {
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: 16px;
  background: var(--field-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    background 0.15s,
    transform 0.2s var(--spring),
    box-shadow 0.15s;
  color: var(--ink-2);
}
.tile-art canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.tile:hover .tile-art {
  background: var(--surface-3);
  color: var(--ink-2);
}
.tile:active .tile-art {
  transform: scale(0.97);
}
.tile-label {
  font-size: 12px;
  color: var(--ink-2);
}
.tile.on .tile-art {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.tile.on .tile-label {
  color: var(--ink);
  font-weight: 600;
}

/* ── Stage ──────────────────────────────────────────── */
.stage {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 22px;
  background-color: var(--board);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 50px;
}
.canvas-box {
  position: relative;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px -30px oklch(0 0 0 / 0.533);
}
.canvas-box canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  touch-action: none;
}
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.selection {
  position: absolute;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.251);
  border-radius: 2px;
}
.handle {
  position: absolute;
  pointer-events: auto;
  translate: -50% -50%;
  background: oklch(1 0 0);
  box-shadow:
    0 0 0 1px oklch(0 0 0 / 0.18),
    0 1px 3px oklch(0 0 0 / 0.267);
}
.handle.corner {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.handle.edge {
  width: 22px;
  height: 6px;
  border-radius: 4px;
}
.handle.side {
  width: 6px;
  height: 22px;
  border-radius: 4px;
}
.overlay.dragging .handle.edge,
.overlay.dragging .handle.side,
.overlay.dragging .rotate-knob {
  opacity: 0;
}
.rotate-knob {
  position: absolute;
  pointer-events: auto;
  left: 50%;
  top: calc(100% + 22px);
  translate: -50% -50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: oklch(1 0 0);
  color: oklch(0.227 0.004 286.092);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px oklch(0 0 0 / 0.18),
    0 2px 6px oklch(0 0 0 / 0.267);
  cursor: grab;
}
.size-badge {
  position: absolute;
  left: 50%;
  top: calc(100% + 48px);
  translate: -50% -50%;
  padding: 3px 8px;
  border-radius: 8px;
  background: oklch(0.227 0.004 286.092 / 0.902);
  color: oklch(1 0 0);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.guide {
  position: absolute;
  background: oklch(0.658 0.232 16.018);
}
.guide.v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}
.guide.h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}
.zoom-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
}
.zoom-pill .tool {
  width: 34px;
  height: 34px;
}
.zoom-readout {
  min-width: 48px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-2);
  height: 34px;
  border-radius: 9px;
}
.zoom-readout:hover {
  background: var(--field-bg);
}
.fit-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-weight: 500;
  color: var(--ink-2);
}
.fit-button:hover {
  background: var(--field-bg);
}
.fit-button.on {
  color: var(--ink);
}
.ask-key {
  position: absolute;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 10px 0 12px;
  border-radius: 24px;
  background: linear-gradient(180deg in srgb, oklch(0.727 0.176 41.204), var(--brand));
  color: oklch(1 0 0);
  font-weight: 600;
  font-size: 15px;
  box-shadow:
    0 4px 0 oklch(0.53 0.169 37.381),
    0 12px 26px -8px oklch(0.683 0.211 37.698 / 0.6);
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.ask-key:hover {
  transform: translateY(-1px);
}
.ask-key:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 oklch(0.53 0.169 37.381),
    0 6px 14px -8px oklch(0.683 0.211 37.698 / 0.6);
}
.ask-key kbd {
  font-family: inherit;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: oklch(0 0 0 / 0.169);
  box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.169);
  display: flex;
  align-items: center;
  justify-content: center;
}
.eyes {
  display: flex;
  gap: 3px;
}
.eyes i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: oklch(0.227 0.004 286.092);
  position: relative;
  animation: blink 4s infinite;
}
.eyes i::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: oklch(1 0 0);
  top: 5.5px;
  left: 5.5px;
  animation: eyes-look 5s infinite;
}
.preview-flag {
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  z-index: 18;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--accent-fill);
  color: oklch(1 0 0);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--pop-shadow);
  animation: pop-up 0.3s var(--spring);
}

/* ── Composer ───────────────────────────────────────── */
.composer {
  position: absolute;
  left: 50%;
  bottom: 12px;
  translate: -50% 0;
  z-index: 30;
  width: min(460px, calc(100% - 24px));
  border-radius: 20px;
  padding: 12px;
  background: var(--menu);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 30px 70px -20px oklch(0 0 0 / 0.702),
    0 2px 6px oklch(0 0 0 / 0.302);
  display: grid;
  gap: 10px;
  animation: panel-in 0.36s var(--spring);
}
.composer header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.composer header strong {
  flex: 1;
  font-size: 14px;
  padding-left: 4px;
}
.composer-pickers {
  display: flex;
  gap: 6px;
}
.chip-button {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--field-bg);
}
.chip-button:hover {
  color: var(--ink);
}
.composer .menu {
  min-width: 160px;
}
.composer-log {
  max-height: min(300px, 38vh);
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 2px;
}
.msg {
  padding: 9px 12px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  max-width: 88%;
  animation: pop-in 0.28s var(--spring);
}
.msg.user {
  justify-self: end;
  background: var(--accent-fill);
  color: oklch(1 0 0);
  border-bottom-right-radius: 5px;
}
.msg.assistant {
  background: var(--field-bg);
  border-bottom-left-radius: 5px;
}
.msg.error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}
.msg.working {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-2);
}
.dots {
  display: flex;
  gap: 3px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink-dot 1s infinite;
}
.dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots i:nth-child(3) {
  animation-delay: 0.3s;
}
.proposal {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  animation: pop-in 0.28s var(--spring);
}
.proposal span {
  flex: 1;
  font-weight: 500;
}
.composer-input {
  background: var(--field-bg);
  border-radius: 14px;
  padding: 10px 10px 8px 12px;
  display: grid;
  gap: 6px;
}
.composer-input:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
.composer-input textarea {
  background: none;
  padding: 0;
  border-radius: 0;
  resize: none;
  min-height: 40px;
  max-height: 140px;
}
.composer-input textarea:focus {
  box-shadow: none;
}
.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer-actions small {
  flex: 1;
  color: var(--ink-3);
  font-size: 11px;
}
.ask-send {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--brand);
  color: oklch(1 0 0);
  font-weight: 600;
  box-shadow: 0 2px 0 oklch(0.53 0.169 37.381);
}
.ask-send:disabled {
  background: var(--ink-4);
  box-shadow: none;
  opacity: 1;
  color: var(--ink-2);
}
.refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 8px;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 12px;
}
.ref button {
  display: flex;
  color: var(--ink-3);
}
.composer-chip {
  position: absolute;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  font-weight: 600;
  animation: pop-in 0.28s var(--spring);
}

/* ── Timeline ───────────────────────────────────────── */
.timeline-shell {
  margin: 0 12px 12px;
  background: var(--surface);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.timeline-shell.collapsed {
  margin-top: 12px;
}
.timeline-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.tools-left,
.tools-right {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.tools-right {
  justify-content: flex-end;
}
.transport {
  display: flex;
  align-items: center;
  gap: 6px;
}
.readout,
.transport .dim {
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}
.transport .dim {
  color: var(--ink-3);
  text-align: left;
}
.play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: oklch(1 0 0);
  color: oklch(0.227 0.004 286.092);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 3px 0 oklch(0.831 0.007 286.249),
    0 6px 16px -4px oklch(0 0 0 / 0.4);
  transition: transform 0.15s var(--spring);
}
.play:active {
  transform: translateY(2px) scale(0.97);
}
.play .icon {
  margin-left: 2px;
}
.play.playing .icon {
  margin-left: 0;
}
.duration {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
}
.duration:hover {
  background: var(--field-bg);
  color: var(--ink);
}
.timeline-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  overscroll-behavior: contain;
}
.timeline-content {
  position: relative;
  min-height: 100%;
  padding-bottom: 10px;
}
.timeline-row,
.ruler-row {
  display: flex;
  position: relative;
}
.ruler-row {
  height: 30px;
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--surface);
}
.ruler {
  height: 30px;
  cursor: col-resize;
  touch-action: none;
}
.ruler-tick {
  position: absolute;
  top: 0;
  height: 30px;
  border-left: 1px solid var(--ink-4);
  pointer-events: none;
}
.ruler-tick small {
  position: absolute;
  top: 6px;
  left: 5px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
}
.ruler-tick::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 5px;
  border-left: 1px solid var(--ink-4);
}
.track-label {
  position: sticky;
  left: 0;
  width: 184px;
  min-width: 184px;
  background: var(--surface);
  z-index: 7;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  color: var(--ink-2);
}
.track-label > span:not(.row-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 6px;
}
.track-label > small {
  font-size: 10px;
  color: var(--ink-3);
}
.section-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-weight: 500;
  padding-left: 16px;
}
.ruler-label {
  z-index: 14;
}
.track {
  flex: 1;
  position: relative;
  min-width: 0;
  height: 100%;
  touch-action: none;
}
.timeline-row {
  border-bottom: 1px solid var(--line);
}
.sections-row {
  height: 36px;
}
.section-pill {
  position: absolute;
  top: 5px;
  height: 26px;
  border-radius: 13px;
  padding: 0 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px transparent;
  cursor: grab;
  touch-action: none;
  transition: box-shadow 0.15s;
}
.section-pill:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}
.section-selected {
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.audio-row {
  height: 48px;
}
.layer-row {
  height: 48px;
}
.audio-clip,
.layer-clip {
  --c1: oklch(0.841 0.097 178.952);
  --c2: oklch(0.682 0.105 178.085);
  position: absolute;
  top: 6px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  user-select: none;
  touch-action: none;
  overflow: hidden;
  cursor: grab;
  color: oklch(1 0 0);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cpath d='M0 20 C20 6 40 6 60 20 S100 34 120 20 S150 8 160 20 V36 H0Z' fill='%23ffffff' fill-opacity='.16'/%3E%3C/svg%3E")
      0 0 / 160px 36px repeat-x,
    linear-gradient(180deg in srgb, var(--c1), var(--c2));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.251),
    inset 0 -3px 0 oklch(0 0 0 / 0.141),
    0 2px 6px -2px oklch(0 0 0 / 0.333);
  transition:
    box-shadow 0.15s,
    filter 0.15s;
}
.audio-clip:hover,
.layer-clip:hover {
  filter: brightness(1.06);
}
.audio-clip.music {
  --c1: oklch(0.813 0.117 158.841);
  --c2: oklch(0.684 0.127 158.76);
}
.audio-clip.voice {
  --c1: oklch(0.766 0.136 308.698);
  --c2: oklch(0.604 0.198 303.315);
}
.layer-clip.text {
  --c1: oklch(0.695 0.191 300.788);
  --c2: oklch(0.561 0.239 295.146);
}
.layer-clip.shape3d {
  --c1: oklch(0.735 0.16 355.121);
  --c2: oklch(0.626 0.196 1.838);
}
.layer-clip.image {
  --c1: oklch(0.719 0.148 255.812);
  --c2: oklch(0.579 0.19 260.532);
}
.layer-clip.video {
  --c1: oklch(0.823 0.136 67.559);
  --c2: oklch(0.722 0.162 55.816);
}
.layer-clip.rect,
.layer-clip.ellipse {
  --c1: oklch(0.764 0.126 249.168);
  --c2: oklch(0.624 0.161 256.028);
}
.waveform {
  display: none;
}
.clip-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.2);
  z-index: 1;
}
.clip-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.clip-motion {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
  opacity: 0.8;
  font-size: 11.5px;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}
.clip-grip,
.trim-handle {
  width: 10px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  cursor: ew-resize;
  z-index: 2;
}
.clip-grip {
  cursor: inherit;
}
.clip-grip::before,
.clip-grip::after,
.trim-handle::before,
.trim-handle::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: oklch(1 0 0 / 0.851);
}
.clip-grip::before,
.trim-handle::before {
  left: 1px;
}
.clip-grip::after,
.trim-handle::after {
  right: 1px;
}
.empty-track {
  font-size: 12px;
  line-height: 47px;
  padding: 0 16px;
  color: var(--ink-3);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sfx-mark {
  position: absolute;
  top: 14px;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: oklch(0.712 0.119 66.12);
}
.row-icon {
  height: 26px;
  width: 26px;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: oklch(1 0 0);
  background: linear-gradient(180deg in srgb, oklch(0.841 0.097 178.952), oklch(0.682 0.105 178.085));
  box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.122);
  transition: transform 0.15s var(--spring);
}
button.row-icon:hover {
  transform: scale(1.1);
}
.row-icon.music {
  background: linear-gradient(180deg, oklch(0.813 0.117 158.841), oklch(0.684 0.127 158.76));
  width: 28px;
  height: 28px;
}
.row-icon.sfx {
  background: linear-gradient(180deg, oklch(0.599 0.09 64.62), oklch(0.485 0.074 62.336));
  width: 28px;
  height: 28px;
}
.row-icon.voice {
  background: linear-gradient(180deg, oklch(0.766 0.136 308.698), oklch(0.604 0.198 303.315));
  width: 28px;
  height: 28px;
}
.row-icon.text {
  background: linear-gradient(180deg in srgb, oklch(0.695 0.191 300.788), oklch(0.561 0.239 295.146));
}
.row-icon.shape3d {
  background: linear-gradient(180deg in srgb, oklch(0.735 0.16 355.121), oklch(0.626 0.196 1.838));
}
.row-icon.image {
  background: linear-gradient(180deg, oklch(0.719 0.148 255.812), oklch(0.579 0.19 260.532));
}
.row-icon.video {
  background: linear-gradient(180deg in srgb, oklch(0.823 0.136 67.559), oklch(0.722 0.162 55.816));
}
.row-icon.rect,
.row-icon.ellipse {
  background: linear-gradient(180deg, oklch(0.764 0.126 249.168), oklch(0.624 0.161 256.028));
}
.clip-selected {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--accent),
    inset 0 -3px 0 oklch(0 0 0 / 0.141);
  z-index: 3;
}
.is-hidden {
  opacity: 0.38;
}
.is-locked {
  cursor: not-allowed;
}
.key-diamond {
  position: absolute;
  bottom: 1px;
  font-size: 9px;
  transform: translateX(-50%);
  color: oklch(1 0 0);
  z-index: 3;
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.4);
}
.playhead {
  position: absolute;
  top: 8px;
  left: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  z-index: 13;
  pointer-events: none;
  will-change: transform;
}
.playhead > span {
  position: absolute;
  top: -2px;
  left: -8px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 3px oklch(0.625 0.206 255.486 / 0.2),
    0 2px 8px oklch(0.625 0.206 255.486 / 0.4);
}
.audio-toggle {
  position: absolute;
  top: 103px;
  left: 138px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--ink-3);
  padding: 4px 6px;
  border-radius: 7px;
}
.audio-toggle:hover {
  color: var(--ink);
  background: var(--field-bg);
}

/* ── Mobile ─────────────────────────────────────────── */
.editor.mobile {
  --brand-ink: oklch(0.726 0.178 43.189);
}
.m-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 12px 6px 6px;
  flex-shrink: 0;
}
.m-back {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--brand-ink);
  font-size: 17px;
  font-weight: 500;
  padding: 6px 4px;
}
.m-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-actions {
  display: flex;
  gap: 0;
}
.m-actions .tool {
  width: 36px;
  height: 36px;
  color: var(--brand-ink);
}
.m-actions .tool:disabled {
  color: var(--ink-3);
}
.m-banner {
  margin: 4px 16px 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 16px;
  background: var(--brand);
  color: oklch(1 0 0);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  line-height: 1.35;
}
.m-banner span {
  flex: 1;
}
.m-banner button {
  background: oklch(1 0 0);
  color: oklch(0.205 0 0);
  border-radius: 20px;
  padding: 9px 14px;
  font-weight: 600;
  white-space: nowrap;
}
.m-stage {
  padding: 0 16px;
  flex-shrink: 0;
  height: min(46vw * 1.2, 34dvh);
}
.m-stage .stage {
  height: 100%;
  border-radius: 18px;
  background-image: none;
  background-color: transparent;
  padding: 0;
}
.m-stage .canvas-box,
.m-stage .canvas-box canvas {
  border-radius: 16px;
}
.m-stage .zoom-pill {
  display: none;
}
.m-transport {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px;
  flex-shrink: 0;
}
.m-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: oklch(0.971 0.003 286.35);
  color: oklch(0.227 0.004 286.092);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-scrub {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}
.m-scrub-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.m-scrub-head .scene {
  display: flex;
  align-items: center;
  gap: 7px;
}
.m-scrub-head .scene i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.m-scrub-head .time {
  font-variant-numeric: tabular-nums;
}
.m-scrub-head .time small {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 13px;
}
.m-track {
  position: relative;
  height: 18px;
  touch-action: none;
  cursor: pointer;
}
.m-track span {
  position: absolute;
  top: 7px;
  height: 4px;
  border-radius: 2px;
  opacity: 0.55;
  border-left: 2px solid var(--bg);
  border-right: 2px solid var(--bg);
}
.m-track b {
  position: absolute;
  top: 0;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: oklch(1 0 0);
  box-shadow: 0 2px 6px oklch(0 0 0 / 0.4);
}
.m-sheet {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 -10px 30px -20px oklch(0 0 0);
}
.grab {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
  margin: 8px auto 0;
  flex-shrink: 0;
}
.m-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 16px 20px;
  display: flex;
  flex-direction: column;
}
.m-pane h2 {
  margin: 4px 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.m-pane h2 small {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0;
}
.m-pane h2 small.ok {
  color: var(--good);
}
.m-hint {
  color: var(--ink-3);
  margin: -4px 0 12px;
  line-height: 1.45;
}
.m-pane .inspector {
  width: 100%;
  flex: 1;
}
.m-pane .inspector-panel {
  overflow: visible;
}
.m-pane .card {
  background: var(--surface-2);
  box-shadow: none;
}
.m-pane .composer {
  position: static;
  translate: none;
  width: 100%;
  animation: none;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.m-pane .composer header strong {
  display: none;
}
.m-pane .composer-log {
  flex: 1;
  max-height: none;
}
.m-add {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
}
.m-add .tool {
  background: var(--surface-2);
}
.m-group {
  margin-bottom: 16px;
}
.m-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 8px;
  font-size: 13px;
}
.m-group-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.m-group-head strong {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.m-group-head small {
  flex: 1;
  color: var(--ink-3);
}
.m-group-head .link {
  color: var(--brand-ink);
}
.m-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface-2);
  border-radius: 14px;
  overflow: hidden;
}
.m-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}
.m-list li:last-child {
  border: 0;
}
.m-list li.on {
  background: var(--accent-soft);
}
.m-list li.empty {
  padding: 14px;
  font-size: 13px;
}
.m-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 10px 12px;
  text-align: left;
  color: var(--ink);
}
.m-row-text {
  display: grid;
  min-width: 0;
  font-size: 16px;
}
.m-row-text small {
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.tile.type-text,
.m-row .tile {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(1 0 0);
  flex-shrink: 0;
  background: oklch(0.501 0.005 286.229);
}
.m-row .tile.type-text {
  background: var(--brand);
}
.m-row .tile.type-shape3d {
  background: oklch(0.626 0.196 1.838);
}
.m-row .tile.type-image {
  background: oklch(0.579 0.19 260.532);
}
.m-row .tile.type-video {
  background: oklch(0.722 0.162 55.816);
}
.m-row .tile.type-rect,
.m-row .tile.type-ellipse {
  background: oklch(0.624 0.161 256.028);
}
.m-tabs {
  display: flex;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 0 max(8px, env(safe-area-inset-bottom));
}
.m-tabs button {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}
.m-tabs button.on {
  color: var(--brand-ink);
}
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }
  .toast {
    top: auto;
    bottom: 90px;
  }
}
@media (max-width: 1100px) {
  .inspector {
    width: 340px;
  }
  .tools-left .tool {
    width: 34px;
  }
  .timeline-toolbar {
    grid-template-columns: auto auto auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
.layer-clip,
.audio-clip {
  container-type: inline-size;
}
@container (max-width: 190px) {
  .clip-motion {
    display: none;
  }
}
@container (max-width: 70px) {
  .clip-caption .icon,
  .clip-name {
    display: none;
  }
}
.m-pane .composer header .icon-button {
  display: none;
}
.m-pane .composer header {
  justify-content: flex-start;
}
.sfx-mark.whoosh {
  background: oklch(0.817 0.119 227.748);
}
.sfx-mark.pop,
.sfx-mark.tick {
  background: oklch(0.887 0.181 94.784);
  height: 12px;
  top: 18px;
}
.sfx-mark.impact,
.sfx-mark.punch,
.sfx-mark.thud,
.sfx-mark.subDrop {
  background: oklch(0.683 0.211 37.698);
  width: 5px;
}

/* ── Gestures ───────────────────────────────────────── */
.editor,
.timeline-shell,
.stage,
.tabs,
.card-head,
.topbar,
.m-transport,
.m-tabs {
  user-select: none;
  -webkit-user-select: none;
}
.editor input,
.editor textarea,
.snippet code,
.msg {
  user-select: text;
  -webkit-user-select: text;
}
html.is-dragging,
html.is-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: var(--drag-cursor, grabbing) !important;
}
html.is-dragging iframe {
  pointer-events: none;
}
.playhead > span {
  pointer-events: auto;
  cursor: ew-resize;
  transition: transform 0.15s var(--spring);
}
.playhead > span:hover {
  transform: scale(1.15);
}
.snap-line {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 0;
  width: 1px;
  background: oklch(0.887 0.181 94.784);
  box-shadow: 0 0 6px oklch(0.887 0.181 94.784);
  z-index: 12;
  pointer-events: none;
}
.composer .composer-input {
  background: var(--field-bg);
}
.composer-chip {
  background: var(--menu);
  backdrop-filter: none;
}
.menu {
  backdrop-filter: none;
}
.key.signin { margin-left: 4px; height: 36px; }
/* Timeline navigation */
html,
body {
  overscroll-behavior: none;
}
.timeline-scroll {
  overscroll-behavior: contain;
}
.track-label {
  z-index: 15;
}
.ruler-row {
  z-index: 12;
}
.playhead.off {
  opacity: 0;
}
.playhead.off > span {
  pointer-events: none;
}

/* ── Interaction layer (hover, press, entry, exit) ───────────── */
@keyframes pop-out {
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes panel-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.96);
  }
}
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes spin-ring {
  to {
    --spin: 360deg;
  }
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.tool,
.icon-button,
.chip-button,
.row-icon,
.row-toggle,
.zoom-readout,
.fit-button,
.duration,
.ratio-button,
.card-fold,
.key-toggle,
.swatches button {
  transition:
    transform 0.22s var(--ease),
    background-color 0.22s var(--ease),
    color 0.22s var(--ease),
    box-shadow 0.28s var(--ease),
    opacity 0.22s var(--ease);
}
.tool:hover:not(:disabled),
.chip-button:hover,
.duration:hover,
.ratio-button:hover,
.zoom-readout:hover,
.fit-button:hover {
  transform: translateY(-1px);
}
.tool:active:not(:disabled),
.icon-button:active,
.chip-button:active,
.row-toggle:active,
.duration:active,
.ratio-button:active,
.fit-button:active,
.zoom-readout:active,
.menu-item:active,
.tile:active .tile-art {
  transform: scale(0.96);
  transition-duration: 0.1s;
}
.key {
  --t: 3px;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.122),
    0 var(--t) 0 var(--key-edge),
    0 calc(var(--t) + 6px) 14px -8px oklch(0 0 0 / 0.549);
  transition:
    transform 0.34s var(--spring),
    box-shadow 0.34s var(--ease),
    background-color 0.2s var(--ease),
    filter 0.2s var(--ease);
}
.key:hover:not(:disabled) {
  --t: 4px;
  transform: translateY(-1px);
}
.key:active:not(:disabled) {
  --t: 1px;
  transform: translateY(2px);
  transition-duration: 0.12s;
}
.key.accent {
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.2),
    0 var(--t) 0 oklch(0.509 0.184 257.479),
    0 calc(var(--t) + 6px) 16px -6px oklch(0.625 0.206 255.486 / 0.502);
}
.key.accent:hover:not(:disabled) {
  filter: brightness(1.06);
}
.slider:active::-webkit-slider-thumb {
  transform: scale(1.12);
}
.slider::-webkit-slider-thumb {
  transition: transform 0.22s var(--spring);
}
/* Card fold: height animates, content stays mounted. */
.fold {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: minmax(0, 1fr);
  transition:
    grid-template-rows 0.32s var(--ease),
    opacity 0.24s var(--ease);
}
.fold[data-open="false"] {
  grid-template-rows: 0fr;
  opacity: 0;
}
.fold > div {
  min-height: 0;
  overflow: clip;
}
.card .card-body {
  animation: none;
}
/* Segmented: one thumb that slides. */
.segmented {
  position: relative;
}
.segmented .seg-thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px - (var(--n) - 1) * 2px) / var(--n));
  transform: translateX(calc(var(--i) * (100% + 2px)));
  border-radius: 8px;
  background: var(--surface-3);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    0 2px 0 var(--key-edge),
    0 3px 8px oklch(0 0 0 / 0.141);
  transition: transform 0.36s var(--spring);
}
:root[data-theme="light"] .segmented .seg-thumb {
  background: oklch(1 0 0);
}
.segmented button {
  position: relative;
  z-index: 1;
}
.segmented button.on {
  background: none !important;
  box-shadow: none !important;
}
/* Timeline: sticky header rows, animated audio group, lifted clips. */
.sections-row {
  position: sticky;
  top: 30px;
  z-index: 11;
  background: var(--surface);
}
.section-label {
  justify-content: space-between;
}
.audio-toggle {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 7px;
  color: var(--ink-3);
}
.audio-toggle .icon:last-child {
  transition: transform 0.32s var(--spring);
  transform: rotate(180deg);
}
.audio-toggle.open .icon:last-child {
  transform: rotate(0deg);
}
.audio-group {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.34s var(--ease),
    opacity 0.26s var(--ease);
}
.audio-group.open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.audio-group > div {
  min-height: 0;
  overflow: clip;
}
.layer-clip,
.audio-clip {
  transition:
    box-shadow 0.4s var(--ease),
    transform 0.3s var(--spring),
    filter 0.15s,
    opacity 0.22s var(--ease);
}
.layer-clip.lift,
.audio-clip.lift {
  transform: translateY(-3px);
  z-index: 20;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.251),
    inset 0 -3px 0 oklch(0 0 0 / 0.141),
    0 16px 24px -12px oklch(0 0 0 / 0.8);
}
.clip-selected.lift {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--accent),
    0 16px 24px -12px oklch(0 0 0 / 0.8);
}
.audio-clip.is-muted {
  opacity: 0.4;
  filter: grayscale(0.8);
}
.snap-line {
  background: oklch(0.625 0.206 255.486);
  box-shadow: 0 0 8px oklch(0.625 0.206 255.486 / 0.451);
}
.row-actions {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding-left: 4px;
}
.row-toggle {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  opacity: 0;
}
.track-label:hover .row-toggle,
.row-toggle.on,
.row-toggle:focus-visible {
  opacity: 1;
}
.row-toggle:hover {
  background: var(--field-bg);
  color: var(--ink);
}
.row-toggle.on {
  color: oklch(0.782 0.171 67.223);
}
.layer-row:has(.row-toggle.on[aria-label="Show track"]) .track,
.audio-row:has(.row-toggle.on) .track {
  background: repeating-linear-gradient(135deg, transparent 0 8px, oklch(1 0 0 / 0.024) 8px 16px);
}
/* Playhead: a red marker with a pointed foot. */
.playhead {
  background: oklch(0.635 0.185 31.211);
  width: 2px;
  top: 4px;
}
.playhead > span {
  top: -2px;
  left: -8px;
  width: 18px;
  height: 22px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 4px oklch(0 0 0 / 0.4));
}
.playhead > span svg {
  display: block;
  fill: oklch(0.635 0.185 31.211);
}
.playhead > span:hover {
  transform: scale(1.12);
  transform-origin: 50% 100%;
}
/* Sidebar collapse */
.workspace .inspector {
  transition:
    width 0.34s var(--ease),
    opacity 0.24s var(--ease),
    margin 0.34s var(--ease);
  overflow: hidden;
}
.workspace.no-sidebar .inspector {
  width: 0;
  opacity: 0;
  margin-right: -12px;
  pointer-events: none;
}
.workspace .inspector > * {
  min-width: 400px;
}
@media (max-width: 1100px) {
  .workspace .inspector > * {
    min-width: 340px;
  }
}
/* Context menu */
.context-menu {
  position: fixed;
  z-index: 200;
  min-width: 250px;
  padding: 6px;
  border-radius: 14px;
  background: var(--menu);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    var(--pop-shadow);
  animation: pop-up 0.2s var(--spring);
}
.context-menu.closing,
.menu.closing {
  animation: pop-out 0.14s var(--ease) forwards;
  pointer-events: none;
}
.context-menu hr {
  border: 0;
  height: 1px;
  background: var(--line-2);
  margin: 5px 8px;
}
.context-menu .menu-item {
  padding: 7px 10px;
  font-weight: 500;
}
.context-menu .menu-item:focus-visible {
  outline: none;
  background: var(--accent-fill);
  color: oklch(1 0 0);
}
.context-menu .menu-item:disabled {
  opacity: 0.35;
}
.context-menu .menu-item:disabled:hover {
  background: none;
  color: inherit;
}
.context-menu kbd {
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 18px;
}
.context-menu .menu-item:hover kbd,
.context-menu .menu-item:focus-visible kbd {
  color: oklch(1 0 0 / 0.702);
}
.context-menu .menu-item.danger {
  color: var(--danger);
}
.context-menu .menu-item.danger:hover {
  background: var(--danger);
  color: oklch(1 0 0);
}
.icon-gap {
  width: 16px;
  flex-shrink: 0;
}
/* Exits */
.toast.closing {
  animation: toast-out 0.2s var(--ease) forwards;
}
.presence.closing .modal-shade {
  animation: fade-out 0.2s var(--ease) forwards;
}
.presence.closing .modal {
  animation: panel-out 0.2s var(--ease) forwards;
}
/* Claude at work: a moving rainbow ring around the composer. */
.composer {
  isolation: isolate;
}
.claude-ring,
.claude-halo {
  position: absolute;
  pointer-events: none;
  border-radius: 22px;
  background: conic-gradient(from var(--spin) in srgb, oklch(0.71 0.168 306.27), oklch(0.855 0.093 332.876), oklch(0.729 0.141 274.346), oklch(0.709 0.185 16.46), oklch(0.838 0.12 66.467), oklch(0.732 0.179 306.936), oklch(0.71 0.168 306.27));
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  animation: spin-ring 3.2s linear infinite paused;
}
.claude-ring {
  inset: -2px;
  padding: 2px;
  mask:
    linear-gradient(oklch(0 0 0) 0 0) content-box exclude,
    linear-gradient(oklch(0 0 0) 0 0);
  z-index: 2;
}
.claude-halo {
  inset: 4px;
  filter: blur(18px);
  z-index: -1;
}
.composer.working .claude-ring {
  opacity: 1;
  animation-play-state: running;
}
.composer.working .claude-halo {
  opacity: 0.6;
  animation-play-state: running;
}
.shimmer {
  background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink) 50%, var(--ink-3) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 2.4s linear infinite;
}
.ask-send:not(:disabled) {
  box-shadow: 0 4px 12px -2px oklch(0.683 0.211 37.698 / 0.502);
  transition: transform 0.2s var(--spring);
}
.ask-send:not(:disabled):active {
  transform: scale(0.88);
}
.tabs button {
  transition: color 0.22s var(--ease);
}
/* Sticky header rows stay above the label column while rows scroll under them. */
.ruler-row {
  z-index: 30;
}
.sections-row {
  z-index: 29;
}
.playhead {
  z-index: 31;
}
.snap-line {
  z-index: 28;
}
/* Track toggles */
.track-label > span.row-actions {
  margin-left: auto;
  overflow: visible;
}
.row-toggle {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--ink-2);
}
.row-toggle.on {
  opacity: 1;
}
.row-toggle.mute.on {
  background: oklch(0.663 0.224 28.292 / 0.161);
  color: oklch(0.707 0.185 25.944);
}
.row-toggle.hide.on,
.row-toggle.lock.on {
  background: oklch(0.782 0.171 67.223 / 0.161);
  color: oklch(0.82 0.152 73.25);
}
.row-toggle .icon {
  animation: toggle-pop 0.34s var(--spring);
}
@keyframes toggle-pop {
  from {
    transform: scale(0.6);
    opacity: 0.4;
  }
}
.audio-row:has(.row-toggle.mute.on) .track-label > span:not(.row-icon):not(.row-actions),
.layer-row:has(.row-toggle.hide.on) .row-icon {
  opacity: 0.45;
}
/* Audio group: stable scrollbar (no reflow jitter) and a softer curve */
.timeline-scroll {
  scrollbar-gutter: stable;
}
.audio-group {
  transition:
    grid-template-rows 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.3s var(--ease);
}
.audio-toggle .icon:last-child {
  transition: transform 0.46s cubic-bezier(0.32, 0.72, 0, 1);
}
/* Compact context menu, no pre-selected row */
.context-menu {
  min-width: 212px;
  padding: 5px;
  border-radius: 12px;
  font-size: 13px;
  outline: none;
}
.context-menu .menu-item {
  padding: 5px 9px;
  gap: 9px;
  border-radius: 7px;
  min-height: 30px;
}
.context-menu .menu-item .icon {
  width: 15px;
  height: 15px;
}
.context-menu hr {
  margin: 4px 6px;
}
.context-menu kbd {
  font-size: 11.5px;
}
.account-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.timeline-row > .track,
.ruler-row > .track {
  margin-left: 14px;
}
/* Claude working over MCP */
.agent-status {
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 10px;
  border-radius: 20px;
  background: var(--menu);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    var(--pop-shadow);
  font-weight: 600;
  font-size: 13px;
  animation: pop-up 0.3s var(--spring);
  max-width: min(520px, 80%);
  white-space: nowrap;
  overflow: hidden;
}
.agent-status .orb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(from var(--spin) in srgb, oklch(0.71 0.168 306.27), oklch(0.855 0.093 332.876), oklch(0.729 0.141 274.346), oklch(0.709 0.185 16.46), oklch(0.838 0.12 66.467), oklch(0.71 0.168 306.27));
  animation:
    spin-ring 2.4s linear infinite,
    orb-breathe 1.6s ease-in-out infinite;
}
@keyframes orb-breathe {
  50% {
    transform: scale(1.18);
  }
}
.canvas-halo {
  inset: -6px;
  border-radius: 20px;
  filter: blur(22px);
  z-index: -1;
}
.stage.agent-on .canvas-halo {
  opacity: 0.55;
  animation-play-state: running;
}
.canvas-box { isolation: isolate; }
/* Ruler: minor ticks, in/out range */
.ruler-tick.minor {
  height: 8px;
  top: auto;
  bottom: 0;
  border-left-color: var(--line-2);
}
.ruler-tick.minor::after {
  display: none;
}
.range {
  position: absolute;
  top: 2px;
  height: 26px;
  border-radius: 7px;
  background: oklch(0.625 0.206 255.486 / 0.18);
  box-shadow: inset 0 0 0 1.5px oklch(0.625 0.206 255.486 / 0.702);
  z-index: 2;
}
.range-body {
  position: absolute;
  inset: 0 10px;
  cursor: grab;
}
.range-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
}
.range-edge::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 2px;
  border-radius: 1px;
  background: oklch(0.625 0.206 255.486);
}
.range-edge.start {
  left: 0;
}
.range-edge.end {
  right: 0;
}
.range-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 3px 2px 8px;
  border-radius: 8px;
  background: oklch(0.625 0.206 255.486);
  color: oklch(1 0 0);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 4px 10px -4px oklch(0.625 0.206 255.486 / 0.667);
  animation: pop-in 0.24s var(--spring);
}
.range-chip button {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(1 0 0);
}
.range-chip button:hover {
  background: oklch(1 0 0 / 0.18);
}
.range-shade {
  position: absolute;
  top: 30px;
  bottom: 0;
  background: oklch(0 0 0 / 0.349);
  pointer-events: none;
  z-index: 10;
}
/* Resizable label column */
.ruler-label {
  position: sticky;
}
.label-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100vh;
  cursor: col-resize;
  z-index: 40;
}
.label-resizer::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.2s var(--ease);
}
.label-resizer:hover::after,
.label-resizer.active::after {
  background: oklch(0.625 0.206 255.486);
}
.track-label {
  width: var(--label-w, 184px);
  min-width: var(--label-w, 184px);
}
/* Row actions float over the icons on hover; a state that's on stays as a badge. */
.track-label {
  position: sticky;
}
.track-label > span.row-actions {
  position: absolute;
  right: 6px;
  top: 50%;
  translate: 0 -50%;
  margin: 0;
  padding: 3px 3px 3px 22px;
  background: linear-gradient(90deg, transparent, var(--surface) 22px);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.track-label:hover > span.row-actions,
.track-label > span.row-actions:focus-within,
.track-label > span.row-actions:has(.on) {
  opacity: 1;
}
.track-label:not(:hover) > span.row-actions:has(.on) .row-toggle:not(.on) {
  display: none;
}
/* Claude working: braille spinner + an inner edge glow on the stage (like an agent-owned space). */
.agent-status {
  gap: 8px;
  padding: 7px 14px 7px 12px;
}
.braille {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: oklch(0.625 0.206 255.486);
  width: 12px;
  text-align: center;
}
.agent-name {
  font-weight: 700;
}
.agent-status .shimmer {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes edge-breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1.5px oklch(0.625 0.206 255.486 / 0.6),
    inset 0 0 60px 6px oklch(0.625 0.206 255.486 / 0.333),
    inset 0 0 140px 30px oklch(0.625 0.206 255.486 / 0.122);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  z-index: 26;
}
.stage.agent-on::after {
  animation: edge-breathe 2.4s ease-in-out infinite;
}
.stage.agent-on .canvas-halo {
  opacity: 0;
}
/* Full-window player */
.theater {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: oklch(0 0 0);
  display: flex;
  flex-direction: column;
  animation: fade-in 0.25s var(--ease);
}
.theater-stage {
  flex: 1;
  min-height: 0;
  padding: 20px 20px 0;
  display: flex;
}
.theater-stage .stage {
  background: none;
}
.theater-stage .zoom-pill {
  display: none;
}
.theater-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 20px;
  color: oklch(0.965 0.003 286.35);
}
.theater-scrub {
  flex: 1;
  display: grid;
  gap: 8px;
}
.theater-track {
  height: 22px;
}
.theater-track span {
  top: 8px;
  height: 6px;
  opacity: 0.75;
  border-radius: 3px;
}
.theater-track b {
  top: 2px;
}
.theater-range {
  position: absolute;
  top: 3px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px oklch(0.625 0.206 255.486);
  background: oklch(0.625 0.206 255.486 / 0.149);
  pointer-events: none;
}
.scrub-tip {
  position: absolute;
  bottom: 26px;
  translate: -50% 0;
  padding: 4px 8px;
  border-radius: 7px;
  background: oklch(0.294 0.004 286.177);
  color: oklch(1 0 0);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.loop-chip {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: oklch(0.625 0.206 255.486 / 0.2);
  color: oklch(0.685 0.17 252.993);
  font-size: 11px;
  font-weight: 600;
}
.theater-stage .stage { padding: 0; border-radius: 0; }
/* Portal menus */
.menu.portal {
  position: fixed;
  right: auto;
  bottom: auto;
  translate: none;
  z-index: 300;
}
.menu.portal.up {
  animation-name: pop-in;
  transform-origin: bottom;
}
/* Timeline wrapper + full-height label resizer */
.timeline-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.timeline-wrap > .timeline-scroll {
  flex: 1;
}
.timeline-wrap > .label-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  height: auto;
  right: auto;
  cursor: col-resize;
  z-index: 45;
}
.timeline-wrap > .label-resizer::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition:
    background 0.18s var(--ease),
    width 0.18s var(--ease),
    left 0.18s var(--ease);
}
.timeline-wrap > .label-resizer:hover::after,
.timeline-wrap > .label-resizer.active::after {
  left: 3px;
  width: 4px;
  background: oklch(0.625 0.206 255.486);
  box-shadow: 0 0 10px oklch(0.625 0.206 255.486 / 0.502);
}
/* Curve editor */
.curve-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--field-bg);
  animation: pop-in 0.26s var(--spring);
}
.curve-graph {
  width: 100%;
  height: auto;
  touch-action: none;
  user-select: none;
}
.curve-graph .grid {
  stroke: var(--line-2);
  stroke-width: 1;
}
.curve-graph .arm {
  stroke: oklch(0.625 0.206 255.486 / 0.6);
  stroke-width: 1.5;
}
.curve-graph .curve {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.curve-graph .end {
  fill: var(--ink-3);
}
.curve-graph .knob {
  fill: oklch(0.625 0.206 255.486);
  stroke: oklch(1 0 0);
  stroke-width: 2.5;
  cursor: grab;
  transition: r 0.2s var(--spring);
}
.curve-graph .knob:hover {
  r: 10;
}
.curve-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.curve-presets .chip-button {
  gap: 5px;
  padding: 0 8px;
}
.curve-presets .chip-button.on {
  background: oklch(0.625 0.206 255.486);
  color: oklch(1 0 0);
}
.curve-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.curve-values code {
  font-size: 11px;
  background: none;
  padding: 0;
  color: var(--ink-2);
}
.curve-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink-2);
  font-weight: 500;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.curve-button:hover,
.curve-button.on {
  color: var(--ink);
  background: var(--surface-3);
}
.curve-button.on svg {
  color: oklch(0.625 0.206 255.486);
}
.icon-button.on {
  color: oklch(0.625 0.206 255.486);
  background: var(--field-bg);
}
.curve-panel {
  position: fixed;
  z-index: 220;
  width: 300px;
  padding: 10px;
  border-radius: 16px;
  background: var(--menu);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    var(--pop-shadow);
  animation: pop-up 0.24s var(--spring);
}
.curve-panel header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 4px;
}
.curve-panel header strong {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.curve-panel .curve-editor {
  background: none;
  padding: 0;
}
.context-menu .menu-item > span {
  white-space: nowrap;
}
.context-menu .menu-item > span.icon-gap {
  flex: 0 0 15px;
}
.context-menu .menu-item > .icon {
  flex: 0 0 auto;
}
.context-menu kbd {
  flex: 0 0 auto;
  white-space: nowrap;
}
/* ── Home ───────────────────────────────────────────── */
.home {
  height: 100dvh;
  overflow-y: auto;
  background: var(--bg);
  position: relative;
}
.home-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sunghyun Sans", Inter, sans-serif;
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: oklch(1 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 3px 0 oklch(0.831 0.007 286.249);
}
.brand-mark i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: oklch(0.547 0.25 265.79);
  position: relative;
}
.brand-mark i::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: oklch(1 0 0);
  top: 3px;
  left: 3px;
  animation: eyes-look 5s infinite;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  width: min(360px, 40vw);
  padding: 0 12px;
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--ink-3);
  margin-left: 18px;
}
.search:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
.search input {
  border: 0;
  background: none;
  outline: none;
  width: 100%;
  color: var(--ink);
}
.home-body {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  display: grid;
  gap: 34px;
}
.home h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.home h2 small {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}
.start-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.start-tile {
  flex: 0 0 150px;
  display: grid;
  justify-items: start;
  gap: 3px;
  text-align: left;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  position: relative;
  animation: panel-in 0.42s var(--spring) both;
  animation-delay: calc(var(--i) * 40ms);
  transition:
    transform 0.28s var(--spring),
    box-shadow 0.28s var(--ease);
}
.start-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    var(--card-shadow),
    0 16px 30px -18px oklch(0 0 0);
}
.start-tile:active {
  transform: scale(0.97);
}
.start-tile .frame {
  height: 96px;
  max-width: 100%;
  justify-self: center;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.start-tile:hover .frame {
  color: var(--accent);
}
.start-tile .frame.dashed {
  background: none;
  border: 1.5px dashed var(--line-2);
}
.start-tile .frame.art {
  color: oklch(1 0 0);
  font-family: "Sunghyun Sans", Inter, sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.frame.art.trailer {
  background: linear-gradient(160deg in srgb, oklch(0.547 0.25 265.79), oklch(0.848 0.122 215.348));
  font-size: 15px;
}
.frame.art.trailer b::after {
  content: "";
}
.frame.art.launch {
  background: linear-gradient(135deg in srgb, oklch(0.726 0.178 43.189), oklch(0.683 0.211 37.698) 60%, oklch(0.656 0.227 312.416));
  font-size: 18px;
}
.start-tile strong {
  font-size: 14px;
}
.start-tile small {
  color: var(--ink-3);
  font-size: 12px;
}
.start-tile.import input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.project-tile {
  border-radius: 18px;
  cursor: pointer;
  outline: none;
  animation: panel-in 0.42s var(--spring) both;
  animation-delay: calc(var(--i) * 30ms);
}
.project-tile .thumb {
  position: relative;
  height: 200px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s var(--ease);
}
.project-tile:hover .thumb,
.project-tile:focus-visible .thumb {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 18px 34px -18px oklch(0 0 0);
}
.project-tile:focus-visible .thumb,
.project-tile.current .thumb {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--accent);
}
.project-tile:active .thumb {
  transform: scale(0.98);
}
.thumb-frame {
  height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-tile .thumb img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
  animation: fade-in 0.4s var(--ease);
}
.thumb-meta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 7px;
  background: oklch(0 0 0 / 0.651);
  color: oklch(1 0 0);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s;
}
.project-tile:hover .thumb-meta {
  opacity: 1;
}
.tile-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 0;
}
.tile-foot > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.tile-foot strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-foot small {
  color: var(--ink-3);
  font-size: 12px;
}
.tile-foot .field {
  flex: 1;
}
.project-tile.skeleton {
  height: 240px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.shimmer-block {
  width: 60%;
  height: 60%;
  border-radius: 10px;
  background: linear-gradient(90deg, oklch(1 0 0 / 0.063) 0%, oklch(1 0 0 / 0.149) 50%, oklch(1 0 0 / 0.063) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.home-empty {
  color: var(--ink-3);
  padding: 40px 0;
  text-align: center;
}
.drop-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: oklch(0.625 0.206 255.486 / 0.122);
  box-shadow: inset 0 0 0 3px oklch(0.625 0.206 255.486);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s;
}
.drop-veil > div {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 34px;
  border-radius: 20px;
  background: var(--menu);
  box-shadow: var(--pop-shadow);
  font-size: 16px;
}
@media (max-width: 767px) {
  .home-top {
    padding: 12px 16px;
  }
  .search {
    display: none;
  }
  .home-body {
    padding: 18px 16px 40px;
  }
  .project-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .project-tile .thumb {
    height: 160px;
  }
}
html.is-dragging .timeline-wrap > .label-resizer:not(.active) {
  pointer-events: none;
}
/* Home hover-scrub */
.scrub-area {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}
.scrub-area .thumb-frame {
  height: 100%;
}
.scrub-area img {
  animation: none !important;
}
.scrub-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: oklch(0.625 0.206 255.486);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px oklch(0.625 0.206 255.486 / 0.667);
  pointer-events: none;
}
.scrub-chip {
  position: absolute;
  right: 10px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 7px;
  background: oklch(0 0 0 / 0.702);
  color: oklch(1 0 0);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: pop-in 0.2s var(--spring);
}
.project-tile:hover .thumb-meta {
  opacity: 0;
}
/* Inline custom duration */
.custom-duration {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 4px 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.custom-duration label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--ink-2);
}
.custom-duration .num {
  width: 84px;
  height: 32px;
}
.custom-duration .num small {
  color: var(--ink-3);
}
/* Export sheet */
.menu.export-sheet {
  min-width: 330px;
  padding: 14px;
}
.export-panel {
  display: grid;
  gap: 12px;
}
.export-title {
  font-size: 15px;
  padding-left: 2px;
}
.export-part button {
  font-size: 12px;
}
.export-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.export-format {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  background: var(--field-bg);
  transition:
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--spring);
}
.export-format:hover {
  background: var(--surface-3);
}
.export-format:active {
  transform: scale(0.97);
}
.export-format.on {
  box-shadow: inset 0 0 0 1.5px oklch(0.625 0.206 255.486);
  background: oklch(0.625 0.206 255.486 / 0.122);
}
.export-format span:last-child {
  display: grid;
  gap: 2px;
}
.export-format strong {
  font-size: 13px;
}
.export-format small {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.3;
}
.export-format .radio {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
  transition: box-shadow 0.25s var(--spring);
}
.export-format.on .radio {
  box-shadow: inset 0 0 0 5px oklch(0.625 0.206 255.486);
}
.export-summary {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-left: 2px;
}
/* Start / end marks */
.marks {
  display: flex;
  gap: 0;
}
.marks .tool {
  width: 34px;
  height: 34px;
}
.marks .tool.active {
  color: oklch(0.625 0.206 255.486);
}
.range-edge .flag {
  position: absolute;
  top: -1px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 4px;
  border-radius: 4px;
  background: oklch(0.625 0.206 255.486);
  color: oklch(1 0 0);
  pointer-events: none;
}
.range-edge.start .flag {
  left: 4px;
}
.range-edge.end .flag {
  right: 4px;
}
.range-band {
  position: absolute;
  top: 30px;
  bottom: 0;
  background: linear-gradient(180deg, oklch(0.625 0.206 255.486 / 0.078), oklch(0.625 0.206 255.486 / 0.039));
  box-shadow:
    inset 1px 0 0 oklch(0.625 0.206 255.486 / 0.4),
    inset -1px 0 0 oklch(0.625 0.206 255.486 / 0.4);
  pointer-events: none;
  z-index: 1;
  animation: fade-in 0.2s var(--ease);
}
.layer-clip.in-range {
  filter: brightness(1.08);
}
.range-shade {
  background: oklch(0 0 0 / 0.251);
}
/* Player: named sections, the playing one grows and fills */
.theater-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-weight: 600;
  min-height: 20px;
}
.theater-head .time {
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
}
.theater-head .time small {
  color: oklch(0.965 0.003 286.35 / 0.42);
  font-weight: 400;
}
.sections-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  cursor: pointer;
  touch-action: none;
}
.sections-bar .seg {
  position: relative;
  height: 20px;
  min-width: 6px;
  flex-basis: 0;
  border-radius: 7px;
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 26%, oklch(0.227 0.004 286.092));
  transition:
    height 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s var(--ease);
}
.sections-bar .seg.now {
  height: 32px;
  border-radius: 10px;
  animation: seg-wiggle 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes seg-wiggle {
  0% {
    transform: scaleY(0.82);
  }
  60% {
    transform: scaleY(1.04);
  }
  100% {
    transform: scaleY(1);
  }
}
.sections-bar .seg.hover:not(.now) {
  height: 24px;
}
.seg-fill {
  position: absolute;
  inset: 0;
  width: calc(var(--fill) * 100%);
  background: var(--c);
  opacity: 0.95;
  transition: width 0.08s linear;
}
.sections-bar .seg.done .seg-fill {
  opacity: 0.55;
}
.sections-bar .seg b {
  position: relative;
  display: block;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  color: oklch(1 0 0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  mix-blend-mode: normal;
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.4);
  transition: line-height 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sections-bar .seg.now b {
  line-height: 32px;
  font-size: 12.5px;
}
.hover-line {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 5px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: oklch(1 0 0);
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.4), 0 4px 12px oklch(0 0 0 / 0.533);
  pointer-events: none;
  z-index: 3;
}
.hover-time {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  padding: 5px 10px;
  border-radius: 10px;
  background: oklch(1 0 0);
  color: oklch(0.227 0.004 286.092);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 6px 18px oklch(0 0 0 / 0.6);
}
.theater-range {
  top: 2px;
  height: 36px;
}
/* Snapping control */
.snap-control {
  display: flex;
  align-items: center;
}
.snap-toggle.active {
  color: oklch(0.625 0.206 255.486);
  background: oklch(0.625 0.206 255.486 / 0.122);
}
.snap-caret {
  width: 18px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--ink-3);
  margin-left: -4px;
}
.snap-caret:hover {
  color: var(--ink);
  background: var(--field-bg);
}
.menu.snap-menu {
  min-width: 250px;
}
.snap-menu .menu-note {
  margin: 4px 10px 6px;
}
/* Snapped playhead: a quick settle */
.playhead.snapped > span {
  animation: snap-settle 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes snap-settle {
  0% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.ruler {
  cursor: text;
}
/* In/out range, DaVinci style: a rounded bar with round end knobs, warm and subtle */
.range {
  top: auto;
  bottom: 3px;
  height: 14px;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.range-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 4px;
  border-radius: 4px;
  background: oklch(0.817 0.136 65.475);
  opacity: 0.85;
  cursor: grab;
  transition:
    height 0.2s var(--ease),
    top 0.2s var(--ease),
    opacity 0.2s var(--ease);
}
.range-bar:hover {
  top: 4px;
  height: 6px;
  opacity: 1;
}
.range-knob {
  position: absolute;
  top: 1px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: oklch(0.294 0.004 286.177);
  box-shadow:
    inset 0 0 0 2.5px oklch(0.817 0.136 65.475),
    0 1px 4px oklch(0 0 0 / 0.533);
  cursor: ew-resize;
  transition: transform 0.22s var(--spring);
}
.range-knob:hover {
  transform: scale(1.2);
}
.range-knob.start {
  left: 0;
}
.range-knob.end {
  left: 100%;
}
.range-band {
  background: linear-gradient(180deg, oklch(0.782 0.171 67.223 / 0.071), oklch(0.782 0.171 67.223 / 0.031));
  box-shadow:
    inset 2px 0 0 oklch(0.817 0.136 65.475 / 0.349),
    inset -2px 0 0 oklch(0.817 0.136 65.475 / 0.349);
}
.range-shade {
  background: oklch(0 0 0 / 0.2);
}
.marks .tool.active {
  color: oklch(0.817 0.136 65.475);
}
.theater-range {
  box-shadow: inset 0 0 0 2px oklch(0.817 0.136 65.475);
  background: oklch(0.782 0.171 67.223 / 0.122);
}
.loop-chip {
  background: oklch(0.782 0.171 67.223 / 0.161);
  color: oklch(0.817 0.136 65.475);
}
/* The hover time pill keeps a fixed width; digits roll vertically inside it */
.hover-time {
  width: 74px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.hover-time > *,
.theater-head .time > span:first-child {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.theater-head .time > span:first-child {
  display: inline-block;
  min-width: 52px;
  text-align: right;
  overflow: hidden;
}
/* Edit points (DaVinci): a selected edge or cut glows green on its side. */
:root {
  --edit-point: oklch(0.802 0.194 151.098);
}
.layer-clip.edge-start::after,
.layer-clip.edge-end::after,
.section-pill.edge-start::after,
.section-pill.edge-end::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--edit-point);
  box-shadow: 0 0 12px 1px color-mix(in srgb, var(--edit-point) 70%, transparent);
  z-index: 3;
  pointer-events: none;
  animation: edit-in 0.18s var(--ease);
}
.layer-clip.edge-start::after,
.section-pill.edge-start::after {
  left: 0;
  border-radius: 11px 2px 2px 11px;
}
.layer-clip.edge-end::after,
.section-pill.edge-end::after {
  right: 0;
  border-radius: 2px 11px 11px 2px;
}
.section-pill.edge-start::after,
.section-pill.edge-end::after {
  width: 3px;
}
.layer-clip.edge-start .trim-handle.start::before,
.layer-clip.edge-start .trim-handle.start::after,
.layer-clip.edge-end .trim-handle.end::before,
.layer-clip.edge-end .trim-handle.end::after {
  background: oklch(1 0 0);
}
@keyframes edit-in {
  from {
    opacity: 0;
    transform: scaleY(0.6);
  }
}
/* A cut: hover shows the roll line; selected, both sides go green. */
.cut {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 12px;
  margin-left: -6px;
  z-index: 5;
  cursor: col-resize;
  touch-action: none;
}
.cut::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  bottom: 3px;
  width: 2px;
  border-radius: 1px;
  background: oklch(1 0 0);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.cut:hover::before {
  opacity: 0.85;
}
.cut.on::before {
  opacity: 1;
  background: var(--edit-point);
  box-shadow: 0 0 10px var(--edit-point);
}
.cut.has-tr {
  z-index: 4;
}
/* Transition chip: a bow-tie sitting across the cut. */
.tr-chip {
  position: absolute;
  top: 50%;
  height: 20px;
  min-width: 18px;
  transform: translate(-50%, -50%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(1 0 0);
  background: oklch(0.214 0.012 270.79);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.22),
    0 2px 8px -2px oklch(0 0 0 / 0.6);
  z-index: 6;
  cursor: ew-resize;
  touch-action: none;
  transition:
    box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
}
.tr-chip svg {
  fill: currentColor;
  flex-shrink: 0;
}
.tr-chip:hover {
  background: oklch(0.269 0.016 269.099);
}
.tr-chip.on {
  color: oklch(0.159 0.011 267.979);
  background: oklch(1 0 0);
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--edit-point);
}
/* FX track */
.fx-row {
  height: 36px;
}
.fx-row .empty-track {
  line-height: 35px;
}
.fx-label {
  gap: 8px;
}
.row-icon.fx {
  background: linear-gradient(180deg in srgb, oklch(0.852 0.112 206.079), oklch(0.677 0.112 214.153));
}
.fx-clip {
  position: absolute;
  top: 5px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 3px;
  color: oklch(1 0 0);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background: linear-gradient(180deg in srgb, oklch(0.852 0.112 206.079), oklch(0.677 0.112 214.153));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.251),
    inset 0 -2px 0 oklch(0 0 0 / 0.141),
    0 2px 6px -2px oklch(0 0 0 / 0.333);
  transition:
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--spring),
    filter 0.15s;
}
.fx-clip:hover {
  filter: brightness(1.06);
}
.fx-clip.lift {
  transform: translateY(-2px);
  z-index: 20;
}
.fx-clip .trim-handle {
  height: 16px;
  width: 8px;
}
.fx-clip .clip-caption {
  font-size: 11.5px;
}
/* Fades: a dot at each top corner drags the ramp; the ramp darkens the faded part. */
.fade-ramp {
  position: absolute;
  top: 0;
  bottom: 0;
  background: oklch(0 0 0 / 0.533);
  pointer-events: none;
  z-index: 1;
}
.fade-ramp.in {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.fade-ramp.out {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.fade-dot {
  position: absolute;
  top: 2px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  margin-right: -4.5px;
  border-radius: 50%;
  background: oklch(1 0 0);
  box-shadow: 0 0 0 1.5px oklch(0 0 0 / 0.2), 0 1px 3px oklch(0 0 0 / 0.4);
  z-index: 4;
  cursor: ew-resize;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.15s var(--ease),
    transform 0.2s var(--spring);
}
.layer-clip:hover .fade-dot,
.audio-clip:hover .fade-dot,
.clip-selected .fade-dot {
  opacity: 1;
  transform: scale(1);
}
.fade-dot:hover {
  transform: scale(1.3) !important;
}
/* Transition & effect catalogue */
.menu.fx-menu {
  width: 372px;
  max-height: 440px;
  overflow: auto;
}
.fx-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 2px 4px 6px;
}
.fx-grid.in-panel {
  padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}
.fx-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 5px 5px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease);
}
.fx-tile:hover {
  background: var(--field-bg);
  color: var(--ink);
}
.fx-tile.on {
  color: var(--ink);
  background: var(--accent-soft);
}
.fx-tile.on .tr-prev,
.fx-tile.on .fx-prev {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--accent);
}
.cut-badge,
.fx-badge {
  background: color-mix(in srgb, var(--edit-point) 16%, transparent);
  color: var(--edit-point);
}
.fx-badge {
  background: oklch(0.677 0.112 214.153 / 0.149);
  color: oklch(0.803 0.116 208.573);
}
.panel-heading > .tool:first-of-type {
  margin-left: auto;
}
.panel-heading > .tool {
  width: 34px;
  height: 34px;
}
/* Tiny previews: paused mid-way, they play on hover. */
.tr-prev,
.fx-prev {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  overflow: hidden;
  background: oklch(0 0 0);
  transition: box-shadow 0.18s var(--ease);
}
.tr-prev i,
.tr-prev b,
.fx-prev i {
  position: absolute;
  inset: 0;
  animation: 1.6s var(--ease) -0.8s infinite paused both;
}
.tr-prev i {
  background: linear-gradient(135deg in srgb, oklch(0.722 0.148 252.281), oklch(0.539 0.214 265.047));
}
.tr-prev b {
  background: linear-gradient(135deg in srgb, oklch(0.847 0.125 72.214), oklch(0.689 0.176 45.294));
  opacity: 0;
}
.fx-tile:hover .tr-prev i,
.fx-tile:hover .tr-prev b,
.fx-tile:hover .fx-prev i,
.fx-tile.on .tr-prev i,
.fx-tile.on .tr-prev b,
.fx-tile.on .fx-prev i {
  animation-play-state: running;
}
.t-mix b { animation-name: tp-in; }
.t-fadeBlack i { animation-name: tp-out-half; }
.t-fadeBlack b { animation-name: tp-in-half; }
.t-fadeWhite { background: oklch(1 0 0); }
.t-fadeWhite i { animation-name: tp-out-half; }
.t-fadeWhite b { animation-name: tp-in-half; }
.t-pushIn i { animation-name: tp-grow-out; }
.t-pushIn b { animation-name: tp-grow-in; }
.t-pushOut i { animation-name: tp-shrink-out; }
.t-pushOut b { animation-name: tp-shrink-in; }
.t-whip i { animation-name: tp-whip-out; }
.t-whip b { animation-name: tp-whip-in; }
.t-spin b { animation-name: tp-spin; }
.t-blur i { animation-name: tp-blur-out; }
.t-blur b { animation-name: tp-blur-in; }
.t-zoomBlur b { animation-name: tp-zoom-blur; }
.t-slide b { animation-name: tp-slide; }
.t-wipe b { animation-name: tp-wipe; }
.t-iris b { animation-name: tp-iris; }
.t-flash b { animation-name: tp-flash; }
.t-leak b { animation-name: tp-leak; }
.t-glitch b { animation-name: tp-glitch; animation-timing-function: steps(1); }
.t-stretch i { animation-name: tp-stretch-out; }
.t-stretch b { animation-name: tp-stretch-in; }
@keyframes tp-in { 0%, 20% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes tp-out-half { 0%, 20% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tp-in-half { 0%, 50% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes tp-grow-out { 0%, 20% { transform: scale(1); opacity: 1; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@keyframes tp-grow-in { 0%, 20% { transform: scale(0.6); opacity: 0; } 80%, 100% { transform: scale(1); opacity: 1; } }
@keyframes tp-shrink-out { 0%, 20% { transform: scale(1); opacity: 1; } 80%, 100% { transform: scale(0.5); opacity: 0; } }
@keyframes tp-shrink-in { 0%, 20% { transform: scale(1.6); opacity: 0; } 80%, 100% { transform: scale(1); opacity: 1; } }
@keyframes tp-whip-out { 0%, 20% { transform: none; filter: none; } 80%, 100% { transform: translateX(-100%); filter: blur(3px); } }
@keyframes tp-whip-in { 0%, 20% { transform: translateX(100%); opacity: 1; filter: blur(3px); } 80%, 100% { transform: none; opacity: 1; filter: none; } }
@keyframes tp-spin { 0%, 20% { transform: rotate(-180deg) scale(0); opacity: 0; } 80%, 100% { transform: none; opacity: 1; } }
@keyframes tp-blur-out { 0%, 20% { filter: none; opacity: 1; } 80%, 100% { filter: blur(6px); opacity: 0; } }
@keyframes tp-blur-in { 0%, 20% { filter: blur(6px); opacity: 0; } 80%, 100% { filter: none; opacity: 1; } }
@keyframes tp-zoom-blur { 0%, 20% { transform: scale(2.2); filter: blur(4px); opacity: 0; } 80%, 100% { transform: none; filter: none; opacity: 1; } }
@keyframes tp-slide { 0%, 20% { transform: translateX(100%); opacity: 1; } 80%, 100% { transform: none; opacity: 1; } }
@keyframes tp-wipe { 0%, 20% { clip-path: inset(0 0 0 100%); opacity: 1; } 80%, 100% { clip-path: inset(0); opacity: 1; } }
@keyframes tp-iris { 0%, 20% { clip-path: circle(0 at 50% 50%); opacity: 1; } 80%, 100% { clip-path: circle(75% at 50% 50%); opacity: 1; } }
@keyframes tp-flash { 0%, 42% { opacity: 0; filter: brightness(1); } 50% { opacity: 1; filter: brightness(4); } 80%, 100% { opacity: 1; filter: brightness(1); } }
@keyframes tp-leak { 0%, 30% { opacity: 0; filter: sepia(0); } 50% { opacity: 1; filter: brightness(1.8) sepia(1) saturate(4) hue-rotate(-20deg); } 80%, 100% { opacity: 1; filter: none; } }
@keyframes tp-glitch { 0%, 40% { opacity: 0; transform: none; } 44% { opacity: 1; transform: translateX(-12%); } 48% { opacity: 0; } 52% { opacity: 1; transform: translateX(8%) skewX(10deg); } 56%, 100% { opacity: 1; transform: none; } }
@keyframes tp-stretch-out { 0%, 20% { transform: none; opacity: 1; } 80%, 100% { transform: scaleX(3); opacity: 0; } }
@keyframes tp-stretch-in { 0%, 20% { transform: scaleX(3); opacity: 0; } 80%, 100% { transform: none; opacity: 1; } }
/* Effect previews: a subject on a scene. */
.fx-prev i {
  background:
    radial-gradient(circle at 50% 55%, oklch(1 0 0) 0 18%, transparent 19%),
    linear-gradient(135deg in srgb, oklch(0.601 0.217 272.737), oklch(0.621 0.24 309.385));
}
.f-shake i { animation-name: fp-shake; animation-duration: 0.5s; }
.f-punch i { animation-name: fp-punch; animation-duration: 0.9s; }
.f-glitch i { animation-name: fp-glitch; animation-timing-function: steps(1); }
.f-rgb i { filter: drop-shadow(3px 0 0 oklch(0.649 0.238 17.898)) drop-shadow(-3px 0 0 oklch(0.846 0.146 209.285)); animation-name: fp-rgb; }
.f-vhs::after,
.f-grain::after,
.f-pixelate::after,
.f-vignette::after,
.f-leak::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.f-vhs::after { background: repeating-linear-gradient(0deg, oklch(0 0 0 / 0.333) 0 1px, transparent 1px 3px); }
.f-vhs i { filter: saturate(1.6) hue-rotate(-12deg); animation-name: fp-vhs; animation-timing-function: steps(1); }
.f-grain::after { background: repeating-conic-gradient(oklch(1 0 0 / 0.133) 0 25%, oklch(0 0 0 / 0.2) 0 50%) 0 0 / 3px 3px; mix-blend-mode: overlay; }
.f-grain i { animation-name: fp-grain; animation-timing-function: steps(1); }
.f-flash i { animation-name: fp-flash; }
.f-strobe i { animation-name: fp-strobe; animation-timing-function: steps(1); }
.f-leak::after { background: radial-gradient(circle at 20% 30%, oklch(0.785 0.154 60.688 / 0.8), transparent 60%); mix-blend-mode: screen; animation: fp-leak 1.6s var(--ease) infinite paused; }
.fx-tile:hover .f-leak::after,
.fx-tile.on .f-leak::after { animation-play-state: running; }
.f-glow i { background: radial-gradient(circle at 50% 55%, oklch(1 0 0) 0 18%, oklch(1 0 0 / 0.533) 22%, transparent 34%), linear-gradient(135deg in srgb, oklch(0.337 0.103 276.509), oklch(0.341 0.121 303.552)); animation-name: fp-glow; }
.f-blur i { filter: blur(2.5px); }
.f-vignette::after { box-shadow: inset 0 0 22px 8px oklch(0 0 0); }
.f-pixelate::after { background: linear-gradient(90deg, oklch(0 0 0 / 0.2) 1px, transparent 1px) 0 0 / 6px 6px, linear-gradient(0deg, oklch(0 0 0 / 0.2) 1px, transparent 1px) 0 0 / 6px 6px; }
.f-pixelate i { filter: contrast(1.3) saturate(1.3); }
.f-flicker i { animation-name: fp-flicker; animation-timing-function: steps(1); }
@keyframes fp-shake { 0%, 100% { transform: none; } 20% { transform: translate(-3px, 2px) rotate(-2deg); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, -3px) rotate(2deg); } 80% { transform: translate(2px, 3px); } }
@keyframes fp-punch { 0% { transform: scale(1.25); } 40%, 100% { transform: scale(1); } }
@keyframes fp-glitch { 0%, 100% { transform: none; filter: none; } 30% { transform: translateX(-6%); filter: hue-rotate(90deg); } 35% { transform: none; filter: none; } 62% { transform: translateX(5%) skewX(-8deg); filter: hue-rotate(-90deg) saturate(3); } 67% { transform: none; filter: none; } }
@keyframes fp-rgb { 0%, 100% { filter: drop-shadow(1px 0 0 oklch(0.649 0.238 17.898)) drop-shadow(-1px 0 0 oklch(0.846 0.146 209.285)); } 50% { filter: drop-shadow(5px 0 0 oklch(0.649 0.238 17.898)) drop-shadow(-5px 0 0 oklch(0.846 0.146 209.285)); } }
@keyframes fp-vhs { 0%, 100% { transform: none; } 47% { transform: translateX(3%); } 53% { transform: none; } }
@keyframes fp-grain { 0%, 100% { transform: none; } 33% { transform: translate(1px, -1px); } 66% { transform: translate(-1px, 1px); } }
@keyframes fp-flash { 0%, 60%, 100% { filter: none; } 70% { filter: brightness(3); } }
@keyframes fp-strobe { 0%, 100% { opacity: 1; } 25% { opacity: 0.15; } 50% { opacity: 1; } 75% { opacity: 0.15; } }
@keyframes fp-leak { 0%, 100% { opacity: 0.4; transform: translateX(-20%); } 50% { opacity: 1; transform: translateX(30%); } }
@keyframes fp-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.5) drop-shadow(0 0 6px oklch(1 0 0)); } }
@keyframes fp-flicker { 0%, 100% { opacity: 1; } 12% { opacity: 0.5; } 18% { opacity: 1; } 55% { opacity: 0.35; } 60% { opacity: 1; } }

/* The playhead rides a sticky rail (its height is set from the viewport). */
.playhead-rail {
  position: sticky;
  top: 0;
  height: 0;
  z-index: 31;
}
.playhead {
  bottom: auto;
}

/* Timeline toolbar: three calm groups — create · transport · view. */
.timeline-toolbar .tool {
  width: 36px;
  height: 36px;
}
.timeline-toolbar .divider {
  margin: 0 5px;
}
.duration-pick {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 6px 0 8px;
  margin-left: 2px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease);
}
.duration-pick .icon {
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 0.15s var(--ease);
}
.duration-pick:hover,
.duration-pick.open {
  background: var(--field-bg);
  color: var(--ink);
}
.duration-pick:hover .icon,
.duration-pick.open .icon {
  opacity: 1;
}
.zoom-control {
  display: flex;
  align-items: center;
  gap: 0;
}
.zoom-control .tool {
  width: 28px;
  height: 32px;
}
.zoom-control .slider.mini {
  flex: 0 0 64px;
  width: 64px;
}
.marks .tool {
  width: 32px;
  height: 34px;
}
@media (max-width: 1360px) {
  .zoom-control .slider.mini {
    display: none;
  }
}
/* The add tools keep their width; the transport moves over rather than overlap them. */
@media (min-width: 1101px) and (max-width: 1360px) {
  .timeline-toolbar {
    grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr);
  }
}
@media (max-width: 1360px) {
  .timeline-toolbar .tool {
    width: 32px;
  }
  .tools-left .divider,
  .tools-right .divider {
    margin: 0 2px;
  }
}

/* Selection box on the tracks */
.marquee {
  position: absolute;
  z-index: 27;
  pointer-events: none;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* What Claude just changed: a soft orange halo that breathes twice, then fades. */
.agent-fresh {
  animation: agent-fresh 1.3s var(--ease) 2;
}
@keyframes agent-fresh {
  0%,
  100% {
    box-shadow:
      0 0 0 0 transparent,
      inset 0 -3px 0 oklch(0 0 0 / 0.141);
  }
  40% {
    box-shadow:
      0 0 0 2px var(--surface),
      0 0 0 4px oklch(0.75 0.167 50.536),
      0 0 18px 4px oklch(0.75 0.167 50.536 / 0.502);
  }
}
/* Catalogue: grouped tiles that read as "A → B". */
.fx-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px 6px;
}
.fx-groups h4 {
  margin: 4px 6px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.fx-groups .fx-grid {
  padding: 0;
}
.fx-groups.in-panel .fx-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}
.menu.fx-menu {
  width: 392px;
  max-height: min(520px, 70vh);
}
.fx-tile:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.tr-prev i::after,
.tr-prev b::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 15px/1 var(--font-sans, Inter, system-ui);
  color: oklch(1 0 0);
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.267);
}
.tr-prev i::after {
  content: "A";
}
.tr-prev b::after {
  content: "B";
}
.tr-prev i,
.tr-prev b,
.fx-prev i {
  animation-duration: 1.8s;
}
/* Static looks get a slow pulse so every effect tile moves on hover. */
.f-blur i { animation-name: fp-blur; }
.f-vignette i { animation-name: fp-breathe; }
.f-pixelate i { animation-name: fp-breathe; }
.f-split4 i {
  background:
    radial-gradient(circle at 50% 55%, oklch(1 0 0) 0 18%, transparent 19%) 0 0 / 50% 50%,
    linear-gradient(135deg in srgb, oklch(0.601 0.217 272.737), oklch(0.621 0.24 309.385));
  animation-name: fp-breathe;
}
.f-blackFlash i { animation-name: fp-black-flash; }
.f-sparkle::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 30%, oklch(1 0 0) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 22%, oklch(1 0 0) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 74%, oklch(1 0 0) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 30% 70%, oklch(1 0 0) 0 1px, transparent 2px);
  animation: fp-twinkle 1.8s var(--ease) infinite paused;
}
.f-oldFilm i { filter: sepia(0.9) contrast(1.1); animation-name: fp-flicker; animation-timing-function: steps(1); }
.f-oldFilm::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 18px 6px oklch(0.234 0.039 67.216 / 0.667);
}
.fx-tile:hover .f-sparkle::after,
.fx-tile.on .f-sparkle::after { animation-play-state: running; }
@keyframes fp-blur { 0%, 100% { filter: blur(0); } 50% { filter: blur(3px); } }
@keyframes fp-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fp-black-flash { 0%, 55%, 100% { filter: none; } 65% { filter: brightness(0.05); } }
@keyframes fp-twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
/* New transitions */
.t-dissolve b { animation-name: tp-in; filter: contrast(1.4); }
.t-shake i { animation-name: tp-shake-out; }
.t-shake b { animation-name: tp-shake-in; }
.t-inhale i { animation-name: tp-inhale-out; }
.t-inhale b { animation-name: tp-inhale-in; }
.t-clock b { animation-name: tp-clock; }
.t-shutter b { animation-name: tp-shutter; }
.t-cube i { animation-name: tp-cube-out; transform-origin: 0 50%; }
.t-cube b { animation-name: tp-cube-in; transform-origin: 100% 50%; }
.t-rgbSplit b { animation-name: tp-glitch; animation-timing-function: steps(1); filter: drop-shadow(3px 0 oklch(0.649 0.238 17.898)) drop-shadow(-3px 0 oklch(0.846 0.146 209.285)); }
.t-squeeze i { animation-name: tp-squeeze-out; }
.t-squeeze b { animation-name: tp-squeeze-in; }
@keyframes tp-shake-out { 0%, 20% { transform: none; opacity: 1; } 30% { transform: translate(-8%, 4%) rotate(-4deg); } 40% { transform: translate(7%, -5%) rotate(3deg); } 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tp-shake-in { 0%, 49% { opacity: 0; } 50% { opacity: 1; transform: translate(6%, 5%) rotate(3deg); } 62% { transform: translate(-5%, -3%) rotate(-2deg); } 75%, 100% { opacity: 1; transform: none; } }
@keyframes tp-inhale-out { 0%, 20% { transform: none; opacity: 1; } 49% { transform: scale(0) rotate(40deg); opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tp-inhale-in { 0%, 50% { transform: scale(0); opacity: 1; } 70% { transform: scale(1.1); } 80%, 100% { transform: none; opacity: 1; } }
@keyframes tp-clock { 0%, 20% { opacity: 1; clip-path: polygon(50% 50%, 50% -50%, 50% -50%, 50% -50%, 50% -50%, 50% -50%); } 40% { clip-path: polygon(50% 50%, 50% -50%, 150% -50%, 150% 50%, 150% 50%, 150% 50%); } 60% { clip-path: polygon(50% 50%, 50% -50%, 150% -50%, 150% 150%, -50% 150%, -50% 150%); } 80%, 100% { opacity: 1; clip-path: polygon(50% 50%, 50% -50%, 150% -50%, 150% 150%, -50% 150%, -50% -50%); } }
@keyframes tp-shutter { 0%, 20% { opacity: 1; -webkit-mask: repeating-linear-gradient(180deg, oklch(0 0 0) 0 0%, transparent 0% 12.5%); mask: repeating-linear-gradient(180deg, oklch(0 0 0) 0 0px, transparent 0px 6px); } 80%, 100% { opacity: 1; mask: repeating-linear-gradient(180deg, oklch(0 0 0) 0 6px, transparent 6px 6px); } }
@keyframes tp-cube-out { 0%, 20% { transform: none; filter: none; } 80%, 100% { transform: scaleX(0); filter: brightness(0.5); } }
@keyframes tp-cube-in { 0%, 20% { transform: scaleX(0); opacity: 1; filter: brightness(0.5); } 80%, 100% { transform: none; opacity: 1; filter: none; } }
@keyframes tp-squeeze-out { 0%, 20% { transform: none; opacity: 1; } 49% { transform: scaleX(0.05); opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tp-squeeze-in { 0%, 50% { transform: scaleX(0.05); opacity: 1; } 80%, 100% { transform: none; opacity: 1; } }
/* At rest, a tile shows the transition mid-way (A and B both visible). */
.tr-prev i,
.tr-prev b {
  animation-delay: -0.75s;
}
/* Rolling digits (hover pill, theater clock) */
.rolling {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.rolling .slot {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.25;
}
.rolling .slot > span {
  display: inline-block;
}
.rolling .slot .in {
  animation: roll-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.rolling .slot .out {
  position: absolute;
  left: 0;
  top: 0;
  animation: roll-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
}
@keyframes roll-in {
  from {
    transform: translateY(70%);
    opacity: 0;
    filter: blur(1.5px);
  }
}
@keyframes roll-out {
  to {
    transform: translateY(-70%);
    opacity: 0;
    filter: blur(1.5px);
  }
}
/* Segmented control, Apple-style: a light raised thumb, no hard key edge. */
.segmented .seg-thumb {
  background: color-mix(in srgb, oklch(1 0 0) 13%, var(--surface-2));
  box-shadow:
    inset 0 0.5px 0 oklch(1 0 0 / 0.141),
    0 0 0 0.5px oklch(0 0 0 / 0.251),
    0 1px 3px oklch(0 0 0 / 0.349);
}
:root[data-theme="light"] .segmented .seg-thumb {
  background: oklch(1 0 0);
  box-shadow:
    0 0 0 0.5px oklch(0 0 0 / 0.059),
    0 1px 3px oklch(0 0 0 / 0.141);
}
.segmented button {
  color: var(--ink-3);
}
.segmented button.on {
  color: var(--ink);
}
.segmented button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.export-scope-note {
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  color: var(--ink-3);
}
/* Catalogue tiles drawn by the renderer */
.fx-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  overflow: hidden;
  background: oklch(0.159 0.011 267.979);
  transition: box-shadow 0.18s var(--ease), transform 0.2s var(--spring);
}
.fx-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.fx-tile:hover .fx-thumb {
  transform: scale(1.04);
}
.fx-tile.on .fx-thumb {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--accent);
}
/* "One shape" template tile: the demo's first frame. */
.frame.art.morph {
  background: oklch(0.926 0.007 80.72);
}
.frame.art.morph b {
  font-family: Geist, Inter, sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0;
  color: oklch(1 0 0);
  background: oklch(0.15 0.002 286.141);
  padding: 7px 12px;
  border-radius: 999px;
}
/* "What's new" tour tile: a dark mesh with a glowing scan band. */
.frame.art.tour {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 30%, oklch(0.5 0.27 266) 0, transparent 60%),
    radial-gradient(circle at 80% 75%, oklch(0.45 0.22 300) 0, transparent 55%),
    oklch(0.16 0.03 270);
}
.frame.art.tour::after {
  content: "";
  position: absolute;
  inset: 54% 0 auto;
  height: 2px;
  background: oklch(0.97 0.035 80);
  box-shadow: 0 0 10px 2px oklch(0.9 0.08 80 / 0.7);
}
.frame.art.tour b {
  font-family: Geist, Inter, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: oklch(1 0 0);
}
/* A destructive menu row asks in place: Cancel · Delete, side by side. */
.menu-confirm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 1px 0;
  animation: confirm-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05);
}
.menu-confirm button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  animation: confirm-btn 0.36s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
  transition:
    background 0.15s var(--ease),
    transform 0.15s var(--spring);
}
.menu-confirm button:active {
  transform: scale(0.97);
}
.menu-confirm-cancel {
  color: var(--ink);
  background: var(--field-bg);
}
.menu-confirm-cancel:hover,
.menu-confirm-cancel:focus-visible {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  outline: none;
}
.menu-confirm-go {
  color: oklch(1 0 0);
  background: var(--danger);
  animation-delay: 0.04s;
}
.menu-confirm-go:hover,
.menu-confirm-go:focus-visible {
  background: color-mix(in srgb, var(--danger) 86%, oklch(0 0 0));
  outline: none;
}
@keyframes confirm-in {
  from {
    clip-path: inset(0 0 0 100% round 7px);
  }
  to {
    clip-path: inset(0 0 0 0 round 7px);
  }
}
@keyframes confirm-btn {
  from {
    opacity: 0;
    transform: translateX(8px) scale(0.96);
    filter: blur(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-confirm,
  .menu-confirm button {
    animation: none;
  }
}
/* Section pills keep the chosen colour, nudged just enough to read on the timeline. */
.section-pill {
  color: var(--sc-d);
  background: color-mix(in srgb, var(--sc-d) 14%, transparent);
}
:root[data-theme="light"] .section-pill {
  color: var(--sc-l);
  background: color-mix(in srgb, var(--sc-l) 12%, transparent);
}
/* The preview label sits in the stage's corner, clear of Claude's status pill. */
.preview-corner {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    0 6px 16px -6px oklch(0 0 0 / 0.533);
  animation: fade-in 0.4s var(--ease);
}
.preview-corner::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.726 0.178 43.189);
  box-shadow: 0 0 8px oklch(0.726 0.178 43.189);
}
/* Toast: a raised key-like card, words rising in, a tone icon. */
.toast {
  gap: 10px;
  padding: 9px 8px 9px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--key-face) 100%, oklch(1 0 0) 4%), var(--key-face));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.078),
    0 3px 0 var(--key-edge),
    0 14px 30px -10px oklch(0 0 0 / 0.627),
    0 0 0 0.5px var(--line-2);
  animation: toast-drop 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.08);
}
:root[data-theme="light"] .toast {
  box-shadow:
    inset 0 1px 0 oklch(1 0 0),
    0 3px 0 var(--key-edge),
    0 14px 30px -12px oklch(0 0 0 / 0.251),
    0 0 0 0.5px var(--line-2);
}
.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: oklch(1 0 0);
  background: var(--good);
  box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.165);
  animation: toast-icon 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.3) 0.05s both;
}
.toast.tone-claude .toast-icon {
  background: oklch(0.726 0.178 43.189);
}
.toast.tone-alert .toast-icon {
  background: var(--danger);
}
.toast.tone-muted .toast-icon {
  background: var(--ink-3);
}
.toast-text > span {
  display: inline-block;
  white-space: pre;
  animation: toast-word 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i) * 22ms + 60ms);
}
.toast.closing {
  animation: toast-lift 0.2s var(--ease) forwards;
}
@keyframes toast-drop {
  from {
    opacity: 0;
    transform: translate(-50%, -14px) scale(0.94) rotateX(18deg);
  }
}
@keyframes toast-lift {
  to {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.97);
  }
}
@keyframes toast-icon {
  from {
    transform: scale(0.4) rotate(-20deg);
    opacity: 0;
  }
}
@keyframes toast-word {
  from {
    opacity: 0;
    transform: translateY(5px);
    filter: blur(3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast-icon,
  .toast-text > span {
    animation: none;
  }
}
/* While Claude works, the stage glows with no hard edge. */
.stage::after {
  box-shadow:
    inset 0 0 70px 8px oklch(0.625 0.206 255.486 / 0.302),
    inset 0 0 160px 36px oklch(0.625 0.206 255.486 / 0.11);
}
/* Components menu */
.menu.components-menu {
  width: 300px;
  max-height: min(420px, 60vh);
  overflow: auto;
}
.component-row {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 9px;
}
.component-row:hover {
  background: var(--field-bg);
}
.component-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  text-align: left;
  border-radius: 9px;
  color: var(--ink);
}
.component-pick span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.component-pick strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.component-pick small {
  font-size: 11.5px;
  color: var(--ink-3);
}
.component-remove {
  width: 26px;
  height: 26px;
  margin-right: 4px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.component-row:hover .component-remove,
.component-remove:focus-visible {
  opacity: 1;
}
.component-remove:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}
/* Claude's working mark: a 3×3 dot grid with a light running round its edge. */
.dot-spinner {
  display: inline-grid;
  grid-template-columns: repeat(3, 3px);
  grid-auto-rows: 3px;
  gap: 2px;
  padding: 1px;
  flex-shrink: 0;
}
.dot-spinner i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
  animation: dot-run 0.96s linear infinite;
  animation-delay: calc(var(--o) * 0.12s - 0.96s);
}
.dot-spinner i.core {
  animation: dot-core 1.92s ease-in-out infinite;
}
@keyframes dot-run {
  0% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.45;
    transform: scale(1);
  }
  100% {
    opacity: 0.18;
  }
}
@keyframes dot-core {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.7;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dot-spinner i {
    animation: none;
    opacity: 0.6;
  }
}
/* Empty project: start with clips. */
.stage-empty {
  position: absolute;
  z-index: 17;
  inset: 0;
  margin: auto;
  width: min(360px, calc(100% - 48px));
  height: fit-content;
  padding: 22px 22px 18px;
  border-radius: 20px;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    0 24px 60px -24px oklch(0 0 0 / 0.667);
  animation: pop-up 0.4s var(--spring);
}
.stage-empty strong {
  font-size: 16px;
}
.stage-empty p {
  margin: 8px 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}
.stage-empty > div {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.shader-error {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* ── Timeline precision (selection, short clips, sounds, timing) ───────────
   Appended block: selection count, tiny-clip handles, sound cue hit zones,
   the double-click timing popover and the Start · Duration · End fields. */
.selection-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-left: 4px;
  padding: 0 9px 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--accent);
  background: var(--accent-soft);
  animation: pop-in 0.28s var(--spring);
  transition: background 0.15s var(--ease);
}
.selection-count:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}
.marquee-count {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translateY(calc(100% + 6px));
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--on-accent);
  background: var(--accent-fill);
  box-shadow: 0 2px 8px -2px oklch(0 0 0 / 0.4);
}
/* Short clips: never thinner than 18 px; trim handles step outside the edges. */
.layer-clip.tiny,
.fx-clip.tiny {
  overflow: visible;
  padding: 0;
  justify-content: center;
}
.layer-clip.tiny .clip-caption,
.fx-clip.tiny .clip-caption {
  display: none;
}
.layer-clip.tiny:hover,
.fx-clip.tiny:hover,
.layer-clip.tiny.clip-selected,
.fx-clip.tiny.clip-selected {
  z-index: 6;
}
.layer-clip.tiny .trim-handle,
.fx-clip.tiny .trim-handle {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 24px;
  margin-top: -12px;
  border-radius: 5px;
  background: var(--c2, oklch(0.677 0.112 214.153));
  box-shadow:
    0 0 0 1.5px var(--surface),
    0 2px 6px -1px oklch(0 0 0 / 0.4);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition:
    opacity 0.15s var(--ease),
    transform 0.22s var(--spring);
}
.fx-clip.tiny .trim-handle {
  height: 20px;
  margin-top: -10px;
  background: oklch(0.677 0.112 214.153);
}
.layer-clip.tiny .trim-handle.start,
.fx-clip.tiny .trim-handle.start {
  left: -14px;
}
.layer-clip.tiny .trim-handle.end,
.fx-clip.tiny .trim-handle.end {
  right: -14px;
}
.layer-clip.tiny .trim-handle::after,
.fx-clip.tiny .trim-handle::after {
  display: none;
}
.layer-clip.tiny .trim-handle::before,
.fx-clip.tiny .trim-handle::before {
  left: 50%;
  margin-left: -1.5px;
  top: 5px;
  bottom: 5px;
}
.layer-clip.tiny:hover .trim-handle,
.fx-clip.tiny:hover .trim-handle,
.layer-clip.tiny.clip-selected .trim-handle,
.fx-clip.tiny.clip-selected .trim-handle {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.layer-clip.tiny.edge-start .trim-handle.start,
.layer-clip.tiny.edge-end .trim-handle.end {
  background: var(--edit-point);
}
/* Sound cues: an 18 px hit zone around each thin mark; selected, the mark
   gets a ring and a label with the sound and its time. */
.sfx-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  margin-left: -9px;
  border-radius: 7px;
  cursor: pointer;
  touch-action: none;
  z-index: 2;
  transition: background 0.15s var(--ease);
}
.sfx-hit.movable {
  cursor: grab;
}
.sfx-hit:hover {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.sfx-hit > .sfx-mark {
  left: 50%;
  transform: translateX(-50%);
  transition:
    transform 0.22s var(--spring),
    box-shadow 0.2s var(--ease);
}
.sfx-hit:hover > .sfx-mark {
  transform: translateX(-50%) scale(1.35, 1.15);
}
.sfx-hit.on {
  z-index: 4;
}
.sfx-hit.on > .sfx-mark {
  transform: translateX(-50%) scale(1.5, 1.2);
  box-shadow:
    0 0 0 1.5px var(--surface),
    0 0 0 3px var(--accent),
    0 0 12px 1px color-mix(in srgb, var(--accent) 70%, transparent);
}
.sfx-tag {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  color: var(--on-accent);
  background: var(--accent-fill);
  box-shadow: 0 2px 8px -2px oklch(0 0 0 / 0.467);
  animation: sfx-tag-in 0.24s var(--spring);
}
@keyframes sfx-tag-in {
  from {
    opacity: 0;
    transform: translate(-4px, -50%) scale(0.96);
  }
}
.sfx-tag small {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.8;
}
/* Double-click timing popover */
.timing-popover {
  position: fixed;
  z-index: 220;
  width: 300px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  background: var(--menu);
  box-shadow:
    0 0 0 0.5px var(--line-2),
    var(--pop-shadow);
  animation: pop-up 0.24s var(--spring);
}
.timing-popover header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 2px;
}
.timing-popover header strong {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Start · Duration · End */
.time-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
}
.time-input {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label frames"
    "field field";
  gap: 4px 6px;
  min-width: 0;
}
.time-label {
  grid-area: label;
  font-size: 12px;
  color: var(--ink-2);
}
.time-frames {
  grid-area: frames;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  align-self: center;
}
.time-input .num {
  grid-area: field;
  height: 34px;
  padding: 0 9px;
  gap: 4px;
}
.time-input .num small {
  color: var(--ink-3);
  font-size: 11.5px;
}
.time-input.bad .num {
  box-shadow: 0 0 0 2px var(--danger);
}
.time-input input:disabled {
  color: var(--ink-3);
}
.time-hint {
  grid-column: 1 / -1;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-3);
}

/* ── src/app/auth.css ── */
/* Sign in, sign up and account. Built on the app's tokens (globals.css):
   the form sits in the page itself, in the app's type, next to a stage that
   plays a Mootionblue video. Rules on Clerk's elements are scoped under
   .auth-page .mb-clerk so they outrank Clerk's own single-class styles. */

.auth-page {
  position: relative;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-top .brand {
  color: var(--ink);
  text-decoration: none;
}
.auth-top .key {
  text-decoration: none;
}

/* Split: form | stage */
.auth-page.split {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}
.auth-side {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding: 24px clamp(24px, 4vw, 56px);
}
.auth-form {
  align-self: center;
  width: min(380px, 100%);
  padding: 32px 0;
  animation: auth-in 0.6s var(--spring) both;
}
.auth-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
.auth-art {
  padding: 12px 12px 12px 0;
  min-height: 100dvh;
  position: sticky;
  top: 0;
}
@media (max-width: 960px) {
  .auth-page.split {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-art {
    display: none;
  }
  .auth-form {
    margin: 0 auto;
  }
}

/* The stage */
.auth-show {
  position: relative;
  height: calc(100dvh - 24px);
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 28px;
  overflow: hidden;
  background-color: var(--board);
  background-image:
    radial-gradient(60% 55% at 50% 42%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 72%),
    radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size:
    100% 100%,
    22px 22px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.auth-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(32px, 8vh, 88px) 40px 24px;
  /* The video at its own proportions, sized to the space it has. */
  container-type: size;
}
.auth-canvas {
  display: block;
  flex: none;
  --ar: 1;
  width: min(100cqw, calc(78cqh * var(--ar)), 620px);
  height: auto;
  aspect-ratio: var(--ar);
  border-radius: 22px;
  background: oklch(0.917 0.007 78.239);
  box-shadow:
    0 1px 2px oklch(0 0 0 / 0.3),
    0 40px 80px -30px oklch(0 0 0 / 0.75),
    0 0 0 1px oklch(1 0 0 / 0.06);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--spring);
}
.auth-show.ready .auth-canvas {
  opacity: 1;
  transform: none;
}
.auth-show figcaption {
  display: grid;
  gap: 14px;
  padding: 0 32px 28px;
  justify-items: center;
}
.auth-track {
  position: relative;
  width: min(360px, 70%);
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--line-2);
}
.auth-track span {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
  background: var(--accent);
}
.auth-caption {
  display: grid;
  gap: 2px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
.auth-caption strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Account page */
.auth-page.wide {
  display: grid;
  grid-template-rows: auto 1fr;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.auth-page.wide .auth-top {
  padding: 18px 24px;
}
.auth-page.wide .auth-body {
  display: grid;
  place-items: start center;
  padding: 24px 16px 48px;
  animation: auth-in 0.5s var(--spring) both;
}

@keyframes auth-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-form,
  .auth-page.wide .auth-body,
  .auth-canvas {
    animation: none;
    transition: none;
  }
}

/* Clerk, in the form column: no card, the page is the card. */
.auth-page.split .mb-clerk {
  width: 100%;
}
.auth-page.split .mb-clerk .mb-clerk-card {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.auth-page.split .mb-clerk .mb-clerk-inner {
  padding: 0;
  gap: 28px;
  background: transparent;
  box-shadow: none;
  border: 0;
}
.auth-page .mb-clerk .mb-clerk-header {
  align-items: flex-start;
  text-align: left;
  gap: 6px;
}
.auth-page .mb-clerk .mb-clerk-title {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-align: left;
}
.auth-page .mb-clerk .mb-clerk-subtitle {
  font-size: 14.5px;
  color: var(--ink-2);
  text-align: left;
}
.auth-page .mb-clerk .mb-clerk-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.auth-page .mb-clerk .mb-clerk-input {
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 12px;
  font-size: 14.5px;
  background: var(--field-bg);
  border: 1px solid transparent;
  box-shadow: none;
  transition:
    box-shadow 0.15s var(--ease),
    border-color 0.15s var(--ease);
}
.auth-page .mb-clerk .mb-clerk-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.auth-page .mb-clerk .mb-clerk-primary {
  min-height: 46px;
  border-radius: 13px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: var(--on-accent);
  background: var(--accent-fill);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.22) inset,
    0 3px 0 color-mix(in oklch, var(--accent) 55%, oklch(0 0 0)),
    0 10px 22px -10px color-mix(in oklch, var(--accent) 75%, transparent);
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s var(--ease),
    filter 0.15s var(--ease);
}
.auth-page .mb-clerk .mb-clerk-primary:hover {
  filter: brightness(1.07);
}
.auth-page .mb-clerk .mb-clerk-primary:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.22) inset,
    0 1px 0 color-mix(in oklch, var(--accent) 55%, oklch(0 0 0));
}
.auth-page .mb-clerk .mb-clerk-otp {
  border-radius: 12px;
  background: var(--field-bg);
}
.auth-page.split .mb-clerk .mb-clerk-otp-field {
  align-items: flex-start;
}
.auth-page.split .mb-clerk .mb-clerk-otp-row {
  justify-content: flex-start;
}
.auth-page.split .mb-clerk .mb-clerk-alert {
  text-align: left;
  justify-content: flex-start;
  border-radius: 12px;
}
.auth-page.split .mb-clerk .mb-clerk-footer {
  background: transparent;
  margin-top: 4px;
  padding: 0;
  justify-content: flex-start;
  align-items: flex-start;
}
.auth-page.split .mb-clerk .mb-clerk-footer > *,
.auth-page.split .mb-clerk .mb-clerk-footer-action {
  justify-content: flex-start;
  text-align: left;
  padding-inline: 0;
  margin-inline: 0;
}
.auth-page .mb-clerk .mb-clerk-link {
  color: var(--accent);
  font-weight: 600;
}
.auth-page .mb-clerk .mb-clerk-hide {
  display: none;
}

/* Clerk on the account page: a panel */
.auth-page.wide .mb-clerk-card {
  width: min(960px, calc(100vw - 32px));
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--pop-shadow);
  overflow: hidden;
}
.auth-page.wide .mb-clerk-card > * {
  box-shadow: none;
}

/* Account menu (Home and editor) */
.account-menu {
  position: relative;
}
.account-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 320;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: var(--menu);
  border: 1px solid var(--line-2);
  box-shadow: var(--pop-shadow);
  animation: auth-in 0.22s var(--spring) both;
}
.account-pop header {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.account-pop header strong {
  font-size: 13.5px;
}
.account-pop header small {
  color: var(--ink-3);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-pop a,
.account-pop button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  background: none;
  text-align: left;
}
.account-pop a:hover,
.account-pop button:hover {
  background: var(--field-bg);
}
.avatar.has-image {
  padding: 0;
  overflow: hidden;
}
.avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── src/components/commands.css ── */
/* Command palette and keyboard shortcuts (CommandPalette.tsx, ShortcutsSheet.tsx). */
:root {
  --sheet-ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* Above every editor layer: menus (300), theater, curve panel, toasts. */
  --command-layer: 1000;
}

/* ── Key caps ───────────────────────────────────────── */
.keys {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.keycap {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--key-face);
  box-shadow:
    inset 0 0 0 0.5px var(--line-2),
    inset 0 -1px 0 var(--key-edge);
  color: var(--ink-2);
  font: 500 11.5px/1 Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
}
.keycap.wide {
  font-size: 10.5px;
  letter-spacing: 0.01em;
  padding: 0 6px;
}
.keys.inline {
  vertical-align: -4px;
  margin: 0 1px;
}

/* ── Palette ────────────────────────────────────────── */
.cmdk-shade {
  position: fixed;
  inset: 0;
  z-index: var(--command-layer);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: max(14vh, 56px) 16px 16px;
  background: oklch(0 0 0 / 0.302);
  animation: fade-in 0.18s var(--ease);
}
.cmdk {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--menu);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-edge),
    0 0 0 0.5px var(--line-2),
    var(--pop-shadow);
  transform-origin: 50% 0;
  animation: cmdk-in 0.34s var(--sheet-ease);
}
@keyframes cmdk-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}
@keyframes cmdk-out {
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
.cmdk-shade.closing {
  animation: fade-out 0.16s var(--ease) forwards;
  pointer-events: none;
}
.cmdk-shade.closing .cmdk {
  animation: cmdk-out 0.16s var(--ease) forwards;
}
.cmdk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 18px;
  height: 56px;
  color: var(--ink-3);
  border-bottom: 0.5px solid var(--line-2);
}
.cmdk-head input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.01em;
}
.cmdk-list {
  height: min(var(--cmdk-list-height, 0px), 52vh);
  max-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding: 8px 0;
  transition: height 0.22s var(--sheet-ease);
}
.cmdk-list [cmdk-list-sizer] {
  padding: 6px;
}
.cmdk-group [cmdk-group-heading] {
  padding: 10px 12px 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 10px 0 10px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  cursor: default;
  user-select: none;
  transition: background-color 0.1s;
}
.cmdk-item[data-selected="true"] {
  background: var(--field-bg);
}
.cmdk-item:active {
  background: var(--accent-soft);
}
.cmdk-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink-2);
  background: var(--field-bg);
}
.cmdk-item[data-selected="true"] .cmdk-icon {
  color: var(--ink);
}
.cmdk-item.ask .cmdk-icon {
  color: oklch(1 0 0);
  background: linear-gradient(180deg in srgb, var(--brand-2), var(--brand));
}
.cmdk-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-title q {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  quotes: "“" "”";
}
.cmdk-title small {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
}
.cmdk-empty {
  margin: 0;
  padding: 14px 12px 16px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.cmdk-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  padding: 0 14px;
  border-top: 0.5px solid var(--line-2);
  color: var(--ink-3);
  font-size: 11.5px;
}
.cmdk-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cmdk-foot .keycap {
  min-width: 18px;
  height: 18px;
  font-size: 10.5px;
}
.cmdk-foot-end {
  margin-left: auto;
}
@media (max-width: 560px) {
  .cmdk-foot {
    display: none;
  }
}

/* ── Shortcuts sheet (inside the shared .modal) ─────── */
.shortcuts-layer {
  position: relative;
  z-index: var(--command-layer);
}
.modal:has(> .shortcuts) {
  width: min(680px, 100%);
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: 0;
}
.shortcuts {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}
.shortcuts-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shortcuts-search {
  flex: 1;
  width: auto;
  margin: 0;
  height: 36px;
}
.shortcuts-hint {
  margin: 0 2px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}
.shortcuts-hint .icon {
  display: inline-block;
  vertical-align: -2px;
}
.shortcuts-list {
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0 -20px;
  padding: 0 20px 18px;
  min-height: 0;
}
.shortcuts-group h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 4px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
}
.shortcut-row {
  border-radius: 10px;
  transition: background-color 0.12s;
}
.shortcut-row:hover,
.shortcut-row:focus-within,
.shortcut-row.recording {
  background: var(--field-bg);
}
.shortcut-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 6px 4px 10px;
  color: var(--ink-2);
}
.shortcut-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
}
.shortcut-title small {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
}
.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.shortcut-chip {
  position: relative;
  display: inline-flex;
}
.chip-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 8px;
  transition: background-color 0.12s;
}
.chip-face:hover {
  background: var(--surface);
  box-shadow: inset 0 0 0 0.5px var(--line-2);
}
.clash-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 1.5px var(--surface);
}
.chip-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-3);
  color: var(--surface);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.14s var(--ease),
    transform 0.2s var(--spring);
}
.shortcut-chip:hover .chip-remove,
.chip-remove:focus-visible,
.chip-face:focus-visible + .chip-remove {
  opacity: 1;
  transform: none;
}
.chip-remove:hover {
  background: var(--danger);
  color: oklch(1 0 0);
}
.shortcut-add {
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  transition:
    color 0.12s,
    background-color 0.12s,
    opacity 0.12s;
}
.shortcut-add.icon {
  width: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  opacity: 0;
}
.shortcut-row:hover .shortcut-add.icon,
.shortcut-add.icon:focus-visible {
  opacity: 1;
}
.shortcut-add:hover {
  color: var(--ink);
  background: var(--surface);
}
.shortcut-reset {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  visibility: hidden;
}
.shortcut-reset.on {
  visibility: visible;
  color: var(--accent);
}
.shortcut-reset:hover {
  background: var(--surface);
}
.shortcut-recorder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 6px 0 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 0 0 2px var(--accent);
  animation: recorder-in 0.24s var(--sheet-ease);
}
.shortcut-recorder:focus-visible {
  outline: none;
}
.shortcut-recorder > span:not(.keys) {
  animation: recorder-pulse 1.4s ease-in-out infinite;
}
.shortcut-recorder small {
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--field-bg);
}
@keyframes recorder-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}
@keyframes recorder-pulse {
  50% {
    opacity: 0.45;
  }
}
.shortcuts .shortcut-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 6px 0 10px;
  padding: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
  animation: note-in 0.24s var(--sheet-ease);
}
.shortcut-note > .icon {
  width: 15px;
  margin-top: 2px;
}
div.shortcut-note > span {
  padding-left: 25px;
}
.shortcut-note.danger > .icon {
  color: var(--danger);
}
.shortcut-note.warn > .icon {
  color: var(--warn);
}
.shortcut-note.ok > .icon {
  color: var(--good);
}
div.shortcut-note {
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
@keyframes note-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
}
.note-actions {
  display: flex;
  gap: 6px;
}
.note-button {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--key-face);
  box-shadow: inset 0 0 0 0.5px var(--line-2);
}
.note-button:hover {
  background: var(--key-face-hover);
}
.note-button.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  box-shadow: none;
}
.note-button.primary:hover {
  background: var(--accent-2);
}
.shortcuts-empty {
  color: var(--ink-3);
  padding: 20px 4px;
  margin: 0;
}
.shortcuts-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── src/components/element-export.css ── */
/* Export one element (ElementExport.tsx). Sits inside the shared .modal. */
.ee {
  display: grid;
  gap: 14px;
}
.ee-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ee-badge {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink-2);
}
.ee-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ee-head strong {
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ee-head small {
  font-size: 12px;
  color: var(--ink-3);
}
.ee-formats .export-format:disabled {
  opacity: 0.5;
  cursor: default;
}
.ee-options {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.ee-options .check {
  font-size: 13px;
  color: var(--ink);
}
.ee-progress {
  height: 6px;
  border-radius: 6px;
  background: var(--field-bg);
  overflow: hidden;
}
.ee-progress span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 0.2s linear;
}
.ee-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ee-actions .key {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .ee-formats {
    grid-template-columns: 1fr !important;
  }
  .ee-actions .key {
    flex: 1;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ee-progress span {
    transition: none;
  }
}

/* ── src/components/fx-grid.css ── */
/* Transition and effect pickers: search, favourites, tiles with a star. */
.fx-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink-3);
  backdrop-filter: blur(10px);
}
.fx-search svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}
.fx-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.fx-search:focus-within {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}
.fx-tile-wrap {
  position: relative;
  display: flex;
}
.fx-tile-wrap > .fx-tile {
  flex: 1;
  min-width: 0;
}
.fx-star {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, oklch(0 0 0) 45%, transparent);
  backdrop-filter: blur(6px);
  color: oklch(1 0 0);
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.15s var(--ease),
    transform 0.2s var(--spring);
}
.fx-star svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.fx-tile-wrap:hover .fx-star,
.fx-star:focus-visible,
.fx-star.on {
  opacity: 1;
  transform: scale(1);
}
.fx-star.on {
  color: oklch(0.887 0.181 94.784);
}
.fx-star.on svg {
  fill: currentColor;
}
.fx-star:hover {
  transform: scale(1.12);
}
.fx-empty {
  margin: 14px 6px;
  font-size: 13px;
  color: var(--ink-3);
}

/* ── src/components/home.css ── */
/* Home: start tiles, library toolbar, folders, list view, selection. */

/* Grid children may shrink, so the start row scrolls instead of widening the page. */
.home .home-body {
  grid-template-columns: minmax(0, 1fr);
}

/* ── Start tiles: one height, art box fixed, text on shared baselines ── */
.home .start-tile {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.home .start-art {
  height: 96px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.home .start-tile .frame {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  justify-self: auto;
}
.home .start-tile strong,
.home .start-tile small {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home .start-tile strong {
  line-height: 18px;
}
.home .start-tile small {
  line-height: 16px;
  margin-top: 2px;
}

/* ── Top bar: clear until content scrolls under it, then frosted glass ── */
.home .home-top {
  background: color-mix(in srgb, var(--bg) 0%, transparent);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(0px) saturate(1);
  backdrop-filter: blur(0px) saturate(1);
  transition:
    background-color 0.28s var(--ease),
    border-color 0.28s var(--ease),
    backdrop-filter 0.28s var(--ease),
    -webkit-backdrop-filter 0.28s var(--ease);
}
.home .home-top.stuck {
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-bottom-color: var(--line-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
}
:root[data-theme="light"] .home .home-top.stuck {
  background: color-mix(in srgb, var(--surface) 66%, transparent);
}

/* ── Project search: lives with the filters, sort and view ── */
.lib-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 260px;
  min-width: 150px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink-3);
  transition: box-shadow 0.15s var(--ease);
}
.lib-search:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
.lib-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--ink);
}

/* ── Search clear ── */
.home .search-clear {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-4);
  color: var(--bg);
  transition: background 0.15s var(--ease);
}
.home .search-clear:hover {
  background: var(--ink-3);
}

/* ── Library header ── */
.library {
  min-width: 0;
}
.lib-head {
  scroll-margin-top: 84px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 34px;
}
.home .lib-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.crumbs {
  white-space: nowrap;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 8px 0 4px;
  margin-left: -4px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.3s var(--spring),
    box-shadow 0.2s var(--ease);
}
.crumb:hover {
  color: var(--ink);
  background: var(--field-bg);
}
.crumb.target {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  transform: scale(1.04);
}
.crumb-sep {
  color: var(--ink-4);
  font-weight: 400;
}
.crumb-here {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: crumb-in 0.36s var(--spring) both;
}
.crumb-edit .field {
  font-size: 17px;
  font-weight: 600;
  padding: 4px 10px;
  width: min(320px, 40vw);
}
@keyframes crumb-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
.lib-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.lib-actions .icon-button {
  width: 32px;
  height: 32px;
}
.home .key.on-select {
  color: var(--accent);
}

/* ── Filter chips · sort · view ── */
.lib-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  min-width: 0;
}
.lib-chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}
.lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink-2);
  font-weight: 500;
  background: var(--field-bg);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.3s var(--spring);
}
.lib-chip:hover {
  color: var(--ink);
}
.lib-chip:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}
.lib-chip.on {
  background: var(--ink);
  color: var(--bg);
}
.pop-anchor {
  position: relative;
  display: inline-flex;
}
.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.tool-button:hover,
.tool-button[aria-expanded="true"] {
  background: var(--field-bg);
  color: var(--ink);
}
.tool-button .icon:last-child {
  color: var(--ink-3);
}
.view-toggle {
  width: 76px;
  flex: 0 0 76px;
}
.view-toggle .segmented button {
  height: 26px;
}
.lib-menu {
  min-width: 200px;
}
.lib-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px 4px;
}

/* ── Groups ── */
.lib-groups {
  display: grid;
  gap: 26px;
  animation: lib-in 0.4s var(--ease) both;
}
@keyframes lib-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.lib-groups.list {
  gap: 18px;
}
.lib-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.lib-groups.list .lib-group h3 {
  margin-bottom: 6px;
  padding-left: 10px;
}

/* ── Grid tiles: pin, checkbox, selection, drag ── */
.tile-foot strong {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.tile-foot strong > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-mark {
  display: inline-flex;
  color: var(--accent);
  flex: 0 0 auto;
}
.project-tile .pick {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
}
.pick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
  background: oklch(0 0 0 / 0.251);
  box-shadow:
    inset 0 0 0 1.5px oklch(1 0 0 / 0.902),
    0 1px 4px oklch(0 0 0 / 0.302);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    opacity 0.2s var(--ease),
    transform 0.32s var(--spring),
    background 0.18s var(--ease),
    color 0.18s var(--ease);
}
.pick:hover {
  background: oklch(0 0 0 / 0.4);
}
.pick.on {
  background: var(--accent-fill);
  color: oklch(1 0 0);
  box-shadow:
    inset 0 0 0 1.5px oklch(1 0 0),
    0 1px 4px oklch(0 0 0 / 0.302);
}
.project-tile:hover .pick,
.project-tile:focus-within .pick,
.home.selecting .project-tile .pick,
.project-tile .pick.on {
  opacity: 1;
  transform: none;
}
.project-tile.selected .thumb {
  transform: scale(0.96);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4.5px var(--accent);
}
.project-tile.selected:hover .thumb {
  transform: scale(0.97);
}
.project-tile.lifted,
.project-row.lifted {
  opacity: 0.45;
  transition: opacity 0.2s var(--ease);
}
.home.selecting .scrub-area {
  cursor: default;
}

/* Folder cards: a real folder (tab, back, front) with tiny previews on the front. */
.folder-tile .thumb {
  overflow: visible;
  box-shadow: none;
  background: none;
}
.folder-tile:hover .thumb,
.folder-tile:focus-visible .thumb {
  transform: none;
  box-shadow: none;
}
.folder-tile:focus-visible .thumb {
  border-radius: 16px;
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--accent);
}
.folder-art {
  --folder-back: var(--surface-2);
  --folder-front: var(--surface-3);
  position: absolute;
  inset: 30px 14px 10px;
  perspective: 700px;
  /* About 18% smaller than the card; everything inside scales with it. */
  scale: 0.82;
  transform-origin: 50% 62%;
}
:root[data-theme="light"] .folder-art {
  --folder-back: oklch(0.897 0.009 286.207);
  --folder-front: oklch(1 0 0);
}
.folder-back {
  position: absolute;
  inset: 14px 0 0;
  border-radius: 6px 16px 16px 16px;
  background: var(--folder-back);
  box-shadow: inset 0 0 0 1px var(--line);
}
/* The tab: a rounded lip with a soft sloped shoulder. */
.folder-back::before {
  content: "";
  position: absolute;
  left: 0;
  top: -14px;
  width: 40%;
  height: 22px;
  border-radius: 10px 6px 0 0;
  background: var(--folder-back);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 var(--line);
}
.folder-front {
  position: absolute;
  inset: 30px 0 0;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--folder-front) 92%, oklch(1 0 0)) 0%, var(--folder-front) 60%);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.11),
    inset 0 0 0 1px var(--line),
    0 -1px 0 oklch(0 0 0 / 0.051),
    0 14px 26px -16px oklch(0 0 0 / 0.651);
  transform-origin: 50% 100%;
  transition:
    transform 0.42s var(--spring),
    background 0.2s var(--ease),
    box-shadow 0.3s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.folder-tile:hover .folder-front,
.folder-tile:focus-visible .folder-front {
  transform: rotateX(-9deg);
}
.folder-tile:active .folder-front {
  transform: rotateX(-4deg) scale(0.98);
  transition-duration: 0.12s;
}
.folder-minis {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.folder-minis i {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--field-bg);
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 2px 6px -2px oklch(0 0 0 / 0.302);
  transition: transform 0.4s var(--spring);
  transition-delay: calc(var(--j, 0) * 30ms);
}
.folder-minis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fade-in 0.4s var(--ease);
}
.folder-minis i.more {
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.folder-tile:hover .folder-minis i {
  transform: translateY(-2px);
}
.drop-hint {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: oklch(1 0 0);
  background: var(--accent-fill);
  box-shadow: 0 6px 16px -6px var(--accent);
  opacity: 0;
  scale: 0.85;
  pointer-events: none;
  transition:
    opacity 0.18s var(--ease),
    scale 0.36s var(--spring);
}
.folder-tile.target .folder-front {
  transform: rotateX(-18deg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, var(--folder-front)), color-mix(in srgb, var(--accent) 12%, var(--folder-front)));
  box-shadow:
    inset 0 0 0 1.5px var(--accent),
    0 18px 30px -16px oklch(0 0 0 / 0.702);
}
.folder-tile.target .folder-back {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.folder-tile.target .drop-hint {
  opacity: 1;
  scale: 1;
}
.home.dragging .folder-tile:not(.target) .folder-front {
  box-shadow:
    inset 0 0 0 1.5px var(--accent-soft),
    0 14px 26px -16px oklch(0 0 0 / 0.651);
}
.crumb-here {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.crumb-here .icon {
  color: var(--ink-3);
}

/* ── List view ── */
.project-list {
  display: grid;
}
.list-head,
.project-row {
  display: grid;
  grid-template-columns: 22px 64px minmax(0, 1fr) 96px 76px minmax(0, 150px) 112px 28px 28px;
  align-items: center;
  column-gap: 14px;
  padding: 0 10px;
}
.list-head .row-folder {
  color: inherit;
}
.list-head {
  height: 30px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.project-row {
  min-height: 56px;
  padding-block: 6px;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  position: relative;
  animation: panel-in 0.36s var(--spring) both;
  animation-delay: calc(var(--i) * 16ms);
  transition:
    background 0.18s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.3s var(--spring);
}
.project-row + .project-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 110px;
  right: 10px;
  border-top: 1px solid var(--line);
}
.project-row:hover,
.project-row:focus-visible {
  background: var(--field-bg);
}
.project-row:hover::before,
.project-row:hover + .project-row::before,
.project-row.selected::before,
.project-row.selected + .project-row::before {
  opacity: 0;
}
.project-row:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.project-row.current .row-name strong::after {
  content: "Open";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  vertical-align: 1px;
}
.project-row.selected {
  background: var(--accent-soft);
}
.project-row .pick {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink-4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
}
.project-row:hover .pick,
.project-row:focus-within .pick,
.home.selecting .project-row .pick,
.project-row .pick.on {
  opacity: 1;
}
.project-row .pick.on {
  background: var(--accent);
  box-shadow: none;
}
.row-thumb {
  width: 64px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--line);
}
.row-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  animation: fade-in 0.4s var(--ease);
}
.row-thumb .shimmer-block {
  width: 60%;
  height: 60%;
}
.folder-glyph {
  color: var(--ink-3);
  background: var(--field-bg);
  box-shadow: none;
}
.folder-row.target .folder-glyph {
  color: var(--accent);
}
.row-name {
  min-width: 0;
}
.row-name strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-name .field {
  padding: 6px 9px;
}
.row-format,
.row-num,
.row-folder,
.row-date {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.row-num {
  font-variant-numeric: tabular-nums;
}
.row-name small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}
.row-num.none,
.row-folder.none {
  color: var(--ink-4);
}
.pin-toggle {
  opacity: 0;
}
.project-row:hover .pin-toggle,
.project-row:focus-within .pin-toggle,
.pin-toggle.on,
.pin-toggle:focus-visible {
  opacity: 1;
}
.pin-toggle.on {
  color: var(--accent);
}
.pin-toggle.on:not(:hover) {
  background: none;
}
.folder-row.target {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  transform: scale(1.01);
}

/* ── Empty states ── */
.lib-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 56px 16px;
  text-align: center;
  color: var(--ink-2);
  border-radius: 18px;
  border: 1.5px dashed var(--line-2);
  animation: panel-in 0.4s var(--spring) both;
}
.lib-empty p {
  margin: 0;
  max-width: 380px;
  line-height: 1.5;
  text-wrap: balance;
}
.lib-empty-art {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: var(--field-bg);
}

/* ── Bulk bar ── */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--menu) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    var(--pop-shadow);
  translate: -50% 0;
  animation: bulk-in 0.44s var(--spring) both;
}
.bulk-bar.closing {
  animation: bulk-out 0.2s var(--ease) both;
}
@keyframes bulk-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
}
@keyframes bulk-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}
.bulk-count {
  padding: 0 10px 0 4px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 92px;
}
.bulk-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line-2);
}
.bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    transform 0.25s var(--spring);
}
.bulk-btn:hover:not(:disabled),
.bulk-btn[aria-expanded="true"] {
  background: var(--field-bg);
}
.bulk-btn:active:not(:disabled) {
  transform: scale(0.96);
  transition-duration: 0.1s;
}
.bulk-btn.danger {
  color: var(--danger);
}
.bulk-btn.danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}
.bulk-confirm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  animation: confirm-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05);
}
.bulk-confirm > span {
  margin-right: 8px;
  color: var(--ink-2);
  white-space: nowrap;
}
.bulk-confirm > span strong {
  color: var(--ink);
  font-weight: 600;
}
.bulk-confirm button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.15s var(--ease),
    transform 0.15s var(--spring);
}
.bulk-confirm button:active {
  transform: scale(0.97);
}

/* Multi-drag image: lives off-screen until a drag paints it. */
.drag-badge {
  position: fixed;
  top: -200px;
  left: 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--accent-fill);
  color: oklch(1 0 0);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Narrow windows ── */
/* Filters take their own row; search, sort and view share the next. */
@media (max-width: 1100px) {
  .lib-tools {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .lib-chips {
    flex: 1 0 100%;
  }
  .lib-tools > .spacer {
    display: none;
  }
  .lib-search {
    flex: 1 1 auto;
    max-width: 420px;
    margin-right: auto;
  }
}
@media (max-width: 1100px) {
  .list-head,
  .project-row {
    grid-template-columns: 22px 56px minmax(0, 1fr) 84px 64px minmax(0, 120px) 96px 28px 28px;
    column-gap: 10px;
  }
}
@media (max-width: 720px) {
  .lib-tools {
    flex-wrap: wrap;
  }
  .lib-chips {
    order: 3;
    flex: 1 0 100%;
  }
  .lib-tools > .spacer {
    display: none;
  }
  .lib-search {
    flex: 1 1 auto;
  }
  .lib-tools .pop-anchor {
    margin-left: auto;
  }
}
@media (max-width: 760px) {
  .list-head,
  .project-row {
    grid-template-columns: 22px 56px minmax(0, 1fr) 72px 96px 28px 28px;
  }
  .list-head > :nth-child(5),
  .list-head > .row-folder,
  .project-row > .row-num,
  .project-row > .row-folder {
    display: none;
  }
  .bulk-count {
    min-width: 0;
  }
  .bulk-btn {
    padding: 0 9px;
  }
  .bulk-confirm > span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lib-groups,
  .project-row,
  .crumb-here,
  .lib-empty,
  .bulk-bar,
  .bulk-bar.closing,
  .bulk-confirm {
    animation: none;
  }
  .project-tile.selected .thumb,
  .folder-front,
  .folder-minis i,
  .folder-row.target,
  .crumb.target,
  .pick {
    transform: none;
    transition: none;
  }
}

/* ── src/components/inspector/sound-panel.css ── */
/* Sound inspector: heading, timing row, the sound library. */
.sound-heading .badge.type-sound {
  background: color-mix(in srgb, oklch(0.782 0.171 67.223) 18%, transparent);
  color: oklch(0.782 0.171 67.223);
}
.sound-title {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}
.sound-title strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sound-title small {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sound-at {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.sound-at small {
  color: var(--ink-3);
  font-size: 11.5px;
}
.link-button {
  align-self: flex-start;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: none;
}
.link-button:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sound-search {
  position: static;
  margin: 0;
}
.sound-group h4 {
  margin: 6px 2px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.sound-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.sound-tile {
  position: relative;
  display: flex;
}
.sound-pick {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 9px 9px 8px;
  border-radius: 11px;
  background: var(--field-bg);
  color: var(--ink-2);
  text-align: left;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.25s var(--spring);
}
.sound-pick:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--field-bg) 100%, var(--ink) 5%);
}
.sound-pick:active {
  transform: scale(0.97);
}
.sound-pick span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sound-pick small {
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.sound-tile.on .sound-pick {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.sound-env {
  width: 44px;
  height: 15px;
  fill: currentColor;
  opacity: 0.75;
}
.sound-tile.on .sound-env {
  color: var(--accent);
  opacity: 1;
}
.sound-play {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px oklch(0 0 0 / 0.133);
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.15s var(--ease),
    transform 0.2s var(--spring);
}
.sound-tile:hover .sound-play,
.sound-play:focus-visible {
  opacity: 1;
  transform: none;
}
/* Timeline: how long each sound plays, behind its mark. */
.sfx-len {
  position: absolute;
  top: 12px;
  height: 24px;
  border-radius: 6px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  pointer-events: none;
}
.sfx-hit.on > .sfx-len {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent);
}
