@font-face {
  font-family: Studio;
  src: local("Helvetica Neue");
}
* {
  box-sizing: border-box;
}
#bellworx-host {
  margin: 0;
  background: #172324;
  color: #e9e6dc;
  font-family: Studio, Arial, sans-serif;
  font-size: 14px;
  background-image: radial-gradient(ellipse at 65% 15%, #34474770, transparent 65%);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #f1793c;
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(2px);
}
.masthead {
  height: 82px;
  border-bottom: 1px solid #64737135;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
.wordmark {
  color: #e8e6db;
  text-decoration: none;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 15px;
}
.wordmark small {
  font-weight: 400;
  letter-spacing: 3px;
  font-size: 10px;
  margin-left: 7px;
}
.brand-symbol {
  vertical-align: middle;
  margin-right: 10px;
}
.local {
  font: 10px monospace;
  letter-spacing: 1.5px;
  color: #b5c4bb;
}
.local i,
.led {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8d8ab;
  margin-right: 8px;
  box-shadow: 0 0 9px #a8d8ab60;
}
.edition {
  margin-left: 20px;
  color: #7f9390;
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 0 40px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 210px;
}
.eyebrow {
  font: 10px monospace;
  letter-spacing: 2.5px;
  color: #aebcb4;
  margin-bottom: 15px;
}
h1 {
  font-size: clamp(36px, 4.3vw, 60px);
  line-height: 1;
  margin: 0;
  letter-spacing: -2.5px;
  font-weight: 500;
}
h1 span {
  color: #e98149;
}
.lede {
  font-size: 14px;
  color: #b9c4bd;
  margin-top: 16px;
}
.object-view {
  position: relative;
  width: 310px;
  height: 200px;
  border: 0;
  background: none;
  color: #a8b9ae;
}
.object-view img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 14px #0006);
}
.object-view span {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font: 9px monospace;
  letter-spacing: 1.2px;
}
.workspace-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
}
.project-name {
  display: flex;
  align-items: center;
  gap: 9px;
}
.project-dot {
  width: 7px;
  height: 7px;
  background: #e6864c;
  border-radius: 50%;
}
.project-name input {
  color: #f3efe5;
  background: transparent;
  border: 0;
  font-size: 16px;
  width: 190px;
  outline-offset: 2px;
}
.project-name #dirty {
  font: 8px monospace;
  letter-spacing: 1px;
  color: #98aaa1;
}
.file-actions {
  display: flex;
  gap: 7px;
}
.file-actions button,
.sequencer-heading button {
  border: 1px solid #81958a45;
  background: #31413c40;
  color: #d0d9ce;
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 11px;
}
.file-actions #save {
  background: #d6ded0;
  color: #24362d;
}
.instrument {
  position: relative;
  background: linear-gradient(115deg, #ddd9c9, #c5c3b5 60%, #cfcabb);
  color: #253333;
  padding: 30px 32px 20px;
  border-radius: 17px;
  border: 1px solid #f5f0dc;
  box-shadow:
    0 2px 1px #ece8d1 inset,
    0 -7px 1px #8d9284 inset,
    0 8px 0 #0c1517,
    0 10px 0 #64746c,
    0 32px 48px #0005;
  overflow: hidden;
}
.instrument:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, #56685c 3px);
}
.instrument > * {
  position: relative;
}
.screw {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 35% 25%, #c2c5b7, #5c685f);
  border-radius: 50%;
  box-shadow: 0 1px 1px #fff8;
}
.screw:after {
  content: "";
  width: 6px;
  height: 1px;
  background: #344039;
  position: absolute;
  top: 5px;
  left: 2px;
  transform: rotate(-35deg);
}
.top-left {
  top: 12px;
  left: 12px;
}
.top-right {
  top: 12px;
  right: 12px;
}
.bottom-left {
  bottom: 14px;
  left: 12px;
}
.bottom-right {
  bottom: 14px;
  right: 12px;
}
.instrument-top {
  display: grid;
  grid-template-columns: 1fr 1.6fr 0.65fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 24px;
}
.device-brand b {
  display: block;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 800;
}
.device-brand > span {
  display: block;
  font: 8px monospace;
  letter-spacing: 1px;
  margin-top: 8px;
}
.stripe {
  display: flex;
  margin-top: 22px;
  gap: 3px;
}
.stripe i {
  width: 20px;
  height: 6px;
  background: #334a46;
}
.stripe i:nth-child(2) {
  background: #637c67;
}
.stripe i:nth-child(3) {
  background: #adae83;
}
.stripe i:nth-child(4) {
  background: #d36a32;
}
.display {
  background: linear-gradient(125deg, #122a25, #0b1d1a);
  color: #b5d9ba;
  border: 5px solid #39423a;
  border-radius: 8px;
  padding: 12px 16px 10px;
  box-shadow:
    inset 0 4px 9px #0009,
    0 1px 1px #ffffe0;
  font-family: monospace;
  text-shadow: 0 0 7px #8edbac45;
}
.display-meta,
.display-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.2px;
  gap: 8px;
}
.display-meta {
  color: #8aa990;
}
.display-meta span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 180px;
}
.readouts {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 10px 0;
}
.readouts > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.readouts strong {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -2px;
}
.readouts small {
  font-size: 7px;
  max-width: 20px;
  line-height: 1.8;
}
.readouts #scope {
  width: 90px;
  height: 35px;
  flex: 1;
  min-width: 35px;
  opacity: 0.8;
}
.display-bottom {
  color: #6c937c;
  font-size: 7px;
}
.transport {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}
.transport button {
  border: 1px solid #4c5146;
  border-radius: 7px;
  height: 62px;
  box-shadow:
    0 4px 0 #867d68,
    0 1px 1px #ffffdc inset;
}
.play {
  background: linear-gradient(#ed925c, #cf6838);
  color: #3d2819;
  font-size: 25px;
}
.play.playing {
  background: #8ba98c;
}
.stop {
  background: linear-gradient(#ebe7d8, #c5c1af);
  font-size: 20px;
  color: #444a3c;
}
.loop {
  grid-column: span 2;
  font: 8px monospace;
  letter-spacing: 1px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.loop input {
  accent-color: #334e42;
}
.control-strip {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
  border-top: 1px solid #78847270;
  border-bottom: 1px solid #78847270;
}
.control-strip label {
  font: 8px monospace;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.control-strip input[type="number"] {
  width: 59px;
  padding: 6px;
  border: 1px solid #8c9583;
  border-radius: 4px;
  background: #e3e0d2;
  color: #263c33;
  font: 14px monospace;
}
.control-strip select {
  background: transparent;
  color: #2f4035;
  border: 0;
  font: 12px monospace;
}
.control-strip label > span {
  font-size: 8px;
  color: #62715f;
}
.monitor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font: 9px monospace;
}
.monitor input {
  width: 100px;
}
input[type="range"] {
  accent-color: #405d4d;
  height: 4px;
}
.sequencer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 17px;
}
.sequencer-heading > div,
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.section-number {
  font: 9px monospace;
  background: #abb09e;
  border: 1px solid #929e88;
  padding: 3px 5px;
  border-radius: 3px;
}
.subtle {
  font: 8px monospace;
  letter-spacing: 1px;
  color: #697764;
}
.sequencer-heading button {
  color: #364d3f;
  border-color: #8d9a85;
  background: #bfc3b2;
  padding: 6px 10px;
}
.sequencer {
  display: grid;
  grid-template-columns: 116px repeat(16, minmax(28px, 1fr));
  gap: 7px;
  min-width: 850px;
}
.sequencer-scroll {
  overflow-x: auto;
  padding: 0 2px 5px;
}
.step-label {
  font: 8px monospace;
  text-align: center;
  color: #6b7765;
  padding-bottom: 4px;
}
.step-label.beat {
  color: #303e32;
  font-weight: bold;
}
.lane-label {
  height: 41px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 600;
}
.lane-label small {
  font: 8px monospace;
  color: #778470;
  width: 18px;
}
.pad {
  height: 41px;
  position: relative;
  border: 1px solid #a1a591;
  border-radius: 5px;
  background: linear-gradient(#e9e5d6, #cfccba);
  box-shadow:
    0 3px 0 #9d9f8c,
    0 1px 0 #fff9 inset;
  color: #7f8a76;
  font: 9px monospace;
  padding: 0;
  transition: background 0.08s;
}
.pad.group-start {
  border-left: 2px solid #8c9581;
}
.pad.on {
  background: linear-gradient(#e59b67, #ce7d4d);
  box-shadow:
    0 3px 0 #9c5b34,
    0 1px 0 #ffd2a6 inset;
  border-color: #ae7047;
  color: #463e25;
}
.pad.hats.on {
  background: linear-gradient(#b9cba6, #96ad85);
  border-color: #859c74;
  box-shadow:
    0 3px 0 #768c64,
    0 1px 0 #e5f1cc inset;
}
.pad.bass.on {
  background: linear-gradient(#83a49c, #688d82);
  border-color: #587c70;
  box-shadow:
    0 3px 0 #4e6f62,
    0 1px 0 #bdd3c8 inset;
  color: #172e27;
}
.pad.percussion.on {
  background: linear-gradient(#d3c69b, #b4a77f);
  border-color: #998d69;
  box-shadow: 0 3px 0 #8e835d;
}
.pad.current:after {
  content: "";
  position: absolute;
  height: 3px;
  bottom: 4px;
  left: 25%;
  right: 25%;
  background: #fff4c4;
  box-shadow: 0 0 7px #ffef91;
}
.step-label.current {
  color: #bd4e21;
  text-shadow: 0 0 5px #d59055;
}
.pattern-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  color: #707c68;
  margin: 15px 0 22px;
}
.lower-deck {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 32px;
  border-top: 1px solid #8c978575;
  padding-top: 20px;
}
.chords {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.chord {
  padding: 10px;
  background: #b9bfac;
  border: 1px solid #9ba58f;
  border-radius: 5px;
  box-shadow: 0 1px 0 #e5e8d3 inset;
}
.chord.active {
  border-color: #c56a3c;
  background: #d2c6a9;
}
.chord > span {
  display: block;
  font: 8px monospace;
  color: #74806b;
  margin-bottom: 7px;
}
.chord select {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  color: #344b3a;
  font: 18px monospace;
  cursor: pointer;
}
.chord .quality {
  font: 9px monospace;
  margin-top: 5px;
}
.tone label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  margin-top: 23px;
}
.tone input {
  flex: 1;
  min-width: 30px;
}
.tone output {
  font: 9px monospace;
  width: 30px;
  color: #65785f;
}
.instrument-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  font: 7px monospace;
  letter-spacing: 1.2px;
  color: #74816c;
}
.instrument-footer .led {
  width: 4px;
  height: 4px;
  background: #4e7956;
  box-shadow: none;
  margin-right: 5px;
}
.instrument-footer b {
  letter-spacing: 3px;
  margin-left: 10px;
  color: #647b62;
}
.below {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  margin-top: 42px;
}
.library .subtle {
  color: #81988a;
}
.library select {
  width: 100%;
  margin-top: 15px;
  border: 1px solid #577265;
  background: #20322d;
  color: #d6dfcf;
  border-radius: 5px;
  padding: 10px;
  font-size: 11px;
}
.library p {
  color: #8fa597;
  font-size: 10px;
}
.export {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-left: 30px;
  border-left: 1px solid #54716160;
}
.export h2 {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.3px;
}
.export p {
  font-size: 11px;
  color: #a2b5a5;
  line-height: 1.7;
  margin: 10px 0 5px;
}
.export > div > span {
  font: 9px monospace;
  color: #7e9785;
}
.export-button {
  white-space: nowrap;
  border: 1px solid #f2b17f;
  border-radius: 6px;
  background: #e18c55;
  color: #2e3529;
  padding: 18px 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 0 #8d502e;
}
.export-button span {
  margin-left: 18px;
  font-size: 17px;
}
#status {
  min-height: 22px;
  color: #b4c8b6;
  margin: 25px 0 10px;
}
#status.error {
  color: #ffc29a;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #546e5e55;
  padding: 20px 0 30px;
  color: #768e7b;
  font: 8px monospace;
  letter-spacing: 1px;
}
dialog {
  background: #23332f;
  color: #dce5d5;
  border: 1px solid #7c8f7c;
  border-radius: 16px;
  max-width: 850px;
  padding: 25px;
  text-align: center;
}
dialog::backdrop {
  background: #07100de0;
  backdrop-filter: blur(8px);
}
dialog img {
  width: 100%;
}
dialog h2 {
  font-size: 21px;
}
dialog p {
  max-width: 580px;
  margin: 14px auto;
  color: #a9bda9;
  line-height: 1.6;
  font-size: 13px;
}
#close-study {
  position: absolute;
  right: 15px;
  top: 12px;
  background: none;
  border: 0;
  color: #d7dfcc;
  font-size: 28px;
}
@media (max-width: 1000px) {
  main {
    padding: 0 22px;
  }
  .instrument {
    padding: 28px 22px 20px;
  }
  .instrument-top {
    grid-template-columns: 0.9fr 1.6fr 0.6fr;
    gap: 15px;
  }
  .device-brand b {
    font-size: 14px;
  }
  .device-brand > span {
    font-size: 6px;
  }
  .readouts {
    gap: 15px;
  }
  .readouts strong {
    font-size: 28px;
  }
  .readouts #scope {
    display: none;
  }
  .file-actions button {
    padding: 8px;
    font-size: 10px;
  }
  .project-name input {
    width: 140px;
  }
  .pattern-hint {
    font-size: 8px;
  }
  .control-strip {
    gap: 18px;
  }
  .export {
    padding-left: 20px;
  }
  .below {
    gap: 20px;
  }
}
@media (max-width: 700px) {
  .masthead {
    height: 65px;
    padding: 0 22px;
  }
  .wordmark {
    font-size: 11px;
  }
  .wordmark small,
  .edition {
    display: none;
  }
  .local {
    font-size: 8px;
  }
  .intro {
    height: 170px;
  }
  .object-view {
    width: 160px;
    height: 140px;
  }
  .object-view span {
    display: none;
  }
  h1 {
    font-size: 36px;
  }
  .lede {
    font-size: 11px;
    max-width: 220px;
    line-height: 1.5;
  }
  .eyebrow {
    font-size: 8px;
  }
  .workspace-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .file-actions {
    width: 100%;
    justify-content: space-between;
  }
  .project-name input {
    width: 180px;
  }
  .instrument-top {
    grid-template-columns: 1fr 0.4fr;
  }
  .device-brand {
    display: none;
  }
  .display {
    padding: 10px;
  }
  .control-strip {
    flex-wrap: wrap;
    gap: 15px;
  }
  .monitor {
    margin-left: 0;
  }
  .monitor input {
    width: 100px;
  }
  .lower-deck {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .below {
    grid-template-columns: 1fr;
  }
  .export {
    border-left: 0;
    border-top: 1px solid #54716160;
    padding: 22px 0;
  }
  .pattern-hint {
    flex-direction: column;
    gap: 5px;
  }
  .sequencer-heading .subtle {
    display: none;
  }
  .instrument-footer {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .page-footer {
    font-size: 7px;
    gap: 15px;
  }
  .object-view {
    margin-right: -15px;
  }
  .section-heading .subtle {
    font-size: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* The Blender model is the primary control surface. */
[hidden] {
  display: none !important;
}
.intro {
  height: 175px;
}
.object-view {
  width: 220px;
  height: 160px;
}
.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #78938340;
  padding: 18px 0 0;
  font: 10px monospace;
  letter-spacing: 2px;
}
.view-bar .subtle {
  color: #80968c;
  margin-left: 12px;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #dc9a65;
  border-radius: 50%;
  margin-right: 10px;
}
#editor-toggle {
  background: transparent;
  border: 1px solid #728c7955;
  color: #bac9b8;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 10px;
}
.hardware {
  position: relative;
  margin: 0 -30px 12px;
  background: radial-gradient(ellipse at 50% 55%, #71806a19, transparent 65%);
}
.hardware canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.hardware-tooltip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font: 9px monospace;
  color: #a5b7a4;
  letter-spacing: 0.7px;
  pointer-events: none;
}
.hardware-loading {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  text-align: center;
  font: 12px monospace;
  color: #aabda6;
}
.instrument {
  margin-top: 24px;
}
@media (max-width: 700px) {
  .hardware {
    margin: 0 -20px;
  }
  .hardware-tooltip {
    font-size: 8px;
    padding: 0 20px;
  }
  .view-bar .subtle {
    display: none;
  }
  .intro {
    height: 160px;
  }
}
@media (min-width: 701px) {
  .masthead {
    height: 60px;
  }
  .intro {
    height: 115px;
  }
  .intro h1 {
    font-size: 42px;
  }
  .intro .eyebrow {
    margin: 0 0 10px;
    font-size: 8px;
  }
  .intro .lede {
    margin: 10px 0 0;
    font-size: 12px;
  }
  .object-view {
    height: 115px;
    width: 180px;
  }
  .object-view span {
    font-size: 7px;
    bottom: 5px;
  }
  .workspace-bar {
    margin-top: 8px;
    margin-bottom: 12px;
  }
  .view-bar {
    padding-top: 12px;
  }
}
.score-download {
  display: block;
  border: 0;
  border-bottom: 1px solid #78947f70;
  background: none;
  color: #b9ccaf;
  font-size: 9px;
  padding: 0 0 3px;
  margin-top: 12px;
}
.score-download:disabled {
  opacity: 0.35;
}
.note-inspector {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 25px 0 0;
  padding: 18px 20px;
  border: 1px solid #58705e80;
  border-radius: 8px;
  background: #20322d;
}
.note-inspector label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.note-inspector select,
.note-inspector input {
  background: #d1d8c6;
  border: 0;
  border-radius: 4px;
  padding: 7px;
  color: #20332a;
}
.note-inspector input {
  width: 64px;
}
.note-inspector span,
.note-inspector p {
  font-size: 10px;
  color: #9eb29a;
}
.note-inspector span {
  display: block;
  margin-top: 6px;
}
.note-inspector p {
  margin-left: auto;
  max-width: 220px;
  line-height: 1.6;
}
@media (max-width: 700px) {
  .note-inspector {
    flex-wrap: wrap;
  }
  .note-inspector p {
    margin: 0;
  }
}
.tuning-deck {
  border-top: 1px solid #ffffff18;
  padding: 28px 0;
  margin-top: 24px;
}
.tuning-voices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tuning-voice {
  padding: 22px;
  border: 1px solid #ffffff1c;
  border-radius: 8px;
  background: #ffffff03;
}
.tuning-voice h3,
.midi-strip h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 500;
}
.tuning-voice p,
.midi-strip p {
  font-size: 12px;
  line-height: 1.6;
  color: #b8c1b8;
  margin: 0 0 16px;
}
.tuning-voice label {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
}
.tuning-voice input {
  width: 100%;
  accent-color: #c6d5bd;
}
.tuning-voice output {
  text-align: right;
  font-family: monospace;
  color: #c6d5bd;
}
.midi-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}
.midi-strip > div {
  flex: 1;
}
.midi-strip p {
  max-width: 650px;
  margin-bottom: 0;
}
.midi-strip button {
  white-space: nowrap;
}
.note-inspector {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .tuning-voices {
    grid-template-columns: 1fr;
  }
  .midi-strip {
    flex-wrap: wrap;
  }
  .midi-strip > div {
    flex-basis: 100%;
  }
}
.midi-strip button {
  border: 1px solid #81958a65;
  background: #31413c80;
  color: #d0d9ce;
  padding: 12px 16px;
  border-radius: 5px;
  font-size: 12px;
}
.midi-strip #midi-export {
  background: #d6ded0;
  color: #24362d;
}
.midi-strip button:hover {
  border-color: #c6d5bd;
}
.tuning-deck > .section-heading {
  margin-bottom: 18px;
}
.profile-strip {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  border: 1px solid #81958a45;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: #23332f80;
}
.profile-picker {
  display: grid;
  grid-template-columns: auto 130px;
  gap: 8px 14px;
}
.profile-picker label {
  font: 10px monospace;
  letter-spacing: 1.5px;
}
.profile-picker p {
  grid-column: 1/-1;
  font-size: 12px;
  color: #aebfb3;
  margin: 2px 0;
}
.profile-picker select,
.random-controls input {
  background: #20322d;
  color: #d6dfcf;
  border: 1px solid #577265;
  border-radius: 5px;
  padding: 9px;
}
.random-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.random-controls button {
  border: 1px solid #81958a65;
  background: #31413c80;
  color: #d0d9ce;
  padding: 11px 13px;
  border-radius: 5px;
  font-size: 12px;
}
.random-controls #randomize {
  background: #d6ded0;
  color: #24362d;
}
.random-controls label {
  display: flex;
  gap: 7px;
  align-items: center;
  font: 10px monospace;
  color: #b8c1b8;
}
.random-controls input {
  width: 116px;
}
@media (max-width: 700px) {
  main {
    padding: 0 14px;
  }
  .profile-strip {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
  }
  .profile-picker {
    grid-template-columns: auto 1fr;
  }
  .random-controls {
    justify-content: flex-start;
  }
  .random-controls input {
    width: 125px;
  }
  .file-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .file-actions button,
  .random-controls button,
  .midi-strip button,
  .view-bar button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
  }
  input,
  select {
    font-size: 16px;
  }
  .note-inspector {
    gap: 14px;
    padding: 16px;
  }
  .note-inspector > div {
    width: 100%;
  }
  .note-inspector input,
  .note-inspector select {
    min-height: 44px;
  }
  .tuning-voice {
    padding: 18px 14px;
  }
  .tuning-voice label {
    grid-template-columns: 46px minmax(60px, 1fr) 94px;
    gap: 7px;
  }
  .tuning-voice input {
    min-height: 44px;
  }
  .tuning-deck > .section-heading {
    flex-wrap: wrap;
    gap: 9px;
  }
  .sequencer {
    grid-template-columns: 80px repeat(16, 44px);
    gap: 5px;
    min-width: 864px;
  }
  .sequencer .pad {
    height: 44px;
    min-height: 44px;
  }
  .sequencer-scroll {
    overscroll-behavior-x: contain;
  }
  .instrument {
    padding: 22px 12px 18px;
  }
  .transport button {
    min-width: 44px;
    min-height: 44px;
  }
  .control-strip input,
  .control-strip select,
  .chords select {
    min-height: 44px;
  }
  .intro .object-view {
    width: 110px;
    margin-right: 0;
  }
  .intro .lede {
    max-width: 225px;
  }
  .page-footer {
    flex-wrap: wrap;
  }
  .midi-strip button {
    flex: 1;
  }
  .masthead {
    padding: 0 14px;
  }
}
@media (max-width: 700px) {
  .hardware {
    margin: 0 -14px;
  }
}
/* Portrait performance surface. Musical controls keep their existing ownership. */
#mobile-lanes {
  display: none;
}
@media (max-width: 700px) {
  .masthead {
    height: 42px;
  }
  .masthead .local {
    display: none;
  }
  main {
    display: flex;
    flex-direction: column;
  }
  .intro {
    display: none;
  }
  main > section,
  main > div,
  main > p,
  main > footer {
    order: 6;
  }
  .profile-strip {
    order: 0;
    margin: 10px 0 6px;
    padding: 0;
    border: 0;
    background: none;
  }
  .profile-picker {
    grid-template-columns: 1fr;
  }
  .profile-picker label,
  .profile-picker p {
    display: none;
  }
  .profile-picker select {
    font-size: 16px;
  }
  .random-controls {
    justify-content: stretch;
    gap: 8px;
  }
  .random-controls > button {
    flex: 1;
  }
  .random-controls label,
  .random-controls #repeat-seed {
    display: none;
  }
  #bellworx-host[data-studio-view="controls"] .random-controls label {
    display: flex;
  }
  #bellworx-host[data-studio-view="controls"] .random-controls #repeat-seed {
    display: block;
  }
  .view-bar {
    order: 1;
    padding-top: 4px;
    border: 0;
    font-size: 9px;
  }
  .view-bar button {
    min-height: 36px;
    padding: 6px 10px;
  }
  #mobile-lanes {
    order: 2;
    display: flex;
    gap: 4px;
    margin-top: 8px;
  }
  #mobile-lanes button {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #b8c9b333;
    border-radius: 6px;
    background: #20322d;
    color: #c9d3bf;
    font-size: 12px;
  }
  #mobile-lanes button[aria-pressed="true"] {
    background: #d69b68;
    color: #15241f;
    border-color: #d69b68;
  }
  .hardware {
    order: 3;
    touch-action: pan-y;
  }
  .hardware-tooltip {
    font-size: 9px;
    letter-spacing: 0;
    bottom: 0;
  }
  #flat-editor {
    order: 4;
  }
  .workspace-bar {
    order: 5;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #ffffff20;
  }
}
@media (max-width: 700px) {
  /* The physical lane keys are primary; retain semantic controls for assistive
     technology and reveal them when keyboard focus enters this group. */
  #mobile-lanes {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #mobile-lanes:focus-within {
    position: static;
    width: auto;
    height: auto;
    margin: 8px 0 0;
    overflow: visible;
    clip-path: none;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .hardware {
    margin-left: -20px;
    margin-right: -20px;
  }
}
#mobile-dock {
  display: none;
}
@media (max-width: 700px) {
  #bellworx-host {
    scroll-padding-bottom: 144px;
  }
  .hardware canvas {
    touch-action: pan-y;
  }
  #mobile-dock {
    display: block;
    position: fixed;
    z-index: 20;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    background: #142722f5;
    border-top: 1px solid #8caa8f66;
    box-shadow: 0 -4px 22px #0003;
  }
  .mobile-transport {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .mobile-transport button {
    min-width: 58px;
    min-height: 48px;
    background: #db9b65;
    color: #172621;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
  }
  .mobile-transport label {
    font: 10px monospace;
    color: #c5d4bd;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  #mobile-tempo {
    width: 78px;
    min-height: 38px;
    font: 18px monospace;
    background: #e0e4d4;
    color: #1a2c22;
    border: 0;
    border-radius: 4px;
    padding: 4px 8px;
  }
  .mobile-volume {
    min-width: 60px;
  }
  .mobile-volume input {
    width: 100%;
    accent-color: #d7a172;
  }
  .note-inspector,
  .tuning-deck,
  #flat-editor,
  .workspace-bar,
  .hardware {
    scroll-margin-top: 12px;
  }
}
@media (max-width: 700px) {
  .mobile-transport {
    gap: 8px;
  }
  .mobile-tempo-control {
    width: 150px;
    flex-shrink: 0;
  }
  .tempo-nudge {
    display: flex;
    align-items: center;
    margin-top: 3px;
  }
  .tempo-nudge button {
    background: #294037;
    color: #dbe4d1;
    font-size: 20px;
    border-radius: 4px;
  }
  #mobile-tempo {
    width: 62px;
    padding: 4px;
    font-size: 16px;
    text-align: center;
    border-radius: 0;
  }
  .mobile-volume {
    min-width: 50px;
  }
}
/* Keep the complete portrait instrument above transport on typical phones.
   Short screens retain scrolling instead of shrinking pads below usability. */
