:root {
  color-scheme: dark;
  font-family: Inter, 'Noto Sans JP', 'Yu Gothic UI', Meiryo, system-ui, sans-serif;
  font-size: 12px;
  --bg: #191a1c;
  --panel: #242528;
  --raised: #2e3033;
  --border: #3a3c40;
  --text: #d7d9dd;
  --muted: #969ba4;
  --active: #414954;
  --focus: #95b8e2;
  --inspector: 208px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 3px 8px;
  min-height: 25px;
  white-space: nowrap;
}
button:hover {
  background: #393c41;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button.active,
button[aria-pressed='true'] {
  background: var(--active);
  border-color: #626e7e;
  color: #f0f3f8;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
input,
select {
  border: 1px solid #414349;
  background: #191a1d;
  border-radius: 3px;
  height: 26px;
  min-width: 0;
  padding: 3px 6px;
  width: 100%;
}
input[type='checkbox'] {
  accent-color: #91a6c0;
  width: 13px;
  height: 13px;
  margin: 0;
}
input[type='number'] {
  font-variant-numeric: tabular-nums;
}
input[type='range'] {
  accent-color: #91a6c0;
}
button,
input,
select {
  transition: background 0.1s;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-size: 12px;
  font-weight: 600;
}
p {
  line-height: 1.75;
  color: var(--muted);
}
kbd {
  font:
    10px ui-monospace,
    Consolas,
    monospace;
  color: #a6abb4;
}
button kbd {
  margin-left: 5px;
}
dl,
dd {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.studio {
  height: 100dvh;
  min-height: 420px;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-bottom: 1px solid #101113;
  background: #292a2d;
}
.topbar h1 {
  font-size: 11px;
  color: #b6bac2;
  white-space: nowrap;
  padding: 0 5px;
}
.file-actions {
  display: flex;
  gap: 1px;
}
.divider {
  height: 17px;
  width: 1px;
  background: #45474b;
  flex: none;
  margin: 0 5px;
}
.toolbar-spacer {
  flex: 1;
  min-width: 4px;
}
#project-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
  margin: 0 5px;
}
.project-format {
  font-size: 10px;
  color: #7f858f;
  white-space: nowrap;
  margin-right: 8px;
}
.topbar button {
  font-size: 11px;
}
.icon-button {
  font:
    17px system-ui,
    sans-serif;
  width: 26px;
  padding: 0;
  flex: none;
  line-height: 23px;
}
.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.workspace.inspector-open {
  grid-template-columns: minmax(0, 1fr) var(--inspector);
}
.editor-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.editor-toolbar,
.track-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding: 0 7px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #55585f #242528;
  background: #27282b;
  border-bottom: 1px solid #101113;
}
.editor-toolbar {
  height: 36px;
}
.track-toolbar {
  height: 32px;
  background: #202124;
  font-size: 11px;
}
.tool-group,
.palette,
.zoom-control,
.automation-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
}
.tool {
  font-size: 11px;
  padding: 3px 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool > span {
  font-size: 15px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 7px;
  height: 26px;
}
.palette-item kbd {
  color: #7f858f;
  font-size: 9px;
  margin: 0 0 0 2px;
}
.palette-item.active kbd {
  color: #bdc8d8;
}
.note-icon {
  display: inline-block;
  width: 16px;
  height: 6px;
  flex: none;
  background: #d9dce2;
  border: 1px solid #f2f3f5;
  border-radius: 1px;
}
.note-icon.accent {
  width: 12px;
  margin: 0 2px;
  background: #d7bf74;
  border-color: #ecd898;
}
.note-icon.hold {
  width: 10px;
  margin: 0 3px;
  height: 16px;
  background: linear-gradient(#d4d9e2 0 30%, #5e687b 30%);
  border-color: #a9b4c7;
}
.note-icon.wide {
  width: 20px;
}
.note-icon.red {
  background: #ce7c7b;
  border-color: #eaa09f;
}
.note-icon.blue {
  background: #709ec8;
  border-color: #a2c0e0;
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #aeb3bc;
  white-space: nowrap;
  flex: none;
}
.inline-field input,
.inline-field select {
  height: 24px;
  font-size: 11px;
  width: 61px;
  padding: 1px 4px;
}
.zoom-control {
  gap: 0;
  margin-left: 3px;
}
.zoom-control button {
  height: 24px;
  min-height: 24px;
}
.zoom-control #zoom-reset {
  font:
    10px ui-monospace,
    monospace;
  width: 46px;
  padding: 0;
}
.view-tabs {
  display: flex;
  gap: 2px;
  flex: none;
}
.view-tabs button {
  font-size: 11px;
  min-height: 23px;
  height: 23px;
  padding: 1px 10px;
}
.automation-controls {
  gap: 8px;
}
.automation-controls button {
  font-size: 10px;
  padding: 1px 5px;
}
.automation-controls #place-effect {
  width: 92px;
}
.jump-field {
  margin-left: 5px;
}
.jump-field input {
  width: 51px;
}
#reveal-playhead {
  font-size: 10px;
}
.chart-region {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100px;
  background: #17181b;
}
.lane-headings {
  display: grid;
  flex: none;
  height: 24px;
  background: #292b2e;
  border-bottom: 1px solid #45474d;
  color: #b2b7bf;
  font:
    10px ui-monospace,
    'Yu Gothic UI',
    Meiryo,
    monospace;
  overflow: hidden;
}
.lane-headings span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #3b3d42;
  overflow: hidden;
  white-space: nowrap;
}
.lane-headings span:nth-child(2) {
  color: #c5a4a4;
}
.lane-headings span:nth-child(9) {
  color: #a9bcae;
}
.lane-headings span:nth-child(n + 10):nth-child(-n + 12) {
  color: #b8aecb;
}
.chart-scroll {
  position: relative;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #555961 #202124;
}
#chart-spacer {
  width: 1px;
  pointer-events: none;
}
#chart {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.empty-guide {
  pointer-events: none;
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  background: #24262cdd;
  border: 1px solid #41444d;
  color: #a4abb6;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
}
.navigator {
  height: 24px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-top: 1px solid #45474d;
  border-bottom: 1px solid #131416;
  background: #242529;
  font-size: 9px;
  color: #989faa;
  font-variant-numeric: tabular-nums;
}
.overview-wrap {
  position: relative;
  flex: 1;
  height: 18px;
  min-width: 0;
}
.overview-wrap:focus-within {
  outline: 1px solid var(--focus);
}
#overview {
  display: block;
  width: 100%;
  height: 18px;
}
#seek {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.transport {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  flex: none;
  background: #292a2e;
  border-bottom: 1px solid #131416;
}
.play-button {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid #656a74;
  background: #373d46;
  color: #e3e8f0;
  font-size: 13px;
}
.transport-time {
  min-width: 112px;
  margin-left: 5px;
}
.transport-time strong {
  font:
    18px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.2px;
  display: block;
  color: #edf0f5;
}
.transport-time small {
  display: block;
  font:
    9px ui-monospace,
    'Yu Gothic UI',
    monospace;
  color: #929ba9;
  margin-top: 3px;
}
.tempo-readout {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.tempo-readout strong {
  font:
    14px ui-monospace,
    monospace;
}
.tempo-readout small {
  font-size: 9px;
  color: #959ba6;
}
.transport .toggle {
  font-size: 11px;
  padding: 3px 8px;
}
.follow-control {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
  margin-left: 5px;
  color: #b1b6c0;
}
.right-panel {
  display: none;
  min-height: 0;
  overflow: auto;
  background: #25262a;
  border-left: 1px solid #121315;
  scrollbar-width: thin;
  scrollbar-color: #55585f transparent;
}
.inspector-open .right-panel {
  display: block;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  background: #2c2d31;
  border-bottom: 1px solid #16171a;
}
.panel-title h2 {
  font-size: 11px;
  color: #bfc4ce;
}
.panel-title .icon-button {
  color: #9a9fa8;
  font-size: 16px;
}
.panel-section {
  padding: 12px;
  border-bottom: 1px solid #17181a;
}
.panel-section h3 {
  font-size: 11px;
  color: #afb5c0;
  margin-bottom: 10px;
}
.field {
  display: block;
  font-size: 11px;
  color: #a8afba;
  margin-bottom: 11px;
  line-height: 1.5;
}
.field input,
.field select {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.primary,
.secondary {
  border: 1px solid #525760;
  background: #363b43;
  font-size: 11px;
}
.primary {
  background: #465467;
  border-color: #65788f;
  color: #eef1f6;
}
.primary:hover {
  background: #53657b;
}
.secondary:hover {
  background: #414752;
}
.full {
  width: 100%;
}
.text-button {
  font-size: 10px;
  color: #aebfd6;
  padding: 3px 0;
  white-space: normal;
}
.text-button:hover {
  background: transparent;
  text-decoration: underline;
}
.danger {
  border-color: #705454;
  color: #d4a5a5;
  background: #392d30;
  font-size: 11px;
}
.selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a1a9b6;
  font-size: 10px;
  margin: -4px 0 9px;
}
.selection-header .icon-button {
  font-size: 15px;
  width: 20px;
  min-height: 20px;
}
.selection-type {
  font-size: 12px;
  font-weight: 600;
  border-left: 2px solid #8d9caf;
  padding: 3px 8px;
  background: #30333a;
  margin-bottom: 13px;
}
#selection-empty p {
  font-size: 11px;
  margin-bottom: 12px;
}
#selection-empty .secondary {
  width: 100%;
  margin-bottom: 15px;
}
.selection-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}
.nudge-controls {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}
.nudge-controls button {
  font-size: 11px;
}
.micro {
  font-size: 10px;
  margin: 8px 0 3px;
  line-height: 1.8;
  color: #8e96a3;
}
.reference-section {
  border-bottom: 0;
}
.reference-section dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  font-size: 9px;
  color: #8f98a7;
}
.reference-section dd {
  color: #b0b9c7;
  font:
    9px ui-monospace,
    'Yu Gothic UI',
    monospace;
}
.reference-section .text-button {
  margin-top: 14px;
}
.left-panel {
  position: absolute;
  z-index: 12;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  background: #28292d;
  border-right: 1px solid #666c76;
  box-shadow: 8px 0 25px #0006;
  overflow: auto;
  scrollbar-width: thin;
}
.audio-card {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #4b505a;
  width: 100%;
  text-align: left;
  padding: 8px;
  white-space: normal;
}
.audio-card > span:last-child {
  min-width: 0;
}
.audio-card strong {
  display: block;
  font-size: 11px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-card small {
  display: block;
  font-size: 9px;
  color: #959eac;
  margin-top: 4px;
}
.statusbar {
  height: 22px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px;
  background: #202125;
  color: #8f97a3;
  font-size: 10px;
  white-space: nowrap;
  border-top: 1px solid #3d4046;
}
#chart-hint {
  overflow: hidden;
  text-overflow: ellipsis;
}
#visible-bars {
  font:
    9px ui-monospace,
    'Yu Gothic UI',
    monospace;
}
.stats {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7e8794;
  font-size: 9px;
}
.stats span {
  color: #bbc2ce;
  margin-left: 7px;
  font-variant-numeric: tabular-nums;
}
#save-status {
  border-left: 1px solid #42464d;
  padding-left: 12px;
  color: #a0a9b6;
  font-size: 9px;
}
.event-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  scrollbar-width: thin;
}
.list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #9fa8b7;
  font-size: 11px;
}
.event-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.event-table th {
  text-align: left;
  font-size: 10px;
  color: #9fa8b7;
  background: #292c32;
  font-weight: 400;
  position: sticky;
  top: 0;
}
.event-table td,
.event-table th {
  padding: 5px 9px;
  border-bottom: 1px solid #30343b;
}
.event-table td:first-child {
  font:
    11px ui-monospace,
    monospace;
}
.event-table tr.selected {
  background: #354052;
}
.event-table button {
  min-height: 23px;
  padding: 1px 8px;
  font-size: 10px;
}
.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  margin-top: 10px;
  color: #9fa8b7;
}
.empty-list {
  text-align: center;
  padding: 25px;
  font-size: 12px;
}
.automation-hidden .lane-headings [data-automation] {
  visibility: hidden;
}
.focus-active #toggle-automation {
  opacity: 0.4;
}
.statusbar .stats {
  flex: none;
}
dialog {
  color: var(--text);
  background: #2a2c31;
  border: 1px solid #5b626e;
  border-radius: 5px;
  max-width: 500px;
  width: calc(100% - 32px);
  padding: 24px;
  box-shadow: 0 15px 60px #0008;
}
dialog::backdrop {
  background: #0009;
}
dialog h2 {
  font-size: 16px;
  margin: 0 0 15px;
}
dialog p {
  font-size: 12px;
  margin-bottom: 13px;
}
dialog .eyebrow {
  font-size: 10px;
  color: #9fa8b7;
  margin-bottom: 8px;
}
.modal-close {
  position: absolute;
  right: 7px;
  top: 7px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}
