:root {
  --background: oklch(10% 0.005 270);
  --foreground: oklch(94% 0.003 270);
  --foreground-secondary: oklch(68% 0.012 270);
  --foreground-tertiary: oklch(48% 0.01 270);

  --surface: oklch(20% 0.0005 270);
  --surface-hover: oklch(26% 0.0014 270);
  --surface-raised: oklch(32% 0.016 270);

  --secondary: oklch(20% 0.003 270);
  --tertiary: oklch(24% 0.008 270);

  --border: oklch(100% 0 0 / 0.06);
  --border-strong: oklch(100% 0 0 / 0.12);

  --accent: oklch(0.63 0.14 305);
  --accent-muted: oklch(22% 0.04 305);
  --accent-text: oklch(0.75 0.1 305);

  --record: oklch(0.58 0.17 25);
  --record-glow: oklch(0.57 0.17 25 / 0.25);

  --border-radius: 1rem;
  --border-radius-sm: 0.5rem;
}

:root[data-theme="light"] {
  --background: oklch(96% 0.005 270);
  --foreground: oklch(18% 0.015 270);
  --foreground-secondary: oklch(45% 0.012 270);
  --foreground-tertiary: oklch(60% 0.008 270);

  --surface: oklch(100% 0 0);
  --surface-hover: oklch(94% 0.008 270);
  --surface-raised: oklch(90% 0.01 270);

  --secondary: oklch(92% 0.008 270);
  --tertiary: oklch(86% 0.008 270);

  --border: oklch(0% 0 0 / 0.06);
  --border-strong: oklch(0% 0 0 / 0.12);

  --accent: oklch(0.55 0.16 305);
  --accent-muted: oklch(94% 0.03 305);
  --accent-text: oklch(0.5 0.14 305);

  --record: oklch(0.55 0.16 25);
  --record-glow: oklch(0.55 0.16 25 / 0.2);

  --border-radius: 1rem;
  --border-radius-sm: 0.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
}

/* Bad practise for accessibility but in my UX skills i pray */
*:focus {
  outline: none;
}

html,
body {
  background: var(--background);
  color: var(--foreground);
  padding: 0;
  margin: 0;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.timeline, .editor-timeline-viewport, .editor-list, .editor-tabs,
.project-body, #track-list, .shortcut-group {
  pointer-events: auto; /* wheel scrolling */
}

#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in oklch, var(--background) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.sidebar {
  height: 100%;
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 0;
  gap: 4px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.version {
  font-size: 0.7rem;
  color: var(--foreground-tertiary);
  font-family: ui-monospace, monospace;
}

.sidebar-section {
  padding: 12px 0;
}

.section-title {
  padding: 0 16px 8px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground-tertiary);
  font-weight: 600;
}

.controls-section {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 14px 0 0;
}

.shortcut-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  min-height: 0;
  padding: 0 16px;
}

.shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--foreground-secondary);
}

.shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  background: var(--tertiary);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.7rem;
  color: var(--foreground);
  box-shadow: 0 2px 0 var(--border);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.navbar {
  height: 52px;
  margin: 12px 8px 0 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 16px;
  flex-shrink: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--foreground-secondary);
  font-size: 0.8rem;
  transition: all 0.12s ease;
  font-family: inherit;
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.nav-btn[data-action="play"].active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--foreground);
}

.nav-btn[data-action="record"].active {
  background: var(--record);
  border-color: var(--record);
  color: var(--background);
  box-shadow: 0 0 12px var(--record-glow);
  fill: currentColor;
}

.nav-btn[data-action="record"].counting {
  border-color: var(--border-strong);
  color: var(--foreground);
  background: var(--surface-hover);
}

.countdown-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--background) 40%, transparent);
  backdrop-filter: blur(8px);
  z-index: 30;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
}