@media (max-width: 700px) {
  .profile-strip {
    flex-direction: row;
    align-items: center;
    margin: 8px 0 0;
  }
  .profile-picker {
    min-width: 80px;
  }
  .random-controls {
    flex-wrap: nowrap;
  }
  .random-controls > button {
    flex: none;
  }
  .random-controls #random-undo {
    padding: 10px 8px;
  }
  .view-bar {
    display: none;
  }
  .hardware {
    margin: 0 -6px 8px;
  }
}
@media (max-width: 350px) {
  .profile-strip {
    gap: 5px;
  }
  .random-controls button {
    padding: 10px 8px;
    font-size: 11px;
  }
}

/* Mobile navigation reveals focused panels without unmounting the engine. */
@media (max-width: 700px) {
  #mobile-dock {
    background: #142722;
  }
  #bellworx-host[data-studio-view] .page-footer {
    display: none;
  }
  #bellworx-host[data-studio-view]:not([data-studio-view="instrument"]) .hardware,
  #bellworx-host[data-studio-view]:not([data-studio-view="instrument"]) #mobile-lanes,
  #bellworx-host[data-studio-view]:not([data-studio-view="controls"]) #flat-editor,
  #bellworx-host[data-studio-view]:not([data-studio-view="tone"]) .note-inspector,
  #bellworx-host[data-studio-view="instrument"] .tuning-deck,
  #bellworx-host[data-studio-view="controls"] .tuning-deck,
  #bellworx-host[data-studio-view]:not([data-studio-view="files"]) .workspace-bar,
  #bellworx-host[data-studio-view]:not([data-studio-view="files"]) .below,
  #bellworx-host[data-studio-view="tone"] .midi-strip,
  #bellworx-host[data-studio-view="files"] .tuning-voices,
  #bellworx-host[data-studio-view="files"] .tuning-deck > .section-heading {
    display: none;
  }
  #bellworx-host[data-studio-view="files"] .tuning-deck {
    padding: 0;
    border: 0;
    margin-top: 12px;
  }
  #bellworx-host[data-studio-view="files"] .midi-strip {
    margin-top: 0;
  }
  #bellworx-host[data-studio-view="instrument"] #status {
    margin: 8px 0;
  }
}
.hardware-knob {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}
.hardware-knob:active:not(:disabled) {
  transform: translate(-50%, -50%);
}
.hardware-knob:focus-visible {
  outline: 2px solid #e6aa72;
}
/* Studio finish: one instrument, one navigation system, neutral desk lighting. */
:root {
  --desk: #24262a;
  --panel: #2c2e32;
  --edge: #484b50;
  --paper: #e8e8e1;
  --muted: #a4a7a8;
  --signal: #f1ad68;
}
#bellworx-host {
  background: radial-gradient(ellipse at 50% 28%, #3c3e42 0%, var(--desk) 72%);
  color: var(--paper);
  font-family: "Helvetica Neue", Arial, sans-serif;
  padding-bottom: 112px;
}
.masthead {
  height: 64px;
  padding: 0 32px;
  border-color: #ffffff12;
  gap: 20px;
  background: #202226a8;
}
.wordmark {
  font-size: 12px;
  letter-spacing: 1.8px;
  white-space: nowrap;
}
.wordmark small {
  display: none;
}
.brand-symbol {
  font-size: 25px;
  margin-right: 8px;
}
.product-title {
  font-size: 12px;
  color: #babdbc;
  border-left: 1px solid #ffffff25;
  padding-left: 20px;
  margin-right: auto;
  letter-spacing: 0.2px;
}
.local {
  font-size: 9px;
  color: #a9b1ab;
}
.edition {
  display: none;
}
main {
  max-width: 1440px;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
}
main > section,
main > div,
main > p,
main > footer {
  order: 6;
}
.profile-strip {
  order: 0;
  margin: 20px 0 0;
  padding: 0;
  background: none;
  gap: 16px;
  flex-direction: row;
  align-items: center;
}
.profile-picker {
  display: flex;
  gap: 14px;
  align-items: center;
}
.profile-picker label {
  display: none;
}
.profile-picker p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  max-width: 290px;
  line-height: 1.5;
}
.profile-picker select {
  min-width: 150px;
  background: #25272b;
  color: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 13px;
}
.random-controls {
  gap: 8px;
}
.random-controls button {
  background: #323438;
  border: 1px solid #515359;
  color: var(--paper);
  border-radius: 4px;
  padding: 12px 18px;
  min-height: 44px;
}
.random-controls #randomize {
  background: #e2e1d8;
  border-color: #e2e1d8;
  color: #242629;
}
.random-controls label,
.random-controls #repeat-seed {
  display: none;
}
#bellworx-host[data-studio-view="controls"] .random-controls label {
  display: flex;
}
#bellworx-host[data-studio-view="controls"] .random-controls #repeat-seed {
  display: block;
}
.view-bar,
.page-footer {
  display: none;
}
.hardware {
  order: 1;
  max-height: 900px;
  margin: 0;
  background: none;
}
.hardware-tooltip {
  bottom: 12px;
  color: #b1b3b1;
  font-size: 10px;
  letter-spacing: 0.3px;
}
#mobile-dock {
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: fixed;
  bottom: 20px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(850px, calc(100% - 64px));
  z-index: 20;
  padding: 12px 18px;
  background: #292b2ff5;
  border: 1px solid #55575b;
  border-radius: 8px;
  box-shadow: 0 8px 24px #0004;
}
.mobile-transport {
  display: flex;
  gap: 14px;
  align-items: center;
  order: 2;
}
.mobile-transport > button {
  min-width: 60px;
  min-height: 44px;
  border: 1px solid #ffc48b;
  border-radius: 4px;
  background: var(--signal);
  color: #25272b;
  font-weight: 600;
  font-size: 12px;
}
.mobile-transport label {
  font: 9px monospace;
  color: #bfc1bf;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mobile-tempo-control {
  width: 138px;
}
.tempo-nudge {
  display: flex;
  align-items: center;
  margin-top: 3px;
}
.tempo-nudge button {
  min-width: 40px;
  min-height: 32px;
  width: 40px;
  border: 1px solid #53565a;
  background: #35373b;
  color: #e3e5df;
  font-size: 18px;
  border-radius: 3px;
}
#mobile-tempo {
  width: 58px;
  min-height: 32px;
  background: #1e2023;
  color: #f1d3a7;
  border: 1px solid #53565a;
  border-radius: 0;
  font: 16px monospace;
  text-align: center;
  padding: 4px;
}
.mobile-volume {
  width: 90px;
  min-width: 50px;
}
.mobile-volume input {
  width: 100%;
  height: 32px;
  accent-color: var(--signal);
}
#bellworx-host[data-studio-view]:not([data-studio-view="instrument"]) .hardware,
#bellworx-host[data-studio-view]:not([data-studio-view="instrument"]) #mobile-lanes,
#bellworx-host[data-studio-view]:not([data-studio-view="controls"]) #flat-editor,
#bellworx-host[data-studio-view]:not([data-studio-view="tone"]) .note-inspector,
#bellworx-host[data-studio-view="instrument"] .tuning-deck,
#bellworx-host[data-studio-view="controls"] .tuning-deck,
#bellworx-host[data-studio-view]:not([data-studio-view="files"]) .workspace-bar,
#bellworx-host[data-studio-view]:not([data-studio-view="files"]) .below,
#bellworx-host[data-studio-view]:not([data-studio-view="files"]) .intro,
#bellworx-host[data-studio-view="tone"] .midi-strip,
#bellworx-host[data-studio-view="files"] .tuning-voices,
#bellworx-host[data-studio-view="files"] .tuning-deck > .section-heading {
  display: none;
}
#bellworx-host[data-studio-view="files"] .intro {
  display: flex;
  order: 5;
  height: 120px;
  margin-top: 20px;
}
.intro .eyebrow,
.intro .lede {
  display: none;
}
.intro h1 {
  font-size: 28px;
  letter-spacing: -1px;
}
.intro h1 span {
  color: var(--signal);
}
.workspace-bar {
  order: 6;
  margin: 16px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}
