.hm-page { width: var(--page); margin: 0 auto; }
.hm-page [hidden] { display: none !important; }
.hm-page.page-columns, .hm-page .page-columns, #hm-explorer.page-columns { display: block !important; }
.hm-page .page-columns > * { grid-column: auto !important; }
.hm-heading { max-width: 800px; margin: 3rem 0 1.5rem; }
.hm-heading .eyebrow { color: var(--gold); margin-bottom: .7rem; }
.hm-heading h1 { color: var(--paper); font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.06; margin: 0 0 1rem; }
.hm-heading h1 em { color: var(--gold); }
.hm-heading > p:last-child { color: var(--soft); font-size: 1.05rem; max-width: 64ch; }
.hm-loading { color: var(--soft); }
.hm-page button { font-family: var(--sans); }
.hm-page button:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.hm-panel { position: relative; margin-bottom: 1.5rem; padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.hm-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: var(--radius) var(--radius) 0 0; background: var(--rainbow); }
.hm-panel .eyebrow { margin-bottom: .3rem; }
.hm-panel h2 { margin: 0 0 .5rem; padding: 0; border: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.hm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .8rem 1.5rem; margin-bottom: 1rem; }
.hm-transport { display: flex; flex-wrap: wrap; gap: .5rem; }
.hm-play { min-width: 7rem; padding: .6rem 1.4rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 1rem; font-weight: 600; cursor: pointer; }
.hm-play.is-playing { background: var(--ink); color: var(--gold); }
.hm-btn { padding: .55rem 1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .88rem; cursor: pointer; }
.hm-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.hm-modes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; margin-bottom: 1.1rem; }
.hm-modes button { display: grid; gap: .15rem; padding: .65rem .7rem; border: 2px solid transparent; border-radius: 10px; background: #231c2e; color: #fff5e1; text-align: left; cursor: pointer; }
.hm-modes button strong { font-size: .88rem; }
.hm-modes button span { color: #cfc4dc; font-size: .72rem; }
.hm-modes button[aria-pressed="true"] { border-color: var(--gold); background: #3b2d52; }

.hm-grid { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.hm-side { display: grid; gap: .9rem; }
.hm-voices { display: grid; gap: .4rem; }
.hm-voice { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; padding: .5rem .6rem; border: 1px solid var(--paper-line); border-radius: 8px; background: #fffaf0; font-size: .85rem; }
.hm-voice i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.hm-voice.is-off { opacity: .5; }
.hm-voice small { grid-column: 3 / -1; color: var(--muted); font-size: .72rem; }
.hm-small { padding: .2rem .55rem; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .72rem; cursor: pointer; }
.hm-small[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hm-vowels { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.hm-vowels span { margin-right: .2rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.hm-vowels button { padding: .3rem .7rem; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .8rem; cursor: pointer; }
.hm-vowels button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.hm-mode-note { margin: 0; color: #4a4040; font-size: .85rem; }

.hm-rollbox { margin: 0; padding: .7rem; border-radius: 12px; background: #231c2e; }
.hm-rollhead { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; color: #b9adc9; font-size: .78rem; }
.hm-rollhead strong { color: var(--gold); font-family: var(--mono); font-size: .8rem; }
.hm-roll { display: block; width: 100%; height: auto; }
.hm-grid line.hm-grid { stroke: #3b3150; }
.hm-roll .hm-grid { stroke: #3b3150; stroke-width: 1; }
.hm-roll .hm-bar { stroke: #4a3f5c; stroke-width: 1; }
.hm-roll .hm-axis, .hm-roll .hm-chord { fill: #b9adc9; font-family: var(--mono); font-size: 11px; }
.hm-roll .hm-chord { fill: #fff5e1; font-size: 12px; }
.hm-roll .hm-head { stroke: #e23d80; stroke-width: 2; }
.hm-rollbox figcaption { margin-top: .4rem; color: #b9adc9; font-size: .74rem; }
.hm-key { display: inline-block; width: 10px; height: 10px; margin: 0 .25rem 0 .5rem; border-radius: 2px; background: var(--c); vertical-align: -1px; }
.hm-status { margin: 1rem 0 0; padding: .55rem .8rem; border-radius: 8px; background: #fdf0cf; font-size: .88rem; }
.hm-fine { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; }

.hm-story > p:not(.eyebrow) { max-width: 80ch; }
.hm-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.2rem; }
.hm-step { padding: 1rem 1.1rem; border: 1px solid var(--paper-line); border-radius: 10px; background: #fffaf0; font-size: .9rem; }
.hm-step h3 { margin: .4rem 0 .3rem; color: var(--ink); font-size: 1.15rem; }
.hm-step p { margin: 0; }
.hm-n { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--ink); color: var(--gold); font-family: var(--mono); font-size: .75rem; }
.hm-story a { color: var(--pink-ink); }
.hm-method { max-width: 90ch; margin: 1.75rem 0; color: var(--soft); font-size: .82rem; }
.hm-method a { color: var(--gold); }
.hm-signoff { margin: 2rem 0; text-align: center; font-family: var(--serif); font-size: 1.2rem; }

@media (max-width: 1000px) { .hm-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .hm-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-steps { grid-template-columns: minmax(0, 1fr); } }