.shortcut-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 11px;
  font-size: 11px;
  color: #bec6d2;
}
.shortcut-list kbd {
  color: #d2d8e2;
}
.modal-note {
  font-size: 10px !important;
  color: #98a2b1;
  line-height: 1.8;
}
.effect-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.effect-row input {
  flex: 1;
}
.dialog-error {
  font-size: 11px;
  color: #efb0aa;
  margin-top: 10px;
}
#toast {
  position: fixed;
  bottom: 31px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #343e4c;
  border: 1px solid #6b7c94;
  padding: 9px 15px;
  color: #e1e7f0;
  font-size: 12px;
  border-radius: 4px;
  box-shadow: 0 6px 25px #0007;
  max-width: 85vw;
}
#toast.error {
  background: #483336;
  border-color: #986466;
  color: #f4cccc;
}
@media (max-width: 1150px) {
  .palette-item kbd {
    display: none;
  }
  .project-format {
    display: none;
  }
  .editor-toolbar .divider {
    margin: 0 3px;
  }
  .palette-item {
    padding-inline: 5px;
  }
  .tool {
    padding-inline: 5px;
  }
  .automation-controls {
    gap: 5px;
  }
  #reveal-playhead {
    display: none;
  }
  .extension {
    display: none;
  }
}
@media (max-width: 850px) {
  .workspace.inspector-open {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector-open .right-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 208px;
    z-index: 11;
    border-left: 1px solid #666c76;
    box-shadow: -8px 0 25px #0006;
  }
  .topbar h1 {
    display: none;
  }
  .topbar > .divider:first-of-type {
    display: none;
  }
  #project-name {
    max-width: 120px;
  }
  .topbar button {
    font-size: 10px;
    padding-inline: 6px;
  }
  .statusbar .stats {
    display: none;
  }
  .automation-controls #place-effect {
    width: 75px;
  }
}
@media (max-width: 560px) {
  .topbar {
    padding: 0 4px;
    gap: 1px;
  }
  .topbar .divider {
    margin-inline: 3px;
  }
  #project-name {
    max-width: 65px;
    font-size: 10px;
    margin-inline: 2px;
  }
  #focus-mode {
    font-size: 0;
    width: 25px;
    padding: 0;
  }
  #focus-mode::after {
    content: '⛶';
    font-size: 16px;
  }
  .topbar #help {
    width: 22px;
  }
  .editor-toolbar {
    height: 35px;
  }
  .palette-item,
  .tool {
    font-size: 10px;
  }
  .palette-item {
    gap: 4px;
  }
  .editor-toolbar .toolbar-spacer {
    display: none;
  }
  .editor-toolbar .inline-field {
    margin-left: 8px;
  }
  .track-toolbar {
    height: 32px;
  }
  .track-toolbar .toolbar-spacer {
    min-width: 10px;
  }
  .track-toolbar .divider {
    margin-inline: 2px;
  }
  .inline-field {
    font-size: 10px;
  }
  .transport {
    padding: 0 6px;
    gap: 4px;
  }
  .transport-time {
    min-width: 104px;
    margin-left: 0;
  }
  .transport-time strong {
    font-size: 16px;
  }
  .transport .divider {
    display: none;
  }
  .tempo-readout {
    display: none;
  }
  .transport .toggle {
    padding: 3px 5px;
    font-size: 10px;
  }
  .follow-control {
    font-size: 10px;
    margin-left: 2px;
  }
  .statusbar {
    gap: 8px;
    font-size: 9px;
  }
  #save-status {
    padding-left: 6px;
  }
  .empty-guide {
    font-size: 10px;
    max-width: 90%;
    white-space: normal;
    text-align: center;
  }
  .navigator {
    height: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