.note-inspector,
.tuning-voice {
  background: var(--panel);
  border-color: var(--edge);
  border-radius: 5px;
}
.note-inspector {
  margin-top: 28px;
  padding: 24px;
}
.tuning-deck {
  border: 0;
  margin-top: 12px;
}
.tuning-voice {
  padding: 24px;
}
.tuning-voice h3 {
  font-size: 20px;
}
.tuning-voice input {
  accent-color: var(--signal);
}
.tuning-voice output {
  color: #f1d3a7;
}
.tuning-voice p,
.midi-strip p,
.export p {
  color: var(--muted);
}
.midi-strip button,
.file-actions button {
  background: #35373b;
  border-color: #56595e;
  color: var(--paper);
  min-height: 44px;
  padding: 10px 16px;
}
.below {
  margin-top: 28px;
  gap: 32px;
}
.library select {
  background: #303236;
  border-color: #56595e;
  color: var(--paper);
  min-height: 44px;
}
.export {
  border-color: var(--edge);
}
.export-button {
  background: var(--signal);
  border-color: #ffc48b;
  color: #242629;
  box-shadow: 0 2px 0 #8e623b;
  border-radius: 4px;
}
#status {
  color: #9da3a4;
  margin: 14px 0 20px;
  font: 10px monospace;
  max-width: 800px;
  line-height: 1.6;
}
#bellworx-host[data-studio-view="instrument"] #status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#bellworx-host[data-studio-view="instrument"] #status.error {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
}
@media (max-width: 900px) {
  .profile-picker p {
    display: none;
  }
  #mobile-dock {
    gap: 14px;
    width: calc(100% - 32px);
  }
  .mobile-volume {
    width: 65px;
  }
}
@media (max-width: 700px) {
  #bellworx-host {
    padding-bottom: 144px;
  }
  .masthead {
    height: 46px;
    padding: 0 16px;
  }
  .wordmark {
    font-size: 10px;
    letter-spacing: 1.4px;
  }
  .product-title {
    padding-left: 12px;
  }
  .brand-symbol {
    font-size: 22px;
    margin-right: 5px;
  }
  main {
    padding: 0 12px;
  }
  .profile-strip {
    margin: 10px 0 0;
    gap: 8px;
  }
  .profile-picker {
    flex: 1;
    min-width: 70px;
  }
  .profile-picker select {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 10px;
  }
  .random-controls {
    gap: 6px;
  }
  .random-controls button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .random-controls #random-undo {
    padding: 10px 9px;
  }
  .hardware {
    max-height: none;
    margin: 0 -4px 8px;
  }
  .hardware-tooltip {
    bottom: 2px;
    font-size: 8px;
  }
  #mobile-dock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    padding: 9px 12px max(8px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #55575b;
    border-radius: 0;
    background: #292b2f;
    box-shadow: 0 -6px 24px #0002;
  }
  .mobile-transport {
    order: 0;
    width: 100%;
  }
  .mobile-transport > button {
    min-height: 48px;
    min-width: 52px;
  }
  .mobile-tempo-control {
    width: 138px;
  }
  .tempo-nudge button {
    min-height: 44px;
    min-width: 44px;
    width: 44px;
  }
  #mobile-tempo {
    min-height: 44px;
    width: 50px;
  }
  .mobile-volume input {
    height: 38px;
  }
  #bellworx-host[data-studio-view="controls"] .profile-strip {
    flex-wrap: wrap;
  }
  #bellworx-host[data-studio-view="controls"] .random-controls {
    flex-wrap: wrap;
  }
  .note-inspector {
    padding: 18px;
    margin-top: 20px;
  }
  .tuning-voice {
    padding: 20px 16px;
  }
  .tuning-voice label {
    margin-top: 18px;
  }
  .file-actions {
    gap: 8px;
  }
  .file-actions button {
    font-size: 11px;
  }
  .below {
    gap: 20px;
  }
}
.hardware-view-actions {
  position: absolute;
  right: 8px;
  top: 12px;
  display: flex;
  gap: 6px;
  z-index: 4;
}
.hardware-view-actions button {
  border: 1px solid #696c70;
  background: #292b2fe8;
  color: #e8e8e1;
  border-radius: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  font:
    11px "Helvetica Neue",
    Arial,
    sans-serif;
}
.hardware[data-mode="inspect"] canvas {
  cursor: grab;
  touch-action: none;
}
.hardware[data-mode="returning"] canvas {
  pointer-events: none;
}
@media (max-width: 700px) {
  .hardware-view-actions {
    top: 5px;
    right: 5px;
  }
  .hardware-view-actions button {
    font-size: 10px;
  }
}
/* Quiet performance shell. The instrument retains the visual emphasis. */
.masthead {
  background: transparent;
  border: 0;
  height: 56px;
}
.wordmark {
  color: #d4d5d0;
  font-size: 10px;
  letter-spacing: 1.6px;
}
.product-title {
  border: 0;
  padding-left: 0;
  color: var(--muted);
  font-size: 11px;
}
.profile-strip {
  max-width: 980px;
  width: 100%;
  align-self: center;
  margin-top: 8px;
}
.profile-picker select {
  background: transparent;
  border-color: transparent;
  font-size: 14px;
  font-weight: 500;
  padding-left: 0;
  min-width: 120px;
}
.profile-picker p {
  display: none;
}
.random-controls button,
.random-controls #randomize {
  background: transparent;
  border-color: transparent;
  color: #c6c8c6;
  font-size: 12px;
  padding: 10px 12px;
}
.random-controls #randomize:hover,
.random-controls button:hover {
  background: #ffffff09;
  color: var(--paper);
}
.random-controls #random-undo {
  color: var(--muted);
}
.hardware-tooltip {
  display: none;
}
.hardware-view-actions button {
  background: transparent;
  border-color: transparent;
  color: #b9bcbb;
}
.hardware-view-actions button:hover {
  background: #ffffff0b;
  color: var(--paper);
}
.hardware-view-actions {
  right: 12px;
  top: 8px;
}

