/*
 * Shared design tokens, self-hosted OFL fonts, theme controls and effects.
 * Change brand-wide colors here; application styles should reference variables.
 * Font filenames contain a content hash so cached files remain immutable.
 */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-cyrillic-ext-wght-normal-ca157063339a.woff2")
    format("woff2");
  unicode-range:
    U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-cyrillic-wght-normal-71d5ee93cc1e.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-greek-ext-wght-normal-6e9e020a25f9.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-greek-wght-normal-1be3448e292f.woff2") format("woff2");
  unicode-range:
    U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-vietnamese-wght-normal-5c66f9e07e90.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-latin-ext-wght-normal-34b9c504cab7.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./inter-latin-wght-normal-3100e775e861.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./ibm-plex-mono-cyrillic-ext-400-normal-f8c22ec1804b.woff2")
    format("woff2");
  unicode-range:
    U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./ibm-plex-mono-cyrillic-400-normal-7635422bd10d.woff2")
    format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./ibm-plex-mono-vietnamese-400-normal-62632b637530.woff2")
    format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./ibm-plex-mono-latin-ext-400-normal-6bc0f226a5b7.woff2")
    format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./ibm-plex-mono-latin-400-normal-08949f728dc5.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #efeee7;
  --ink: #262724;
  --line: #b9b9b0;
  --muted: #5b6055;
  --accent: #e64620;
  --action: #b63716;
  --header: #efeee7f2;
  --panel: #efeee7fa;
  --grid: #b9b9b025;
  --hover-fill: #292c27;
  --section-bg: #262a25;
  --section-ink: #eeeee5;
  --section-muted: #c1c9ba;
  --mono: "IBM Plex Mono", monospace;
  color-scheme: light;
}
:root[data-theme="blue"] {
  --paper: #e6f2f7;
  --ink: #203846;
  --line: #a7bdc8;
  --muted: #405e6b;
  --action: #af3417;
  --header: #e6f2f7f2;
  --panel: #e6f2f7fa;
  --grid: #a7bdc830;
  --hover-fill: #233f4c;
  --section-bg: #25434f;
  --section-ink: #e6f2f7;
  --section-muted: #c5dce5;
}
:root[data-theme="dark"] {
  --paper: #20231f;
  --ink: #e9e9df;
  --line: #596151;
  --muted: #bdc6b6;
  --action: #ff977a;
  --header: #20231ff2;
  --panel: #20231ffa;
  --grid: #87947d22;
  --hover-fill: #e9e9df;
  --section-bg: #dfdfd4;
  --section-ink: #252a22;
  --section-muted: #4c5745;
  color-scheme: dark;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter Variable", sans-serif;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.035' filter='url(%23n)'/%3E%3C/svg%3E");
}
.display-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}
.instrument-switch {
  display: grid;
  gap: 4px;
  min-width: 105px;
}
.instrument-label {
  font: 8px var(--mono);
  letter-spacing: 0.12em;
  color: var(--muted);
}
.instrument-positions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--grid);
  border: 1px solid var(--line);
  padding: 3px;
  gap: 2px;
}
.instrument-key {
  height: 28px;
  min-width: 29px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 10px var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.instrument-key[aria-pressed="true"] {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px #0002;
}
.instrument-key:hover {
  border-color: var(--muted);
}
.instrument-track {
  position: relative;
  height: 3px;
  background: var(--line);
  margin: 0 9px;
}
.instrument-track > span {
  position: absolute;
  top: -1px;
  left: 0;
  height: 5px;
  width: 9px;
  background: var(--accent);
  transform: translateX(-4px);
  transition: left 0.2s;
}
.instrument-switch[data-position="1"] .instrument-track > span {
  left: 50%;
}
.instrument-switch[data-position="2"] .instrument-track > span {
  left: 100%;
}
.theme-disc {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #777;
}
.paper .theme-disc {
  background: #efeee7;
}
.blue .theme-disc {
  background: #d6eaf5;
}
.dark.theme-key {
  background: transparent;
  color: var(--muted);
}
.dark.theme-key .theme-disc {
  background: #20231f;
}
.dark.theme-key[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}
.position-number {
  font-size: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.brand-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
}
.brand-surface > .brand-label {
  position: relative;
  z-index: 1;
  color: white;
  mix-blend-mode: difference;
}
.surface-ink {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0 !important;
  pointer-events: none;
}
#cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 130;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  width: 12px;
  height: 14px;
  background: none;
  color: var(--accent);
  font:
    700 14px/0.95 "Inter Variable",
    sans-serif;
  display: grid;
  place-items: center;
  margin-left: -3px;
  margin-top: -3px;
}
#trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 129;
}
#trail path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.65;
  opacity: 0.45;
}
.cursor-origin {
  display: inline-block;
}
@media (pointer: coarse) {
  #cursor,
  #trail {
    display: none;
  }
  html.touch-pointer-active #cursor {
    display: grid;
  }
  html.touch-pointer-active #trail {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  #cursor,
  #trail,
  html.touch-pointer-active #cursor,
  html.touch-pointer-active #trail {
    display: none;
  }
  .instrument-key,
  .instrument-track > span {
    transition: none;
  }
}

/* Read-only coordinate strip is part of the sticky header, never a floating action. */
.coordinate-strip {
  order: 2;
  flex-basis: calc(100% + 8vw);
  width: calc(100% + 8vw);
  margin: 0 -4vw;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 6px 4vw;
  background: var(--header);
}
.coordinate-strip .coords {
  position: static;
  color: var(--muted);
  font: 9px var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: nowrap;
}
body,
body * {
  cursor: default;
}
a,
a *,
button,
button *,
[role="button"],
[role="button"] * {
  cursor: pointer;
}
input,
textarea,
[contenteditable="true"] {
  cursor: text;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