.countdown-number {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", monospace;
  text-shadow: 0 0 60px color-mix(in oklch, var(--accent) 40%, transparent);
  animation: pop-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pop-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.nav-readout {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.85rem;
  color: var(--foreground-secondary);
}

.nav-readout strong {
  color: var(--foreground);
  font-weight: 600;
}

.workspace {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin: 12px;
  display: flex;
  flex-direction: column;
}

.bottom-bar {
  height: 40px;
  border-top: 1px solid var(--border-strong);
  background-color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-item {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.8rem;
  color: var(--foreground-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-item .value {
  color: var(--foreground-secondary);
  font-weight: 600;
}

#keys {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
}

.key {
  width: 64px;
  height: 150px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 1.2rem;
  color: #000;
}

.key.sharp {
  width: 48px;
  height: 80px;
  background: #000;
  color: #fff;
  margin: 0 -26px;
  z-index: 2;
}

.key.pressed {
  background: linear-gradient(#fff 50%, var(--accent));
  border-color: var(--accent);
  color: #000;
}

.key.sharp.pressed {
  background: linear-gradient(#000, var(--accent));
  color: #fff;
  border: 0;
}

#start-overlay .modal {
  position: relative;
  inset: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 64px));
  animation: modal-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--border-radius);
  padding: 0;
  width: 440px;
  max-height: 420px;
  color: var(--foreground);
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  box-shadow: 0 24px 80px color-mix(in oklch, black 45%, transparent);
  overflow: hidden;
}

.modal::backdrop {
  background: color-mix(in oklch, var(--background) 75%, transparent);
  backdrop-filter: blur(6px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01rem;
}

.modal-body {
  padding: 8px;
  overflow-y: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-row {
  border: 1px solid transparent;
  border-radius: 10px;
}

.modal-row.selected {
  background-color: color-mix(in oklch, var(--accent) 10%, transparent);
  border-color: color-mix(in oklch, var(--accent) 29%, transparent);
  color: var(--foreground);
}

.modal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.modal-label {
  flex: 1;
  font-weight: 500;
  min-width: 0;
}

.modal-meta {
  font-size: 0.75rem;
  color: var(--foreground-secondary);
  font-family: ui-monospace, "SF Mono", monospace;
}

.timeline {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  display: flex;
  background: var(--background);
  flex-direction: column;
  gap: 2px;
}

.track-lane {
  display: flex;
  width: 100%;
  height: 125px;
  min-width: max-content;
  border-bottom: 1px solid var(--border);
}

.track-lane.active {
  background: color-mix(in oklch, var(--accent) 5%, transparent);
}

.track-lane-header {
  width: 120px;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 8px 0 12px -10px color-mix(in oklch, black 40%, transparent);
  border-right: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  position: sticky;
  left: 0;
  z-index: 6;
}

.track-lane-roll {
  position: relative;
  height: 100%;
  flex-shrink: 1 0 auto;
}

.track-roll-canvas {
  display: block;
  height: 100%;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--foreground);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 6px color-mix(in oklch, var(--foreground) 35%, transparent);
}

dialog.editor-modal {
  width: 920px;
  height: 640px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--foreground);
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.editor-modal::backdrop {
  background: color-mix(in oklch, var(--background) 75%, transparent);
  backdrop-filter: blur(12px);
}

.editor-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  width: 220px;
  max-width: 220px;
  height: 100%;
  flex: 0 0 220px;
  background: var(--secondary);
  border-right: 1px solid var(--border-strong);
  padding: 24px 0 20px;
  overflow: hidden;
}

.editor-sidebar-title {
  padding: 0 20px 16px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.editor-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--foreground-secondary);
  font-size: 0.88rem;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.1s ease;
  position: relative;
}

.editor-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-tab.active {
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent-text);
  font-weight: 600;
}

.editor-tab.active::before {
  transform: translateY(-50%) scaleY(1);
}

.editor-hint {
  padding: 16px 16px 0;
  font-size: 0.75rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-direction: column;
  color: var(--foreground-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}

.editor-hint div {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  width: 100%;
  margin: 4px;
}

.editor-hint span {
  padding: 1px 5px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  background: var(--tertiary);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.7rem;
  color: var(--foreground);
  box-shadow: 0 2px 0 var(--border);
}

.editor-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 32px;
  grid-column: 2;
  overflow: hidden;
}

.editor-panel-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--foreground);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--foreground-secondary);
  border: 1px solid transparent;
  flex-shrink: 0;
  transition:
    background 0.08s,
    border-color 0.08s,
    color 0.08s;
  position: relative;
}

.editor-row.selected {
  background-color: color-mix(in oklch, var(--accent) 8%, transparent);
  border-color: transparent;
  color: var(--foreground);
}

.editor-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-row.selected::before {
  transform: translateY(-50%) scaleY(1);
}

.editor-row-meta {
  font-size: 12px;
  color: var(--foreground-tertiary);
  font-family: ui-monospace, "SF Mono", monospace;
}

.editor-row-value {
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
}

.editor-row-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: var(--accent);
  color: var(--background);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.editor-empty {
  color: var(--foreground-tertiary);
  font-size: 14px;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-hint-row {
  margin-top: auto;
  padding-top: 16px;
  font-size: 11px;
  color: var(--foreground-tertiary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  font-family: ui-monospace, "SF Mono", monospace;
}

.time-ruler {
  height: 24px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.65rem;
  color: var(--foreground-tertiary);
  pointer-events: none;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border-strong);
}

.piano-roll {
  width: 44px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
  position: sticky;
  left: 120px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.piano-roll canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.timeline::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.timeline::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.editor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.editor-panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.editor-panel-meta {
  font-size: 0.75rem;
  color: var(--foreground-tertiary);
  font-family: ui-monospace, monospace;
}

.editor-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--foreground-tertiary);
  font-family: ui-monospace, "SF Mono", monospace;
  flex-shrink: 0;
  line-height: 1.5;
}