#mobile-dock {
  background: #24262af5;
  border-radius: 0;
  padding: 12px 8px;
  bottom: 12px;
  gap: 32px;
}
.mobile-transport > button {
  background: #d8d8ce;
  border-color: transparent;
  color: #24262a;
}
.tempo-nudge button {
  border-color: transparent;
  background: transparent;
  color: #b7bab8;
}
#mobile-tempo {
  background: transparent;
  border-color: transparent;
  color: #e2dfd2;
}
.mobile-volume input {
  accent-color: #bfc3ba;
}
.instrument-help {
  position: relative;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  z-index: 30;
}
.instrument-help summary {
  list-style: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.instrument-help summary::-webkit-details-marker {
  display: none;
}
.instrument-help summary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.instrument-help[open] summary {
  color: var(--paper);
}
.instrument-help > div {
  position: absolute;
  top: 44px;
  right: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 20px;
  background: #303236;
  border: 1px solid #ffffff12;
  border-radius: 6px;
  box-shadow: 0 14px 40px #0005;
  line-height: 1.6;
  color: #c2c5c2;
}
.instrument-help strong {
  font-size: 12px;
  color: var(--paper);
  font-weight: 500;
}
.instrument-help p:last-child {
  margin-bottom: 0;
}
.note-inspector,
.tuning-voice {
  border: 0;
  background: #ffffff03;
}
@media (max-width: 700px) {
  .masthead {
    height: 44px;
    gap: 12px;
  }
  .product-title {
    font-size: 10px;
  }
  .wordmark {
    font-size: 9px;
  }
  .profile-strip {
    margin-top: 4px;
    gap: 4px;
  }
  .profile-picker select {
    min-width: 0;
    padding-left: 4px;
    font-size: 15px;
  }
  .random-controls {
    gap: 0;
  }
  .random-controls button,
  .random-controls #randomize {
    font-size: 11px;
    padding: 10px;
  }

  #mobile-dock {
    bottom: 0;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom));
    gap: 4px;
    background: #24262a;
  }
  .mobile-transport {
    gap: 12px;
  }
  .hardware-view-actions {
    top: 4px;
    right: 8px;
  }
}
.profile-picker #meter {
  min-width: 60px;
  width: 60px;
  flex: 0 0 60px;
  padding: 10px 4px;
  font: 12px monospace;
  color: #bfc3bc;
}
@media (max-width: 700px) {
  .profile-picker {
    gap: 4px;
  }
  .profile-picker #instrument-profile {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .profile-picker #meter {
    min-width: 54px;
    width: 54px;
    flex-basis: 54px;
  }
  .random-controls #randomize {
    padding: 10px 6px;
  }
}
/* Performance hierarchy: a compact identity above a complete playable object. */
#bellworx-host {
  --desk: #10181a;
  --paper: #edf0eb;
  --muted: #aab9bb;
  background: #10181a;
}
.brand-symbol {
  color: #d4b76c;
}
.hardware-view-actions {
  display: block;
  top: 0;
  right: 8px;
}
.hardware-view-actions summary {
  list-style: none;
  cursor: pointer;
  min-width: 54px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.hardware-view-actions summary:after {
  content: "+";
  color: #d4b76c;
}
.hardware-view-actions[open] summary:after {
  content: "−";
}
.hardware-view-actions summary::-webkit-details-marker {
  display: none;
}
.hardware-view-actions summary:focus-visible {
  outline: 2px solid #d4b76c;
  outline-offset: 2px;
}
.hardware-view-buttons {
  display: flex;
  padding: 4px;
  background: #172324;
  border: 1px solid #edf0eb24;
  box-shadow: 0 8px 24px #0004;
}
.hardware-view-actions button {
  font-size: 12px;
}
#mobile-dock {
  background: #10181af5;
}
@media (min-width: 901px) {
  #bellworx-host {
    padding-bottom: 100px;
  }
  .masthead {
    height: 60px;
    padding: 0 4vw;
    gap: 24px;
    border-bottom: 1px solid #edf0eb12;
  }
  .wordmark {
    font-size: 12px;
    letter-spacing: 1.5px;
  }
  .product-title,
  .instrument-help {
    font-size: 13px;
  }
  main {
    max-width: 1920px;
    width: 100%;
    padding: 0 4vw;
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro {
    display: flex;
    order: -1;
    height: auto;
    min-height: 0;
    margin: 24px 0 16px;
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro h1 {
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.045em;
    font-weight: 400;
    margin: 0;
    color: var(--paper);
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro h1 span {
    color: #d4b76c;
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro .lede {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    color: var(--muted);
    max-width: none;
  }
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro .eyebrow,
  #bellworx-host[data-studio-view][data-studio-view="instrument"] .intro .object-view {
    display: none;
  }
  .profile-strip {
    border-radius: 0;
    max-width: none;
    margin: 0;
    padding: 4px 0;
    border-top: 1px solid #edf0eb18;
    gap: 16px;
  }
  .profile-picker {
    gap: 16px;
  }
  .profile-picker select {
    font-size: 16px;
    min-width: 140px;
  }
  .profile-picker #meter {
    font-size: 13px;
    width: 64px;
    flex-basis: 64px;
  }
  .profile-picker p {
    display: none;
  }
  .random-controls button,
  .random-controls #randomize {
    font-size: 13px;
    padding: 10px 12px;
  }
  .hardware {
    max-height: 1050px;
    margin: 0;
    width: 100%;
    background: radial-gradient(ellipse at 50% 58%, #23323455, transparent 65%);
  }
  #mobile-dock {
    width: calc(100% - 8vw);
    max-width: 1766px;
    bottom: 0;
    gap: 24px;
    padding: 12px 0;
    border-top: 1px solid #edf0eb18;
  }
  .mobile-transport {
    gap: 18px;
  }
  .mobile-transport > button {
    min-width: 72px;
    font-size: 13px;
    background: #edf0eb;
  }
  .mobile-transport label {
    font-size: 10px;
    color: var(--muted);
  }
  .mobile-volume {
    width: 110px;
  }
}
@media (max-width: 700px) {
  .hardware-view-actions {
    top: 0;
    right: 4px;
  }
  #mobile-dock {
    background: #10181af7;
    border-top: 1px solid #edf0eb18;
  }
  .hardware {
    margin-bottom: 20px;
  }
}
.hardware-display {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}
.hardware-display:active:not(:disabled) {
  transform: translate(-50%, -50%);
}
.hardware-display:focus-visible {
  outline: 2px solid #d4b76c;
  outline-offset: 4px;
}
.hardware canvas {
  cursor: grab;
}
.hardware canvas:active {
  cursor: grabbing;
}
.hardware-sticker-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.hardware-sticker-link:focus-visible {
  top: 48px;
  left: 16px;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 12px;
  background: #10181a;
  color: #edf0eb;
  z-index: 5;
}
/* Both instrument presentations consume the selected profile's visual palette. */
#flat-editor {
  background: var(--machine-enamel);
  color: var(--machine-ink);
  border-color: color-mix(in srgb, var(--machine-enamel), white 20%);
  border-radius: 10px;
  box-shadow:
    inset 0 1px #ffffff30,
    0 7px var(--machine-chassis),
    0 18px 40px #0003;
}
#flat-editor:before {
  display: none;
}
#flat-editor .control-strip,
#flat-editor .instrument-footer {
  border-color: color-mix(in srgb, var(--machine-ink), transparent 80%);
}
#flat-editor .control-strip input[type="number"],
#flat-editor .control-strip select,
#flat-editor .chord select {
  color: var(--machine-ink);
  background: transparent;
}
#flat-editor .control-strip label > span,
#flat-editor .lane-label small,
#flat-editor .step-label,
#flat-editor .subtle,
#flat-editor .pattern-note,
#flat-editor .instrument-footer,
#flat-editor .tone output,
#flat-editor .chord > span {
  color: var(--machine-ink);
  opacity: 0.8;
}
#flat-editor .pad {
  background: var(--machine-pad);
  color: #26312e;
  border-color: color-mix(in srgb, var(--machine-chassis), transparent 60%);
  box-shadow:
    inset 0 1px #ffffff55,
    0 3px var(--machine-chassis);
}
#flat-editor .pad.on {
  background: color-mix(in srgb, var(--machine-pad) 82%, var(--machine-accent));
  box-shadow:
    inset 0 -4px var(--machine-accent),
    0 3px var(--machine-chassis);
}
#flat-editor .pad.current {
  outline: 2px solid #fff0b5;
  outline-offset: 1px;
  filter: brightness(1.16);
}
#flat-editor .chord {
  background: color-mix(in srgb, var(--machine-enamel) 85%, var(--machine-pad));
  border-color: color-mix(in srgb, var(--machine-ink), transparent 80%);
}
#flat-editor .chord.active {
  border-color: var(--machine-accent);
}
#flat-editor input[type="range"],
#flat-editor input[type="checkbox"] {
  accent-color: var(--machine-accent);
}
#flat-editor .play {
  background: var(--machine-accent);
  color: #26312e;
}
#flat-editor .stop {
  background: var(--machine-pad);
  color: #26312e;
}
#flat-editor .stripe i {
  background: var(--machine-chassis);
}
#flat-editor .stripe i:last-child {
  background: var(--machine-accent);
}
#flat-editor .pattern-hint {
  color: var(--machine-ink);
  opacity: 0.75;
}
#flat-editor .section-number {
  color: var(--machine-ink);
  background: color-mix(in srgb, var(--machine-enamel), var(--machine-pad) 20%);
  border-color: color-mix(in srgb, var(--machine-ink), transparent 75%);
}
#flat-editor #undo {
  background: var(--machine-pad);
  color: #26312e;
  border-color: transparent;
}

