:root {
  --ink: #272320;
  --muted: #756d66;
  --paper: #f8f5ed;
  --paper-strong: #fffdf8;
  --mustard: #d99925;
  --mustard-deep: #9c5e19;
  --rust: #b55339;
  --plum: #463b4a;
  --sage: #829080;
  --line: #dfd6ca;
  --shadow: 0 18px 50px rgba(57, 39, 22, 0.11);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 9%, rgba(217, 153, 37, 0.1), transparent 24rem),
    var(--paper);
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 3px solid #335d8d;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--plum);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid rgba(128, 104, 77, 0.15);
  background: rgba(255, 253, 248, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2rem));
  min-height: 4.5rem;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand strong {
  color: var(--mustard-deep);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--paper-strong);
  background: var(--plum);
  border-radius: 50%;
  font-size: 1.15rem;
}

.header-note {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 2.8rem;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  min-height: 275px;
  overflow: hidden;
  isolation: isolate;
  color: var(--paper-strong);
  background:
    linear-gradient(108deg, rgba(58, 42, 43, 0.96) 0%, rgba(74, 53, 49, 0.9) 52%, rgba(67, 58, 63, 0.84) 100%),
    url("assets/synth-hero.jpg") center / cover;
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.hero-card::after {
  position: absolute;
  z-index: -1;
  inset: auto -5rem -8rem auto;
  width: 22rem;
  height: 22rem;
  content: "";
  background: rgba(226, 165, 55, 0.16);
  border: 1px solid rgba(255, 244, 207, 0.18);
  border-radius: 50%;
}

.hero-copy {
  align-self: center;
  max-width: 620px;
  padding: 2.3rem clamp(1.4rem, 5vw, 4rem);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--mustard);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.3;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 0.9rem;
  font-size: clamp(2.35rem, 5vw, 4.3rem);
  font-weight: 780;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

h1 em {
  color: #f4bc52;
  font-style: normal;
}

.hero-lede {
  max-width: 38rem;
  margin-bottom: 1.35rem;
  color: rgba(255, 253, 248, 0.82);
  font-size: 0.98rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span {
  padding: 0.35rem 0.65rem;
  color: rgba(255, 253, 248, 0.88);
  background: rgba(255, 253, 248, 0.11);
  border: 1px solid rgba(255, 253, 248, 0.17);
  border-radius: 99px;
  font-size: 0.72rem;
}

.hero-art {
  position: relative;
  min-height: 250px;
  overflow: hidden;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(246, 193, 83, 0.45);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.orbit-one {
  top: 15%;
  right: 2%;
  width: 25rem;
  height: 9rem;
}

.orbit-two {
  top: 36%;
  right: 12%;
  width: 17rem;
  height: 6rem;
  border-color: rgba(255, 253, 248, 0.23);
}

.hero-spark {
  position: absolute;
  color: #f5c45c;
  font-size: 2rem;
}

.spark-one {
  top: 15%;
  right: 25%;
}

.spark-two {
  right: 11%;
  bottom: 17%;
  color: rgba(255, 253, 248, 0.65);
  font-size: 2.7rem;
}

.hero-device {
  position: absolute;
  right: 18%;
  bottom: 16%;
  width: 12.5rem;
  height: 7.2rem;
  background: linear-gradient(150deg, #d99925, #87531f);
  border: 1px solid rgba(255, 244, 207, 0.5);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 2rem rgba(18, 14, 18, 0.23), inset 0 1px rgba(255, 255, 255, 0.28);
  transform: rotate(-10deg);
}

.hero-device::before {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  width: 4.5rem;
  height: 2.1rem;
  content: "";
  background: #403744;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
}

.device-light,
.device-knob,
.device-keyboard {
  position: absolute;
}

.device-light {
  top: 1.2rem;
  width: 0.45rem;
  height: 0.45rem;
  background: #f5cf72;
  border-radius: 50%;
  box-shadow: 0 0 0.5rem #f5cf72;
}

.light-a { left: 1.25rem; }
.light-b { left: 2.15rem; opacity: 0.6; }

.device-knob {
  top: 1rem;
  width: 1.2rem;
  height: 1.2rem;
  background: #56424d;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.knob-a { right: 3.25rem; }
.knob-b { right: 1.25rem; }

.device-keyboard {
  right: 0.9rem;
  bottom: 0.9rem;
  left: 0.9rem;
  height: 2.2rem;
  background: repeating-linear-gradient(90deg, #f8f1d8 0 0.85rem, #72543f 0.85rem 0.92rem);
  border-radius: 0.25rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 1.15rem;
  margin-top: 1.15rem;
}

.panel {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background: var(--paper-strong);
  border: 1px solid rgba(128, 104, 77, 0.18);
  border-radius: 1rem;
  box-shadow: 0 0.7rem 2.5rem rgba(57, 39, 22, 0.055);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.panel-heading h2,
.how-it-works h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.03em;
}

.bar-count,
.status-dot {
  flex: none;
  margin-top: 0.15rem;
}

.bar-count {
  padding: 0.32rem 0.58rem;
  color: var(--mustard-deep);
  background: #fff2d4;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  background: #7caa74;
  border: 3px solid #e5f0dc;
  border-radius: 50%;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.chord-slot {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.65rem;
  background: #f7f1e7;
  border: 1px solid #e7d9c6;
  border-radius: 0.72rem;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chord-slot:focus-within {
  background: #fff7e5;
  border-color: var(--mustard);
  transform: translateY(-2px);
}

.slot-number {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

select,
input[type="number"] {
  width: 100%;
  min-height: 2.85rem;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid #cbbca9;
  border-radius: 0.45rem;
  font-size: 1rem;
}

select {
  padding: 0.25rem 0.35rem;
}

input[type="number"] {
  padding: 0.45rem 0.6rem;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.control-card {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.85rem;
  background: #fbf8f1;
  border: 1px solid #e7ded1;
  border-radius: 0.65rem;
}

.control-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 760;
}

.control-label small {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.number-control {
  position: relative;
}

.number-control input {
  padding-right: 3.2rem;
}

.unit {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.range-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.4rem;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.85rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--mustard-deep);
}

output {
  display: grid;
  min-height: 2.25rem;
  place-items: center;
  color: var(--mustard-deep);
  background: #fff2d4;
  border-radius: 0.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.control-help {
  color: var(--muted);
  font-size: 0.71rem;
}

.validation-message {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  color: var(--rust);
  font-size: 0.78rem;
}

.action-row {
  display: grid;
  grid-template-columns: 1.1fr 0.85fr 1.35fr;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.button {
  min-height: 2.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  font-size: 0.87rem;
  font-weight: 780;
  letter-spacing: 0.01em;
  transition: filter 160ms ease, transform 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.button-primary {
  color: #fffdf8;
  background: var(--plum);
}

.button-secondary {
  color: var(--plum);
  background: #eee7de;
  border-color: #ddd0c1;
}

.button-outline {
  color: var(--mustard-deep);
  background: #fffdf8;
  border-color: #d1a65f;
}

.button:disabled {
  color: #a9a09a;
  background: #f1ede7;
  border-color: #e4ddd5;
  filter: none;
  transform: none;
}

.button-icon {
  display: inline-block;
  margin-right: 0.2rem;
  font-size: 0.75em;
}

.playback-status {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.result-summary {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  padding: 0.9rem;
  background: #f7f0e3;
  border-left: 3px solid var(--mustard);
  border-radius: 0.5rem;
}

.result-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
}

.result-main strong {
  color: var(--plum);
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}

.result-main span,
.result-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
}

.note-summary {
  color: var(--ink);
  font-size: 0.77rem;
  line-height: 1.7;
}

.roll-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.roll-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.roll-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--rust);
  border-radius: 0.15rem;
}

.piano-roll {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  min-height: 12.8rem;
  padding: 0.6rem;
  background:
    repeating-linear-gradient(to bottom, rgba(70, 59, 74, 0.05) 0 1px, transparent 1px 1.1rem),
    #eee9e1;
  border: 1px solid #ddd3c6;
  border-radius: 0.55rem;
}

.bar-column {
  position: relative;
  display: grid;
  grid-template-rows: 1.45rem minmax(0, 1fr);
  min-width: 0;
  min-height: 11.5rem;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.7);
  border-left: 1px solid rgba(70, 59, 74, 0.11);
}

.bar-column:first-child {
  border-left: 0;
}

.bar-label {
  z-index: 1;
  padding: 0.18rem 0.35rem;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.87);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.bar-notes {
  position: relative;
  min-height: 0;
}

.note-block {
  position: absolute;
  right: 9%;
  left: 9%;
  height: 0.7rem;
  padding: 0 0.15rem;
  overflow: hidden;
  color: #fffaf0;
  background: linear-gradient(90deg, var(--rust), #d17c45);
  border-radius: 0.18rem;
  box-shadow: 0 2px 5px rgba(100, 54, 35, 0.2);
  font-size: 0.52rem;
  line-height: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roll-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.roll-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.text-button {
  flex: none;
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem;
  color: var(--mustard-deep);
  background: transparent;
  border: 1px solid #d1a65f;
  border-radius: 0.45rem;
  font-size: 0.72rem;
  font-weight: 760;
}

.text-button:hover {
  background: #fff2d4;
}

.note-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.note-edit-card {
  min-width: 0;
  padding: 0.6rem;
  background: #fbf8f1;
  border: 1px solid #e7ded1;
  border-radius: 0.6rem;
}

.note-edit-card legend {
  max-width: 100%;
  margin: 0 0 0.35rem;
  padding: 0 0.25rem;
  overflow: hidden;
  color: var(--plum);
  font-size: 0.72rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem 2.75rem;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.note-edit-row + .note-edit-row {
  margin-top: 0.35rem;
}

.note-edit-label {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-nudge-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  color: var(--plum);
  background: var(--paper-strong);
  border: 1px solid #cbbca9;
  border-radius: 0.42rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.note-nudge-button:hover {
  background: #fff2d4;
  border-color: var(--mustard);
}

.how-it-works {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 2rem;
  margin-top: 1.15rem;
  padding: 1.45rem 1.65rem;
  color: var(--paper-strong);
  background: var(--plum);
  border-radius: 1rem;
}

.how-it-works h2 {
  color: #fff8e8;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  gap: 0.1rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(255, 248, 232, 0.25);
}

.steps span {
  color: #eab151;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.steps strong {
  font-size: 0.95rem;
}

.steps small {
  color: rgba(255, 253, 248, 0.66);
  font-size: 0.68rem;
}

.guide-panel {
  margin-top: 1.15rem;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background: #efe9de;
  border: 1px solid #ddd2c4;
  border-radius: 1rem;
}

.guide-heading h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.guide-grid article {
  min-width: 0;
  padding: 0.85rem;
  background: rgba(255, 253, 248, 0.76);
  border-radius: 0.65rem;
}

.guide-grid h3 {
  margin: 0 0 0.35rem;
  color: var(--plum);
  font-size: 0.82rem;
}

.guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.guide-grid code {
  color: var(--mustard-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.guide-help {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 253, 248, 0.76);
  border-left: 4px solid var(--mustard);
  border-radius: 0.5rem;
}

.guide-help h3 {
  margin: 0 0 0.45rem;
  color: var(--plum);
  font-size: 0.88rem;
}

.guide-help ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.guide-help strong {
  color: var(--ink);
}

.article-links {
  margin-top: 1.15rem;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.article-links h2 {
  margin-bottom: 0.35rem;
  color: var(--plum);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
}

.article-links > div:first-child > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.article-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.article-link-grid a {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.95rem;
  color: var(--ink);
  background: #f2ede3;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  text-decoration: none;
}

.article-link-grid a:hover {
  border-color: var(--mustard-deep);
}

.article-link-grid a span {
  color: var(--mustard-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

.article-link-grid a strong {
  font-size: 0.85rem;
  line-height: 1.4;
}

.article-link-grid a small {
  color: var(--muted);
  font-size: 0.72rem;
}

.article-index-link {
  margin: 0.85rem 0 0;
  text-align: right;
  font-size: 0.78rem;
}

.article-index-link a {
  color: var(--mustard-deep);
  font-weight: 700;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.site-footer p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 1rem;
  color: #fff;
  background: var(--rust);
  border-radius: 0.5rem;
  text-align: center;
}

@media (max-width: 850px) {
  .hero-card {
    grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  }

  .hero-device {
    right: 8%;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .header-inner {
    width: min(100% - 1rem, 1120px);
    min-height: 3.8rem;
  }

  .header-note {
    display: none;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding: 1.7rem 1.2rem 1.2rem;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .hero-lede {
    font-size: 0.88rem;
  }

  .hero-art {
    min-height: 9rem;
  }

  .hero-device {
    right: 19%;
    bottom: 12%;
    width: 10.5rem;
    height: 6rem;
    transform: rotate(-7deg) scale(0.86);
    transform-origin: bottom right;
  }

  .orbit-one {
    top: 4%;
    right: -13%;
  }

  .orbit-two {
    top: 26%;
    right: 2%;
  }

  .chord-grid,
  .control-grid,
  .action-row {
    grid-template-columns: 1fr;
  }

  .chord-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roll-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .text-button {
    width: 100%;
  }

  .note-editor {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.2rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 0.25rem;
  }
}

@media (max-width: 360px) {
  .panel {
    padding: 1rem;
  }

  .chord-grid {
    gap: 0.4rem;
  }

  .chord-slot {
    padding: 0.5rem;
  }

  .piano-roll {
    gap: 0.2rem;
    padding: 0.4rem;
  }

  .bar-label {
    padding-inline: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Stage A: compact first view */
.stage-a-hero h1 { word-break: auto-phrase; }
.stage-a-hero .stage-a-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 1rem 0 0.85rem; padding: 0; list-style: none; counter-reset: stage-a-step; }
.stage-a-hero .stage-a-steps li { display: flex; min-width: 0; gap: 0.5rem; align-items: baseline; counter-increment: stage-a-step; font-size: 0.9rem; line-height: 1.45; }
.stage-a-hero .stage-a-steps li::before { content: counter(stage-a-step, decimal-leading-zero); flex: none; font-size: 0.74rem; font-weight: 800; }
.stage-a-cta { display: inline-flex; min-height: 44px; max-width: 100%; align-items: center; justify-content: center; padding: 0.65rem 1.15rem; border: 1px solid #26383d; border-radius: 999px; background: #fff; color: #18272d; font-weight: 750; line-height: 1.25; text-align: center; text-decoration: none; white-space: nowrap; }
.hero-card.stage-a-hero { min-height: 0; }
.hero-card.stage-a-hero .hero-copy { padding-block: clamp(1.7rem, 3.3vw, 2.8rem); }
.hero-card.stage-a-hero h1 { max-width: none; margin-bottom: 0.65rem; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.12; }
.hero-card.stage-a-hero .hero-lede { margin-bottom: 0; line-height: 1.55; }
.hero-card.stage-a-hero .hero-art { transform: scale(0.88); transform-origin: center; }
@media (max-width: 640px) {
  .hero-card.stage-a-hero { grid-template-columns: minmax(0, 1fr); gap: 0; background-image: linear-gradient(108deg, rgba(58, 42, 43, 0.96) 0%, rgba(74, 53, 49, 0.9) 52%, rgba(67, 58, 63, 0.84) 100%); }
  .hero-card.stage-a-hero .hero-copy { padding: 1.25rem; }
  .hero-card.stage-a-hero .hero-art { display: none; }
  .stage-a-hero .stage-a-steps { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-block: 0.75rem; }
  .stage-a-hero .stage-a-steps li { font-size: 0.86rem; }
  .stage-a-hero .stage-a-cta { min-width: 12rem; }
  .composer-panel > .panel-heading .section-kicker { display: none; }
  .composer-panel > .panel-heading h2 { margin: 0; font-size: 1.3rem; line-height: 1.25; }
  .composer-panel > .panel-heading { margin-bottom: 0.75rem; }
}
