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

.hj-panel { position: relative; margin-bottom: 1.5rem; padding: clamp(1.2rem, 3vw, 1.9rem); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.hj-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: var(--radius) var(--radius) 0 0; background: var(--rainbow); }
.hj-panel .eyebrow { margin-bottom: .3rem; }
.hj-panel h2 { margin: 0 0 .5rem; padding: 0; border: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.hj-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .8rem 1.5rem; }
.hj-transport, .hj-extras { display: flex; flex-wrap: wrap; gap: .5rem; }
.hj-play { min-width: 11rem; padding: .6rem 1.4rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 1rem; font-weight: 650; cursor: pointer; }
.hj-btn { padding: .55rem 1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .88rem; cursor: pointer; }
.hj-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hj-group-label { margin: 0 0 .4rem; color: var(--muted); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.hj-group-label span { margin-left: .4rem; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* The studio floor */
.hj-stage { position: relative; margin-top: 1rem; border-radius: 16px; overflow: hidden; background: #1c130d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.hj-svg { display: block; width: 100%; height: auto; }
.hj-halo { opacity: 0; transition: opacity .3s; }
.hj-sec.is-on .hj-halo { opacity: 1; }
.hj-person .hj-body { fill: #4a4150; transition: fill .3s; }
.hj-person .hj-head { fill: #6e6470; transition: fill .3s; }
.hj-chair { fill: #2a2026; }
.hj-inst { fill: none; stroke: #8c7f78; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hj-inst.hj-fill { fill: #5b4632; }
.hj-skin { fill: #d9cfb8; }
.hj-sec.is-on .hj-body { fill: var(--sc); }
.hj-sec.is-on .hj-head { fill: #f1d3b3; }
.hj-sec.is-on .hj-inst { stroke: #f6d27a; }
.hj-sec.is-on .hj-inst.hj-fill { fill: #b8742c; }
.hj-arm { fill: none; stroke: #f1d3b3; stroke-width: 4; stroke-linecap: round; }
.hj-hand { fill: #f1d3b3; }
.hj-leg { stroke: #2a2026; stroke-width: 5; stroke-linecap: round; }
.hj-arms-up { opacity: 0; }
.hj-crossed { opacity: 0; }
.hj-kit { fill: #6e6470; stroke: #b9b0a4; stroke-width: 1.5; }
.hj-cym { fill: #8f7a3c; }
.hj-tamb { fill: none; stroke: #b9b0a4; stroke-width: 3; stroke-dasharray: 3 2; }
.hj-sec.is-on .hj-kit { fill: #d8402f; } .hj-sec.is-on .hj-cym { fill: #ffd76a; } .hj-sec.is-on .hj-tamb { stroke: #ffd76a; }
.hj-gtr { fill: #6e5236; stroke: #b9a88f; stroke-width: 2; }
.hj-sec.is-on .hj-gtr { fill: #d68a2c; } .hj-sec.is-on .hj-gtr-e { fill: #c0392b; } .hj-sec.is-on .hj-bassg { fill: #8b5a2b; stroke: #ffd76a; }
.hj-amp { fill: #3a3036; stroke: #6a5e66; }
.hj-sec.is-on .hj-amp { stroke: #ffd76a; }
.hj-wtext { fill: #9a8ea4; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; }
.hj-vu { fill: #2c3a44; transition: fill .3s; }
.hj-vu.is-on { fill: #6fd17f; }
.is-playing .hj-vu.is-on { animation: hj-vu .4s ease-in-out infinite alternate; }
@keyframes hj-vu { from { fill: #6fd17f; } to { fill: #e8d04a; } }
.hj-lab { fill: #b8aca0; font-family: var(--mono); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }

/* Paul at the keys, or up on the lid conducting */
.hj-paul-up { opacity: 0; transition: opacity .3s; }
.hj-paul-up .hj-paul-body { fill: #e8b33a; }
.is-conducting .hj-paul-up { opacity: 1; }
.is-conducting .hj-paul-keys { opacity: 0; }
.is-playing .is-conducting .hj-baton { animation: hj-beat .79s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 0% 100%; }
@keyframes hj-beat { from { transform: rotate(-10deg); } to { transform: rotate(14deg); } }

/* Clapping and singing */
.is-clapping .hj-orch .hj-person .hj-body { fill: #8350c4; }
.is-clapping .hj-orch .hj-person .hj-head { fill: #f1d3b3; }
.is-clapping .hj-orch .hj-person:not(.hj-refuser) .hj-arms-up { opacity: 1; }
.is-clapping .hj-orch .hj-person .hj-inst { opacity: .25; }
.is-clapping .hj-refuser .hj-crossed { opacity: 1; }
.is-clapping .hj-refuser .hj-body { fill: #4a4150 !important; }
.is-playing .is-clapping .hj-orch .hj-person:not(.hj-refuser) .hj-arms-up { animation: hj-clap .395s ease-in-out infinite alternate; }
@keyframes hj-clap { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.hj-bubble { opacity: 0; transition: opacity .25s; }
.is-asked.is-clapping .hj-bubble { opacity: 1; }
.hj-btext { fill: #1f1830; font-family: var(--serif); font-size: 22px; font-weight: 650; }

.hj-readout { position: absolute; top: .7rem; right: .9rem; display: flex; gap: .7rem; align-items: baseline; pointer-events: none; }
.hj-chord { padding: .15rem .6rem; border-radius: 8px; background: rgba(0,0,0,.5); color: #ffd76a; font-family: var(--serif); font-size: 1.3rem; font-weight: 650; }
.hj-chord.is-beat { animation: hj-pop .4s ease-out; }
@keyframes hj-pop { from { transform: scale(1.18); } to { transform: scale(1); } }
.hj-round { color: #e8dfd4; font-family: var(--mono); font-size: .78rem; text-shadow: 0 1px 2px #000; }

/* The parts */
.hj-controls { margin-top: 1rem; }
.hj-layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.hj-layer { position: relative; display: flex; flex-direction: column; align-items: start; gap: .15rem; min-height: 4.6rem; padding: .55rem .7rem .55rem .9rem; border: 1.5px solid var(--paper-line); border-left: 6px solid var(--lc); border-radius: 12px; background: #fffaf0; color: var(--ink); text-align: left; cursor: pointer; transition: background .2s, box-shadow .2s; }
.hj-layer strong { font-size: .92rem; line-height: 1.2; padding-right: 1.4rem; }
.hj-layer span { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.hj-layer kbd { position: absolute; top: .45rem; right: .5rem; padding: 0 .3rem; border-radius: 4px; background: #efe5d2; color: var(--muted); font-size: .66rem; }
.hj-layer:hover { background: #f6eedd; }
.hj-layer[aria-pressed="true"] { background: var(--lc); border-color: var(--lc); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.hj-layer[aria-pressed="true"] span { color: rgba(255,255,255,.9); }
.hj-layer[aria-pressed="true"] kbd { background: rgba(0,0,0,.2); color: #fff; }
.hj-extras { margin-top: .6rem; }

/* The tape */
.hj-tape { margin-top: 1rem; padding: .8rem .9rem; border-radius: 14px; background: #2a211c; color: #efe6d8; }
.hj-tape .hj-group-label { color: #c9bca9; margin: 0; }
.hj-tape .hj-group-label span { color: #9f9384; }
.hj-tape-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; margin-bottom: .6rem; }
.hj-machines { display: flex; flex-wrap: wrap; gap: .3rem; }
.hj-machines button { padding: .28rem .7rem; border: 1.5px solid #6a5a4c; border-radius: 999px; background: transparent; color: #efe6d8; font-size: .78rem; cursor: pointer; }
.hj-machines button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.hj-tracks { display: grid; gap: .25rem; margin: 0; padding: .5rem; list-style: none; border-radius: 8px; background: linear-gradient(180deg, #5a3a22, #3d2716); }
.hj-track { display: grid; grid-template-columns: 1.6rem minmax(0, 15rem) minmax(0, 1fr); align-items: center; gap: .5rem; min-height: 1.6rem; font-size: .76rem; }
.hj-tn { color: #e0c9a8; font-family: var(--mono); text-align: right; }
.hj-tl { overflow: hidden; color: #b39c80; white-space: nowrap; text-overflow: ellipsis; }
.hj-tl em { color: #ffd76a; font-style: normal; font-family: var(--mono); font-size: .68rem; }
.hj-track.is-rec .hj-tl { color: #fff3e0; }
.hj-stripe { height: .8rem; border-radius: 3px; background: rgba(0,0,0,.25); }
.hj-track.is-rec .hj-stripe { background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 2px, transparent 2px 9px), var(--tc); background-size: 18px 100%, 100% 100%; }
.hj-track.is-bounced .hj-stripe { filter: saturate(.55) brightness(.85); }
.is-rolling .hj-track.is-rec .hj-stripe { animation: hj-roll .6s linear infinite; }
@keyframes hj-roll { from { background-position: 0 0, 0 0; } to { background-position: -18px 0, 0 0; } }

.hj-status { margin: 1rem 0 0; padding: .55rem .8rem; border-radius: 8px; background: #fdf0cf; font-size: .88rem; }
.hj-fine { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; }

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

@media (max-width: 1000px) { .hj-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hj-layers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hj-steps { grid-template-columns: minmax(0, 1fr); }
  .hj-layer kbd, .hj-lab, .hj-wtext { display: none; }
  .hj-layer { min-height: 4rem; padding: .45rem .55rem .45rem .7rem; }
  .hj-layer strong { padding-right: 0; font-size: .85rem; }
  .hj-layer span { font-size: .68rem; }
  .hj-track { grid-template-columns: 1.1rem minmax(0, 1fr) 3rem; gap: .35rem; font-size: .7rem; }
  .hj-readout { top: .35rem; right: .4rem; } .hj-chord { padding: .05rem .4rem; font-size: .9rem; } .hj-round { font-size: .62rem; }
  .hj-play { min-width: 0; }
  .hj-btext { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .hj-page *, .hj-page svg * { animation: none !important; transition: none !important; }
}
