#rhythm-runner-panel{--rr-purple:#8c52ff;--rr-ink:#26173e;--rr-lime:#d5f797;overflow:hidden}.rr-heading{display:flex;align-items:center;gap:1.5rem;background:#efe8fb;padding:2.2rem}.rr-heading img{width:106px;height:92px}.rr-heading h1{font-size:clamp(2.2rem,5vw,3.4rem);margin:.15rem 0 .5rem;letter-spacing:-.04em}.rr-heading p:last-child{margin:0;line-height:1.6;color:#625272}.rr-body{padding:2rem}.rr-setup-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:1.6rem}.rr-trail-card{border-radius:20px;padding:1.5rem;background:#291a43;color:#f3edff;display:flex;flex-direction:column;justify-content:space-between;min-width:0}.rr-trail-card h2{font-size:1.9rem;line-height:1.15;max-width:260px}.rr-trail-card p{line-height:1.6;color:#d8c9ec}.rr-trail-illustration{height:170px;width:100%;margin:.5rem 0}.rr-legend{display:flex;gap:.5rem;flex-wrap:wrap;font-size:.8rem;line-height:1.5}.rr-legend span{padding:.4rem .65rem;border-radius:30px;background:#ffffff14;border:1px solid #ffffff20}.rr-courses{display:grid;gap:.65rem}.rr-course{display:grid;grid-template-columns:auto 1fr;gap:.2rem .8rem;border:2px solid #e0d6ed;border-radius:14px;background:#fff;text-align:left;padding:.9rem;cursor:pointer;color:#39264d}.rr-course[aria-pressed=true]{border-color:#8c52ff;background:#f0e8ff;box-shadow:0 0 0 2px #8c52ff14}.rr-course>span{grid-row:span 2;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#ede3fa;color:#7043b3;font-weight:800}.rr-course strong{font-size:1rem}.rr-course small{color:#71617f;line-height:1.4}.rr-course-controls h2{font-size:1.1rem;margin:.2rem 0 .75rem}.rr-tempo{margin-top:1.2rem;padding:1rem;border:1px solid #e0d6ed;border-radius:14px}.rr-tempo label{display:flex;align-items:center;justify-content:space-between;gap:.6rem;font-weight:700}.rr-tempo-number{display:flex;align-items:center;gap:.4rem}.rr-tempo input[type=number]{width:77px;min-height:44px;text-align:center;border:1px solid #cbbbdf;border-radius:8px;font:inherit;color:#39264d;background:white}.rr-tempo input[type=range]{width:100%;min-height:38px;accent-color:#8c52ff;margin-top:.5rem}.rr-range-labels{display:flex;justify-content:space-between;font-size:.75rem;color:#71617f}.rr-setup-actions{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1.2rem}.rr-setup-actions button{flex:1;min-height:48px}.rr-settings{margin-top:1rem;border-top:1px solid #e9e1f1;padding-top:1rem}.rr-settings summary{cursor:pointer;color:#654590;font-weight:700;min-height:36px}.rr-settings p{font-size:.85rem;line-height:1.6;color:#6b597a}.rr-offset{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.rr-offset input{width:95px;min-height:44px;padding:.5rem;border:1px solid #d4c4e7;border-radius:8px;font:inherit}.rr-status{min-height:1.5em;color:#6a4b89;font-size:.9rem;line-height:1.5;margin:.9rem 0 0}.rr-status.is-error{color:#a24141}.rr-trail-summary{color:#71617f;font-size:.85rem;margin:.8rem 0}.rr-play-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.rr-play-top p{margin:0;color:#644885;font-weight:800;font-size:.8rem;letter-spacing:.05em}.rr-play-top button{min-height:44px}.rr-stats{display:flex;gap:.7rem;margin:1rem 0;flex-wrap:wrap}.rr-stats span{display:flex;gap:.4rem;align-items:center;background:#f3eef8;border-radius:10px;padding:.6rem .8rem;font-size:.85rem;color:#6a557d}.rr-stats strong{font-size:1.1rem;color:#321e49}.rr-progress-track{height:6px;background:#ece4f6;overflow:hidden;border-radius:8px;margin-bottom:.8rem}.rr-progress-track>div{height:100%;width:0;background:#8c52ff}.rr-stage{border-radius:18px;overflow:hidden;position:relative;background:#291743;isolation:isolate;contain:layout paint}.rr-stage-svg{display:block;overflow:hidden}.rr-sky-stars{fill:#e0cdf6;opacity:.7}.rr-horizon{fill:#684385;opacity:.38}.rr-floor{stroke:url(#rr-ground);stroke-width:3}.rr-target-glow{stroke:#d7f892;stroke-width:15;opacity:.09}.rr-target-line{stroke:#d7f892;stroke-width:2;stroke-dasharray:4 6;opacity:.6}.rr-barline{stroke:#ac8dc7;stroke-width:1;opacity:.4}.rr-bar-label{fill:#be9cde;font-size:9px;font-weight:800;letter-spacing:1.4px}.rr-beat-tick{stroke:#ac8dc7;stroke-width:1.5}.rr-count{fill:#c6a9df;font:11px system-ui;text-anchor:middle}.rr-notation{color:#f1e8ff}.rr-gem{fill:#dcf89b;filter:drop-shadow(0 0 5px #c8f57366)}.rr-hold-shadow{fill:#ab7bf1;opacity:.2}.rr-hold-rail{stroke:#ba8dff;stroke-width:8;stroke-linecap:round}.rr-release-mark{stroke:#d7f797;stroke-width:2;stroke-dasharray:3 3}.rr-hold-label{fill:#cfb4ec;font:8px system-ui;letter-spacing:.6px}.rr-rest-zone{fill:#563c6c;stroke:#b59ac9;stroke-dasharray:4 4}.rr-rest-label{fill:#e0ceec;font:9px system-ui;letter-spacing:1.5px}.rr-world-event.is-perfect .rr-notation,.rr-world-event.is-good .rr-notation{color:#d6f797}.rr-world-event.is-perfect .rr-gem,.rr-world-event.is-good .rr-gem{opacity:0}.rr-world-event.is-holding .rr-hold-rail{stroke:#d6f797;filter:drop-shadow(0 0 5px #d6f79780)}.rr-world-event.is-miss .rr-notation,.rr-world-event.is-short .rr-notation,.rr-world-event.is-long .rr-notation{color:#e9a6b2;opacity:.65}.rr-world-event.is-miss .rr-gem{fill:#ab7d96;opacity:.35}.rr-finish-flag text{fill:#daf5a4;font:10px system-ui;font-weight:800;letter-spacing:1px}.rr-character{filter:drop-shadow(0 8px 6px #11051c50)}.rr-count-in{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#26153bcb;color:white;pointer-events:none}.rr-count-in[hidden]{display:none}.rr-count-in span{font-size:.7rem;font-weight:800;letter-spacing:.18em;color:#d7c4ed}.rr-count-in strong{font-size:5rem;line-height:1.15;color:#daf5a4}.rr-stage-hint{position:absolute;bottom:7px;right:12px;font-size:.65rem;letter-spacing:.07em;color:#d8c8e9}.rr-input-area{max-width:580px;margin:1.1rem auto 0;text-align:center}.rr-input{display:flex;align-items:center;justify-content:center;gap:.75rem;min-height:84px;width:100%;border:0;border-radius:18px;box-shadow:0 6px 0 #59329e;background:#8c52ff;color:#fff;font:800 1.2rem system-ui;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.rr-input kbd{font:700 .7rem system-ui;letter-spacing:.1em;border:1px solid #ffffff60;border-radius:6px;padding:.4rem .6rem}.rr-input.is-down{background:#6840ba;transform:translateY(4px);box-shadow:0 2px 0 #59329e}.rr-input:disabled{opacity:.65;cursor:default}.rr-input:focus-visible,.rr-course:focus-visible{outline:3px solid #5f308f;outline-offset:5px}.rr-feedback{margin:.9rem 0 .3rem;min-height:1.5em;color:#563473;font-weight:700;font-size:.95rem;line-height:1.5}.rr-instructions{font-size:.8rem;color:#796987;line-height:1.6;margin:.4rem 0}.rr-paused{background:#f4edf9;border:1px solid #d8cae6;border-radius:14px;padding:1.2rem;margin-top:1rem}.rr-paused h2{font-size:1.2rem;margin:0 0 .4rem}.rr-paused p{line-height:1.6;font-size:.9rem;color:#71617f}.rr-pause-actions{display:flex;flex-wrap:wrap;gap:.6rem}.rr-pause-actions button{min-height:44px}.rr-results{text-align:center;padding:1.5rem .2rem}.rr-results h2{font-size:2.4rem;letter-spacing:-.03em;margin:.6rem 0}.rr-award-stars{font-size:3rem;color:#6a3ca6;letter-spacing:.3rem}.rr-award-stars .empty{color:#d9cce9}.rr-results .rr-stats{justify-content:center}.rr-results p{color:#71617f;line-height:1.6}.rr-best{font-weight:700;color:#61448b!important}.rr-result-actions{display:flex;justify-content:center;gap:.7rem;flex-wrap:wrap;margin-top:1.4rem}.rr-calibration{margin-top:1rem;padding:1rem;background:#f1e9fb;border-radius:14px}.rr-calibration strong{display:block;margin-bottom:.5rem}.rr-calibration button{min-height:60px;touch-action:none;user-select:none}.rr-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:750px){.rr-heading{padding:1.5rem;gap:1rem}.rr-heading img{width:70px;height:70px}.rr-heading p:last-child{font-size:.85rem}.rr-body{padding:1.1rem}.rr-setup-grid{grid-template-columns:1fr}.rr-trail-card{padding:1.2rem}.rr-trail-card h2{max-width:none;font-size:1.65rem;margin:.3rem 0}.rr-trail-illustration{height:110px;margin:0}.rr-trail-card>p{font-size:.85rem;margin:.5rem 0}.rr-stats{gap:.4rem}.rr-stats span{padding:.5rem;font-size:.72rem;gap:.25rem}.rr-stats strong{font-size:.95rem}.rr-input{min-height:84px;font-size:1.1rem}.rr-input kbd{font-size:.6rem}.rr-stage-hint{font-size:.55rem}.rr-result-actions button{width:100%}.rr-play-top{gap:.4rem}.rr-play-top p{font-size:.7rem}}@media(prefers-reduced-motion:reduce){.rr-character{filter:none}.rr-input{transform:none}.rr-stage-svg .rr-scarf{display:none}}
#rhythm-runner-panel.rr-is-playing .rr-heading{display:none}#rhythm-runner-panel.rr-is-playing .rr-body{padding-top:1rem}#rr-play{scroll-margin-top:12px}
/* Generated levels and the endless trail share the same compact controls. */
.rr-modes{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin:0 0 1rem}.rr-modes button{min-height:48px;padding:.6rem;border:1px solid #d4c4e7;border-radius:12px;background:#fff;color:#624580;font:700 .85rem system-ui;cursor:pointer}.rr-modes button[aria-pressed=true]{background:#37214f;border-color:#37214f;color:#edffc9}.rr-courses{grid-template-columns:repeat(6,minmax(0,1fr));gap:.45rem}.rr-course{display:grid;place-items:center;padding:.5rem;min-height:48px;border-radius:10px}.rr-course>span{grid-row:auto;width:auto;height:auto;background:transparent;font-size:.9rem}.rr-level-detail{padding:.8rem 0 .2rem;min-height:95px}.rr-level-detail h3{margin:0 0 .35rem;font-size:1rem;color:#49305f}.rr-level-detail p{margin:0;font-size:.8rem;line-height:1.5;color:#71617f}.rr-endless-intro{padding:1rem;background:#f0e8fb;border-radius:14px;color:#49305f}.rr-endless-intro p{font-size:.8rem;line-height:1.65;margin:.6rem 0 0}.rr-modes button:focus-visible{outline:3px solid #7042ab;outline-offset:3px}.rr-stats .rr-hearts{background:#f9e6ef;color:#9a355e}.rr-hearts>span{padding:0;background:none;gap:.25rem}.rr-hearts i{font-style:normal;font-size:1.1rem;color:#b73f73}.rr-hearts i.empty{color:#cdb8c3}.rr-hearts strong{color:#8e3159}.rr-notation ellipse[fill=none]{stroke-width:3}.rr-beam{shape-rendering:geometricPrecision}#rhythm-runner-panel [hidden]{display:none!important}@media(max-width:400px){.rr-courses{grid-template-columns:repeat(4,minmax(0,1fr))}.rr-modes button{font-size:.78rem}.rr-hearts i{font-size:.9rem}}
/* Adventure uses the recording's tempo; rhythm vocabulary changes by level. */
.rr-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.rr-song-card{padding:1rem;background:linear-gradient(135deg,#2d1b44,#503076);color:#f4efff;border-radius:15px}.rr-song-card .eyebrow{font-size:.62rem;color:#d8c2fa;letter-spacing:.08em;margin:0}.rr-song-card h3{font-size:1.4rem;letter-spacing:-.025em;margin:.45rem 0}.rr-song-card>p:not(.eyebrow){font-size:.8rem;line-height:1.5;color:#e0d1f1;margin:.4rem 0 .8rem}.rr-song-form{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.rr-song-form>span{border:1px solid #d5b9f044;border-radius:8px;padding:.5rem;font-size:.72rem;font-weight:750}.rr-song-form b{color:#d5f797}.rr-song-form small{width:100%;font-size:.7rem;color:#dbc7ef;padding-top:.4rem}.rr-adventure-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin-top:.8rem}.rr-adventure-levels button{border:2px solid #ded0ec;border-radius:12px;min-height:82px;padding:.7rem .5rem;text-align:left;background:white;color:#523571;cursor:pointer;font:inherit}.rr-adventure-levels button[aria-pressed=true]{border-color:#8c52ff;background:#f0e8ff}.rr-adventure-levels span{display:block;font-size:.6rem;font-weight:850;letter-spacing:.06em;margin-bottom:.35rem}.rr-adventure-levels strong{font-size:.8rem;line-height:1.35;display:block}.rr-adventure-description{color:#5d4375;font-size:.83rem;line-height:1.6;min-height:2.6em}.rr-adventure-note{font-size:.73rem;line-height:1.5;color:#7a668b}.rr-adventure-levels button:focus-visible{outline:3px solid #7042ab;outline-offset:3px}.rr-stats .rr-current-key{background:#e7f0d8;color:#425532;font-weight:700;font-size:.72rem}@media(max-width:400px){.rr-modes button{font-size:.7rem;padding:.55rem .3rem}.rr-adventure-levels{gap:.35rem}.rr-adventure-levels strong{font-size:.72rem}}

/* Character reactions use the audio clock; the SVG stays a fixed size. */
.rr-effects,.rr-avatar{pointer-events:none}
.rr-pose{display:none}
.rr-avatar[data-pose=ready] .rr-pose-ready,
.rr-avatar[data-pose=run-a] .rr-pose-run-a,
.rr-avatar[data-pose=run-b] .rr-pose-run-b,
.rr-avatar[data-pose=jump] .rr-pose-jump,
.rr-avatar[data-pose=land] .rr-pose-land,
.rr-avatar[data-pose=hold] .rr-pose-hold,
.rr-avatar[data-pose=release] .rr-pose-release,
.rr-avatar[data-pose=rest] .rr-pose-rest,
.rr-avatar[data-pose=hurt] .rr-pose-hurt,
.rr-avatar[data-pose=cheer] .rr-pose-cheer{display:inline}
.rr-hold-aura{fill:#d5f797;opacity:.12}
.rr-hold-ring{fill:none;stroke:#dfff9b;stroke-width:1.8;opacity:.7}
.rr-hold-wave{fill:none;stroke:#dfff9b;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;opacity:.9}
.rr-wave-echo{stroke:#c19aff;stroke-width:5;opacity:.45}
.rr-hit-sparks{fill:none;stroke:#e2ffae;stroke-width:2.5;stroke-linecap:round}
.rr-hurt-ring{fill:none;stroke:#f5a9c7;stroke-width:2;opacity:.7}
.rr-lightning-glow{fill:#ab98ff;stroke:#ab98ff;stroke-width:5;stroke-linejoin:round;opacity:.45}
.rr-lightning-core{fill:#f2edff;stroke:#dbd0ff;stroke-width:.8;stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){
 .rr-effects [data-rr-lightning],.rr-effects [data-rr-spark-fx]{display:none}
 .rr-hold-wave{opacity:.55}
}
.rr-result-runner svg{display:block;margin:0 auto .3rem;overflow:visible}

/* Heart recovery, Band Bot's exit, and an arcade-style results conversation. */
.rr-heart-progress{margin:0 0 .3rem;color:#725185;font-size:.78rem;font-weight:700}
.rr-earned-heart{fill:#dfff9b;stroke:#eee5ff;stroke-width:2;stroke-linejoin:round;filter:drop-shadow(0 0 5px #dfff9b88)}
.rr-heart-restored{animation:rr-heart-restore .7s ease-out}
.rr-is-losing .rr-avatar{transform-box:fill-box;transform-origin:center;animation:rr-bot-fall 1s cubic-bezier(.4,0,.8,.6) both}
.rr-is-losing .rr-effects{display:none}
.rr-is-losing .rr-stage-hint{opacity:0}
.rr-bot-feedback{display:flex;align-items:flex-end;justify-content:center;gap:20px;max-width:620px;margin:1.7rem auto 1rem;text-align:left}
.rr-bot-feedback .rr-result-runner{flex:none;width:128px}
.rr-bot-feedback .rr-result-runner svg{width:128px;height:112px;margin:0}
.rr-bot-bubble{position:relative;flex:1;min-width:0;padding:15px 19px;border:2px solid #8c52ff;border-radius:18px 18px 18px 5px;background:#f2eaff;box-shadow:4px 5px 0 #26173e}
.rr-bot-bubble::before{content:'';position:absolute;left:-9px;bottom:25px;width:14px;height:14px;background:#f2eaff;border-left:2px solid #8c52ff;border-bottom:2px solid #8c52ff;transform:rotate(45deg)}
.rr-results .rr-bot-name{margin:0 0 6px;color:#6633bb;font-size:.65rem;font-weight:900;letter-spacing:.14em}
.rr-results .rr-bot-message{min-height:4.8em;margin:0;color:#26173e;font:700 1rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.rr-is-typing [data-rr-bot-text]::after{content:'▌';color:#8c52ff}
.rr-results-enter #rr-result-title{animation:rr-result-pop .4s ease-out both}
.rr-results-enter #rr-result-stats>span{animation:rr-result-pop .38s cubic-bezier(.2,1.4,.5,1) both;animation-delay:.16s}
.rr-results-enter #rr-result-stats>span:nth-child(2){animation-delay:.28s}
.rr-results-enter #rr-result-stats>span:nth-child(3){animation-delay:.4s}
.rr-results-enter #rr-result-stats>span:nth-child(4){animation-delay:.52s}
.rr-results-enter .rr-result-runner{animation:rr-bot-arrive .5s cubic-bezier(.2,1.35,.5,1) .42s both}
.rr-results-enter .rr-bot-bubble{animation:rr-result-pop .3s ease-out .6s both}
@keyframes rr-heart-restore{0%,100%{transform:scale(1)}35%{transform:scale(1.14);box-shadow:0 0 0 8px #dfff9b80}}
@keyframes rr-bot-fall{0%{transform:translate(0,0) rotate(0);opacity:1}25%{transform:translate(-8px,-30px) rotate(-18deg);opacity:1}100%{transform:translate(35px,190px) rotate(65deg);opacity:0}}
@keyframes rr-result-pop{from{opacity:0;transform:translateY(12px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes rr-bot-arrive{from{opacity:0;transform:translateY(90px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:500px){
 .rr-bot-feedback{gap:12px;align-items:flex-end}
 .rr-bot-feedback .rr-result-runner{width:76px}
 .rr-bot-feedback .rr-result-runner svg{width:76px;height:84px}
 .rr-bot-bubble{padding:12px}
 .rr-results .rr-bot-message{font-size:.83rem;min-height:6.4em}
}
@media(prefers-reduced-motion:reduce){
 .rr-heart-restored,.rr-is-losing .rr-avatar,.rr-results-enter #rr-result-title,.rr-results-enter #rr-result-stats>span,.rr-results-enter .rr-result-runner,.rr-results-enter .rr-bot-bubble{animation:none;transform:none}
 .rr-is-losing .rr-avatar{opacity:.35}
}

/* Custom runs use the same settings in teacher assignment links. */
#rr-custom-settings fieldset{border:1px solid #d8cae8;border-radius:14px;margin:16px 0;padding:14px;min-width:0}
#rr-custom-settings legend{padding:0 7px;color:#50336c;font-weight:800;font-size:.9rem}
.rr-custom-help{font-size:.83rem;line-height:1.6;color:#71617f}
.rr-custom-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rr-custom-options label{display:flex;align-items:center;gap:9px;min-height:50px;padding:10px;border:1px solid #e4daed;border-radius:10px;background:#faf7ff;color:#49305f;font-size:.8rem;line-height:1.4;cursor:pointer}
.rr-custom-options input{width:18px;height:18px;accent-color:#8c52ff;flex:none}
.rr-custom-options label:has(input:checked){background:#eee3ff;border-color:#aa7cea}
.rr-custom-options label:focus-within{outline:2px solid #8c52ff;outline-offset:2px}
.rr-custom-options small{display:block;font-size:.68rem;color:#7b668d}
@media(max-width:500px){.rr-custom-options{grid-template-columns:1fr}}