@font-face {
  font-family: Plex;
  src: url('/assets/fonts/ibm-plex-sans-latin-var.woff2');
}
@font-face {
  font-family: Mono;
  src: url('/assets/fonts/ibm-plex-mono-latin-400.woff2');
}
@font-face {
  font-family: Bravura;
  src: url('/assets/fonts/Bravura.woff2');
}
@font-face {
  font-family: SheetSans;
  src: url('/assets/fonts/SheetSans.ttf');
}
:root {
  color-scheme: light;
  --ink: #14171c;
  --muted: #505964;
  --blue: #1e3f66;
  --paper: #fff;
  --line: #c1c6c9;
  --well: #eceeeb;
  --canvas: #f4f4f1;
  font:
    16px/1.5 Plex,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
body > header,
body > footer,
main {
  width: min(1184px, calc(100% - 48px));
  margin: auto;
}
body > header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}
body > footer {
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: 46px;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0;
}
footer nav,
.cluster,
.instruments,
.tools,
.transport,
.score-head,
.score-status,
.score-legend,
.local-note,
dialog header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
footer nav {
  gap: 16px;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input,
select,
textarea,
summary {
  font: inherit;
  color: inherit;
}
button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 8px 12px;
}
button,
select,
summary {
  cursor: pointer;
}
button,
select,
input:not([type='checkbox']),
summary {
  min-height: 44px;
}
button:hover,
summary:hover {
  background: #edf1f3;
}
button[aria-pressed='true'],
button[aria-expanded='true'] {
  background: #e6edf5;
  color: #153654;
  border-color: #92a9bd;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  font-weight: 500;
}
.primary:hover {
  background: #153451;
}
.text-button {
  border: 0;
  text-decoration: underline;
  background: transparent;
}
.cluster {
  gap: 6px;
}
:focus-visible {
  outline: 3px solid #335d87;
  outline-offset: 2px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 1.07;
}
h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.18;
}
h3 {
  font-weight: 500;
  font-size: 1.2rem;
}
.intro {
  padding: 32px 0 18px;
}
.intro > p {
  margin-top: 9px;
  font-size: 1.08rem;
  color: var(--muted);
}
.instruments {
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.instruments a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  padding: 0 2px;
}
.instruments a[aria-current] {
  color: var(--ink);
  border-color: var(--blue);
}
#workbench {
  background: var(--paper);
  border: 1px solid #afb6bc;
  border-radius: 0 0 7px 7px;
  border-top: 0;
  overflow: hidden;
}
.score-head,
.transport,
.score-legend,
.score-status,
.tools,
#inspector {
  padding: 10px 18px;
}
.score-head,
.transport,
.score-legend {
  justify-content: space-between;
}
.score-title {
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  border: 0;
  min-width: 8rem;
  flex: 1;
  padding: 3px 0;
}
.score-title::placeholder {
  color: #404954;
}
.score-head {
  border-bottom: 1px solid var(--line);
}
.transport {
  background: #f8f9f8;
  border-bottom: 1px solid #cdd2d1;
}
.transport label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.transport button,
.transport select,
.tools button,
.score-head button {
  font-size: 0.91rem;
}
.transport .primary {
  min-width: 98px;
}
.transport #bpm-label,
.score-status,
.editor-mark,
kbd {
  font-family: Mono, monospace;
  font-size: 0.8rem;
}
.score-legend {
  padding-top: 16px;
  padding-bottom: 0;
  color: var(--muted);
}
.editor-mark {
  font-size: 0.72rem;
}
.system {
  position: relative;
  max-width: none;
  line-height: 0;
}
.system svg {
  display: block;
}
.system,
#pages,
#score-scroll {
  user-select: none;
  -webkit-user-select: none;
}
#score-scroll {
  position: relative;
  overflow-x: auto;
  max-height: 58vh;
  min-height: 154px;
  padding: 6px 0;
  scroll-margin: 12px;
}
#score-scroll:focus-visible {
  outline-offset: -3px;
}
.system .selected {
  background: #597fb331;
  width: 19px;
  position: absolute;
  pointer-events: none;
}
#cursor {
  position: absolute;
  pointer-events: none;
  width: 20px;
  height: 18px;
  border: 2px solid var(--blue);
  background: #507ba22e;
  border-radius: 3px;
  transform: translate(-50%, -50%);
}
#cursor.sounding {
  background: #305b874d;
}
.score-status {
  gap: 12px;
  border-top: 1px solid #dfe2df;
  color: var(--muted);
  min-height: 44px;
}
.score-status button {
  font: inherit;
  min-height: 44px;
}
.score-status #balance {
  margin-left: auto;
}
#key-hint,
.local-note {
  color: var(--muted);
  font-size: 0.88rem;
}
#key-hint {
  padding: 0 18px 12px;
}
.local-note {
  margin: 12px 0 22px;
}
.tools {
  background: var(--well);
  border-top: 1px solid #c8cdce;
}
.tools button:last-child {
  margin-left: auto;
}
.tools button {
  min-width: 44px;
}
details {
  border-top: 1px solid #d6dadb;
}
summary {
  padding: 10px 18px;
  color: #334454;
}
details > .cluster,
details > .touch-pad {
  padding: 4px 18px 12px;
}
.frets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 4px;
  margin: 8px 0;
}
.fields,
.diagram-grid,
.export-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}
label {
  display: grid;
  color: var(--muted);
  font-size: 0.92rem;
  gap: 4px;
}
label > input,
label > select {
  width: 100%;
  color: var(--ink);
}
label.check {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
}
.check input {
  width: 18px;
  height: 18px;
}
.fields > .cluster {
  grid-column: 1/-1;
}
#inspector h3 {
  margin: 6px 0 12px;
}
#pages {
  padding: 22px 12px;
  max-height: 78vh;
  overflow: auto;
  background: #e5e8e6;
}
.page-sheet {
  position: relative;
  margin: 0 auto 16px;
  max-width: 820px;
  border: 1px solid #c5c7c8;
  box-shadow: 0 4px 12px #182c4010;
}
.page-sheet svg {
  width: 100%;
  display: block;
  height: auto;
}
.watermark {
  position: absolute;
  top: 48%;
  width: 100%;
  font-size: clamp(1rem, 4vw, 3rem);
  color: #3a4c6033;
  text-align: center;
  transform: rotate(-24deg);
  pointer-events: none;
}
.entitled :is(.watermark, .editor-mark),
[hidden],
#print-pages,
#print-lock {
  display: none !important;
}
#status:empty,
#member:empty {
  display: none;
}
#status:not(:empty),
#member:not(:empty) {
  padding: 12px 0;
}
#member code {
  overflow-wrap: anywhere;
}
.sample {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.reading p {
  max-width: 64ch;
  margin: 14px 0;
}
.sample img {
  display: block;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
  background: white;
}
.sample figcaption {
  font-size: 0.85rem;
  margin-top: 8px;
  color: var(--muted);
}
.prose {
  max-width: 760px;
  padding: 48px 0;
  min-height: 55vh;
}
.prose h2 {
  margin: 27px 0 12px;
}
.price-line {
  font-variant-numeric: tabular-nums;
}
.key-list > div {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) 2fr;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #d8dddf;
}
.key-list dd {
  margin: 0;
}
.loading {
  padding: 50px 18px;
}
dialog {
  width: min(590px, calc(100% - 24px));
  max-height: 88dvh;
  color: var(--ink);
  border: 1px solid #aab3bd;
  border-radius: 8px;
  padding: 22px;
  overflow: auto;
}
dialog::backdrop {
  background: #1b2d3b55;
}
dialog header {
  justify-content: space-between;
  margin-bottom: 18px;
}
dialog p {
  margin: 12px 0;
}
dialog [role='status']:empty {
  display: none;
}
dialog label {
  margin: 8px 0;
}
dialog textarea {
  width: 100%;
  font:
    14px Mono,
    monospace;
}
.tab-list > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.tab-list small {
  margin-right: auto;
}
.reading a,
footer a {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  body > header,
  body > footer,
  main {
    width: calc(100% - 24px);
  }
  body > header {
    min-height: 58px;
  }
  .intro {
    padding: 17px 0 6px;
  }
  .intro > p {
    font-size: 0.93rem;
    line-height: 1.35;
  }
  .score-head,
  .transport,
  .score-status,
  .tools,
  .score-legend {
    padding: 6px 9px;
  }
  .score-head {
    gap: 1px;
  }
  .score-title {
    font-size: 1.17rem;
    width: 100%;
    flex-basis: 100%;
  }
  .transport label {
    font-size: 0;
  }
  .transport {
    gap: 4px;
  }
  .transport .cluster {
    gap: 3px;
  }
  .score-head button,
  .tools button,
  .transport button,
  .transport select {
    padding: 5px 8px;
  }
  .score-head button {
    background: transparent;
    border-color: transparent;
  }
  .score-status #balance {
    margin-left: 0;
  }
  .score-status {
    gap: 4px;
  }
  .sample {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .tools button:last-child {
    margin-left: 0;
  }
  .prose {
    padding: 30px 0;
  }
  .fields {
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  }
  #key-hint {
    padding: 0 9px 8px;
  }
  #score-scroll {
    max-height: 43vh;
  }
  .tabs {
    gap: 4px;
  }
  dialog {
    padding: 15px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .local-note {
    display: block;
  }
  .tools button {
    flex: 1;
  }
}
@media print {
  html,
  body,
  main,
  #site {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  body > header,
  body > footer,
  dialog,
  #site > * {
    display: none !important;
  }
  #print-lock {
    display: block !important;
    margin: 16mm;
  }
  body.entitled #print-lock {
    display: none !important;
  }
  body.entitled #print-pages {
    display: block !important;
  }
  #print-pages > div {
    break-inside: avoid;
    break-after: page;
    line-height: 0;
  }
  #print-pages > div:last-child {
    break-after: auto;
  }
  #print-pages svg {
    width: 100%;
    height: auto;
  }
  * {
    box-shadow: none !important;
  }
}

.diagram-grid {
  display: grid;
  grid-template-columns: repeat(var(--strings), minmax(0, 1fr));
  gap: 2px;
  max-width: 420px;
  margin: 12px 0;
}
.diagram-grid fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.diagram-grid legend {
  padding: 0;
  width: 100%;
  text-align: center;
  font:
    14px Mono,
    monospace;
}
.diagram-grid label {
  display: grid;
  place-items: center;
  position: relative;
  height: 36px;
  margin: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    transparent 49%,
    var(--line) 49%,
    var(--line) 51%,
    transparent 51%
  );
  cursor: pointer;
}
.diagram-grid input {
  position: absolute;
  inset: 0;
  opacity: 0;
  min-height: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}
.diagram-grid span {
  display: grid;
  place-items: center;
  background: white;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  font:
    13px Mono,
    monospace;
  pointer-events: none;
}
.diagram-grid input:checked + span {
  background: var(--blue);
  color: white;
}
.diagram-grid input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