.editor-timeline-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
}

.editor-piano-roll {
  width: 52px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
}

.editor-piano-roll canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.editor-timeline-viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

.editor-timeline-viewport::-webkit-scrollbar {
  height: 5px;
  background: var(--background);
}
.editor-timeline-viewport::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

html,
body,
.editor-modal,
.modal,
.sidebar,
.navbar,
.workspace,
.track-lane,
.editor-card {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}

.editor-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.editor-divider {
  height: 1px;
  background: var(--border);
  width: 100%;
  margin: 4px 0;
}

.choice-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  flex-shrink: 0;
  scrollbar-width: none;
  max-width: 100%;
  flex-wrap: wrap;
}

.choice-strip::-webkit-scrollbar {
  display: none;
}

.choice-item {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--foreground-tertiary);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.1s;
}

.choice-item.active {
  background: var(--accent);
  color: var(--background);
  font-weight: 600;
  border-color: var(--accent);
}

.slider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 140px;
}

.slider-track {
  flex: 1;
  height: 6px;
  background: var(--tertiary);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.slider-fill {
  height: 100%;
  background-color: var(--accent);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.slider-value {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--accent-text);
  font-weight: 600;
  min-width: 52px;
  text-align: right;
}

.editor-locked {
  opacity: 0.32;
  filter: grayscale(0.6);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    filter 0.25s ease;
}

.editor-card .editor-row {
  margin: 0 -8px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 8px;
}

.editor-card-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--foreground-tertiary);
  font-weight: 700;
  padding: 0 4px 8px;
  margin: 0;
}

.editor-card + .editor-card {
  margin-top: 12px;
}

.toggle {
  width: 44px;
  height: 24px;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.toggle-track {
  width: 100%;
  height: 100%;
  background: var(--tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.toggle[data-on="true"] .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--foreground);
  border-radius: 50%;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle[data-on="true"] .toggle-thumb {
  transform: translateX(20px);
  background: var(--background);
}

.project-modal {
  width: 500px;
}

.project-modal .modal-header {
  padding: 20px 22px 16px;
  gap: 12px;
}

.project-modal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.05rem;
}

.project-modal .modal-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.project-body {
  min-height: 0;
  max-height: 340px;
  flex: 1;
  overflow-y: auto;
  gap: 2px;
  flex-direction: column;
  display: flex;
  padding: 8px 10px;
}

.project-body::-webkit-scrollbar { width: 6px; }
.project-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.project-body .modal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm);
  position: relative;
}

.project-body .modal-row .modal-meta {
  flex-shrink: 0;
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-body .modal-row.selected {
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
}

.project-body .modal-row.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.project-body .modal-row.selected .project-icon {
  color: var(--accent-text);
}

.project-body .editor-row-vaue {
  margin-left: auto;
  color: var(--accent-text);
}

.project-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--foreground-tertiary);
}

.project-action .modal-label {
  color: var(--accent-text);
  font-weight: 600;
}

.project-badge {
  display: inline-block;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--accent-muted);
  color: var(--accent-text);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 700;
}

.project-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--foreground-tertiary);
  font-size: 0.85rem;
  line-height: 2.1;
}

.project-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 13px 20px;
  font-size: 0.7rem;
  color: var(--foreground-tertiary);
  font-family: ui-monospace, "SF Mono", monospace;
  border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 35%, var(--surface));
}

.project-hint kbd,
.project-empty kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--tertiary);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.65rem;
  color: var(--foreground);
}

.logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.kbd-pair {
  display: inline-flex;
  gap: 3px;
}

.editor-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--background);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--accent);
}

.edit-action-btn svg {
  width: 13px;
  height: 13px;
}

.edit-action-btn kbd {
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: color-mix(in oklch, var(--background) 40%, transparent);
  color: var(--foreground);
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 600;
}

#editor-timeline-canvas {
  display: block;
}

.editor-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.transport-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-block {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--foreground);
  background: color-mix(in oklch, var(--background) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
}

.mobile-block-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 340px;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--border-radius);
  box-shadow: 0 24px 80px color-mix(in oklch, black 45%, transparent);
  animation: modal-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-block-icon {
  width: 34px;
  height: 34px;
  color: var(--accent-text);
  stroke-width: 1.75;
}

.mobile-block-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mobile-block-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--foreground-secondary);
}

.mobile-block-hint {
  font-size: 0.78rem;
  color: var(--foreground-tertiary);
}

.mobile-block-meta {
  margin-top: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--foreground-tertiary);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}