/* The playable keyboard (piano.js) and the tool pages: /piano-keys, /chords. */
.ip-keys { position: relative; display: flex; height: 160px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #FFFDF8; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ip-w { flex: 1; border: 0; border-right: 1px solid var(--line); background: transparent; position: relative; cursor: pointer; padding: 0; transition: background .12s; }
.ip-w:last-of-type { border-right: 0; }
.ip-b { position: absolute; top: 0; height: 60%; background: var(--keydark); border: 0; border-radius: 0 0 6px 6px; z-index: 2; cursor: pointer; padding: 0; transition: background .12s; }
.ip-label { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 700 13px "Figtree", -apple-system, system-ui, sans-serif; color: var(--muted); pointer-events: none; }
.ip-b .ip-label { color: #FFF8F1; bottom: 7px; font-size: 10px; }
.ip-w.ip-on { background: var(--lit); } .ip-w.ip-on .ip-label { color: var(--accent); }
.ip-b.ip-on { background: var(--accent); }
.ip-w.ip-hit { background: #F7C6A9 !important; } .ip-b.ip-hit { background: #8E3F1E !important; }
.ip-middle::after { content: ""; position: absolute; left: 50%; bottom: 32px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }

.tool { background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 22px; margin: 24px 0; box-shadow: 0 18px 50px rgba(91,60,30,.08); }
.tool .row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tool button.b { border: 0; border-radius: 999px; padding: 11px 18px; font: 700 15px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--pill); color: var(--ink); }
.tool button.b.dark { background: var(--ink); color: #FFF8F1; }
.row-btns button#playProg { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 700; font-size: 15px; font-family: inherit; background: var(--ink); color: #FFF8F1; cursor: pointer; }   /* chord pages: the progression button sits outside a .tool */
.tool button.b[aria-pressed="true"] { background: var(--lit); color: var(--accent); }
.tool .readout { margin: 14px 0 0; font-size: 15px; color: var(--muted); min-height: 1.5em; }
.notes-big { display: flex; gap: 10px; margin: 6px 0 4px; flex-wrap: wrap; }
.notes-big span { font-weight: 800; font-size: 30px; letter-spacing: -.5px; background: var(--lit); color: var(--accent); border-radius: 14px; padding: 6px 16px; }

/* Chord chart */
.chart { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 40px; }
.chart a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 10px; color: var(--ink); }
.chart a:hover { text-decoration: none; border-color: var(--peach); }
.chart strong { display: block; font-size: 19px; }
.chart small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.chart svg { display: block; width: 100%; height: auto; margin-top: 8px; }

@media (max-width: 560px) {
  .ip-keys { height: 120px; }
  .ip-label { font-size: 11px; bottom: 8px; }
  .ip-b .ip-label { font-size: 8px; }
  .notes-big span { font-size: 24px; padding: 4px 12px; }
  .chart { grid-template-columns: repeat(2, 1fr); }
}

/* Song pages: the left hand lit in lilac, and the letter names that follow the music. */
.ip-w.ip-lh { background: #E6DDF4; } .ip-b.ip-lh { background: #8B7BC0; }
.letters { margin: 18px 0 4px; }
.letters .line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.letters span { min-width: 34px; text-align: center; padding: 6px 8px; border-radius: 10px; background: #F6EFE6; font-weight: 800; font-size: 16px; color: var(--ink); transition: background .1s, color .1s; }
.letters span.long { min-width: 54px; }
.letters span.on { background: var(--accent); color: #FFF8F1; }
.tool label.tempo { font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tool label.tempo input { accent-color: var(--accent); width: 130px; }
.song-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; margin: -6px 0 22px; }
.song-meta b { color: var(--ink); }
@media (max-width: 560px) { .letters span { min-width: 28px; font-size: 14px; padding: 5px 6px; } .tool label.tempo { margin-left: 0; width: 100%; } }

/* The music staff (staff.js) */
.ivory-staff { display: block; width: 100%; height: auto; }
.ivory-staff .st-line { stroke: #8C7B6E; stroke-width: 1.2; }
.ivory-staff .st-clef { font-family: "Noto Music", serif; fill: var(--ink); }
.ivory-staff .st-acc { font-family: "Noto Music", serif; fill: var(--ink); transition: fill .15s; }
.ivory-staff .st-acc.on { fill: var(--accent); }
.ivory-staff .st-head { fill: var(--ink); transition: fill .15s; }
.ivory-staff .st-note:hover .st-head, .ivory-staff .st-note:focus .st-head { fill: var(--accent); }
.ivory-staff .st-note.on .st-head { fill: var(--accent); }
.ivory-staff .st-note.landmark .st-head { fill: var(--accent); }
.ivory-staff .st-label { font: 700 13px "Figtree", -apple-system, system-ui, sans-serif; fill: var(--muted); }
.ivory-staff .st-note:focus { outline: none; }
.ivory-staff.q-right .st-head { fill: #3E8E5A; }
.ivory-staff.q-wrong .st-head { fill: #C0412F; }
.quiz { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: center; }
.q-letters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.q-letters .b { padding: 14px 0 !important; font-size: 18px !important; }
.q-score { margin: 12px 0 0; color: var(--muted); font-size: 16px; min-height: 1.5em; }
@media (max-width: 560px) { .quiz { grid-template-columns: 1fr; } .q-letters .b { padding: 12px 0 !important; } }
/* On a phone a long staff keeps a readable size and scrolls sideways. */
.tool .staff { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) { .tool .staff .ivory-staff { min-width: 640px; } }

/* The circle of fifths (/circle-of-fifths) */
.cof-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.cof { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; font-family: "Figtree", -apple-system, system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
.cof-k { cursor: pointer; outline: none; }
.cof-k path { stroke: var(--paper); stroke-width: 2; transition: fill .2s; }
.cof-maj path { fill: #F6EFE6; } .cof-min path { fill: #EFE5D9; }
.cof-k:hover path, .cof-k:focus-visible path { fill: #F7DCCB; }
.cof-k.fam path { fill: #FCD9C4; }
.cof-k.sel path { fill: var(--accent); }
.cof text { text-anchor: middle; pointer-events: none; fill: var(--ink); }
.cof-big { font-weight: 800; font-size: 24px; } .cof-big.cof-two { font-size: 17px; }
.cof-mid { font-weight: 700; font-size: 16px; } .cof-small { font-weight: 700; font-size: 12px; }
.cof-sig { font-size: 11px; font-weight: 600; fill: var(--muted) !important; }
.cof-k.fam .cof-sig, .cof-k.sel .cof-sig { display: none; }
.cof-num { font-size: 11px; font-weight: 800; fill: var(--accent) !important; letter-spacing: .3px; }
.cof-k.sel text { fill: #FFF8F1 !important; }
.cof-hub { fill: var(--paper); stroke: var(--line); }
.cof-hub1 { font-weight: 800; font-size: 17px; } .cof-hub2 { font-size: 11px; fill: var(--muted) !important; }
.cof-panel h3 { margin: 0 0 4px; font-size: 26px; } .cof-panel h3 a { color: var(--ink); }
.cof-panel .cp-sig { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.cof-panel .cp-staff { max-width: 220px; }
.cof-panel .cp-label { margin: 10px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.cp-chords { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; border-radius: 12px; padding: 6px 10px 7px; background: var(--pill); font: 800 16px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; min-width: 48px; }
.chip small { font-size: 10px; font-weight: 700; color: var(--muted); }
.chip.on { background: var(--lit); color: var(--accent); }
.cof-panel .cp-scale { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 720px) { .cof-grid { grid-template-columns: 1fr; } }
@media print {
  html.print-chart header.site, html.print-chart footer.site { display: none; }
  html.print-chart article.guide > *:not(.cof-printable) { display: none; }
  html.print-chart .cof-printable { border: 0; box-shadow: none; }
  html.print-chart .cof-printable > :not(.cof-grid), html.print-chart .cof-panel { display: none; }
  html.print-chart .cof-grid { display: block; } html.print-chart .cof { max-width: 640px; }
  html.print-chart .cof-maj path { fill: #F6EFE6 !important; } html.print-chart .cof-min path { fill: #EFE5D9 !important; }
  html.print-chart .cof text { fill: var(--ink) !important; } html.print-chart .cof .cof-sig { display: inline !important; fill: var(--muted) !important; }
  html.print-chart .cof-num, html.print-chart .cof-hub1, html.print-chart .cof-hub2 { display: none; }
}

/* Key signatures (/key-signatures) */
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.sig-card { position: relative; background: #FFFDF8; border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px 10px; }
.sig-card p { margin: 2px 0 0; font-weight: 800; font-size: 15px; } .sig-card p a { color: var(--ink); }
.sig-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; padding-right: 34px; }
.sig-card button.b { position: absolute; right: 8px; bottom: 8px; padding: 6px 10px !important; font-size: 12px !important; }
.sig-answers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sig-answers .b { padding: 11px 0 !important; }
#sigQuiz { grid-template-columns: 260px 1fr; }
@media (max-width: 560px) { .sig-grid { grid-template-columns: repeat(2, 1fr); } #sigQuiz { grid-template-columns: 1fr; } }
.tool[data-order] .staff { max-width: 440px; }
#sigQuiz .q-staff { max-width: 300px; width: 100%; margin: 0 auto; }

/* The chords of a key (keychords.js): on every scale page and /chords-in-every-key */
.tool a.b { display: inline-flex; align-items: center; border-radius: 999px; padding: 11px 18px; font: 700 15px "Figtree", -apple-system, system-ui, sans-serif; background: transparent; color: var(--accent); }
.tool a.b:hover { text-decoration: none; background: var(--pill); }
.kc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin: 0 0 16px; }
.kc-tile { position: relative; border: 1px solid var(--line); background: #FBF4EA; border-radius: 16px; padding: 10px 6px 8px; cursor: pointer; text-align: center; color: var(--ink); font-family: "Figtree", -apple-system, system-ui, sans-serif; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.kc-tile:hover { border-color: var(--peach); transform: translateY(-1px); }
.kc-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kc-tile.on { background: var(--lit); border-color: var(--peach); box-shadow: 0 6px 18px rgba(180,85,44,.18); }
.kc-tile > span { display: block; }
.kc-tile small { display: block; font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .2px; }
.kc-tile strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 1px 0 0; white-space: nowrap; }
.kc-tile em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-tile svg { display: block; width: 100%; height: auto; margin-top: 7px; border-radius: 3px; }
.kc-xtra { background: #FFF6EC; border-style: dashed; border-color: var(--peach); }
.kc-xtra::after { content: "borrowed"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--peach); color: #FFF8F1; font-size: 9px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; }
html[lang="fr"] .kc-xtra::after { content: "emprunté"; } html[lang="es"] .kc-xtra::after { content: "prestado"; } html[lang="de"] .kc-xtra::after { content: "geliehen"; } html[lang="pl"] .kc-xtra::after { content: "zapożyczony"; } html[lang="cs"] .kc-xtra::after { content: "vypůjčený"; } html[lang="sv"] .kc-xtra::after { content: "lånat"; } html[lang="no"] .kc-xtra::after { content: "lånt"; } html[lang="da"] .kc-xtra::after { content: "lånt"; } html[lang="fi"] .kc-xtra::after { content: "lainattu"; }
.kc .t7 { display: none !important; }
.kc.kc-sev .t3 { display: none !important; }
.kc.kc-sev .t7 { display: block !important; }
.kc.kc-sev .kc-steps .t7 { display: inline !important; }
.kc .kc-kb .ip-keys { height: 130px; }
.kc .kc-readout a { font-weight: 700; }
.guide .kc h3.kc-h { font-size: 20px; margin: 26px 0 10px; }
.kc-style { display: inline-flex; background: var(--pill); border-radius: 999px; padding: 3px; margin: 0 0 12px; }
.kc-style button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; color: var(--muted); cursor: pointer; }
.kc-style button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(91,60,30,.15); }
.kc-progs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kc-prog { background: #FBF4EA; border-radius: 18px; padding: 14px 16px; }
.kc-ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kc-ph strong { display: block; font-size: 16px; }
.kc-ph small { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 2px; letter-spacing: .2px; }
.tool .kc-ph button.b { padding: 8px 14px; font-size: 14px; flex: none; }
.tool .kc-ph button.b.playing { background: var(--accent); }
.kc-steps { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; }
.kc-steps span { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px 9px; font-weight: 800; font-size: 15px; transition: background .12s, color .12s; }
.kc-steps span i { font-style: normal; }
.kc-steps span.on { background: var(--accent); border-color: var(--accent); color: #FFF8F1; }
.guide .kc-prog p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.kc-table td:first-child { font-weight: 700; color: var(--accent); }
.kc-table tr.kc-hrow td { background: #FFF6EC; }
.kc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; }
.kc-bar .kc-style { margin: 0; }
.kc-bar .readout { margin: 0; flex: 1 1 260px; }
@media (max-width: 560px) {
  .kc-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 8px; }
  .kc-tile { padding: 8px 3px 6px; border-radius: 13px; }
  .kc-tile strong { font-size: 16px; }
  .kc-tile em { font-size: 10px; }
  .kc-progs { grid-template-columns: 1fr; }
  .kc .kc-kb .ip-keys { height: 110px; }
}

/* /chords-in-every-key */
.kpick { display: grid; gap: 8px; margin: 22px 0 0; }
.kpick > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kpick span { width: 52px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.kpick button { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; min-width: 46px; padding: 8px 10px; font: 800 15px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.kpick button:hover { border-color: var(--peach); }
.kpick button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFF8F1; }
.guide .kc-more { font-size: 15px; margin: -8px 0 0; }
.finder .cp-label { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.finder .cp-label + .cp-chords { margin-bottom: 14px; }
.finder .chip { min-width: 52px; font-size: 15px; padding: 8px 10px; }
.finder-out { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; display: grid; gap: 8px; }
.fit { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #FBF4EA; border-radius: 16px; padding: 12px 14px; }
.fit.best { background: var(--lit); }
.fit strong { font-size: 17px; }
.fit em { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin-left: 8px; }
.fit small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tool .fit button.b { padding: 8px 14px; font-size: 14px; flex: none; background: var(--paper); }
.keychart { font-size: 15px; }
.guide .keychart th, .guide .keychart td { padding: 9px 10px; white-space: nowrap; }
.keychart td:first-child, .keychart th:first-child { position: sticky; left: 0; background: var(--page); z-index: 1; font-weight: 700; }
.keychart td a { color: var(--ink); font-weight: 700; } .keychart td:first-child a { color: var(--accent); }
.keychart td a:hover { color: var(--accent); }
@media (max-width: 560px) { .kpick span { width: 100%; } .kpick button { min-width: 0; flex: 1 0 13%; padding: 8px 4px; } .fit { flex-direction: column; align-items: flex-start; } }
@media print {
  html.print-keys header.site, html.print-keys footer.site { display: none; }
  html.print-keys article.guide > *:not(.keychart-wrap):not(h3) { display: none; }
  html.print-keys article.guide > h3 { margin: 10px 0 4px; }
  html.print-keys .keychart { font-size: 11px; }
  html.print-keys .guide .keychart th, html.print-keys .guide .keychart td { padding: 4px 6px; }
}
.finder .cp-chords { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.finder .chip { min-width: 0; }
@media (max-width: 720px) { .finder .cp-chords { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* The song player (songs/song.js): falling notes over the keyboard, transport, hands, wait-for-me */
.tool.song { padding-top: 16px; }
.sfall-wrap { position: relative; margin: 0 0 -1px; border-radius: 14px 14px 0 0; overflow: hidden; background: linear-gradient(#FFFDF9, #FBF3E8); border: 1px solid var(--line); border-bottom: 0; }
.sfall { display: block; width: 100%; height: 230px; }
.song #skb .ip-keys { border-radius: 0 0 14px 14px; }
.ip-w.ip-next { background: #FFE7B8 !important; box-shadow: inset 0 -5px 0 var(--accent); } .ip-b.ip-next { background: #D9822B !important; }
.ip-w.ip-miss { background: #F5C2B5 !important; } .ip-b.ip-miss { background: #A0352A !important; }
.sp-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tool .sp-play { min-width: 108px; justify-content: center; }
.tool .sp-icon { padding: 9px 13px; font-size: 18px; line-height: 1; }
.sp-pos { flex: 1; min-width: 0; accent-color: var(--accent); }
.sp-time { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 12px; }
.sp-opts .kc-style { margin: 0; }
.tool .sp-wait { padding: 8px 16px; font-size: 14px; }
.tool .sp-wait[aria-pressed="true"] { background: var(--accent); color: #FFF8F1; }
.sp-opts label.tempo { margin-left: auto; }
.song .readout { margin-top: 12px; }
.song.waiting .sfall-wrap { background: linear-gradient(#FFFDF9, #FDEBDD); }
.letters .line { cursor: pointer; border-radius: 12px; padding: 2px; margin-left: -2px; transition: background .15s; }
.letters .line:hover { background: #FBF1E6; }
.letters .line.looping { background: var(--lit); box-shadow: inset 0 0 0 1.5px var(--peach); }
.sp-foot { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.guide .all-songs { margin: 14px 0 0; font-weight: 700; }
@media (max-width: 560px) {
  .tool.song { padding: 12px; }
  .sfall { height: 190px; }
  .sp-opts label.tempo { margin-left: 0; }
  .sp-opts .kc-style button { padding: 7px 11px; }
}

/* The songs hub (/songs/) */
.song-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.song-filter button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.song-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFF8F1; }
.song-sec h2 { margin-top: 40px; }
.song-sec > p { margin: -6px 0 14px; color: var(--muted); font-size: 16px; }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.song-card { position: relative; }
.song-card > a { display: block; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px 16px; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.song-card > a:hover { text-decoration: none; border-color: var(--peach); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(91,60,30,.10); }
.song-card .roll { display: block; width: 100%; height: auto; margin: 0 0 10px; background: #FBF3E8; border-radius: 12px; }
.song-card .roll rect { fill: #E07F55; }
.song-card strong { display: block; font-size: 18px; letter-spacing: -.2px; line-height: 1.25; overflow-wrap: break-word; }
:lang(sv) .song-card strong, :lang(no) .song-card strong, :lang(da) .song-card strong, :lang(fi) .song-card strong { hyphens: auto; }
.song-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.sc-level { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--accent); }
.song-card strong, .song-card small { padding-right: 40px; }
.sc-play { position: absolute; z-index: 2; bottom: 16px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: #FFF8F1; font-size: 13px; cursor: pointer; box-shadow: 0 4px 12px rgba(43,33,29,.25); }
.sc-play.on { background: var(--accent); }
@media (max-width: 560px) { .song-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .song-card > a { padding: 10px 11px 12px; border-radius: 16px; } .song-card strong { font-size: 15px; } .sc-play { bottom: 11px; right: 9px; width: 30px; height: 30px; font-size: 11px; } .song-card strong, .song-card small { padding-right: 30px; } .sc-level { font-size: 9.5px; gap: 5px; } }
.tool .sp-icon svg { display: block; }

/* /chord-progressions */
.prog-tool .ip-keys { height: 130px; }
.prog-readout { min-height: 1.6em; } .prog-readout strong { color: var(--ink); font-size: 17px; } .prog-readout span { font-weight: 800; color: var(--accent); margin: 0 4px; }
.prog-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 10px; }
.prog-ctl .kc-style { margin: 0; } .prog-ctl label.tempo { margin-left: auto; }
.tool #ploop { padding: 8px 16px; font-size: 14px; }
.plib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; }
.pcard .kc-ph strong { font-size: 17px; }
.pcard button.b { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--ink); color: #FFF8F1; flex: none; }
.pcard button.b.playing { background: var(--accent); }
.pchips { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; }
.pchips span { background: #FBF4EA; border: 1px solid var(--line); border-radius: 10px; padding: 3px 9px; font-weight: 800; font-size: 15px; transition: background .12s, color .12s; }
.pchips span.on { background: var(--accent); border-color: var(--accent); color: #FFF8F1; }
.guide .pcard p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 8px 0 4px; }
.pcard .pedit { font-size: 13px; font-weight: 700; }
.ppal { display: grid; gap: 10px; }
.pgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pgroup > span { width: 100%; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.pgroup .chip { min-width: 58px; }
.pbuild-seq { display: flex; flex-wrap: wrap; gap: 6px; min-height: 58px; align-items: center; margin: 14px 0 0; padding: 10px; border-radius: 16px; background: #FBF4EA; border: 1px dashed var(--line); }
.pbuild-seq em { color: var(--muted); font-size: 15px; font-style: normal; padding: 0 6px; }
.pbuild-seq span { display: inline-flex; flex-direction: column; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 5px 10px; font-weight: 800; font-size: 16px; cursor: pointer; }
.pbuild-seq span small { font-size: 10px; color: var(--muted); font-weight: 700; }
.pbuild-seq span.on { background: var(--accent); border-color: var(--accent); color: #FFF8F1; } .pbuild-seq span.on small { color: #FFE9DA; }
.pbuild-seq span:hover { border-color: var(--peach); }
.tool .pp-btn.playing { background: var(--accent); }
@media (max-width: 560px) { .plib { grid-template-columns: 1fr; } .prog-ctl label.tempo { margin-left: 0; } .prog-tool .ip-keys { height: 110px; } }
.guide .keychart th { text-transform: none; letter-spacing: 0; font-size: 13px; }   /* Roman numerals: case is meaning (ii is minor, II major) */

/* /metronome and /tap-tempo */
.metro { text-align: center; }
.m-top { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.m-pend { width: 150px; height: auto; flex: none; }
.m-body { fill: #F3EBE2; stroke: var(--line); stroke-width: 2; } .m-base { fill: var(--keydark); }
.m-arm { transform-origin: 100px 140px; transform-box: view-box; } .m-arm line { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; } .m-arm rect { fill: var(--accent); }
.m-pivot { fill: var(--ink); }
.m-bpm { display: flex; align-items: center; gap: 14px; }
.m-bpm span { font-weight: 800; font-size: 76px; letter-spacing: -3px; line-height: 1; min-width: 2.2ch; font-variant-numeric: tabular-nums; }
.m-bpm button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font: 700 24px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.m-read small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.guide .m-mark { margin: 6px 0 0; font-weight: 800; color: var(--accent); font-size: 20px; font-style: italic; }
.m-slider { width: 100%; margin: 18px 0 8px; accent-color: var(--accent); }
.m-dots { display: flex; justify-content: center; gap: 10px; min-height: 26px; align-items: center; margin: 6px 0 14px; flex-wrap: wrap; }
.m-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); transition: background .06s, transform .06s; }
.m-dots i.acc { width: 22px; height: 22px; } .m-dots i.gap { margin-left: 10px; }
.m-dots i.on { background: var(--accent); transform: scale(1.15); } .m-dots i.acc.on { background: #8E3F1E; }
.m-main { display: flex; justify-content: center; gap: 10px; }
.tool .m-main .b { min-width: 130px; padding: 14px 22px; font-size: 17px; justify-content: center; }
.m-opts { display: grid; gap: 10px; margin: 20px 0 0; text-align: left; }
.m-opts > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-opts > div > span { width: 80px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.m-seg { display: inline-flex; flex-wrap: wrap; background: var(--pill); border-radius: 14px; padding: 3px; gap: 2px; }
.m-seg button { border: 0; background: transparent; border-radius: 11px; padding: 7px 11px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; color: var(--muted); cursor: pointer; }
.m-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(91,60,30,.15); }
.tool .m-acc { padding: 7px 13px; font-size: 14px; }
.metro .readout { text-align: center; font-size: 13px; }
.marks tr.on td { background: var(--lit); }
.t-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 260px; border: 0; border-radius: 22px; background: linear-gradient(#FFFDF9, #FBF1E6); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-family: "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.t-pad span { font-size: 96px; font-weight: 800; letter-spacing: -4px; line-height: 1; font-variant-numeric: tabular-nums; }
.t-pad small { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.t-pad em { font-style: normal; margin-top: 14px; font-weight: 700; color: var(--accent); }
.t-pad.hit { animation: tap .25s ease-out; }
@keyframes tap { 0% { box-shadow: inset 0 0 0 4px var(--peach); background: var(--lit); } 100% { box-shadow: inset 0 0 0 1px var(--line); } }
.tapper .t-info { text-align: center; font-size: 15px; }
.tool a.b.dark { background: var(--ink); color: #FFF8F1; }
@media (max-width: 560px) { .m-bpm span { font-size: 60px; } .m-pend { width: 110px; } .m-opts > div > span { width: 100%; } .t-pad { height: 220px; } .t-pad span { font-size: 80px; } }
@media (prefers-reduced-motion: reduce) { .t-pad.hit { animation: none; } }
.marks td.nw { white-space: nowrap; }

/* /note-values and /time-signatures */
.nv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.nv-card { display: flex; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; }
.nv-glyph { flex: none; width: 64px; height: 92px; display: grid; place-items: center; font-family: "Noto Music", serif; font-size: 58px; line-height: 1; color: var(--ink); background: #FBF4EA; border-radius: 14px; }
.nv-card.small .nv-glyph { height: 78px; font-size: 50px; }
.guide .nv-text h3 { margin: 0; font-size: 19px; }
.guide .nv-text p { font-size: 15px; line-height: 1.5; margin: 4px 0; }
.guide .nv-text .nv-uk { color: var(--accent); font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.nv-rg { font-family: "Noto Music", serif; font-size: 22px; vertical-align: -4px; margin-right: 2px; }
.nv-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nv-btns .b, .tree .b, .rgame .b { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--pill); color: var(--ink); }
.nv-btns .b:first-child { background: var(--ink); color: #FFF8F1; }
.tree { display: grid; gap: 8px; }
.tree-row { display: grid; grid-template-columns: 40px 120px 1fr; align-items: center; gap: 10px; }
.tree .tree-row .b { width: 36px; height: 36px; padding: 0; background: var(--ink); color: #FFF8F1; }
.tree-name { font-weight: 700; font-size: 14px; color: var(--muted); }
.tree-cells { display: flex; gap: 3px; }
.tree-cells i { flex: 1; font-style: normal; text-align: center; font-family: "Noto Music", serif; font-size: 26px; line-height: 44px; height: 44px; background: #FBF4EA; border-radius: 8px; transition: background .08s, color .08s; overflow: hidden; }
.tree-row:nth-child(5) .tree-cells i { font-size: 17px; }
.tree-cells i.on { background: var(--accent); color: #FFF8F1; }
.rg-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rg-top label.tempo { margin-left: auto; }
.rstaff { position: relative; display: flex; margin: 18px 0 0; padding: 18px 12px 10px; background: #FBF4EA; border-radius: 16px 16px 0 0; min-height: 112px; align-items: flex-end; }
.rstaff::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 33px; height: 2px; background: #D9C9B9; }
.rn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; padding-left: 4px; min-width: 0; border-left: 3px solid transparent; border-radius: 2px; }
.rn b { font-family: "Noto Music", serif; font-weight: 400; font-size: 52px; line-height: 1; height: 62px; display: flex; align-items: flex-end; transition: color .08s; }
.rn small { min-height: 16px; }
.rbeats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 12px 8px; background: #F6ECDF; border-radius: 0 0 16px 16px; margin: 0 0 12px; }
.rbeats span { font-size: 12px; font-weight: 800; color: var(--muted); padding-left: 6px; border-left: 2px solid #D9C9B9; }
.rn.rest b { color: var(--muted); }
.rn.on b { color: var(--accent); }
.rn small { font-size: 11px; font-weight: 800; white-space: nowrap; }
.rn.hit { border-color: #3E8E5A; } .rn.hit small { color: #3E8E5A; }
.rn.near { border-color: #D9822B; } .rn.near small { color: #B5651B; }
.rn.miss { border-color: #C0412F; } .rn.miss small { color: #C0412F; }
.rpad { display: block; width: 100%; height: 120px; border: 0; border-radius: 18px; background: linear-gradient(#FFFDF9, #FBF1E6); box-shadow: inset 0 0 0 1px var(--line); font: 800 20px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.rpad small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.rpad.hit { animation: tap .2s ease-out; }
.rgame .b.dark { background: var(--ink); color: #FFF8F1; }
.ts-how { display: flex; align-items: center; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 22px; margin: 18px 0; }
.guide .ts-how p { margin: 0; font-size: 16px; } .ts-how p span { color: var(--muted); font-size: 14px; }
.tsig { display: inline-flex; flex-direction: column; align-items: center; font: 800 30px/0.92 Georgia, "Times New Roman", serif; color: var(--ink); }
.tsig.big { font-size: 46px; }
.ts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; }
.ts-head { display: flex; align-items: center; gap: 14px; }
.guide .ts-head h3 { margin: 0; font-size: 18px; }
.ts-sym { font-family: "Noto Music", serif; font-size: 26px; line-height: 1; }
.guide .ts-card p { font-size: 15px; line-height: 1.55; margin: 10px 0; flex: 1; }
.ts-count { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.ts-count span { min-width: 30px; text-align: center; padding: 5px 6px; border-radius: 9px; background: #FBF4EA; font-weight: 800; font-size: 15px; color: var(--muted); transition: background .06s, color .06s, transform .06s; }
.ts-count span.big { color: var(--ink); background: var(--pill); }
.ts-count span.on { background: var(--accent); color: #FFF8F1; transform: scale(1.08); }
.ts-card .ts-play { align-self: flex-start; border: 0; border-radius: 999px; padding: 9px 16px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--ink); color: #FFF8F1; }
.ts-card .ts-play.on { background: var(--accent); }
@media (max-width: 560px) { .nv-cards, .ts-grid { grid-template-columns: 1fr; } .tree-row { grid-template-columns: 36px 1fr; } .tree-name { display: none; } .rg-top label.tempo { margin-left: 0; } .rn b { font-size: 36px; } }
.guide .ts-card p .ts-sym { font-size: 20px; vertical-align: -3px; }

/* /how-to-play-piano */
.lhead { position: sticky; top: 0; z-index: 5; background: var(--page); padding: 10px 0 8px; margin: 10px 0 0; border-bottom: 1px solid var(--line); }
.lbar { height: 8px; border-radius: 99px; background: var(--pill); overflow: hidden; } .lbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .5s; }
#lprogt { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.guide .lkeys { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }
kbd { display: inline-block; min-width: 20px; text-align: center; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--paper); font: 700 12px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); }
.lstep { scroll-margin-top: 110px; }
.lstep h2 { display: flex; align-items: center; gap: 12px; }
.lnum { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--pill); color: var(--muted); display: grid; place-items: center; font-size: 16px; font-weight: 800; transition: background .3s, color .3s; }
.lstep.done .lnum { background: #3E8E5A; color: #fff; font-size: 0; } .lstep.done .lnum::after { content: "✓"; font-size: 17px; }
.lstep.celebrate .lex { box-shadow: 0 0 0 3px rgba(62,142,90,.35), 0 18px 50px rgba(91,60,30,.08); }
.lex { transition: box-shadow .3s; }
.lex .ip-keys { height: 140px; }
.lex .lmsg { font-size: 15px; } .lex .lmsg strong { color: #2F7A4A; }
.lask-wrap { font-size: 18px; font-weight: 700; margin: 0 0 12px; } .lask { display: inline-block; min-width: 46px; text-align: center; background: var(--ink); color: #FFF8F1; border-radius: 12px; padding: 2px 12px; font-size: 26px; font-weight: 800; margin-left: 6px; }
.lseq { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.lseq span { min-width: 28px; text-align: center; padding: 4px 6px; border-radius: 8px; background: #F6EFE6; font-weight: 800; font-size: 14px; color: var(--muted); }
.lseq span.done { background: #DDEFE2; color: #2F7A4A; } .lseq span.now { background: var(--accent); color: #FFF8F1; }
.hands { display: block; width: 100%; max-width: 520px; margin: 10px auto; }
.hands .hand { fill: #F6E3D3; stroke: #D9BBA3; stroke-width: 2; } .hands .hnum { fill: var(--accent); } .hands text { fill: #FFF8F1; font: 800 15px "Figtree", sans-serif; } .hands .hlabel { fill: var(--muted); font: 700 13px "Figtree", sans-serif; }
.lstep [data-gotit] { border: 0; border-radius: 999px; padding: 10px 18px; font: 700 15px "Figtree", -apple-system, system-ui, sans-serif; background: var(--ink); color: #FFF8F1; cursor: pointer; }
.lstep.done [data-gotit] { background: #3E8E5A; }
.ldone { text-align: center; margin: 30px 0 0; }
.guide .ivory.big { padding: 26px 28px; } .guide .ivory.big p { font-size: 18px; }
@media (max-width: 560px) { .lex .ip-keys { height: 120px; } .lhead { padding: 8px 0 6px; } .guide .lkeys { font-size: 13px; } }

/* Sheet music on song pages (songs/sheets/*.svg, engraved by scripts/site/build_sheets.py) */
.sheet { margin: 16px 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px 8px; }
.sheet img { display: block; width: 100%; height: auto; }
.sheet figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; }
.guide .sheet-btns { font-size: 15px; } .sheet-btns .b { border: 0; border-radius: 999px; padding: 10px 18px; font: 700 15px "Figtree", -apple-system, system-ui, sans-serif; background: var(--ink); color: #FFF8F1; cursor: pointer; margin-right: 10px; }
.sc-sheet { font-weight: 700; color: var(--accent); }
@media print {
  html.print-sheet header.site, html.print-sheet footer.site { display: none; }
  html.print-sheet article.guide > *:not(h1):not(.sheet) { display: none; }
  html.print-sheet article.guide > h1 { font-size: 26px; margin: 0 0 8px; }
  html.print-sheet .sheet { border: 0; padding: 0; }
  html.print-sheet .sheet picture source { display: none; }
}
.sheet-svg svg { display: block; width: 100%; height: auto; }
.sheet-svg g.note.on, .sheet-svg g.note.on use, .sheet-svg g.note.on path { fill: #B4552C; stroke: #B4552C; color: #B4552C; }
.staff-scale { display: grid; gap: 4px; padding: 12px 18px; }
.staff-scale .ivory-staff { max-width: 560px; }
@media (max-width: 560px) { .tool.staff-scale .staff .ivory-staff { min-width: 0; } }
.staff-chord { padding: 10px 18px; }
.staff-chord .ivory-staff { max-width: 520px; }
@media (max-width: 560px) { .tool.staff-chord .staff .ivory-staff { min-width: 0; } }

/* /sight-reading */
.sr-levels { margin: 0 0 12px; }
.sr .staff { margin: 4px 0 8px; }
.ivory-staff .st-note.ok .st-head { fill: #3E8E5A; }
.ivory-staff .st-note.late .st-head { fill: #D9822B; }
.guide .sr-keys { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.7; }
@media (max-width: 560px) { .tool.sr .staff .ivory-staff { min-width: 0; } }
@media (hover: none) and (pointer: coarse) { .guide .sr-keys, .guide .lkeys kbd, .sp-keys-hint { display: none; } }

/* /music-symbols */
.sym-strip { padding: 14px 18px; }
.sym-strip p { margin: 0 0 8px !important; font-size: 12px !important; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted) !important; }
.sym-strip div { display: flex; flex-wrap: wrap; gap: 6px; }
.sym-strip button { min-width: 44px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #FBF4EA; font: 26px "Noto Music", "Figtree", serif; color: var(--ink); cursor: pointer; }
.sym-strip button:hover { border-color: var(--peach); }
.sym-strip button.copied, .sym-copy.copied { background: #DDEFE2; border-color: #3E8E5A; }
.guide .toc-line { font-size: 15px; }
.syms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 6px; }
.sym { display: flex; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.sym-g { flex: none; width: 66px; min-height: 76px; display: grid; place-items: center; background: #FBF4EA; border-radius: 12px; font: 40px/1 "Noto Music", serif; color: var(--ink); }
.guide .sym-t h3 { margin: 0; font-size: 17px; }
.guide .sym-t p { font-size: 14px; line-height: 1.5; margin: 4px 0 8px; color: var(--muted); }
.sym-b { display: flex; flex-wrap: wrap; gap: 6px; }
.sym-b .b { border: 0; border-radius: 999px; padding: 6px 12px; font: 700 13px "Figtree", -apple-system, system-ui, sans-serif; background: var(--pill); color: var(--ink); cursor: pointer; }
.sym-b [data-demo] { background: var(--ink); color: #FFF8F1; } .sym-b [data-demo].on { background: var(--accent); }
.sym-copy { font-family: "Noto Music", "Figtree", sans-serif !important; }
.copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #FFF8F1; padding: 10px 18px; border-radius: 999px; font: 700 15px "Figtree", "Noto Music", sans-serif; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20; }
.copied.show { opacity: 1; transform: translateX(-50%); }
@media (max-width: 560px) { .syms { grid-template-columns: 1fr; } }

/* /perfect-pitch-test and /ear-training */
.pp-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.pp-msg, .et-msg { font-size: 17px; min-height: 2.4em; }
.pp-names { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.et-ans { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 14px; }
.pp-names .b, .et-ans .b { border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; font: 800 15px "Figtree", -apple-system, system-ui, sans-serif; background: var(--paper); color: var(--ink); cursor: pointer; }
.pp-names .b.right, .et-ans .b.right { background: #DDEFE2; border-color: #3E8E5A; color: #2F7A4A; }
.pp-names .b.wrong, .et-ans .b.wrong { background: #F8DDD6; border-color: #C0412F; color: #A0352A; }
.et-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .pp-names { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* /chord-finder */
.cf-out { min-height: 92px; margin-top: 14px; }
.cf-best { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; background: var(--lit); border-radius: 18px; padding: 14px 18px; }
.cf-best strong { font-size: 34px; letter-spacing: -.5px; }
.cf-best span { color: var(--muted); font-size: 15px; } .cf-best .cf-tones { font-weight: 800; color: var(--accent); }
.cf-best a { margin-left: auto; font-weight: 700; font-size: 15px; }

/* /play-piano-by-ear */
.ear-dots { display: flex; gap: 8px; justify-content: center; margin: 14px 0 12px; min-height: 16px; }
.ear-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.ear-dots i.ok { background: #3E8E5A; } .ear-dots i.now { background: var(--accent); }
.ear-msg { font-size: 16px; min-height: 2.4em; }

/* /piano-practice-routine */
.pr-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 6px; }
.pr-top span { display: block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); }
.pr-top b { font-size: 56px; letter-spacing: -2px; font-variant-numeric: tabular-nums; line-height: 1; }
.pr-top .row-btns { margin: 0; }
.pr-plan { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.pr-plan li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: #FBF4EA; border-radius: 14px; padding: 10px 14px; border: 1px solid transparent; }
.pr-plan li b { font-size: 16px; } .pr-plan li span { font-weight: 800; color: var(--muted); font-size: 14px; }
.guide .pr-plan li em { grid-column: 1 / -1; font-style: normal; font-size: 14px; color: var(--muted); }
.pr-plan li.now { background: var(--lit); border-color: var(--peach); } .pr-plan li.done { opacity: .55; }

/* /sheet-music: a card per score, with the first line of the music, a preview and a print button */
.sm-sec { margin-top: 8px; }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sm-card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.sm-card:hover { border-color: var(--peach); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(91,60,30,.10); }
.sm-card > a { display: block; flex: 1; padding: 0 16px 6px; color: var(--ink); }
.sm-card > a:hover { text-decoration: none; }
.sm-img { display: block; margin: 0 -16px 12px; padding: 10px 6px 4px; background: #FFFDF8; border-bottom: 1px solid var(--line); }
.sm-img img { display: block; width: 100%; height: auto; }
.sm-card strong { display: block; font-size: 18px; letter-spacing: -.2px; line-height: 1.25; }
.sm-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.sm-btns { display: flex; gap: 8px; align-items: center; padding: 8px 16px 14px; }
.sm-btns .sc-play { position: static; box-shadow: none; flex: none; }
.sm-print { border: 0; border-radius: 999px; padding: 9px 16px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--pill); color: var(--ink); }
.sm-print:hover { background: var(--lit); }
#printone { display: none; }
@media (max-width: 560px) { .sm-grid { grid-template-columns: 1fr; gap: 12px; } }
@media print {
  html.print-one header.site, html.print-one footer.site { display: none; }
  html.print-one article.guide > *:not(#printone) { display: none !important; }
  html.print-one #printone { display: block; }
  html.print-one #printone h1 { font-size: 26px; margin: 0 0 2px; }
  html.print-one #printone p { margin: 0 0 14px; color: #555; font-size: 13px; }
  html.print-one #printone img { width: 100%; height: auto; }
}

/* scaletool.js: the scales beyond major and minor, and the modes */
.st-scales { margin: 0 0 12px; flex-wrap: wrap; }
.st-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.st-keys button { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; min-width: 46px; padding: 8px 10px; font: 800 15px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.st-keys button:hover { border-color: var(--peach); }
.st-keys button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFF8F1; }
.st .st-name { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.st .notes-big span.char { background: #E6DDF4; color: #5B4A9A; }
.st .st-staff { margin: 6px 0 10px; }
.ip-w.ip-on.ip-char { background: #E6DDF4; } .ip-w.ip-on.ip-char .ip-label { color: #5B4A9A; } .ip-b.ip-on.ip-char { background: #8B7BC0; }
.st [data-jam][aria-pressed="true"] { background: var(--accent); color: #FFF8F1; }
.st-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.st-hint kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--paper); font: 700 12px "Figtree", -apple-system, system-ui, sans-serif; text-align: center; color: var(--ink); }
.st-table td:first-child { white-space: nowrap; }
@media (max-width: 560px) { .st-keys button { min-width: 40px; padding: 7px 8px; font-size: 14px; } .st-hint kbd { display: none; } }
.st .st-staff .ivory-staff { max-width: 560px; }
@media (max-width: 560px) { .tool.st .staff .ivory-staff { min-width: 0; } .st-hint .kb-only { display: none; } }
@media (min-width: 561px) { .st-hint .touch-only { display: none; } }

/* tempo.js: hear a tune at any tempo */
.tempo-hear .tempo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tempo-hear .tempo-now { display: block; font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.tempo-hear .tempo-name { display: block; font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); min-height: 18px; }
.tempo-hear input[type=range] { width: 100%; margin: 16px 0 6px; accent-color: var(--accent); }
.tempo-hear .tempo-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 8px; }
.tempo-hear .tempo-foot label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tempo-hear .tempo-foot input { accent-color: var(--accent); }
.tool.tempo-hear button.b.on { background: var(--accent); color: #FFF8F1; }
.marks button.linkish.on { color: var(--ink); }
.tempo-ladder tr.on td { background: var(--lit); }
.tempo-compare { margin: 6px 0 14px; }
.tempo-compare .b { border: 0; border-radius: 999px; padding: 10px 16px; font: 700 14px "Figtree", -apple-system, system-ui, sans-serif; cursor: pointer; background: var(--pill); color: var(--ink); }
.tempo-compare .b.on { background: var(--accent); color: #FFF8F1; }
@media (max-width: 560px) { .tempo-ladder td:nth-child(3), .tempo-ladder th:nth-child(3) { display: none; } .tempo-hear .tempo-now { font-size: 32px; } }

/* /hardest-piano-pieces */
.hp-kinds li { margin: 4px 0; }
.hp-list { display: grid; gap: 14px; margin: 14px 0 6px; }
.hp-card { display: grid; grid-template-columns: 52px 1fr; gap: 6px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px 16px 16px; }
.hp-n { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--peach); text-align: center; line-height: 1.1; }
.hp-card h3 { margin: 2px 0 2px; font-size: 21px; }
.hp-card p { margin: 6px 0; }
.hp-by { color: var(--muted); font-size: 14px; font-weight: 700; }
.hp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-tags span { background: var(--pill); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); }
.hp-listen { font-size: 15px; color: var(--muted); }
.trill .tr-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trill .tr-pad { height: 150px; border: 1px solid var(--line); border-radius: 18px; background: #FFFDF8; font: 800 34px "Figtree", -apple-system, system-ui, sans-serif; color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .06s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.trill .tr-pad small { font-size: 13px; color: var(--muted); font-weight: 700; }
.trill .tr-pad.on { background: var(--lit); border-color: var(--peach); }
.trill .tr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 6px; text-align: center; }
.trill .tr-stats b { display: block; font-size: 34px; letter-spacing: -1px; }
.trill .tr-stats span { font-size: 12px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.hp-ladder { display: grid; gap: 8px; margin: 12px 0; }
.hp-step { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.hp-step span { font-size: 12px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--accent); }
.hp-step div { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 700; }
.hp-step.hp-top { background: var(--ink); border-color: var(--ink); color: #FFF8F1; }
.hp-step.hp-top span { color: var(--peach); }
@media (max-width: 560px) { .hp-card { grid-template-columns: 1fr; padding: 16px; } .hp-n { text-align: left; font-size: 26px; } .hp-step { grid-template-columns: 1fr; gap: 4px; } .trill .tr-pad { height: 120px; } }

/* A staff printed on its own (the clef note charts, 早見表) */
@media print {
  html.print-staff header.site, html.print-staff footer.site { display: none; }
  html.print-staff article.guide > *:not(h1):not(.print-me) { display: none !important; }
  html.print-staff .print-me { border: 0; box-shadow: none; }
  html.print-staff .print-me .kb, html.print-staff .print-me .row-btns, html.print-staff .print-me .readout { display: none; }
}

/* The music symbol quiz (/ja/music-symbols) */
.sym-quiz { text-align: center; }
.sym-quiz .sq-g { font-family: "Noto Music", serif; font-size: 72px; line-height: 1.2; min-height: 100px; display: grid; place-items: center; width: 140px; height: 120px; margin: 0 auto 14px; background: #FBF4EA; border-radius: 22px; color: var(--ink); transition: background .2s; }
.sym-quiz .sq-g.ok { background: #DFF0DC; } .sym-quiz .sq-g.ng { background: #F8DCD3; }
.sym-quiz .sq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 520px; margin: 0 auto; }
.tool.sym-quiz .sq-opts button.b { padding: 13px 10px; }
.tool.sym-quiz .sq-opts button.right { background: #DFF0DC; color: #2E6B2A; } .tool.sym-quiz .sq-opts button.wrong { background: #F8DCD3; color: #A0352A; }

/* The online piano (online-piano.js): wider than the text column, held notes, two rows of computer keys */
.tool.op { width: min(1180px, calc(100vw - 32px)); box-sizing: border-box; position: relative; left: 50%; transform: translateX(-50%); padding: 16px; }
.op-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.op-bar .op-gap { flex: 1; }
.op-oct { display: inline-flex; align-items: center; gap: 4px; background: var(--pill); border-radius: 999px; padding: 3px; }
.op-oct span { font: 700 13px "Figtree", -apple-system, system-ui, sans-serif; color: var(--muted); padding: 0 6px; }
.tool .op-oct button.b { padding: 8px 13px; background: var(--paper); }
.tool button.b.on, .tool button#opPedal[aria-pressed="true"] { background: var(--ink); color: #FFF8F1; }
.tool button.b.rec { background: #B3261E; color: #FFF8F1; }
.tool button.b:disabled { opacity: .45; cursor: default; }
.op-keys { position: relative; height: 240px; border-radius: 14px; overflow: hidden; background: #E2D6C7; border: 1px solid #E2D6C7; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.op-w { position: absolute; top: 0; bottom: 0; box-sizing: border-box; background: linear-gradient(#FFFEFB, #F4EDE3); border-right: 1px solid #E2D6C7; border-radius: 0 0 9px 9px; cursor: pointer; }
.op-b { position: absolute; top: 0; height: 61%; z-index: 2; background: linear-gradient(#45372F, #211915); border-radius: 0 0 7px 7px; box-shadow: 0 3px 4px rgba(0,0,0,.28); cursor: pointer; }
.op-w.op-on { background: linear-gradient(#FCE6D6, #F5C2A1); }
.op-b.op-on { background: linear-gradient(#C9643E, #973F20); }
.op-n, .op-k { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; font-family: "Figtree", -apple-system, system-ui, sans-serif; }
.op-n { bottom: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.op-k { bottom: 36px; font-size: 12px; font-weight: 600; color: #B5A392; }
.op-w.op-on .op-n { color: var(--accent); }
.op-b .op-n { bottom: 9px; font-size: 10px; color: #FFF0E4; }
.op-b .op-k { bottom: 28px; font-size: 10px; color: #CBB6A2; }
.op-middle::after { content: ""; position: absolute; left: 50%; bottom: 58px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.op .readout { margin-top: 12px; }
.op-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .tool.op { padding: 10px; border-radius: 20px; }
  .op-keys { height: 200px; }
  .op-n { font-size: 11px; bottom: 9px; } .op-k { font-size: 10px; bottom: 28px; }
  .op-b .op-n { font-size: 8px; } .op-b .op-k { display: none; }
  .op-middle::after { bottom: 46px; }
  .tool .op-bar button.b { padding: 9px 13px; font-size: 14px; }
}
@media (pointer: coarse) { .tool #opLetters { display: none; } }
@media (max-width: 560px) { .op-oct span { display: none; } }
