* { box-sizing: border-box }
:root { color-scheme: light; font:16px/1.45 system-ui,sans-serif; color:#243e33; background:#faf8f3; --forest:#243e33; --line:#c6cfc2; --muted:#536254 }
body { margin:0 } a { color:#38563c; text-underline-offset:3px } a:hover { color:#243e33 }
.frame { width:min(1040px,calc(100% - 48px)); margin:auto }
.voices.with-descant { grid-template-columns:repeat(auto-fit,minmax(72px,1fr)) }
.section-btn span { white-space:nowrap }
.demo-note {
  max-width: 80ch;
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 2px solid #749374;
  color: #394c40;
  line-height: 1.55;
}
.demo-note strong { font-weight: 600; }
.section-jump { display:none }
@media(max-width:720px) {
  .section-jump {
    display:block;
    width:100%;
    min-height:44px;
    margin-top:10px;
    padding:6px 10px;
    border:1px solid #aebccc;
    border-radius:6px;
    background:white;
    color:var(--forest);
    font:inherit;
  }
}
.layout > .panel { min-width:0 }
header { border-bottom:1px solid var(--line) }.mast { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-block:18px; font-size:.9rem }
.brand { display:inline-flex; align-items:center; min-height:44px; flex-shrink:0 }.brand img { display:block; width:clamp(145px,34vw,210px); height:auto }
.piece { display:flex; justify-content:space-between; align-items:end; gap:20px; padding:48px 0 29px }.piece h1 { font:normal clamp(3rem,7vw,5.4rem)/1.03 Georgia,serif; margin:0; letter-spacing:-.05em }.piece p { margin:12px 0 0; color:var(--muted) }.piece p span { margin:0 .25em }
.details { display:flex; gap:11px; flex-wrap:wrap; color:var(--muted); font-size:.9rem; margin-bottom:3px }.details span+span { padding-left:11px; border-left:1px solid #adb4bc }
.layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(220px,1fr); gap:24px; align-items:start }
.panel,.sections { border:1px solid var(--line); border-radius:16px; background:#fff; padding:clamp(18px,3.2vw,32px) }
fieldset { margin:0; padding:0; border:0; min-width:0 } legend,h2,h3 { color:inherit; margin:0; font-size:1rem; font-weight:650 } legend { margin-bottom:10px }
.voices { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; background:#f0f1ef; border-radius:10px; padding:4px }.voices label { position:relative; cursor:pointer }.voices input { position:absolute; opacity:0 }.voices span { display:block; text-align:center; padding:10px 0; border-radius:7px; font-weight:600; font-size:.93rem }.voices input:checked+span { background:var(--forest); color:white }.voices input:focus-visible+span,:focus-visible { outline:3px solid #536e52; outline-offset:2px }
.settings { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:22px 0 }.settings label { font-weight:600; font-size:.9rem }.settings select { display:block; width:100%; min-height:44px; padding:8px 5px; margin-top:6px; border:1px solid #b6c1c8; border-radius:7px; background:white; color:var(--forest); font:inherit; font-weight:450 }
.transport { background:var(--forest); color:white; padding:18px; border-radius:10px }.track,.links { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap }.track h2 { font-size:1.08rem }.track span,.links { font-size:.79rem; color:#e0eade } audio { width:100%; margin:13px 0 8px; height:44px }.links a { color:white; font-weight:600; padding:4px 0 }
.sections h2 { font:normal 1.55rem/1.2 Georgia,serif; margin-bottom:14px }.section-btn { width:100%; border:0; border-top:1px solid var(--line); background:transparent; color:var(--forest); display:flex; justify-content:space-between; gap:12px; align-items:center; padding:13px 8px; cursor:pointer; font:inherit; text-align:left }.section-btn span { color:var(--muted); font-size:.8rem }.section-btn[aria-current="true"] { box-shadow:inset 3px 0 #536e52; background:#e7eee3 }.section-btn:hover { background:#f3f4f3 }.loop { display:flex; align-items:center; gap:8px; font-size:.9rem; border-top:1px solid var(--line); padding-top:16px; cursor:pointer }.loop input { width:17px; height:17px; accent-color:var(--forest) }
#play-error:empty { display:none } footer { font-size:.84rem; color:var(--muted); margin:22px 0 34px } footer p { margin:5px 0 }
@media(max-width:720px){.frame{width:calc(100% - 32px)}.piece{display:block;padding:32px 0 20px}.details{margin-top:12px}.layout{grid-template-columns:1fr;gap:14px}.mast{font-size:.8rem}.mast>span{text-align:right}.panel,.sections{padding:18px}.settings{gap:8px}.transport{padding:13px}}
@media(max-width:380px){.settings{grid-template-columns:1fr}.mast{gap:8px}.voices span{font-size:.82rem}}


@media (max-width:720px), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  .frame { text-align:center; }
  .piece { display:block; }
  .layout { grid-template-columns:minmax(0,1fr); }
  .demo-note { border:0; padding:0; margin-inline:auto; }
  .details, .track, .links, .loop { justify-content:center; }
  .track { flex-direction:column; gap:2px; }
  legend { margin-inline:auto; }
  .settings select, .section-jump { text-align:center; text-align-last:center; }
  .settings label:last-child:nth-child(odd) { grid-column:1/-1; }
  .voices.with-descant { display:flex; flex-wrap:wrap; justify-content:center; }
  .voices.with-descant label { flex:0 1 max(18%, 72px); }
  .section-btn { flex-direction:column; gap:2px; text-align:center; }
}

.room-name { display:block; margin-bottom:.4rem; font-size:.85rem; font-weight:650; color:#496447; }
.piece { padding:26px 0 12px; }
.piece h1 { font-size:clamp(2.7rem,5vw,4.3rem); }
.piece p { margin-top:.4rem; }
.demo-note { margin-bottom:20px; }
.layout { grid-template-columns:minmax(0, 2.45fr) minmax(220px, 1fr); }
.panel, .sections { padding:0; border:0; border-radius:0; background:transparent; }
.panel { display:flex; flex-direction:column; }
.part-settings, .rehearsal-settings { border-top:1px solid var(--line); }
summary { padding:11px 0; min-height:44px; color:#34543c; font-weight:650; cursor:pointer; }
.part-settings .settings { margin:8px 0 14px; }
.rehearsal-settings .settings { grid-template-columns:1fr; margin:6px 0 18px; }
.rehearsal-settings h2 { font-size:1.2rem; }
.section-btn { min-height:44px; }
.transport { border-radius:6px; }
.panel .score-reader { border:0; margin:0; padding-top:12px; }
.panel .reader-head { display:flex; align-items:center; flex-wrap:wrap; gap:0 12px; }
.panel .score-toolbar, .panel .score-options { display:contents; }
.panel .reader-head h2 { flex:1; }
.panel .reader-head label { min-height:44px; }
.panel .notation { margin-top:6px; }
@media(max-width:720px), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  .layout { grid-template-columns:minmax(0,1fr); }
  .piece { padding:18px 0 10px; }
  .piece .details { margin-top:6px; }
  .demo-note { margin-bottom:12px; }
  .panel .reader-head { justify-content:center; }
  .panel .reader-head h2 { flex:1 0 100%; }
  .part-settings .settings label:only-child { grid-column:1/-1; }
  .sections { margin-top:6px; }
}
@media(max-width:720px) {
  .sections:has(.section-jump) #sections { display:none; }
}

.song-shelf { padding:clamp(28px,5vw,62px) 0 clamp(36px,6vw,80px); text-align:center; }
.shelf-heading { border:0; }
.shelf-heading h1 { margin:0; font:normal clamp(2.5rem,5vw,4.25rem)/1.05 Georgia,serif; letter-spacing:-.045em; }
.shelf-heading p { margin:.7rem 0 0; color:var(--muted); }
.repertoire { display:flex; flex-wrap:wrap; justify-content:center; gap:28px clamp(12px,3vw,32px); margin:clamp(24px,4vw,40px) auto 0; }
.repertoire a { width:min(218px,calc(50% - 16px)); text-decoration:none; color:var(--forest); }
.score-cover { display:block; border:1px solid var(--line); padding:clamp(6px,1.4vw,16px); background:#e8ede5; }
.score-cover img { display:block; width:100%; height:auto; aspect-ratio:384/500; object-fit:contain; background:white; box-shadow:0 1px 4px #20392f26; }
.song-title { display:block; margin-top:.65rem; font:normal clamp(1.13rem,2.3vw,1.55rem)/1.16 Georgia,serif; text-wrap:balance; }
.song-setting { display:block; margin-top:.35rem; font-size:.85rem; color:var(--muted); }
.repertoire a:is(:hover,:focus-visible) .song-title { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.15em; }
.repertoire a:is(:hover,:focus-visible) .score-cover { border-color:#536e52; }
.choose-song:not([hidden]) { display:inline-flex; align-items:center; gap:.45em; min-height:44px; margin-top:8px; font-size:.9rem; }
.choose-song:not([hidden]) + .piece { padding-top:4px; }
body:has(.song-shelf:not([hidden])) { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
body:has(.song-shelf:not([hidden])) main { flex:1; margin-block:0; }
@media(max-width:420px) { .repertoire a { width:calc(50% - 6px); } }
