*{box-sizing:border-box} :root{font-family:Inter,Segoe UI,system-ui,sans-serif;color:#20324d;background:#f3f6fb;font-synthesis:none}body{margin:0}button,input,select{font:inherit}button{border:1px solid #d8e0eb;background:white;color:#263b59;padding:11px 16px;border-radius:9px;cursor:pointer;font-weight:600}button:hover{background:#edf3ff}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #608aff;outline-offset:3px}button:disabled{opacity:.5;cursor:default}.primary{background:#285bea;color:white;border-color:#285bea}.primary:hover{background:#1948c8}header{height:76px;border-bottom:1px solid #e0e6ef;display:flex;align-items:center;justify-content:space-between;padding:0 4%;background:#fff}.brand{text-decoration:none;color:#243750;font-size:23px;letter-spacing:-.8px;display:flex;align-items:center;gap:8px}.brand b{font-weight:400}.brand-icon{background:#285bea;color:#fff;border-radius:10px;padding:5px 10px;font-size:27px}nav{display:flex;gap:10px}nav button{border:none;background:transparent;font-size:14px}main{max-width:1280px;margin:auto;padding:25px 4% 0}.heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.eyebrow{font-size:11px;letter-spacing:2px;color:#607796;font-weight:750}h1{font-size:32px;letter-spacing:-1px;margin:5px 0 7px}p{color:#65768e;margin:0;line-height:1.6;font-size:14px}.best{text-align:right}.best small{font-size:10px;letter-spacing:1.5px;color:#677890}.best strong{display:block;font-size:27px;color:#285bea}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:20px;flex-wrap:wrap}.toolbar label{display:flex;align-items:center;gap:7px;font-size:13px;margin-right:auto}.toolbar input{width:95px;accent-color:#285bea}.toolbar button{font-size:13px}.segmented{background:#e7edf6;border-radius:10px;padding:4px;display:flex}.segmented button{border:0;background:transparent;color:#69778e}.segmented .selected{background:#fff;color:#285bea;box-shadow:0 1px 4px #20324d15}.score-panel{background:#fff;border:1px solid #e1e7f0;border-radius:16px;overflow:hidden;box-shadow:0 5px 20px #24375404}.score-top,.score-bottom{padding:16px 23px;display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:13px}.legend{display:flex;gap:7px;align-items:center;color:#61738b;font-size:11px}.legend i,#count i{width:8px;height:8px;display:inline-block;border-radius:50%}.green{background:#1c9565}.yellow{background:#d4a20d}.red{background:#d6505f}.score-bottom{border-top:1px solid #edf0f6;color:#697991;flex-wrap:wrap}.score-bottom label{font-size:11px;display:flex;align-items:center;gap:5px}.score-bottom input{width:40px;border:1px solid #d6dfed;padding:5px;border-radius:5px}.score-bottom button{font-size:11px;padding:6px}#staff{width:100%;display:block;height:190px}#count{display:flex;gap:8px}#count i{background:#dfe7f3;width:11px;height:11px}#count i.on{background:#285bea}.guide{display:flex;align-items:center;justify-content:center;gap:40px;padding:15px 0}.guide h2{font-size:20px;margin:7px 0}.guide svg{height:142px;width:275px}.guide-note{font-size:12px}.guide-note p{font-size:12px;margin-top:7px}footer{position:sticky;bottom:0;background:#e5ecf7;padding:10px max(4%,calc((100vw - 1178px)/2)) 12px;border-top:1px solid #d3deed}.keyboard-label{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;color:#596f90;padding:0 0 8px}.keyboard-label b{color:#285bea}#keyboard{height:166px;position:relative;display:flex;border-radius:10px;padding:0 3px 4px;background:#1e2e47;user-select:none;touch-action:none;box-shadow:0 8px 20px #1e2e4726}.key{border-radius:0 0 7px 7px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;touch-action:none;font-weight:400;padding:0 0 13px;border:1px solid #cbd3de}.key.white{background:linear-gradient(white,#fafcff);height:100%;flex:1}.key.black{position:absolute;z-index:2;top:0;width:4.6%;height:61%;background:linear-gradient(#273449,#162137);color:#fff;border-color:#111d32;padding-bottom:10px;box-shadow:0 4px 2px #0005}.key .note{font-size:12px;color:#6a7891}.key.black .note{color:#b8c6da;font-size:10px}.key kbd{font-family:inherit;font-size:14px;font-weight:650}.key.middle .note{color:#285bea;font-weight:750}.key.down,.key.white.down{background:#aec7ff}.key.black.down{background:#416dba}.key.target{box-shadow:inset 0 -5px #285bea}dialog{border:0;border-radius:20px;padding:30px;max-width:820px;width:90%;max-height:85vh;box-shadow:0 25px 100px #17284550}dialog::backdrop{background:#182a4855;backdrop-filter:blur(4px)}.close{float:right;font-size:24px;border:0;padding:0 8px}dialog h2{font-size:26px;margin-top:0}dialog h3{margin-bottom:10px}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.song-card{text-align:left;padding:14px;min-height:98px;font-size:14px}.song-card small{display:block;font-size:11px;color:#70829b;margin-top:8px}.filters{display:flex;gap:8px;margin:15px 0;flex-wrap:wrap}select,input[type=text],input[type=password]{border:1px solid #d2dceb;border-radius:8px;padding:10px;min-width:0;background:white}dialog form{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}dialog label{display:flex;flex-direction:column;gap:8px;margin:14px 0}table{width:100%;border-collapse:collapse;font-size:13px}td,th{text-align:left;padding:12px 7px;border-bottom:1px solid #e3e9f1}.result{text-align:center}.result-score{font-size:76px;color:#285bea;font-weight:750;letter-spacing:-5px}.result-counts{display:flex;gap:20px;justify-content:center;margin:20px}.result-counts span{padding:14px;border-radius:10px;background:#f0f4fa}.result-counts b{display:block;font-size:24px}#toast{position:fixed;bottom:210px;left:50%;transform:translateX(-50%);background:#233856;color:white;padding:12px 20px;border-radius:10px;z-index:10;max-width:90%}[hidden]{display:none!important}@media(max-width:800px){header{height:64px}.brand{font-size:19px}nav{gap:0}nav button{padding:8px;font-size:12px}main{padding:18px 3% 0}.heading{margin-bottom:15px}h1{font-size:27px}.toolbar{gap:8px}.toolbar label{order:4;width:100%}.guide{gap:15px;padding:10px 0}.guide svg{height:125px;width:225px}.guide-note{display:none}.guide p{font-size:12px}#staff{height:180px}.legend{display:none}.score-top,.score-bottom{padding:12px}.cards{grid-template-columns:repeat(2,1fr)}footer{padding:8px 2%}#keyboard{height:160px}.key kbd{font-size:12px}.key .note{font-size:10px}.key.black .note{font-size:8px}}@media(max-height:760px) and (min-width:800px){header{height:58px}main{padding-top:14px}.heading{margin-bottom:12px}h1{font-size:27px}.toolbar{margin-bottom:12px}#staff{height:160px}.guide svg{height:110px}.guide{padding:8px}#keyboard{height:145px}}
body{display:flex;flex-direction:column;min-height:100dvh}main{width:100%;flex:1}footer{position:relative;margin-top:auto;flex-shrink:0}#staff{height:180px}.guide{min-height:130px}@media(min-width:800px) and (max-height:820px){header{height:54px;flex-shrink:0}main{padding-top:12px}.heading{margin-bottom:10px}h1{font-size:25px;margin:3px 0}.toolbar{margin-bottom:10px}.score-top,.score-bottom{padding:10px 18px}#staff{height:132px}.guide{min-height:104px;padding:4px 0}.guide svg{height:96px}.guide h2{font-size:18px;margin:3px 0}.guide p{font-size:12px}#keyboard{height:142px}footer{padding-top:7px;padding-bottom:8px}}@media(max-width:600px){header{height:auto;min-height:64px;flex-wrap:wrap;padding:10px 3%;gap:8px}.brand{font-size:20px}nav{width:100%;justify-content:space-between}.toolbar label{width:auto;order:0}#staff{height:180px}.score-bottom label{flex-wrap:wrap}.guide{gap:4px}.guide svg{width:190px}.cards{grid-template-columns:1fr}.key .note{font-size:9px}.key.black .note{display:none}}
.guide img{width:275px;height:142px;object-fit:contain}@media(min-width:800px) and (max-height:820px){.guide img{height:100px}}@media(max-width:800px){.guide img{width:225px;height:125px}}@media(max-width:600px){.guide img{width:190px}}
.score-filters{display:flex;flex-wrap:wrap;gap:16px;margin:14px 0}.score-filters label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.score-filters select{min-width:150px;padding:10px;border:1px solid #d2dceb;border-radius:8px;background:white;color:#263b59}
.locked{min-height:100vh;background:#edf3ff}.locked dialog::backdrop{background:#edf3ff}.login-options{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}.locked #close{display:none}
/* Keep the full score, hand guide and piano within the tablet viewport. */
@media(min-width:700px){
 body{height:100dvh;min-height:0;overflow:hidden}header{height:48px;min-height:48px;padding:0 3%}nav{gap:2px}nav button{padding:8px;font-size:12px}.brand{font-size:20px}
 main{min-height:0;display:flex;flex-direction:column;padding:8px 3% 0}.heading{margin-bottom:6px;flex-shrink:0}h1{font-size:23px;margin:2px 0}.heading p{font-size:12px}.best strong{font-size:22px}.eyebrow{font-size:9px}.toolbar{margin-bottom:8px;gap:8px;flex-shrink:0}.toolbar button{padding:8px 10px;font-size:12px}.toolbar label{font-size:12px}.toolbar input{width:75px}
 .score-panel{flex:1;min-height:0;display:flex;flex-direction:column}.score-top,.score-bottom{padding:6px 14px;flex-shrink:0;font-size:11px}.score-bottom{gap:5px}#staff-wrap{flex:1;min-height:0;display:flex;align-items:center}#staff{height:100%;max-height:100%;width:100%}
 .guide{min-height:74px;height:74px;flex-shrink:0;padding:3px 0;gap:24px}.guide img{height:68px;width:160px}.guide h2{font-size:16px;margin:2px 0}.guide p,.guide-note p{font-size:11px}.guide-note{font-size:11px}
 footer{padding:6px 3% 8px;margin-top:0}#keyboard{height:116px}.keyboard-label{padding-bottom:5px}.key{padding-bottom:8px;gap:3px}
}
@media(min-width:700px) and (orientation:portrait){#keyboard{height:155px}.guide{height:110px}.guide img{height:100px;width:200px}}
#keyboard,#keyboard *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.key-label{width:50px;max-width:100%;height:37px;object-fit:contain;pointer-events:none;-webkit-user-drag:none;user-select:none}.key{touch-action:none}.key.black .key-label{width:42px;height:35px}

#student-progress{margin-top:4px;font-size:12px;line-height:1.4;color:#526783}#student-progress>div{display:flex;align-items:center;gap:10px}#student-progress strong{color:#285bea;font-size:14px}
