/* Compact references use the existing library palette and lesson shell. */
.overview-tools { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; }
.overview-tools a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: underline; }
.cheat-sheet .cheat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 28px; }
.cheat-sheet .cheat-panel { min-width: 0; border-top: 1px solid var(--line); padding-top: 18px; scroll-margin-top: 88px; }
.cheat-sheet .cheat-panel h2 { font: 400 1.45rem/1.25 var(--serif); margin: 0 0 12px; }
.cheat-sheet .cheat-panel > p { font-size: .875rem; color: var(--muted); margin: 10px 0 16px; }
.cheat-sheet .cheat-regular { grid-column: 1 / -1; }
.cheat-sheet .cheat-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cheat-sheet .cheat-controls label { display: flex; align-items: center; gap: 12px; }
.cheat-sheet select { max-width: 100%; min-height: 44px; padding: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font: 1rem var(--sans); }
.cheat-sheet .cheat-scroll { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; scrollbar-color: var(--accent) var(--surface); }
.cheat-sheet .cheat-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cheat-sheet .cheat-matrix { width: 100%; min-width: 27rem; border-collapse: collapse; text-align: left; font-size: .9375rem; line-height: 1.5; }
.cheat-sheet .cheat-matrix th, .cheat-sheet .cheat-matrix td { padding: 10px 10px 10px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.cheat-sheet .cheat-matrix th { font-weight: 500; }
.cheat-sheet .cheat-matrix thead th { font-size: .8125rem; color: var(--muted); }
.cheat-sheet .cheat-matrix small { display: block; color: var(--muted); font: .8125rem/1.45 var(--sans); margin-top: 3px; }
.cheat-sheet .cheat-matrix caption { text-align: left; padding-bottom: 12px; color: var(--muted); font-size: .875rem; }
.cheat-sheet .cheat-regular .cheat-matrix { min-width: 29rem; table-layout: fixed; }
.cheat-sheet .cheat-regular td { font: 1.25rem/1.5 var(--serif); }
.cheat-sheet .cheat-regular th[scope="row"] { width: 25%; font-size: .875rem; }
.cheat-sheet .written-pattern { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.cheat-sheet .cheat-legend { font-size: .875rem; color: var(--muted); }
.cheat-sheet .cheat-legend > summary { min-height: 44px; width: fit-content; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cheat-sheet .cheat-legend > summary::after { position: static; }
.cheat-sheet .cheat-legend > p { max-width: 75ch; margin-block: 10px; }
.cheat-sheet .sheet-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: start; margin-top: 16px; }
.cheat-sheet .sheet-actions #save-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cheat-sheet .keep-lesson { flex: 1; min-width: 190px; margin: 0; border: 0; }
.cheat-sheet .keep-lesson > summary { padding: 0; }
.cheat-sheet .cheat-grid { margin-top: 12px; }
.cheat-sheet .cheat-more { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent); font-size: .875rem; }
.cheat-sheet .cheat-sounds { margin-top: 32px; }
.cheat-sheet [hidden] { display: none !important; }
@media (max-width: 760px) {
 .cheat-sheet .cheat-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
 .cheat-sheet .cheat-controls label { width: 100%; }
 .cheat-sheet select { flex: 1; min-width: 0; }
 .cheat-sheet .cheat-matrix { min-width: 22rem; font-size: .875rem; }
 .cheat-sheet .cheat-regular .cheat-matrix { min-width: 26rem; }
 .cheat-sheet .cheat-regular td { font-size: 1.125rem; }
}
