@font-face {
  font-family: Anybody;
  src: url("./fonts/Anybody.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #e8e3ed;
  --surface: #f5f1f7;
  --ink: #282332;
  --muted: #625b67;
  --accent: #5a32ae;
  --accent-soft: #ded4ed;
  --line: #817685;
  --rule: #c7c0c9;
  --capture: #a64455;
  --band-label-width: 4.5rem;
  --band-height: 44px;
  font-family: Anybody, sans-serif;
  font-weight: 450;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; min-width: 0; padding-bottom: calc(max(100px,5rem) + env(safe-area-inset-bottom)); }
button, input, summary, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button, summary, a { touch-action: manipulation; }
button {
  min-height: 44px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: .875rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
button:active:not(:disabled) { background: #d3c6e4; }
button:disabled { opacity: .48; cursor: wait; }
button, a { transition: background-color 120ms ease, border-color 120ms ease; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible, canvas:focus-visible, .timeline-scroll:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transition: none;
}
a { color: var(--ink); text-underline-offset: .25em; }
p { line-height: 1.5; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 12px; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.instrument { max-width: 1580px; margin: auto; padding: 8px 8px 2rem; }
.studio-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 70px; margin-bottom: 0; }
.identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1rem; min-width: 0; }
.identity h1 { margin: 0; font-size: clamp(2.35rem,12vw,3.5rem); line-height: 1; font-weight: 650; font-stretch: 72%; letter-spacing: -.065em; overflow-wrap: anywhere; }
.identity p { display: none; margin: 0; color: var(--muted); font-size: .75rem; }
.view-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.view-actions button { padding: 8px 6px; border-color: transparent; font-size: .75rem; }
.view-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 6px; font-size: .75rem; text-decoration: none; }
.view-actions button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); }
.listening-chamber { min-width: 0; }
.listening-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; margin: 0; padding: 4px 0 12px; }
.listening-object { position: relative; width: 100%; height: 260px; perspective: 1000px; }
#listening-art { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center; user-select: none; pointer-events: none; }
.listening-stage figcaption { margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.5; text-align: center; }
.listening-object #material { z-index: 2; }
.transport-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0; border-block: 1px solid var(--rule); }
.transport { display: flex; align-items: center; gap: 4px; min-width: 0; }
.play-button { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 580; }
.transport .play-button { flex: 0 0 64px; width: 64px; min-width: 64px; height: 64px; min-height: 64px; padding: 0; border-radius: 50%; }
.transport .play-symbol { border-block-width: 7px; border-left-width: 11px; margin-left: 3px; }
[data-state=playing] .transport .play-symbol { width: 11px; height: 15px; margin-left: 0; border-block: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.play-symbol { flex: 0 0 auto; width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
[data-state=playing] .play-symbol { width: 8px; height: 11px; border-block: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
#play-label { min-width: 0; }
.stop-button { padding-inline: 8px; border-color: transparent; }
kbd { display: none; font: inherit; color: var(--muted); font-size: .75rem; margin-left: .35rem; }
.listening-state { flex: 1 1 8rem; min-width: 0; min-height: 2.8rem; font-size: .75rem; }
.status-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 1.5; }
.status-line > span { min-width: 0; overflow-wrap: anywhere; }
.status-line > time { flex: 0 0 auto; font-size: 1rem; font-weight: 570; font-variant-numeric: tabular-nums; }
.track-position { margin: .2rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.4; overflow-wrap: anywhere; }
.tempo-note { display: none; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.tempo-note strong { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tempo-note > span, .tempo-note > small { font-size: .75rem; }
.tempo-note > small { color: var(--muted); }
.range-control { display: flex; flex-direction: column; min-width: 0; }
.range-control > span { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; font-size: .875rem; }
.range-control output { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.range-control small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.master-control { display: grid; grid-template-columns: minmax(0,1fr) minmax(5rem,1fr); align-items: center; gap: 8px; width: 100%; }
.transport-bar .scenes { flex: 1 1 100%; gap: 12px; }
.transport-bar .scenes span { border-color: transparent; background: transparent; }
.transport-bar .scenes input:checked + span { color: var(--ink); border-color: var(--ink); background: transparent; }
.chamber-take { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding-top: 8px; }
.chamber-take .take-actions { padding: 0; gap: 4px; }
.chamber-take button { border-color: transparent; font-size: .75rem; padding-inline: 8px; }
.chamber-take #take-count { margin-left: 8px; color: var(--muted); font-size: .75rem; }
.chamber-take .take-status { margin: 0; }
.chamber-help { margin: 4px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
input[type=range] { appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 10px; height: 20px; margin-top: -9px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 10px; height: 20px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); }
.studio-body { min-width: 0; }
.workspace { margin-top: clamp(40px,7vw,100px); padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.workspace-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.workspace-heading h2 { font-size: clamp(1.8rem,4vw,3rem); font-weight: 630; font-stretch: 80%; letter-spacing: -.045em; }
.workspace-heading p { margin: 6px 0 0; color: var(--muted); font-size: .875rem; }
.arrangement { min-width: 0; padding-top: 12px; }
.arrangement-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
h2 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.arrangement-heading h2 { font-size: 1.4rem; font-weight: 650; font-stretch: 80%; letter-spacing: -.04em; }
.structure-note { margin: 4px 0 0; font-size: .75rem; color: var(--muted); }
.score-navigation, .score-controls { display: flex; flex-wrap: wrap; gap: 4px; }
.score-controls button { padding: 8px 10px; font-size: .75rem; border-color: transparent; }
.score-controls button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }
.timeline-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--line) var(--paper); }
.timeline-scroll:focus-visible { outline-offset: -3px; }
.arrangement-inner { min-width: 0; }
.ruler { display: grid; grid-template-columns: var(--band-label-width) minmax(0,1fr); border-block: 1px solid var(--ink); }
.mix-heading { display: flex; align-items: center; padding: 8px 6px; font-size: .75rem; font-weight: 600; }
.section-map { display: grid; grid-template-columns: 8fr 8fr 24fr 8fr 32fr 16fr; min-width: 0; }
.section-map > div { min-width: 0; padding: 8px 0; font-size: .75rem; line-height: 1.3; color: var(--muted); text-align: center; white-space: nowrap; }
.section-name, .section-range { display: none; }
.section-code { color: var(--ink); }
.section-map.is-detail > div { padding-inline: 8px; text-align: left; }
.section-map.is-detail .section-name { display: inline; color: var(--ink); }
.section-map.is-detail .section-code { display: none; }
.section-map.is-detail .section-range { display: inline; margin-left: .6rem; }
.section-map small { font-size: .75rem; }
.engraving-score { position: relative; min-width: 0; border-bottom: 1px solid var(--ink); background: var(--surface); }
.score-band { display: grid; grid-template-columns: var(--band-label-width) minmax(0,1fr); min-height: var(--band-height); }
.score-band + .score-band { border-top: 1px solid var(--rule); }
.score-band-name { display: flex; align-items: center; min-width: 0; padding: 6px; font-size: .75rem; font-weight: 520; line-height: 1.2; overflow-wrap: anywhere; background: var(--paper); }
.track-lane { position: relative; min-width: 0; height: var(--band-height); overflow: hidden; contain: layout paint; }
.score-notes { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.material-overlay { position: absolute; z-index: 3; inset: 0 0 0 var(--band-label-width); pointer-events: none; }
#material { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: auto; touch-action: pan-y; cursor: crosshair; }
[data-state=playing] #material { touch-action: none; }
#material:focus-visible { outline-offset: -4px; }
.gesture-mark { position: absolute; top: 0; left: 0; width: 18px; height: 18px; margin: -9px; border: 1px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none; }
.gesture-mark.is-active { opacity: 1; }
.gesture-mark span { position: absolute; inset: 6px; background: var(--accent); }
.playhead-track { position: absolute; z-index: 2; pointer-events: none; inset: 0 0 0 var(--band-label-width); overflow: hidden; }
.playhead { position: absolute; inset: 0 auto 0 0; width: 1px; background: var(--accent); }
.playhead::before { content: ""; position: absolute; top: 0; left: -3px; width: 7px; height: 5px; background: var(--accent); }
.score-cursor { display: none; }
.band-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 8px; }
.band-caption p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.section-key { font-size: .75rem; }
.section-key summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
.section-key ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap: 8px 16px; margin: 0; padding: 0 0 12px; list-style: none; line-height: 1.5; color: var(--muted); }
.arrangement:has(.section-map.is-detail) .section-key { display: none; }
.tool-deck { margin-top: 12px; border-top: 2px solid var(--ink); }
.tool-deck > details { min-width: 0; border-bottom: 1px solid var(--rule); }
.tool-deck > details > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 12px 4px; cursor: pointer; list-style: none; font-size: .875rem; font-weight: 530; }
.tool-deck > details > summary::-webkit-details-marker { display: none; }
.tool-deck > details > summary::after { content: "+"; font-size: 1.1rem; font-weight: 450; }
.tool-deck > details[open] > summary { color: var(--accent); }
.tool-deck > details[open] > summary::after { content: "−"; }
.tool-deck > details > summary > span { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 450; }
.composer-body { display: grid; min-width: 0; gap: 12px 24px; padding: 4px 4px 16px; }
.scenes { display: flex; flex-wrap: wrap; gap: 4px; align-items: start; }
.scenes label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.scenes input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scenes span { display: flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px; border: 1px solid var(--line); font-size: .875rem; line-height: 1.25; overflow-wrap: anywhere; }
.scenes input:checked + span { color: var(--surface); border-color: var(--ink); background: var(--ink); }
.scenes input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.scenes:disabled, .macro-controls:disabled { opacity: .48; }
.macro-controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: 12px; }
.take-actions, .edition-actions, .variation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 8px 12px; }
#take-arm[aria-pressed=true] { color: var(--surface); background: var(--capture); border-color: var(--capture); }
.tool-note, .take-status, .edition-note, .render-progress { margin: 0 0 12px; color: var(--muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.gesture-controls-inner { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: 8px 24px; padding: 4px 4px 16px; }
.gesture-controls-inner p { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
#tracks { display: grid; grid-template-columns: minmax(0,1fr); }
.track-row { min-width: 0; border-top: 1px solid var(--rule); }
.track-head { display: grid; grid-template-columns: minmax(0,1fr) 44px 44px; align-items: center; gap: 4px 8px; padding: 8px 4px; }
.track-name { min-width: 0; font-size: .875rem; font-weight: 550; line-height: 1.25; overflow-wrap: anywhere; }
.track-number { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; font-weight: 450; }
.track-signal { display: block; width: 100%; max-width: 80px; height: 3px; margin-top: 4px; transform: scaleX(0); transform-origin: left; background: var(--accent); }
.mix-toggle { min-width: 44px; padding: 4px; }
.mix-toggle[aria-pressed=true] { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.track-volume { display: flex; grid-column: 1/-1; align-items: center; gap: 12px; min-width: 0; }
.track-volume input { flex: 1; min-width: 0; }
.track-volume output { flex: 0 0 3rem; text-align: right; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.track-row.is-muted .track-name { color: var(--muted); }
.seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; font-size: .875rem; }
.seed input { width: min(7rem,100%); min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--ink); font: inherit; font-size: .875rem; }
.edition a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.feedback, .error-message { margin: 8px 0; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.error-message { padding: 12px; border-left: 3px solid var(--accent); background: var(--surface); }
.transport-dock { position: fixed; z-index: 8; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; gap: 4px 8px; width: min(28rem,calc(100% - 16px)); padding: 8px; transform: translateX(-50%); border-top: 1px solid var(--line); background: var(--surface); }
.transport-dock button { min-width: 0; min-height: 44px; padding: 8px 10px; font-size: .875rem; }
.transport-dock .play-button { flex: 1 1 auto; min-width: 0; }
.transport-dock > time { grid-column: 1/-1; justify-self: end; flex: 0 0 2.7rem; text-align: right; font-size: .875rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
dialog { width: min(42rem,calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: clamp(16px,4vw,32px); border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--surface); overflow-wrap: anywhere; }
dialog::backdrop { background: #28233285; }
.dialog-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { min-width: 0; max-width: 28rem; margin-block: 4px; font-size: 1.4rem; font-weight: 580; }
.dialog-heading button { flex-shrink: 0; }
dialog h3 { margin-top: 24px; font-size: 1rem; font-weight: 600; }
dialog p { color: var(--muted); font-size: .875rem; line-height: 1.65; }
.method-note { padding-top: 16px; border-top: 1px solid var(--rule); }
@media (min-width: 44.01rem) {
  :root { --band-label-width: 6.5rem; --band-height: 56px; }
  .instrument { padding: 16px 32px 32px; }
  .studio-header { margin-bottom: 12px; min-height: 90px; }
  .identity h1 { font-size: clamp(4.375rem,7.2vw,6.875rem); }
  .identity p { display: block; }
  .view-actions button { padding-inline: 10px; }
  .view-actions a { padding-inline: 10px; }
  .listening-stage { min-height: 0; padding: 4px 0 16px; }
  .listening-object { width: min(70vw,1000px); height: auto; aspect-ratio: 3/2; }
  .listening-stage figcaption { margin-top: 8px; }
  .transport-bar { gap: 8px 24px; }
  .play-button { min-width: 9rem; }
  .listening-state { flex-basis: 10rem; max-width: 25rem; }
  .master-control { width: 12rem; margin-left: auto; }
  .transport-bar .scenes { flex: 0 1 13rem; gap: 4px; }
  kbd { display: inline; }
  .arrangement { padding-top: 16px; }
  .arrangement-heading { margin-bottom: 16px; }
  .arrangement-heading h2 { font-size: 1.6rem; }
  .section-map.is-detail .section-range { display: inline; }
  .score-band-name { padding-inline: 12px; font-size: .75rem; }
  .band-caption p { font-size: .75rem; }
  .composer-body { grid-template-columns: minmax(0,1fr); align-items: start; gap: 32px; padding-block: 12px 20px; }
  .scenes label { flex-basis: 3rem; }
  .macro-controls { gap: 24px; }
  #tracks { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 32px; }
  .transport-dock { display: flex; gap: 8px; width: min(28rem,calc(100% - 2rem)); }
  .transport-dock .play-button { min-width: 0; }
}
@media (min-width: 70rem) {
  .tempo-note { display: flex; flex: 0 0 7rem; }
  .tempo-note small { flex-basis: 100%; }
  .track-head { grid-template-columns: minmax(0,1fr) 7rem 44px 44px; }
  .track-head > [data-mix-mute] { grid-column: 3; grid-row: 1; }
  .track-head > [data-mix-solo] { grid-column: 4; grid-row: 1; }
  .track-volume { grid-column: 2; grid-row: 1; flex-direction: column; gap: 0; }
  .track-volume input { min-height: 44px; height: 44px; }
  .track-volume output { flex-basis: auto; text-align: center; }
}
@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) { background: var(--accent-soft); }
  .play-button:hover:not(:disabled) { background: #46364f; border-color: #46364f; }
  .tool-deck summary:hover { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  button, .scenes span, .engraving-score { border: 1px solid CanvasText; }
  input[type=range] { appearance: auto; }
  .playhead, .track-signal { background: Highlight; }
  .mix-toggle[aria-pressed=true], #take-arm[aria-pressed=true], .score-controls button[aria-pressed=true] { background: Highlight; color: HighlightText; }
}
