* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #77916f #0d211f; }
body.rhythm-page, body.cano-adventure.rhythm-page { --paper:#0d211f; --bg:#0d211f; --panel:#17352f; --ink:#f2e8cd; --muted:#bdcfc7; --line:#48655a; --accent:#e8bd6c; margin:0; background:var(--paper); color:var(--ink); font:16px/1.65 'Segoe UI',sans-serif; caret-color:#f2e8cd; scrollbar-color:#77916f #0d211f; }
[hidden] { display:none !important; }
a { color:inherit; text-underline-offset:.22em; }
a:hover { text-decoration-thickness:2px; }
button,input,select { font:inherit; }
button,summary,select { cursor:pointer; }
button { min-height:46px; padding:10px 18px; border:1px solid #819976; border-radius:6px; color:inherit; background:transparent; }
button:hover { background:#254b3b; }
button:disabled { opacity:.5; cursor:not-allowed; }
button:disabled:hover { background:transparent; }
input,select { accent-color:#ba913f; }
input[type=range] { width:100%; min-height:30px; margin:8px 0 0; }
input[type=checkbox],input[type=radio] { width:18px; height:18px; margin:0; flex:none; }
svg { width:20px; height:20px; flex:none; }
body.rhythm-page :is(h1,h2,h3) { font-family:var(--cano-display,'Barlow Condensed',sans-serif); font-weight:600; letter-spacing:-.015em; line-height:1.05; text-wrap:balance; }
h1,h2,h3,p,ol,figure { margin:0; }
body.rhythm-page :focus-visible { outline:3px solid #e8bd6c; outline-offset:4px; }
body.rhythm-page ::selection { background:#e5be71; color:#183d2e; }
.rhythm-skip { position:absolute; left:20px; top:-80px; z-index:100; padding:10px 18px; background:#e8bc69; color:#173b30; }
.rhythm-skip:focus { top:12px; }
body.cano-adventure.rhythm-page header.cano-shell { display:flex; gap:14px 40px; min-height:86px; padding:8px max(24px,calc((100vw - 1380px)/2)); background:#173b30; color:#f1edda; border-color:#3a5945; }
.rhythm-page .cano-shell .brand img { display:block; width:112px; height:64px; object-fit:contain; filter:brightness(0) saturate(100%) invert(93%) sepia(18%) saturate(327%) hue-rotate(352deg) brightness(102%) contrast(89%); }
.rhythm-page .cano-shell nav.cano-nav { justify-content:flex-end; }
.rhythm-page .cano-nav .cano-nav-panel { --ink:#f1edda; --paper:#254b3b; --line:#55745e; --accent:#f0cf80; color:#f1edda; background:#193d2f; border:0; }
.rhythm-page .cano-nav .cano-nav-group > summary { border-radius:6px; }
.rhythm-page .cano-nav .cano-nav-group[open] > summary,.rhythm-page .cano-nav .cano-nav-group[data-current] > summary { color:#f1edda; background:#305740; }
.rhythm-page .cano-shell :focus-visible { outline-color:#e8bc69; }
.rhythm-page .cano-nav-toggle { color:#f1edda; border-color:#70896c; background:transparent; }
main { max-width:1440px; margin:auto; padding:0 40px 0; }
.rhythm-wayfinding { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:18px 0; color:var(--muted); font-size:13px; }
.rhythm-wayfinding a { min-height:44px; display:inline-flex; align-items:center; gap:10px; text-decoration:none; }
.rhythm-wayfinding a:hover { text-decoration:underline; }
.rhythm-intro { display:grid; grid-template-columns:1.05fr 1fr; gap:70px; align-items:center; padding:35px 0 55px; }
.rhythm-intro h1 { font-size:clamp(48px,6vw,84px); max-width:13ch; }
.intro-lead { font-size:20px; line-height:1.5; max-width:38ch; margin-top:22px; }
.intro-direction > p:first-child { max-width:43ch; font-size:22px; line-height:1.6; }
.intro-actions { display:flex; gap:25px; align-items:center; flex-wrap:wrap; margin:26px 0 22px; }
.intro-actions a:not(.rhythm-primary) { font-size:14px; min-height:44px; display:inline-flex; align-items:center; }
body.rhythm-page .rhythm-primary { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:12px 20px; border:0; border-radius:6px; background:#224b35; color:#f1eedb; text-decoration:none; font-size:15px; font-weight:600; }
body.rhythm-page .rhythm-primary:hover { background:#356043; }
.cultural-context { max-width:62ch; font-size:14px; line-height:1.7; color:var(--muted); }
.rhythm-course { display:grid; grid-template-columns:285px minmax(0,1fr); gap:55px; border-block:1px solid #48655a; padding:40px 0 50px; scroll-margin-top:20px; }
.course-sidebar { min-width:0; }
.course-map > summary { display:flex; gap:20px; align-items:center; justify-content:space-between; list-style:none; font:600 29px/1.2 var(--cano-display); padding:4px 0 15px; }
.course-map > summary::-webkit-details-marker { display:none; }
.course-map > summary svg { width:18px; transition:transform 180ms ease-out; }
.course-map[open] > summary svg { transform:rotate(180deg); }
.course-progress { font-size:13px; color:var(--muted); margin:0 0 15px; }
.course-map ol { list-style:none; padding:0; }
.course-map li { border-bottom:1px solid #48655a; }
.course-map a { display:grid; grid-template-columns:25px 1fr 18px; gap:9px; align-items:center; min-height:60px; padding:12px 9px; font-size:14px; line-height:1.4; text-decoration:none; }
.course-map a:hover { background:#254b3b; }
.course-map a[aria-current=page] { background:#244e37; color:#f1eedb; border-radius:6px; }
.lesson-number { font-variant-numeric:tabular-nums; opacity:.75; font-size:12px; }
.course-map .lesson-check { width:17px; height:17px; }
.progress-note { font-size:12px; line-height:1.6; color:var(--muted); margin-top:18px; }
.lesson-content { padding:3px 0 0; min-width:0; max-width:860px; }
.lesson-position { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; font-size:13px; color:var(--muted); }
#lesson-completed { color:#e8bd6c; font-weight:600; }
.lesson-content h2 { font-size:clamp(34px,3.8vw,50px); margin-bottom:18px; }
.lesson-lead { font-size:18px; line-height:1.7; max-width:69ch; }
.lesson-pattern { display:flex; flex-wrap:wrap; gap:6px 20px; padding:20px 0; margin:17px 0 4px; border-block:1px solid #48655a; font:500 clamp(27px,3vw,38px)/1.3 var(--cano-display); color:#e8bd6c; }
.lesson-pattern span { white-space:nowrap; }
.lesson-steps { list-style:none; padding:0; counter-reset:steps; }
.lesson-steps li { counter-increment:steps; display:grid; grid-template-columns:28px 1fr; gap:13px; padding:12px 0; max-width:75ch; }
.lesson-steps li::before { content:counter(steps); font-variant-numeric:tabular-nums; color:#bdcfc7; font-size:14px; padding-top:1px; }
.lesson-steps strong { display:block; font-weight:600; margin-bottom:3px; }
.lesson-steps p { color:#bdcfc7; line-height:1.65; }
.lesson-detail { margin:20px 0 0; max-width:74ch; font-size:14px; color:var(--muted); }
.lesson-detail p + p { margin-top:10px; }
.lesson-detail strong { color:#f2e8cd; }
.lesson-actions { display:flex; gap:14px; flex-wrap:wrap; margin-top:26px; }
.completion-button { font-size:14px; }
.completion-button[aria-pressed=true] { background:#254b3b; border-color:#75936c; }
.lesson-pagination { display:flex; justify-content:space-between; gap:15px; margin-top:30px; border-top:1px solid #48655a; padding-top:15px; }
.lesson-pagination button { border:0; padding-inline:0; font-size:14px; }
.lesson-pagination button:hover { background:transparent; text-decoration:underline; }
.rhythm-lab { --paper:#16392d; --ink:#f1edd8; --muted:#c3d1b7; --line:#547557; margin:55px 0; padding:42px; background:#173b2e; color:#f1edd8; border-radius:16px; scroll-margin-top:20px; }
body.rhythm-page .rhythm-lab :focus-visible { outline-color:#edc66f; }
.lab-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:50px; margin-bottom:32px; }
.lab-heading h2 { font-size:clamp(38px,4vw,56px); margin-bottom:16px; }
.lab-heading p { color:#c3d1b7; font-size:15px; }
.lab-principle { max-width:39ch; font-size:14px !important; }
.lab-controls { display:grid; grid-template-columns:1.1fr 1.1fr 1fr; gap:24px; align-items:end; padding-bottom:28px; border-bottom:1px solid #4e7150; }
.mode-switch { padding:0; margin:0; border:0; display:flex; flex-wrap:wrap; gap:12px 20px; }
.mode-switch legend { margin:0 0 12px; font-size:13px; color:#c3d1b7; }
.mode-switch label { display:inline-flex; align-items:center; gap:8px; min-height:42px; font-size:14px; }
.lab-select { display:block; font-size:13px; color:#c3d1b7; }
.lab-select select { width:100%; min-height:46px; margin-top:9px; padding:10px 12px; border:1px solid #708c69; border-radius:6px; background:#234c36; color:#f1edd8; font-size:14px; }
.range-label { display:grid; grid-template-columns:1fr auto; gap:0 10px; font-size:13px; color:#c3d1b7; }
.range-label output { font-weight:600; color:#f1edd8; font-variant-numeric:tabular-nums; }
.range-label input { grid-column:1/-1; }
.grouping-control { font-size:13px; color:#c3d1b7; }
.audio-layers { display:flex; flex-wrap:wrap; gap:12px 26px; margin-top:22px; }
.audio-layers label { display:inline-flex; gap:9px; align-items:center; font-size:13px; min-height:36px; }
.score-reading { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:28px 0 24px; }
.score-reading > div:first-child { display:flex; align-items:center; gap:24px; }
.now-label { font-size:13px; color:#c3d1b7; }
#current-syllable { font:600 64px/1 var(--cano-display); color:#e8c46d; min-width:140px; }
.cycle-readout { display:flex; flex-direction:column; align-items:flex-end; gap:3px; font-size:13px; color:#c3d1b7; font-variant-numeric:tabular-nums; }
.subdivision-score { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px 24px; }
.pulse-group { padding:12px 0; border-top:1px solid #6b855e; min-width:0; }
.pulse-group.is-current { border-top-color:#f3d38d; }
.pulse-header { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:#c3d1b7; margin-bottom:9px; }
.pulse-header span:first-child { font-weight:600; color:#f1edd8; }
.syllable-row { display:grid; grid-template-columns:repeat(var(--divisions),minmax(0,1fr)); gap:3px; }
.syllable { display:flex; align-items:center; justify-content:center; min-height:48px; font:500 clamp(20px,2vw,28px)/1.15 var(--cano-display); border-radius:4px; color:#d1dcc2; }
.syllable.is-active { background:#e8c46d; color:#173b2e; text-decoration:underline; text-underline-offset:6px; }
.syllable.is-group-start { box-shadow:inset 0 -2px #d3b567; color:#f0d391; }
.syllable.is-group-start.is-active { color:#173b2e; }
.track-label { display:flex; align-items:baseline; justify-content:space-between; gap:15px; margin:16px 0 12px; font-size:14px; }
.track-label span { font-size:12px; color:#c3d1b7; }
.rhythm-track { display:grid; grid-template-columns:repeat(var(--ticks),minmax(0,1fr)); gap:0; min-height:55px; border-top:1px solid #5e7b56; border-bottom:1px solid #5e7b56; }
.rhythm-tick { position:relative; display:flex; align-items:center; justify-content:flex-start; min-height:54px; border-right:1px solid #385b40; font:500 26px/1 var(--cano-display); }
.rhythm-tick:last-child { border-right:0; }
.rhythm-tick::after { content:''; position:absolute; left:0; top:0; height:6px; border-left:1px solid #7b916b; }
.rhythm-tick.has-attack span { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; width:32px; height:34px; border-radius:4px; color:#f1edd8; background:#396044; }
.track-a .rhythm-tick.has-attack span { color:#e8c46d; background:transparent; }
.rhythm-tick.is-active.has-attack span,.track-a .rhythm-tick.is-active.has-attack span { background:#e8c46d; color:#173b2e; text-decoration:underline; text-underline-offset:4px; }
.alignment-note,.score-explanation { font-size:13px; color:#c3d1b7; margin-top:18px; max-width:83ch; }
.score-explanation { margin-top:25px; }
.lab-transport { display:flex; gap:16px; flex-wrap:wrap; align-items:center; border-top:1px solid #4e7150; padding-top:25px; margin-top:28px; }
.transport-button,.stop-button { display:inline-flex; gap:10px; align-items:center; justify-content:center; font-size:15px; font-weight:600; min-height:50px; }
.transport-button { background:#e8c46d; color:#173b2e; border:0; padding-inline:25px; }
.transport-button:hover { background:#f2d68e; }
.transport-button:disabled { opacity:.65; background:#e8c46d !important; }
.stop-button { color:#f1edd8; border-color:#7c976c; }
.stop-button:hover { background:#2b5239; }
.sound-check { display:inline-flex; align-items:center; gap:9px; font-size:14px; min-height:44px; margin-left:auto; }
.volume-label { display:grid; grid-template-columns:1fr auto; gap:0 15px; min-width:130px; max-width:170px; font-size:12px; color:#c3d1b7; }
.volume-label output { font-variant-numeric:tabular-nums; }
.volume-label input { grid-column:1/-1; margin-top:0; }
.practice-status { color:#f0d491; font-size:14px; margin-top:20px; min-height:24px; }
.lab-note { color:#c3d1b7; font-size:12px; margin-top:12px; max-width:95ch; }
.rhythm-transfer { display:grid; grid-template-columns:1fr 1.2fr; gap:70px; padding:0 0 55px; }
.rhythm-transfer h2 { font-size:clamp(36px,4vw,52px); }
.rhythm-transfer p { max-width:70ch; }
.next-paths { display:flex; flex-direction:column; align-items:flex-start; gap:7px; margin-top:22px; font-size:14px; }
.next-paths a { min-height:36px; display:inline-flex; align-items:center; }
.rhythm-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:27px max(24px,calc((100vw - 1360px)/2)); background:#173b30; color:#eaf0da; }
.rhythm-footer > a:first-child { font:600 26px/1.2 var(--cano-display); text-decoration:none; }
.rhythm-footer span { display:block; font:12px/1.7 'Segoe UI',sans-serif; color:#c3d1b7; margin-top:4px; }
.rhythm-footer > a:last-child { font-size:14px; }
.noscript-note { padding:24px 0; }
@media(max-width:1190px) {
  body.cano-adventure.rhythm-page header.cano-shell { padding:8px 28px; }
  .rhythm-page .cano-shell nav.cano-nav { flex-wrap:wrap; flex-basis:100%; justify-content:flex-start; }
  .rhythm-page .cano-shell .cano-nav-toggle { display:block; margin-inline-start:auto; }
  .rhythm-page .cano-shell.cano-nav-ready[data-nav-open] nav.cano-nav { display:flex; }
  .rhythm-intro { gap:45px; }
  .rhythm-course { grid-template-columns:255px minmax(0,1fr); gap:35px; }
  .rhythm-lab { padding:32px; }
  .lab-controls { grid-template-columns:1fr 1fr; }
  .mode-switch { grid-column:1/-1; }
}
@media(max-width:820px) {
  main { padding-inline:26px; }
  .rhythm-intro { grid-template-columns:1fr; gap:28px; padding-top:20px; }
  .rhythm-intro h1 { font-size:clamp(48px,9vw,74px); max-width:15ch; }
  .intro-direction > p:first-child { font-size:20px; max-width:56ch; }
  .intro-actions { margin-top:20px; }
  .rhythm-course { grid-template-columns:1fr; gap:30px; padding-top:26px; }
  .course-sidebar { border-bottom:1px solid #48655a; padding-bottom:22px; }
  .course-map ol { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
  .course-map > summary { padding-bottom:4px; }
  .course-map[open] > summary { padding-bottom:15px; }
  .progress-note { margin-top:10px; }
  .lab-heading { display:block; }
  .lab-principle { margin-top:18px; max-width:65ch; }
  .subdivision-score { gap:13px 18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rhythm-transfer { grid-template-columns:1fr; gap:25px; }
  .sound-check { margin-left:0; }
}
@media(max-width:520px) {
  main { padding-inline:18px; }
  body.cano-adventure.rhythm-page header.cano-shell { padding:6px 18px; }
  .rhythm-page .cano-shell .brand img { width:100px; height:56px; }
  .rhythm-wayfinding > span { display:none; }
  .rhythm-intro { padding-bottom:35px; }
  .rhythm-intro h1 { font-size:clamp(45px,12vw,62px); }
  .intro-lead { font-size:18px; }
  .intro-direction > p:first-child { font-size:18px; }
  .intro-actions { gap:18px; }
  .course-map ol { grid-template-columns:1fr; }
  .lesson-content h2 { font-size:36px; }
  .lesson-lead { font-size:17px; }
  .lesson-actions { flex-direction:column; align-items:stretch; }
  .lesson-steps li { gap:8px; grid-template-columns:22px 1fr; }
  .rhythm-lab { margin:35px -18px; border-radius:0; padding:30px 18px; }
  .lab-heading h2 { font-size:42px; }
  .lab-controls { grid-template-columns:1fr; gap:20px; }
  .mode-switch { grid-column:auto; }
  .score-reading { gap:12px; align-items:flex-end; }
  .score-reading > div:first-child { display:block; }
  .now-label { display:block; margin-bottom:6px; }
  #current-syllable { display:block; font-size:56px; min-width:0; }
  .cycle-readout { font-size:12px; padding-bottom:3px; }
  .pulse-header { font-size:11px; gap:3px; }
  .syllable { font-size:21px; min-height:42px; }
  .track-label { display:block; }
  .track-label span { display:block; margin-top:3px; }
  .rhythm-tick.has-attack span { width:24px; font-size:21px; }
  .lab-transport { gap:12px; }
  .transport-button,.stop-button { flex:1 1 calc(50% - 12px); }
  .sound-check { flex:1 1 calc(50% - 12px); font-size:13px; }
  .volume-label { flex:1 1 calc(50% - 12px); max-width:none; min-width:0; }
  .lab-note { font-size:12px; }
  .rhythm-footer { padding:24px 18px; align-items:flex-start; }
  .rhythm-footer > a:last-child { max-width:13ch; text-align:right; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .course-map > summary svg { transition:none; } }

body.rhythm-page{color-scheme:dark}
