#rhythm {color:#52240f; scroll-margin-top:6rem}
.rh-heading,.rh-card-head,.rh-readout,.rh-control {display:flex;align-items:center;justify-content:space-between;gap:12px}
.rh-heading {margin-bottom:16px;flex-wrap:wrap}
.rh-heading h2 {margin:0;color:#52240f;font-size:clamp(1.45rem,3vw,2rem);line-height:1.32;letter-spacing:-.04em}
.rh-heading>span,.rh-meta,.rh-control>span,.rh-share {font-size:.875rem;color:#725646}
.rh-grid {display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px}
.rh-panel {background:#fff;border:1px solid #ead8c7;border-radius:20px;min-width:0;padding:clamp(18px,2.4vw,32px)}
.rh-card-head {min-height:44px}
.rh-panel h3 {margin:0;font-size:clamp(1.06rem,2vw,1.28rem);line-height:1.4;letter-spacing:-.025em;color:#52240f}
.rh-select-wrap {position:relative;flex-shrink:0}
.rh-select-wrap:after {content:"";position:absolute;right:13px;top:calc(50% - 4px);width:6px;height:6px;border:solid #7a452a;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none}
.rh-select-wrap select {font:inherit;font-size:.875rem;appearance:none;-webkit-appearance:none;min-height:44px;border:1px solid #ba9479;background:#fff7ef;color:#66391f;border-radius:10px;padding:0 30px 0 12px;cursor:pointer}
.rh-readout {align-items:flex-end;margin:20px 0 16px}
.rh-readout strong,.rh-donut strong,.rh-key b {font-family:var(--ui-font);font-variant-numeric:tabular-nums}
.rh-count {font-size:clamp(1.85rem,3.8vw,2.7rem);font-weight:650;line-height:1.12;letter-spacing:-.04em}
.rh-when {font-size:.875rem;color:#934419;font-weight:600;margin-bottom:4px}
.rh-readout small {font-size:.9rem;color:#715543}
.rh-share {padding-bottom:4px}
.rh-hist {display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:132px auto;column-gap:8px;row-gap:5px;font: .75rem/1.2 var(--ui-font);color:#755746;font-variant-numeric:tabular-nums}
.rh-yaxis {display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}
.rh-xaxis {grid-column:2;display:flex;justify-content:space-between}
.rh-plot {position:relative;cursor:crosshair;outline-offset:3px;touch-action:pan-y}
.rh-bars,.rh-rules {position:absolute;inset:0}
.rh-rules {display:flex;flex-direction:column;justify-content:space-between}
.rh-rules i {width:100%;border-top:1px dashed #e3cebb}
.rh-rules i:last-child {border-top-style:solid}
.rh-bars {display:grid;align-items:end;grid-template-columns:repeat(24,minmax(0,1fr));gap:clamp(2px,.36vw,5px);padding-inline:1px}
.rh-bars i {background:#c47e53;border-radius:4px 4px 0 0}
.rh-bars .rh-on {background:#a44715;outline:1px solid #733014}
.rh-control {margin-top:8px}
.rh-step {display:flex;gap:5px}
.rh-step button {width:44px;height:44px;padding:0;border:1px solid #c4a38c;border-radius:13px;background:#fff;color:#82421e;font:1.55rem/1 var(--ui-font);cursor:pointer}
.rh-step button:hover:not(:disabled),.rh-step button:active {background:#ffdfb6}
.rh-step button:disabled {color:#977f70;border-color:#e8dbd0;cursor:default}
#rhythm :focus-visible {outline:3px solid #80400f;outline-offset:2px}
.rh-type-body {display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:8px}
.rh-donut {border-radius:50%;width:112px;aspect-ratio:1;display:grid;place-items:center;flex:none}
.rh-donut>div {width:73%;height:73%;border-radius:50%;background:white;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.2}
.rh-donut strong {font-size:1.2rem;letter-spacing:-.055em}
.rh-donut span {font-size:.75rem;color:#725646;margin-top:2px}
.rh-key {list-style:none;padding:0;margin:0;width:100%;display:grid;gap:3px}
.rh-key li {display:grid;grid-template-columns:minmax(0,1fr) auto 4.2em;gap:8px;align-items:center;line-height:1.4;font-variant-numeric:tabular-nums;font-size:.875rem}
.rh-key li>span {display:flex;align-items:center;gap:9px}
.rh-key li>span i {width:9px;height:9px;border-radius:2px;flex:none}
.rh-key b {font-weight:600}
.rh-key small {text-align:right;color:#725646;font-size:.875rem}
@media(min-width:1040px){
  .rh-mix .rh-type-body {height:calc(100% - 56px);justify-content:center;gap:18px}
  .rh-key {gap:6px}
}
@media(max-width:740px){
  .rh-grid {grid-template-columns:minmax(0,1fr);gap:12px}
  .rh-type-body {display:grid;grid-template-columns:auto 1fr;gap:clamp(12px,4vw,30px);margin-top:12px}
  .rh-donut {width:clamp(90px,18vw,132px)}
  .rh-hist {grid-template-rows:118px auto}
}
@media(max-width:460px){
  .rh-type-body {grid-template-columns:minmax(0,1fr);justify-items:center}
  .rh-key {gap:6px}
}