/* Pointer interaction should not draw the invisible DOM hit regions. */
.hardware-slot[data-input="pointer"] :is(.hardware-knob, .hardware-display, canvas):focus {
  outline: none;
  box-shadow: none;
}
.hardware-slot[data-input="keyboard"] :is(.hardware-knob, .hardware-display, canvas):focus {
  outline: 2px solid #d4b76c;
  outline-offset: 3px;
}

.hardware-slot {
  position: absolute;
  inset: 0;
}

/* Keep one product identity; performance needs controls, not an introduction. */
#bellworx-host[data-studio-view] .intro {
  display: none !important;
}
@media (min-width: 901px) {
  .profile-strip {
    margin-top: 16px;
  }
}

.study-link {
  background: transparent;
  border: 1px solid #edf0eb30;
  color: var(--paper);
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 4px;
}

/* Native selects retain focus after touch; reserve the ring for keyboard use. */
#bellworx-host[data-input="pointer"] :is(button, select):focus-visible {
  outline: none;
}
#bellworx-host[data-input="keyboard"] :is(button, select):focus-visible {
  outline: 2px solid #d4b76c;
  outline-offset: 3px;
}

/* The instrument owns its space. Navigation never overlays the playable face. */
#bellworx-host {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  min-height: 100svh;
}
.masthead {
  order: 0;
  flex-shrink: 0;
  border-bottom: 0;
}
main {
  order: 3;
  width: 100%;
}
#mobile-dock {
  position: static;
  order: 2;
  transform: none;
  inset: auto;
  margin: 0 auto;
  width: calc(100% - 8vw);
  max-width: 1766px;
  flex-direction: row;
  gap: 24px;
  padding: 8px 0 16px;
  background: none;
  border: 0;
  box-shadow: none;
}
.transport-disclosure {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.transport-disclosure summary {
  list-style: none;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.transport-disclosure summary::-webkit-details-marker {
  display: none;
}
.transport-disclosure summary:after {
  content: "+";
  color: #d4b76c;
}
.transport-disclosure[open] summary:after {
  content: "−";
}
.transport-disclosure summary:focus-visible {
  outline: 2px solid #d4b76c;
  outline-offset: 2px;
}
.transport-disclosure .mobile-transport {
  padding: 8px 0;
  gap: 12px;
}
.profile-strip {
  border: 0;
}
@media (min-width: 901px) {
  .profile-strip {
    margin-top: 0;
  }
}
@media (max-width: 700px) {
  #mobile-dock {
    width: calc(100% - 32px);
    padding: 0 0 max(12px, env(safe-area-inset-bottom));
  }
  .transport-disclosure summary {
    justify-content: center;
    font-size: 11px;
  }
  .transport-disclosure .mobile-transport {
    padding: 8px 0 16px;
  }
  .hardware {
    margin-bottom: 4px;
  }
}
