:root{
  --canvas:#f8fafb;--ink:#26323c;--ink-2:#3b4b55;--muted:#6f7f8b;
  --line:#e1e7eb;--line-strong:#cdd8df;--navy:#284455;--tabito-deep:#2a7194;
  --blue-soft:#eff5f8;--shadow:none;--radius:9px
}
html{scroll-behavior:smooth}
body{font-size:14px;line-height:1.55}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #6aa7c6;outline-offset:3px}
.topbar{background:rgba(255,255,255,.98);border-bottom:1px solid var(--line)}
.topbar-inner,.page{width:min(1200px,calc(100% - 48px))}
.topbar-inner{min-height:56px}
.brand-logo{height:31px;width:31px;border-radius:5px}
.brand-copy strong{font-size:13px;font-weight:750}
.brand-copy span{font-size:10px;font-weight:500}
.top-actions{align-items:center}
.top-actions .btn{font-size:11.5px;border-radius:6px;padding:6px 11px;min-height:33px}
.top-actions .btn.primary{background:var(--navy)}
.page{padding:22px 0 48px}
.intro{display:flex;align-items:center;justify-content:space-between;gap:30px;margin:0 0 15px}
.intro-main{border:0;background:none;padding:0;min-width:0}
.eyebrow{color:#738b9b;letter-spacing:0;font-weight:650;font-size:11px;margin:0 0 4px}
.intro h1{font-size:clamp(23px,2.6vw,31px);font-weight:800;line-height:1.28;letter-spacing:-.025em}
.lead{margin:5px 0 0;font-size:12px;line-height:1.6;color:var(--muted)}
.intro-side{display:block;flex:0 0 auto;max-width:325px;min-width:230px;border:0;border-left:1px solid var(--line);border-radius:0;background:none;padding:0 0 0 21px}
.intro-side strong{display:block;margin-bottom:5px;color:var(--muted);font-size:10.5px;font-weight:700}
.formula{padding:0;border:0;background:none;color:var(--ink);font-size:14px;font-weight:750;line-height:1.55}
.formula small{font-size:10px;line-height:1.45;color:var(--muted);font-weight:500}
.steps{display:none!important}
.layout{grid-template-columns:minmax(0,1fr) 298px;gap:15px;align-items:start}
.screen{padding:11px;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:none}
.screen canvas{width:100%;height:auto!important;border:1px solid #e3e9ed;border-radius:6px;aspect-ratio:auto;background:#fbfcfd}
.controls{display:block;position:static;min-width:0;padding:4px 15px 6px;background:#fff;border:1px solid var(--line);border-radius:9px}
.control{border:0;border-radius:0;padding:13px 0;background:none;border-bottom:1px solid #edf1f3}
.control:last-child{border-bottom:none}
.control label{font-size:12px;font-weight:680;margin-bottom:8px}
.control h3{font-size:12px}
.control input[type=range]{display:block;min-height:23px;accent-color:#387a9e}
.control select{border-radius:6px;font-size:12px}
.seg button,.mode button{min-height:39px;border-radius:6px;font-size:12px;font-weight:700}
.seg button.active,.mode button.active{background:var(--navy);color:white;border-color:var(--navy)}
.btn{font-weight:700}
.btn.primary{background:var(--navy)}
.result{font-size:12px;line-height:1.6;font-weight:600;background:#eef5f8;color:#37576b;border-radius:6px;padding:10px}
.result.red{background:#faeded;color:#974b4b}
.result.warn{background:#faf4e8;color:#886431}
.teacher-note{margin-top:9px;padding:0;background:none;border:0;border-radius:0;font-size:11px;line-height:1.65;color:var(--muted)}
.teacher-note summary{cursor:pointer;font-size:11px;font-weight:700;color:#52758a;list-style:revert}
.teacher-note p{margin:6px 0 0}
.facts{gap:0}
.fact{font-size:11px;padding:7px 0;align-items:center}
.fact strong{font-size:12px;color:var(--ink)}
.legend{gap:9px}
.note-row{margin-top:13px}
.note-card,.sound,.audio-one{border:1px solid var(--line);border-radius:8px;background:#fff}
.back-list{display:none}
.demo-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;border-top:1px solid var(--line);padding-top:13px;color:var(--muted);font-size:12px}
.demo-pager a{color:var(--tabito-deep);font-weight:680;display:inline-flex;align-items:center;gap:6px}
.demo-pager a:hover{text-decoration:underline;text-underline-offset:3px}
.demo-pager small{font-size:11px;color:#96a2a9}
.sound-grid{gap:12px}
.sound b{font-size:13px}
.sound audio,.audio-one audio{width:100%;height:38px}
.sound canvas{width:100%;height:auto!important}
@media(max-width:1020px){
 .layout{grid-template-columns:minmax(0,1fr) 275px}
 .intro-side{max-width:250px;min-width:190px}
 .intro h1{font-size:27px}
}
@media(max-width:820px){
 .intro{align-items:start;gap:15px}
 .intro h1{font-size:25px}
 .layout{grid-template-columns:1fr}
 .controls{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;row-gap:0}
 .control:nth-last-child(2){border-bottom:0}
 .teacher-note{grid-column:1/-1}
}
@media(max-width:640px){
 .topbar-inner,.page{width:calc(100% - 28px)}
 .topbar-inner{min-height:54px}
 .top-actions .btn.secondary{display:none}
 .page{padding:18px 0 36px}
 .intro{display:block;margin-bottom:12px}
 .intro h1{font-size:24px}
 .intro-side{border:0;min-width:0;max-width:none;padding:10px 0 0}
 .intro-side strong{display:none}
 .formula{font-size:12px}
 .formula small{display:none}
 .screen{padding:5px}
 .controls{grid-template-columns:1fr;padding:4px 13px}
 .control:nth-last-child(2){border-bottom:1px solid #edf1f3}
 .control{padding:12px 0}
 .control input[type=range]{min-height:29px}
 .teacher-note{grid-column:auto}
 .demo-pager{margin-top:15px}
 .sound-grid{grid-template-columns:1fr}
 .note-row{grid-template-columns:1fr}
 .audio-list{grid-template-columns:1fr 1fr}
}
@media(max-width:380px){
 .audio-list{grid-template-columns:1fr}
 .brand-copy span{display:none}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}

.quickset{grid-template-columns:repeat(3,minmax(0,1fr))}
.quickset button{font-size:11px;line-height:1.35;padding:6px 4px}
.screen-note{margin:7px 4px 0;color:#83919a;font-size:11px}
.sound-actions button{font-size:11px;padding:7px 3px}
@media(max-width:640px){
 .seg.three.quickset,.seg.three.sound-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* On small phones preserve diagram labels instead of scaling them to unreadable sizes. */
@media(max-width:620px){
  .screen,.beat-canvas{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .screen canvas,.beat-canvas canvas{min-width:560px}
  .screen-note{font-size:11px;line-height:1.55}
}
