@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/manrope-latin-ext-v1.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/manrope-latin-v1.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root{font-family:Manrope,Arial,sans-serif;color:#20211e;background:#faf7ef;font-synthesis:none;--paper:#faf7ef;--ink:#20211e;--accent:#9f3566;--accent-hover:#852b55;--accent-soft:#9f35660c;--accent-sounding:#efdce5;--muted:#6f6e66}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;cursor:pointer;color:inherit}button:disabled{cursor:default}button,a{outline-offset:5px}button:focus-visible,a:focus-visible{outline:3px solid var(--accent)}button{transition:background .15s,transform .15s,color .15s}button:not(:disabled):active{transform:translateY(2px)}[hidden]{display:none!important}a{color:inherit;text-decoration:none}.topbar{height:90px;padding:0 40px;display:flex;align-items:center;justify-content:space-between;border-bottom:1.5px solid var(--ink)}.brand{font-size:38px;font-weight:800;letter-spacing:-2px;line-height:1}.header-actions{display:flex;align-items:center;gap:32px}.star-count{display:flex;align-items:center;gap:13px;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}.star-count>span:first-child{font-size:33px;line-height:1}.star-count strong{font-weight:800}.icon-button{border:0;background:transparent;display:grid;place-items:center;width:40px;height:40px;padding:3px}.icon-button svg{width:34px;height:34px}.help-button{border:2px solid var(--ink);border-radius:50%;font-size:25px;width:33px;height:33px;padding:0;font-weight:700}.layout{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(340px,1fr);max-width:1700px;margin:0 auto;padding:42px 38px 34px;gap:30px;min-height:calc(100vh - 90px)}.journey{min-width:0;display:flex;flex-direction:column}.journey-heading{display:flex;align-items:baseline;gap:24px;position:relative;z-index:2;flex-wrap:wrap}.journey-heading h1{font-size:48px;font-weight:800;letter-spacing:-2.5px;line-height:1.15;margin:0}.journey-heading>span{font-size:15px;color:#6f6e66;font-weight:600;white-space:nowrap}.map{position:relative;aspect-ratio:1.1;min-height:510px;width:100%;margin-top:-14px;flex:1;max-height:820px;isolation:isolate}.island{position:absolute}.terrain{position:absolute;inset:0;background:#d7e2b9;mask:url('assets/island.svg') center/100% 100% no-repeat;-webkit-mask:url('assets/island.svg') center/100% 100% no-repeat}.terrain:after{content:'';position:absolute;inset:0;background:url('assets/island.svg') center/100% 100%;mix-blend-mode:multiply;opacity:.45}.island-keys{left:-3%;bottom:0;width:66%;height:36%}.island-rhythm{left:13%;bottom:29%;width:72%;height:38%}.island-strings{right:-1%;top:0;width:60%;height:43%}.island-rhythm .terrain{background:#ffdbb8;transform:rotate(4deg)}.island-strings .terrain{background:#ded0f2;transform:rotate(-8deg)}.instrument{position:absolute;object-fit:contain;pointer-events:none;user-select:none}.island-keys .instrument{width:40%;height:65%;left:5%;top:6%;transform:rotate(-5deg)}.island-rhythm .instrument{width:34%;height:67%;left:10%;top:-5%;transform:rotate(-7deg)}.island-strings .instrument{width:37%;height:72%;left:18%;top:-3%;transform:rotate(5deg)}.world-name{position:absolute;line-height:1.1}.world-name h2{font-family:Georgia,'Times New Roman',serif;font-weight:800;font-size:clamp(26px,2.7vw,44px);letter-spacing:-1.1px;margin:0 0 5px}.world-name>span{font-size:clamp(18px,2vw,28px);color:#6b685f;font-weight:500}.island-keys .world-name{left:47%;top:24%}.island-rhythm .world-name{left:47%;top:23%}.island-strings .world-name{left:58%;top:22%}.map-nodes{position:absolute;inset:0}.map-node{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;border:1.5px solid #7e7c72;background:#f8f5ed;color:#6d6a64;display:grid;place-items:center;padding:0;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;z-index:2}.map-node:not(:disabled):active{transform:translate(-50%,-48%)}.map-node:not(:disabled):hover{background:#eae8de}.map-node.current{color:#fff;background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 4px var(--paper),0 0 0 6px var(--accent)}.map-node.current:hover{background:var(--accent-hover)}.map-node.complete{background:var(--ink);border-color:var(--paper);color:#fff}.map-node.complete.current{background:var(--accent)}.map-node:disabled{background:#eeeae3b8;color:#6e6c65;border-color:#929085}.node-lock{position:absolute;top:calc(100% - 3px);left:50%;transform:translateX(-50%);width:16px;height:17px;background:#77766e;border:1.5px solid var(--paper);border-radius:4px;display:grid;place-items:center}.node-lock svg{width:11px;height:13px;stroke:#fff;stroke-width:1.8;fill:none}.node-stars{position:absolute;top:calc(100% + 1px);left:50%;transform:translateX(-50%);color:var(--ink);font-size:11px;letter-spacing:0;white-space:nowrap;text-shadow:0 0 4px var(--paper);line-height:1}.map-node.current .node-stars{color:var(--accent)}.island-trail{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.island-trail path{fill:none;stroke:var(--ink);stroke-width:.8;stroke-dasharray:.1 2;stroke-linecap:round;opacity:.75}.map-bridges{position:absolute;inset:0;width:100%;height:100%;z-index:-1}.map-bridges path{fill:none;stroke:var(--ink);stroke-width:3;stroke-dasharray:1 12;stroke-linecap:round;opacity:.6}.game{border-left:1px solid #77766d;padding:8px 0 6px 34px;margin-top:0;min-width:0;align-self:start}.level-counter{text-transform:uppercase;color:#6f6e66;font-size:15px;font-weight:800;letter-spacing:.3px}.game-heading h2{font-size:clamp(26px,2.7vw,40px);line-height:1.2;letter-spacing:-1.6px;font-weight:800;margin:16px 0 0}.listen-button{margin:31px 0 39px;background:var(--accent);border:0;border-radius:10px;min-height:63px;padding:14px 28px;display:flex;align-items:center;justify-content:center;gap:14px;font-size:23px;font-weight:700;color:white;min-width:210px}.listen-button:hover{background:var(--accent-hover)}.listen-button>span:first-child{font-size:22px}.audio-bars{display:none;height:25px;align-items:center;gap:4px}.audio-bars i{display:block;width:3px;height:17px;background:white;animation:wave .5s ease-in-out infinite alternate}.audio-bars i:nth-child(2){height:25px;animation-delay:-.3s}.audio-bars i:nth-child(3){animation-delay:-.15s}.listen-button.playing .audio-bars{display:flex}.listen-button.playing #listen-icon{display:none}.answer-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-height:86px;align-content:start}.note-slot{position:relative;min-width:0;height:86px;background:transparent;border:1px solid #96948a;border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:0 3px}.slot-index{position:absolute;top:7px;left:9px;font-size:12px;color:#858277;font-weight:500}.slot-note{font-size:17px;font-weight:700}.slot-beat{font-size:12px;color:#6f6e66;line-height:1}.note-slot.filled{background:#eeece4}.note-slot.selected{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent);background:var(--accent-soft)}.note-slot.correct{background:#e5edd8;border-color:#778c5c}.note-slot.incorrect{background:#f9e0d5;border-color:#b7775a}.slot-result{position:absolute;right:5px;top:4px;font-size:13px;color:#677f4e}.incorrect .slot-result{color:#ad6447}.playing-note{box-shadow:0 0 0 2px var(--accent);border-color:var(--accent)}.rhythm-control{display:flex;align-items:center;justify-content:space-between;margin:18px 0 -9px;font-size:12px;color:#727064}.rhythm-control>div{display:flex;gap:5px}.rhythm-control button{border:1px solid #a29e91;border-radius:6px;background:none;min-width:48px;min-height:39px;font-size:24px;padding:2px 10px;display:flex;align-items:center;justify-content:center;gap:8px}.rhythm-control button span{font-size:12px}.rhythm-control button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}.piano{display:flex;margin:36px 0 0;border:1.5px solid var(--ink);border-radius:9px;overflow:visible;height:155px}.piano-key{flex:1;position:relative;min-width:0;border:0;border-right:1.5px solid var(--ink);border-radius:0 0 5px 5px;background:transparent;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;padding:0 1px 14px;font-size:14px;font-weight:500;touch-action:manipulation}.piano-key:first-child{border-top-left-radius:7px}.piano-key:last-child{border-right:0;border-top-right-radius:7px}.piano-key:disabled{color:#9a978a;background:#77705c08}.piano-key:hover:not(:disabled){background:#edeadf}.piano-key.sounding{background:var(--accent-sounding)}.black-key{position:absolute;top:-1px;right:-16px;width:30px;height:85px;z-index:2;pointer-events:none;background:var(--ink);border-radius:0 0 5px 5px;box-shadow:inset 0 -3px 0 #000}.piano-key:disabled .black-key{background:#6a695f;box-shadow:none}.tools{display:flex;gap:12px;margin:29px 0 0;align-items:center}.tool-button,.hint-button{border:1px solid #89867c;border-radius:9px;min-height:48px;background:transparent;display:flex;align-items:center;justify-content:center;padding:9px 13px;gap:8px}.tool-button svg{width:25px;height:25px}.tool-button:disabled{opacity:.3}.hint-button{margin-left:auto;font-size:15px;font-weight:600;padding:9px 12px}.hint-button svg{width:23px;height:26px}.hint-button>span{display:flex}.hint-button:disabled{opacity:.3}.tool-button:hover:not(:disabled),.hint-button:hover:not(:disabled){background:#eeebe2}.feedback{font-size:12px;line-height:1.6;min-height:50px;color:#706e65;padding:12px 0 6px}.feedback.error{color:#a1563f}.feedback.success{color:#607c41}.check-button{display:flex;align-items:center;justify-content:center;gap:17px;min-height:56px;width:100%;padding:12px 16px;color:white;background:var(--ink);border:0;border-radius:9px;font-size:19px;font-weight:700}.check-button>span{font-size:27px;line-height:1}.check-button:disabled{background:#aaa9a5}.check-button:hover:not(:disabled){background:var(--accent)}.storage-notice{color:#9a593b;font-size:11px;margin:10px 0 0}.close-button{position:absolute;right:15px;top:10px;border:0;background:transparent;font-size:30px;width:40px;height:40px}.replay-button{border:0;background:transparent;padding:15px 5px 0;font-size:13px;color:#6f6d64}dialog{border:1px solid var(--ink);border-radius:15px;background:var(--paper);color:var(--ink);padding:42px 30px 30px;max-width:430px;width:calc(100% - 32px);max-height:calc(100dvh - 40px);overflow:auto}dialog::backdrop{background:#20211e66;backdrop-filter:blur(4px)}dialog h2{font-size:28px;font-weight:800;letter-spacing:-1px;line-height:1.2;margin:8px 0 24px}dialog ol{padding-left:20px}dialog li,dialog p{font-size:13px;color:#706c60;line-height:1.8}dialog li{margin-bottom:8px}dialog .check-button{margin-top:25px}#success-dialog{text-align:center}.success-stars{font-size:44px;letter-spacing:5px;color:var(--accent);line-height:1.5}.success-stars .empty{color:#d1cfc3}@keyframes wave{from{transform:scaleY(.4)}to{transform:scaleY(1)}}
@media(min-width:1450px){.topbar{height:100px;padding:0 48px}.layout{padding:45px 45px 36px;gap:37px}.game{padding-left:38px}.map-node{width:52px;height:52px;font-size:26px}.game-heading h2{font-size:43px}.listen-button{margin-top:36px;margin-bottom:48px}.note-slot{height:100px}.piano{height:175px;margin-top:42px}.black-key{height:100px;width:35px;right:-18px}.piano-key{font-size:17px}.tools{margin-top:37px}.feedback{min-height:60px}.journey-heading h1{font-size:55px}}
@media(max-width:1100px){.topbar{padding:0 28px;height:80px}.brand{font-size:33px}.layout{grid-template-columns:minmax(0,1.5fr) minmax(310px,1fr);padding:30px 25px;gap:20px}.game{padding-left:23px}.journey-heading{gap:16px}.journey-heading h1{font-size:39px}.journey-heading>span{font-size:12px}.map{min-height:505px;aspect-ratio:auto}.map-node{width:39px;height:39px;font-size:19px}.world-name h2{font-size:28px}.world-name>span{font-size:20px}.island-strings .world-name{left:52%;top:28%}.level-counter{font-size:13px}.game-heading h2{font-size:29px}.listen-button{font-size:20px;min-height:57px;min-width:180px}.note-slot{height:73px}.answer-slots{min-height:73px;gap:8px}.slot-note{font-size:15px}.piano{height:143px}.black-key{width:24px;right:-13px;height:79px}.piano-key{font-size:12px}.hint-button{font-size:13px;padding:9px}.tool-button{padding:9px 11px}.tools{gap:10px}.check-button{font-size:17px}.world-name h2{letter-spacing:-.9px}}
@media(max-width:800px){.topbar{height:74px;padding:0 23px}.brand{font-size:32px}.header-actions{gap:22px}.star-count{font-size:16px;gap:8px}.star-count>span:first-child{font-size:26px}.icon-button{width:32px;height:32px}.icon-button svg{width:29px;height:29px}.help-button{width:28px;height:28px;font-size:21px}.layout{grid-template-columns:1fr;padding:27px 22px 38px;gap:22px;max-width:650px}.journey-heading{justify-content:space-between;gap:15px}.journey-heading h1{font-size:40px}.journey-heading>span{font-size:12px}.map{height:560px;min-height:0;aspect-ratio:auto;flex:none;margin-top:8px}.island-keys{left:-3%;bottom:0;width:98%;height:33%}.island-rhythm{left:1%;bottom:31%;width:98%;height:34%}.island-strings{right:-3%;top:0;width:99%;height:35%}.island-keys .instrument{left:7%;top:-2%;width:34%;height:72%}.island-keys .world-name{left:46%;top:19%}.island-rhythm .instrument{left:7%;top:-4%;width:33%;height:70%}.island-rhythm .world-name{left:46%;top:17%}.island-strings .instrument{left:13%;top:-4%;width:33%;height:74%}.island-strings .world-name{left:50%;top:19%}.world-name h2{font-size:32px}.world-name>span{font-size:22px}.map-node{height:43px;width:43px;font-size:20px}.node-stars{font-size:10px}.map-bridges{display:none}.game{border-left:0;border-top:1px solid #88857a;padding:28px 0 0;margin:0}.game-heading{display:flex;flex-direction:column}.level-counter{font-size:12px}.game-heading h2{font-size:31px;margin-top:10px;letter-spacing:-1.2px}.listen-button{margin:24px 0 28px;font-size:22px;min-height:58px;min-width:200px}.answer-slots{gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));min-height:80px}.note-slot{height:80px}.slot-index{font-size:12px}.slot-note{font-size:19px}.piano{height:167px;margin-top:28px}.piano-key{font-size:16px}.black-key{height:94px;width:32px;right:-17px}.tools{margin-top:25px;gap:12px}.tool-button{min-width:55px}.hint-button{font-size:16px;padding:10px 14px}.feedback{font-size:12px;min-height:48px}.check-button{font-size:19px;min-height:57px}.rhythm-control{margin-bottom:-8px}}
@media(max-width:420px){.topbar{padding:0 18px;height:69px}.brand{font-size:29px;letter-spacing:-1.6px}.header-actions{gap:17px}.star-count{font-size:14px}.star-count>span:first-child{font-size:24px}.icon-button{width:29px;height:29px}.icon-button svg{width:27px;height:27px}.help-button{height:26px;width:26px;font-size:19px}.layout{padding:24px 18px 30px;gap:18px}.journey-heading h1{font-size:35px;letter-spacing:-1.8px}.journey-heading>span{font-size:11px}.map{height:530px;margin-top:13px}.world-name h2{font-size:30px}.map-node{width:40px;height:40px;font-size:20px}.game-heading h2{font-size:30px}.piano{height:151px}.black-key{height:84px;width:27px;right:-14px}.piano-key{font-size:14px}.note-slot{height:74px}.answer-slots{gap:8px;min-height:74px}.hint-button{font-size:14px;padding:9px 12px}.slot-note{font-size:17px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.terrain:after{background:url('assets/paper.svg') repeat;background-size:150px 150px;mix-blend-mode:multiply;opacity:.7}
@media(max-width:800px){.map{overflow:clip}.island-strings .instrument{top:0}}
/* The map and the instrument now have their own screens. */
.layout{display:block;max-width:1280px;padding:40px 38px 45px;min-height:calc(100dvh - 90px)}
.layout[data-screen=game]{max-width:650px;padding-top:26px}
.journey-heading{justify-content:space-between;align-items:baseline}
.journey-heading h1{font-size:48px}
.chapter-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:38px;height:auto;min-height:0;max-height:none;aspect-ratio:auto;overflow:visible;margin:32px 0 0}
.chapter{position:relative;min-width:0}
.chapter+.chapter{border-left:1px solid #d8d3c6;padding-left:26px}
.chapter-art{height:205px;position:relative;margin-bottom:20px}
.chapter-art .terrain{inset:8px -10px 0}
.chapter-rhythm .terrain{background:#ffdbb8;transform:rotate(3deg)}
.chapter-strings .terrain{background:#ded0f2;transform:rotate(-4deg)}
.chapter-art img{position:relative;display:block;width:80%;height:100%;margin:auto;object-fit:contain;transform:rotate(-4deg)}
.chapter-strings .chapter-art img{transform:rotate(6deg)}
.chapter-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:0 0 27px}
.chapter-number{font-size:10px;letter-spacing:1.5px;font-weight:700;color:var(--muted)}
.chapter-heading h2{font-family:Georgia,serif;font-size:34px;letter-spacing:-1px;line-height:1.1;margin:7px 0 0}
.chapter-range{font-size:14px;color:var(--muted);padding-bottom:3px;white-space:nowrap}
.chapter-map .map-nodes{position:relative;inset:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:60px 60px;row-gap:30px;justify-items:center;align-items:center;background:radial-gradient(circle,#aaa595 1px,transparent 1.5px) left 30px / 11px 2px repeat-x}
.chapter-map .map-nodes:before{content:'';position:absolute;left:0;right:0;top:119px;height:2px;background:radial-gradient(circle,#aaa595 1px,transparent 1.5px) left center / 11px 2px repeat-x;z-index:-1}
.chapter-map .map-node{position:relative;left:auto;top:auto;transform:none;width:44px;height:44px;font-size:18px}
.chapter-map .map-node:not(:disabled):active{transform:translateY(2px)}
.chapter-map .map-node:nth-child(6){grid-column:5;grid-row:2}.chapter-map .map-node:nth-child(7){grid-column:4;grid-row:2}.chapter-map .map-node:nth-child(8){grid-column:3;grid-row:2}.chapter-map .map-node:nth-child(9){grid-column:2;grid-row:2}.chapter-map .map-node:nth-child(10){grid-column:1;grid-row:2}
.game{border:0;margin:0;padding:0;max-width:560px;margin-inline:auto}
.back-button{border:0;background:none;padding:8px 0;font-size:14px;margin:0 0 27px;color:#747166;min-height:40px}
.back-button:hover{color:var(--accent)}
.game-heading h2{font-size:36px}.game .listen-button{margin:28px 0 34px}.game .note-slot{height:90px}.game .piano{height:180px}.game .black-key{height:100px;width:34px;right:-18px}.game .piano-key{font-size:17px}.game .tools{margin-top:30px}.game .feedback{min-height:50px}
.completion{margin:25px 0 4px;padding:14px 18px;background:#ebece1;display:flex;align-items:center;gap:14px;border-radius:9px;font-size:14px;flex-wrap:wrap}.completion-stars{color:var(--accent);font-size:21px;letter-spacing:2px}.completion strong{font-size:12px;font-weight:600;color:#727665}.continue-button{background:var(--ink);color:white;border:0;padding:10px 16px;border-radius:6px;margin-left:auto;font-weight:600;font-size:13px;min-height:40px}.continue-button:hover{background:var(--accent)}
@media(max-width:1100px){.chapter-map{gap:24px}.chapter+.chapter{padding-left:18px}.chapter-art{height:180px}.chapter-heading h2{font-size:30px}.chapter-range{font-size:12px}.chapter-map .map-node{width:40px;height:40px;font-size:17px}}
@media(max-width:800px){.layout{padding:28px 22px 36px;max-width:560px}.journey-heading h1{font-size:39px}.journey-heading>span{font-size:12px}.chapter-map{grid-template-columns:1fr;gap:40px;margin-top:22px}.chapter+.chapter{border:0;border-top:1px solid #d8d3c6;padding:28px 0 0}.chapter-art{height:210px;max-width:370px;margin:0 auto 15px;width:100%}.chapter-heading{margin-bottom:20px}.chapter-heading h2{font-size:33px}.chapter-map .map-node{width:46px;height:46px;font-size:20px}.chapter-range{font-size:14px}.chapter-map .map-nodes{grid-template-rows:65px 65px;row-gap:22px;background-position:left 32px}.chapter-map .map-nodes:before{top:119px}.layout[data-screen=game]{padding:20px 22px 32px}.game-heading{display:block}.game-heading h2{font-size:33px}.game .piano{height:175px}.back-button{margin-bottom:22px}.game .note-slot{height:80px}.game .piano-key{font-size:16px}.completion{font-size:13px;padding:12px 14px;gap:10px}.completion strong{width:100%;order:3}}
@media(max-width:420px){.layout{padding:25px 18px 32px}.layout[data-screen=game]{padding:16px 18px 28px}.journey-heading{gap:12px;align-items:baseline}.journey-heading h1{font-size:34px}.journey-heading>span{font-size:10px}.chapter-map .map-node{width:43px;height:43px;font-size:19px}.chapter-art{height:190px}.game-heading h2{font-size:30px}.game .piano{height:155px}.game .black-key{height:86px;width:27px;right:-14px}.game .piano-key{font-size:14px}.game .note-slot{height:74px}.completion{gap:8px;font-size:12px}.completion-stars{font-size:17px}.continue-button{font-size:12px;padding:8px 11px}.back-button{font-size:13px}}
.instrument-marimba{border:0;border-radius:0;gap:7px;align-items:flex-start;background:linear-gradient(transparent 31%,#44382d 31% 36%,transparent 36% 67%,#44382d 67% 72%,transparent 72%)}
.instrument-marimba .piano-key{height:var(--bar-height);background:#cb885a;color:#30271f;border:1.5px solid #533f2c;border-radius:5px;box-shadow:0 4px 0 #815334;font-weight:700;padding-bottom:12px}
.instrument-marimba .piano-key:before{content:'';position:absolute;width:5px;height:5px;border-radius:50%;background:#684c34;left:calc(50% - 2px);top:23%}
.instrument-marimba .piano-key:disabled{background:#dfc9ad;color:#a28b70;box-shadow:0 4px 0 #c2aa8d}
.instrument-marimba .piano-key:hover:not(:disabled),.instrument-marimba .piano-key.sounding{background:#e8b384}
.instrument-guitar{border:0;background:#f0dfb7;border-radius:55px;padding:10px 17px;gap:4px;box-shadow:inset 0 0 0 2px #d8bd86}
.instrument-guitar .piano-key{border:0;border-radius:0;background:transparent;justify-content:flex-end;isolation:isolate;padding-bottom:8px}
.instrument-guitar .piano-key:before{content:'';position:absolute;top:-9px;bottom:-9px;left:50%;width:2px;background:#9d793b;z-index:-1;box-shadow:1px 0 0 #fff3d6}
.instrument-guitar .piano-key span{background:var(--paper);border:1px solid #c3a36b;border-radius:50%;height:38px;min-width:38px;display:grid;place-items:center;font-size:13px}
.instrument-guitar .piano-key:disabled{opacity:.4}
.instrument-guitar .piano-key:hover:not(:disabled) span,.instrument-guitar .piano-key.sounding span{background:var(--accent);border-color:var(--accent);color:white}
@media(max-width:420px){.instrument-guitar{padding:10px 12px;gap:2px}.instrument-guitar .piano-key span{height:32px;min-width:32px;font-size:11px}}
.rhythm-control button{font-size:17px}.rhythm-control button span{font-size:11px}
.star-count{white-space:nowrap}
@media(max-width:420px){.header-actions{gap:12px}.star-count{font-size:13px;gap:5px}.star-count>span:first-child{font-size:21px}.brand{font-size:27px}}
/* One chapter, one continuous path through ten levels. */
.layout[data-screen=map]{max-width:1080px}
.chapter-controls{display:flex;gap:17px;align-items:center}
.chapter-controls button{border:1px solid #aaa597;border-radius:50%;background:transparent;width:44px;height:44px;font-size:24px;line-height:1}
.chapter-controls button:hover:not(:disabled){background:var(--ink);border-color:var(--ink);color:var(--paper)}
.chapter-controls button:disabled{opacity:.25}
.chapter-controls>span{color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums;min-width:34px;text-align:center}
.chapter-map{display:block;max-width:900px;margin:15px auto 0}
.chapter-map .chapter{border:0;padding:0}
.chapter-art{height:190px;width:350px;max-width:85%;margin:0 auto 10px}
.chapter-art img{width:75%}
.chapter-heading{justify-content:center;align-items:flex-end;gap:25px;margin:0 0 10px}
.chapter-heading h2{font-size:40px;margin-top:5px}
.chapter-number{font-size:10px}
.chapter-range{font-size:13px;padding-bottom:5px}
.chapter-route{position:relative;height:250px;margin:5px auto 0;max-width:900px}
.chapter-path{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.chapter-path path{fill:none;stroke:#b7ad94;stroke-width:3;stroke-linecap:round;stroke-dasharray:2 9;vector-effect:non-scaling-stroke}
.chapter-map .map-nodes{position:absolute;inset:0;display:block;background:none}
.chapter-map .map-nodes:before{display:none}
.chapter-map .map-node{position:absolute;left:var(--node-x);top:var(--node-y);transform:translate(-50%,-50%);width:54px;height:54px;font-size:23px}
.chapter-map .map-node:not(:disabled):active{transform:translate(-50%,-48%)}
@media(max-width:800px){.chapter-map{margin-top:17px}.chapter-art{height:180px}.chapter-heading h2{font-size:36px}.chapter-route{height:230px}.chapter-map .map-node{width:46px;height:46px;font-size:20px}.chapter-controls{gap:12px}.chapter-controls button{height:40px;width:40px;font-size:23px}.chapter-heading{gap:20px}}
@media(max-width:420px){.chapter-art{height:165px;margin-bottom:15px}.chapter-heading h2{font-size:33px}.chapter-heading{justify-content:space-between;gap:12px;margin-bottom:15px}.chapter-range{font-size:12px}.chapter-route{height:215px}.chapter-controls{gap:10px}.chapter-controls>span{font-size:12px;min-width:29px}.chapter-controls button{height:36px;width:36px;font-size:21px}.chapter-map .map-node{height:42px;width:42px;font-size:19px}}
/* Desktop play workspace: a compact toolbar and all controls above the fold. */
@media(min-width:801px){
  body:has(.layout[data-screen=game]) .topbar{max-width:900px;margin-inline:auto;height:52px;padding:0 24px;border-bottom:1px solid #ddd8ca}
  body:has(.layout[data-screen=game]) .brand{font-size:25px;letter-spacing:-1.3px}
  body:has(.layout[data-screen=game]) .header-actions{gap:20px}
  body:has(.layout[data-screen=game]) .star-count{font-size:14px;gap:7px}
  body:has(.layout[data-screen=game]) .star-count>span:first-child{font-size:23px}
  body:has(.layout[data-screen=game]) .icon-button{width:28px;height:28px}
  body:has(.layout[data-screen=game]) .icon-button svg{width:25px;height:25px}
  body:has(.layout[data-screen=game]) .help-button{width:25px;height:25px;font-size:18px}
  .layout[data-screen=game]{max-width:900px;min-height:0;padding:10px 24px 16px}
  .layout[data-screen=game] .game{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 185px;gap:12px 24px;align-items:center}
  .game .back-button{grid-column:1/-1;grid-row:1;justify-self:start;margin:0;padding:0;min-height:28px;font-size:12px}
  .game .game-heading{grid-row:2;grid-column:1}
  .game .level-counter{font-size:11px}
  .game .game-heading h2{font-size:29px;letter-spacing:-1px;margin:5px 0 0;line-height:1.2}
  .game .listen-button{grid-row:2;grid-column:2;margin:0;min-width:0;min-height:48px;padding:10px 15px;font-size:18px}
  .game .listen-button>span:first-child{font-size:17px}
  .game .answer-slots{grid-row:3;grid-column:1/-1;grid-template-columns:repeat(var(--note-count,4),minmax(0,84px));justify-content:center;gap:10px;min-height:64px;margin:5px 0 0}
  .game .note-slot{height:64px}
  .game .slot-index{font-size:10px;top:5px;left:7px}
  .game .slot-note{font-size:18px}
  .game .slot-beat{font-size:11px}
  .game .rhythm-control{grid-row:4;grid-column:1/-1;margin:0;justify-content:center;gap:18px}
  .game .rhythm-control button{min-height:32px;padding:2px 10px}
  .game .piano{grid-row:5;grid-column:1/-1;margin:0;height:clamp(110px,23dvh,170px)}
  .game .black-key{height:56%;width:36px;right:-19px}
  .game .piano-key{font-size:16px;padding-bottom:12px}
  .game .tools{grid-row:6;grid-column:1;margin:0;gap:10px}
  .game .hint-button{margin-left:6px;min-height:44px;font-size:14px}
  .game .tool-button{min-height:44px;padding:8px 12px}
  .game .tool-button svg{width:24px;height:24px}
  .game .check-button{grid-row:6;grid-column:2;min-height:48px;font-size:17px}
  .game .feedback{grid-row:7;grid-column:1/-1;min-height:24px;padding:0;font-size:12px}
  .game .storage-notice{grid-row:8;grid-column:1/-1;margin:0}
}
@media(min-width:801px) and (max-height:600px){
  body:has(.layout[data-screen=game]) .topbar{height:42px}
  .layout[data-screen=game]{padding-top:5px;padding-bottom:8px}
  .layout[data-screen=game] .game{row-gap:8px}
  .game .back-button{min-height:22px}
  .game .game-heading h2{font-size:25px}
  .game .listen-button,.game .check-button{min-height:42px;font-size:16px}
  .game .answer-slots{min-height:56px;margin:0}
  .game .note-slot{height:56px}
  .game .piano{height:clamp(94px,21dvh,126px)}
  .game .tool-button,.game .hint-button{min-height:40px}
  .game .feedback{min-height:20px;font-size:11px}
}
/* Keep instrument proportions independent of the wider desktop workspace. */
@media(min-width:801px){
  .game .piano{width:min(100%,560px);justify-self:center;height:170px}
  .game .black-key{width:30px;right:-16px;height:95px}
  .game .instrument-marimba{height:180px}
  .game .instrument-guitar{height:170px}
}
@media(min-width:801px) and (max-height:600px){
  .game .piano{width:min(100%,490px);height:145px}
  .game .black-key{width:26px;right:-14px;height:80px}
  .game .instrument-marimba{height:155px}
  .game .instrument-guitar{height:145px}
}
/* The journey uses the same compact desktop toolbar as the play screen. */
@media(min-width:801px){
  body:has(.layout[data-screen=map]) .topbar{max-width:1080px;margin-inline:auto;height:52px;padding:0 24px;border-bottom:1px solid #ddd8ca}
  body:has(.layout[data-screen=map]) .brand{font-size:25px;letter-spacing:-1.3px}
  body:has(.layout[data-screen=map]) .header-actions{gap:20px}
  body:has(.layout[data-screen=map]) .star-count{font-size:14px;gap:7px}
  body:has(.layout[data-screen=map]) .star-count>span:first-child{font-size:23px}
  body:has(.layout[data-screen=map]) .icon-button{width:28px;height:28px}
  body:has(.layout[data-screen=map]) .icon-button svg{width:25px;height:25px}
  body:has(.layout[data-screen=map]) .help-button{width:25px;height:25px;font-size:18px}
  .layout[data-screen=map]{min-height:0;padding:16px 24px 20px}
  .journey-heading h1{font-size:34px;letter-spacing:-1.5px}
  .chapter-controls{gap:14px}
  .chapter-controls button{width:36px;height:36px;font-size:21px}
  .chapter-map{margin-top:8px}
  .chapter-art{height:145px;width:280px;margin-bottom:5px}
  .chapter-heading{margin-bottom:0;gap:20px}
  .chapter-heading h2{font-size:32px;margin-top:4px}
  .chapter-number{font-size:9px}
  .chapter-range{font-size:12px}
  .chapter-route{height:clamp(160px,29dvh,225px);margin-top:0}
  .chapter-map .map-node{width:48px;height:48px;font-size:21px}
  .completion{margin:10px 0 0;padding:8px 12px;min-height:42px;font-size:12px}
  .completion-stars{font-size:18px}
  .continue-button{min-height:32px;padding:6px 12px;font-size:12px}
}
@media(min-width:801px) and (max-height:600px){
  body:has(.layout[data-screen=map]) .topbar{height:42px}
  .layout[data-screen=map]{padding-top:10px;padding-bottom:12px}
  .journey-heading h1{font-size:30px}
  .chapter-controls button{width:32px;height:32px}
  .chapter-map{margin-top:3px}
  .chapter-art{height:110px;width:235px;margin-bottom:2px}
  .chapter-heading h2{font-size:29px}
  .chapter-route{height:clamp(145px,28dvh,168px)}
  .chapter-map .map-node{width:44px;height:44px;font-size:19px}
}
#listen-icon{display:flex;align-items:center;justify-content:center}
#listen-icon svg{display:block;flex:none;width:22px;height:22px}
/* Approved completion screen, always in Remido's light palette. */
:root{--reward-gold:#dfa631;--reward-soft:#f5e8bd}
.play-panel{display:contents}
.game .game-heading #level-title{font-size:20px;line-height:1.3;font-weight:700;letter-spacing:.5px;text-transform:none;color:var(--ink);margin:0}
.finish-panel{grid-column:1/-1;width:100%;max-width:560px;justify-self:center;min-height:440px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 0 16px;position:relative;isolation:isolate}
.finish-level{font-size:11px;text-transform:uppercase;letter-spacing:1.7px;font-weight:700;color:var(--muted);margin:0 0 22px}
.finish-star-stage{position:relative;min-height:94px;margin:0 0 20px}
.finish-stars{display:flex;gap:15px;align-items:center;min-height:94px}
.finish-star{display:flex;color:#d2cbbd;transform-origin:center}
.finish-star svg{width:62px;height:62px;fill:#eeece4;stroke-width:1.4}
.finish-star:nth-child(2) svg{width:78px;height:78px}
.finish-star.earned{color:var(--reward-gold);animation:reward-star-in .65s cubic-bezier(.18,.8,.25,1.2) both;filter:drop-shadow(0 4px 0 var(--reward-soft))}
.finish-star.earned svg{fill:currentColor;stroke:currentColor}
.finish-panel #finish-title{font-size:33px;font-weight:800;letter-spacing:-1px;line-height:1.2;margin:0 0 12px}
.finish-copy{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 8px}
.finish-award{font-size:13px;line-height:1.6;color:var(--accent);min-height:21px;opacity:0;transform:translateY(7px);transition:opacity .25s,transform .25s;margin:0}
.finish-award.visible{opacity:1;transform:translateY(0)}
.finish-actions{display:flex;gap:12px;width:100%;max-width:370px;margin-top:32px;opacity:0;transform:translateY(10px);transition:opacity .3s,transform .3s}
.finish-actions.ready{opacity:1;transform:translateY(0)}
.next-level-button,.finish-map-button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border:0;border-radius:8px;background:var(--accent);color:#fff;font-size:15px;font-weight:700;padding:12px 17px;flex:1.8}
.next-level-button>span{font-size:22px;line-height:1}
.finish-map-button{background:transparent;color:var(--ink);border:1px solid #aaa597;flex:1}
.next-level-button:hover:not(:disabled){background:var(--accent-hover)}.finish-map-button:hover:not(:disabled){background:#eeebe2}
.finish-burst{position:absolute;left:50%;top:45%;width:0;height:0;pointer-events:none;z-index:-1}
.finish-burst i{position:absolute;left:0;top:0;width:5px;height:10px;border-radius:1px;background:var(--reward-gold);opacity:0;animation:reward-confetti .9s ease-out forwards}
.finish-burst i:nth-child(3n){background:var(--accent)}.finish-burst i:nth-child(3n+1){background:#91a96d}
.star-count.awarding{animation:reward-counter .4s ease-out}
@keyframes reward-star-in{0%{transform:translateY(18px) scale(.4) rotate(-18deg);opacity:0}65%{transform:translateY(-5px) scale(1.17) rotate(6deg);opacity:1}100%{transform:translateY(0) scale(1) rotate(0);opacity:1}}
@keyframes reward-confetti{0%{transform:translate(0,0) rotate(0);opacity:0}15%{opacity:1}100%{transform:translate(var(--burst-x),var(--burst-y)) rotate(var(--burst-rotation));opacity:0}}
@keyframes reward-counter{50%{transform:scale(1.16);color:var(--reward-gold)}}
@media(min-width:801px) and (max-height:600px){.finish-panel{min-height:360px;padding:15px 0 8px}.finish-level{margin-bottom:15px}.finish-star-stage{margin-bottom:12px}.finish-actions{margin-top:24px}}
/* Mobile play layout leaves room for Check even with browser controls visible. */
@media(max-width:800px){
  body:has(.layout[data-screen=game]) .topbar{height:52px;padding:0 18px}
  body:has(.layout[data-screen=game]) .brand{font-size:24px;letter-spacing:-1.3px}
  body:has(.layout[data-screen=game]) .header-actions{gap:14px}
  body:has(.layout[data-screen=game]) .star-count{font-size:12px;gap:5px}
  body:has(.layout[data-screen=game]) .star-count>span:first-child{font-size:20px}
  body:has(.layout[data-screen=game]) .icon-button{width:27px;height:27px}
  body:has(.layout[data-screen=game]) .icon-button svg{width:25px;height:25px}
  body:has(.layout[data-screen=game]) .help-button{width:24px;height:24px;font-size:18px}
  .layout[data-screen=game]{min-height:0;padding:10px 18px 14px}
  .layout[data-screen=game] .game{display:block;width:100%}
  .play-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;align-items:center}
  .game .back-button{grid-row:1;grid-column:1/-1;justify-self:start;margin:0;padding:0;min-height:27px;font-size:12px}
  .game .game-heading{grid-row:2;grid-column:1;display:block}
  .game .game-heading #level-title{font-size:15px;letter-spacing:.4px}
  .game .listen-button{grid-row:2;grid-column:2;min-width:136px;min-height:44px;font-size:16px;padding:10px 15px;margin:0;gap:9px}
  .game .answer-slots{grid-row:3;grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-height:62px;margin:5px 0 0}
  .game .note-slot{height:62px}.game .slot-index{font-size:10px;top:5px;left:7px}.game .slot-note{font-size:17px}.game .slot-beat{font-size:10px}
  .game .rhythm-control{grid-row:4;grid-column:1/-1;margin:0;justify-content:center;gap:14px;font-size:11px}
  .game .rhythm-control button{min-height:30px;font-size:15px}.game .rhythm-control button span{font-size:10px}
  .game .piano{grid-row:5;grid-column:1/-1;height:clamp(115px,21svh,150px);margin:0;width:100%}
  .game .black-key{height:56%;width:27px;right:-14px}.game .piano-key{font-size:14px;padding-bottom:11px}
  .game .tools{grid-row:6;grid-column:1/-1;margin:0;gap:9px}
  .game .tool-button{min-width:42px;min-height:40px;padding:8px 10px}.game .tool-button svg{width:21px;height:21px}
  .game .hint-button{min-height:40px;padding:8px 12px;font-size:13px}.game .hint-button svg{width:21px;height:23px}
  .game .feedback{grid-row:7;grid-column:1/-1;min-height:18px;padding:0;font-size:11px;line-height:1.5}
  .game .check-button{grid-row:8;grid-column:1/-1;min-height:46px;font-size:16px;padding:10px 14px;margin:0}
  .game .storage-notice{grid-row:9;grid-column:1/-1;margin:0}
  .game[data-long=true] .note-slot{height:54px}
  .finish-panel{min-height:min(470px,calc(100svh - 80px));padding:24px 0 12px;max-width:400px;margin:auto}
  .finish-stars{gap:12px}.finish-star svg{width:55px;height:55px}.finish-star:nth-child(2) svg{width:69px;height:69px}
  .finish-panel #finish-title{font-size:29px}.finish-copy{font-size:13px}.finish-actions{margin-top:30px;gap:10px}.next-level-button,.finish-map-button{font-size:14px;padding:11px 12px}
}
@media(max-width:800px) and (max-height:700px){
  body:has(.layout[data-screen=game]) .topbar{height:48px}
  .layout[data-screen=game]{padding:7px 16px 10px}
  .play-panel{row-gap:7px}
  .game .back-button{min-height:23px}
  .game .listen-button{min-height:40px;font-size:15px}
  .game .answer-slots{min-height:54px;margin:0;gap:6px}.game .note-slot{height:54px}.game[data-long=true] .note-slot{height:46px}
  .game .piano{height:clamp(100px,19svh,128px)}
  .game .tools .tool-button,.game .hint-button{min-height:38px}
  .game .feedback{min-height:17px;font-size:10px}
  .game .check-button{min-height:43px}
  .finish-panel{min-height:min(430px,calc(100svh - 75px));padding:15px 0 8px}
  .finish-level{margin-bottom:15px}.finish-star-stage{margin-bottom:14px}
}
@media(prefers-reduced-motion:reduce){.finish-star.earned,.star-count.awarding,.finish-burst i{animation:none!important}.finish-award,.finish-actions{transition:none!important}}
/* Independent melody and reward levels, behind the existing speaker control. */
#sound-dialog{max-width:360px;padding:36px 26px 28px}
#sound-title{margin-bottom:26px}
.volume-setting{display:grid;grid-template-columns:1fr auto;gap:10px 16px;margin-bottom:22px;align-items:center}
.volume-setting label{font-size:14px;font-weight:700}
.volume-setting output{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:40px;text-align:right}
.volume-setting input{grid-column:1/-1;width:100%;min-height:32px;margin:0;accent-color:var(--accent);cursor:pointer}
.mute-setting{display:flex;align-items:center;gap:10px;font-size:13px;min-height:38px;cursor:pointer}
.mute-setting input{width:18px;height:18px;margin:0;accent-color:var(--accent)}
/* Give fingers a clear gap below the instrument without pushing Check away. */
.game .tools{margin-top:12px}
@media(max-width:800px){.game .tools{margin-top:12px}}
.volume-setting{grid-template-columns:minmax(0,1fr) auto auto;gap:10px}
.volume-setting input{grid-column:1/-1}
.volume-preview{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px 9px;border:1px solid #aaa597;border-radius:6px;background:transparent;color:var(--ink);font-size:12px;font-weight:600;min-width:65px}
.volume-preview svg{width:14px;height:14px;flex:none}
.volume-preview:hover:not(:disabled){background:#eeebe2}
.volume-preview:disabled{opacity:.35}
.sound-preview-status{min-height:18px;font-size:11px!important;line-height:1.5!important;margin:10px 0 0!important;color:var(--muted)}
@media(max-width:380px){#sound-dialog{padding-inline:20px}.volume-setting label{font-size:13px}.volume-preview{padding:6px 8px}}
@media(max-width:800px){.volume-preview{min-height:40px}}
.volume-preview{width:36px;min-width:36px;padding:8px;gap:0}
@media(max-width:800px){.volume-preview{width:40px;min-width:40px}}
/* Keep Listen/Stop identical in size; the animated bars share the icon box. */
.game .listen-button{height:48px;min-height:48px;padding-block:0;line-height:1.2;white-space:nowrap;flex-shrink:0}
#listen-icon,.listen-button .audio-bars{width:24px;height:24px;flex:0 0 24px;order:-1;justify-content:center;align-items:center}
.listen-button .audio-bars i{height:15px}.listen-button .audio-bars i:nth-child(2){height:22px}
@media(max-width:800px){.game .listen-button{height:44px;min-height:44px}}
@media(max-width:800px) and (max-height:700px){.game .listen-button{height:40px;min-height:40px}}
@media(min-width:801px) and (max-height:600px){.game .listen-button{height:42px;min-height:42px}}
/* Daily shares the instrument and recording controls with Journey. */
.mode-nav{display:flex;justify-content:center;gap:28px;padding:6px 18px;border-bottom:1px solid #e4dfd3}.mode-nav :is(button,a){border:0;background:transparent;color:var(--muted);padding:9px 3px;font-size:14px;font-weight:700;min-height:36px}.mode-nav :is(button,a)[aria-current=page]{color:var(--accent);box-shadow:0 2px var(--accent)}
.daily-meta{font-size:11px;letter-spacing:1px;color:var(--muted);grid-column:1/-1;grid-row:1;margin-bottom:8px}.daily-attempts{font-size:12px;color:var(--muted);display:flex;align-items:center;justify-content:space-between;grid-column:1/-1;grid-row:3}
body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 12px;align-items:center}body:is([data-mode=daily],[data-journey-editor=true]) .game{max-width:700px!important;margin:auto}body:is([data-mode=daily],[data-journey-editor=true]) .game:not([hidden]){display:block!important}body:is([data-mode=daily],[data-journey-editor=true]) .game-heading{grid-row:2;grid-column:1}body:is([data-mode=daily],[data-journey-editor=true]) .listen-button{grid-row:2;grid-column:2;margin:0;min-width:120px}body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-row:4;grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr));margin:0;min-height:0}body:is([data-mode=daily],[data-journey-editor=true]) .piano{grid-row:5;grid-column:1/-1;margin:8px 0 0}body:is([data-mode=daily],[data-journey-editor=true]) .tools{grid-row:6;grid-column:1/-1;margin:12px 0 0}body:is([data-mode=daily],[data-journey-editor=true]) .feedback{grid-row:7;grid-column:1/-1}body:is([data-mode=daily],[data-journey-editor=true]) .check-button{grid-row:8;grid-column:1/-1;width:100%;margin:0}body:is([data-mode=daily],[data-journey-editor=true]) .storage-notice{grid-row:9;grid-column:1/-1}body:is([data-mode=daily],[data-journey-editor=true]) #level-title{font-size:23px;letter-spacing:0}body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel{margin:auto;padding-top:16px;min-height:0}body:is([data-mode=daily],[data-journey-editor=true]) .finish-award{display:none}body:is([data-mode=daily],[data-journey-editor=true]) .finish-star-stage{margin-bottom:14px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel #finish-title{font-size:28px}
.daily-actions{display:grid;gap:9px;width:100%;margin-top:23px}.daily-actions button{width:100%;margin:0}.daily-actions p{margin:0;font-size:12px;color:var(--muted)}.daily-actions #share-status:empty{display:none}.daily-actions input{font:inherit;font-size:13px;min-width:0;width:100%;padding:10px;border:1px solid #aaa597;border-radius:6px;background:var(--paper);color:var(--ink)}
@media(max-width:800px){body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{gap:10px 12px}.daily-meta{margin-bottom:4px}body:is([data-mode=daily],[data-journey-editor=true]) #level-title{font-size:17px}body:is([data-mode=daily],[data-journey-editor=true]) .piano{height:clamp(112px,21svh,150px)}body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:62px}body:is([data-mode=daily],[data-journey-editor=true]) .game .feedback{min-height:18px}body:is([data-mode=daily],[data-journey-editor=true]) .game .tools{margin-top:12px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-star-stage{height:90px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-stars svg{width:44px;height:44px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-star:nth-child(2) svg{width:54px;height:54px}.daily-actions{margin-top:16px}}
@media(max-width:800px) and (max-height:700px){body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{row-gap:7px}body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:50px}.daily-meta{font-size:10px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-star-stage{height:65px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-level{margin-bottom:10px}body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel #finish-title{font-size:24px}}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-level{font-size:11px}
/* Daily streak stays secondary to the instrument and never changes Journey stars. */
.daily-streak{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);grid-column:1/-1;grid-row:2}.daily-streak>span:first-child{display:flex;align-items:center;gap:7px;color:var(--ink)}.daily-streak svg{width:18px;height:18px;color:#b16c23}
body:is([data-mode=daily],[data-journey-editor=true]) .game-heading,body:is([data-mode=daily],[data-journey-editor=true]) .listen-button{grid-row:3}body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts{grid-row:4}body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-row:5}body:is([data-mode=daily],[data-journey-editor=true]) .piano{grid-row:6}body:is([data-mode=daily],[data-journey-editor=true]) .tools{grid-row:7}body:is([data-mode=daily],[data-journey-editor=true]) .feedback{grid-row:8}body:is([data-mode=daily],[data-journey-editor=true]) .check-button{grid-row:9}body:is([data-mode=daily],[data-journey-editor=true]) .storage-notice{grid-row:10}
@media(max-width:800px) and (max-height:700px){.daily-streak{font-size:11px}body:is([data-mode=daily],[data-journey-editor=true]) .daily-meta{margin-bottom:0}}
/* Repertoire Daily: real chromatic keys and compact multi-row answers. */
body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-template-columns:repeat(var(--slot-columns,6),minmax(0,1fr));gap:8px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:56px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:17px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{position:relative;display:flex;width:100%;max-width:calc(var(--white-count) * 70px);height:auto;aspect-ratio:calc(var(--white-count) * .39);margin-inline:auto;overflow:hidden;isolation:isolate}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-white-key{flex:1;min-width:0;border:0;border-right:1.5px solid var(--ink);border-radius:0;align-self:stretch;align-items:flex-end;justify-content:center;font-size:14px;padding:0 0 12px;background:var(--paper);box-shadow:none}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-white-key:last-of-type{border-right:0}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key{position:absolute;z-index:2;top:0;left:calc(var(--key-position) / var(--white-count) * 100%);transform:translateX(-50%);width:calc(62% / var(--white-count));height:59%;min-height:0;background:var(--ink);color:var(--paper);border:0;border-radius:0 0 4px 4px;padding:0 0 8px;align-items:flex-end;justify-content:center;font-size:11px;box-shadow:0 3px #080908;flex:none;white-space:nowrap}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key:hover:not(:disabled),body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key.sounding{background:var(--accent);color:white}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key:active{transform:translateX(-50%)}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts:after{display:none}.daily-rhythm-label{white-space:nowrap}
@media(min-width:801px){body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{gap:9px 12px}body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * 48px)}body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:54px}}
@media(max-width:800px){body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-template-columns:repeat(6,minmax(0,1fr))}body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:48px}body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:14px}body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * 44px);aspect-ratio:calc(var(--white-count) * .34)}body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-white-key{font-size:11px;padding-bottom:10px}body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key{font-size:9px}}
@media(max-width:800px) and (max-height:700px){body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:42px}body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{gap:6px}body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * 35px);aspect-ratio:calc(var(--white-count) * .33)}body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{row-gap:6px}body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:13px}.daily-rhythm-label{font-size:10px}}
@media(max-width:800px) and (max-height:700px){body:is([data-mode=daily],[data-journey-editor=true]):has(.game[data-many=true]) .mode-nav{padding-block:2px}body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .note-slot{height:34px}body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .slot-index{top:3px;font-size:9px}body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .answer-slots{gap:4px 6px}body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .daily-piano{margin-top:0}body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .tools{margin-top:8px}}
/* Anchor labels inside the keys independently of inherited flex direction. */
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-white-key{position:relative;display:block;padding:0}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key{display:block;padding:0}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key-label{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);line-height:1;text-align:center;white-space:nowrap;pointer-events:none}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key .piano-key-label{bottom:10px}
@media(max-width:800px){body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key-label{bottom:10px}body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key .piano-key-label{bottom:8px}}
@media(max-width:800px){body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key .piano-key-label{letter-spacing:-.5px}}

/* Daily manual rhythm workspace — shared desktop and mobile layout. */
body:is([data-mode=daily],[data-journey-editor=true]) .star-count{display:none}
body:is([data-mode=daily],[data-journey-editor=true]) .game{max-width:820px!important}
body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{display:grid;grid-template-columns:minmax(0,1fr) 116px;gap:20px 12px;align-items:start}
body:is([data-mode=daily],[data-journey-editor=true]) .game-heading{grid-row:1;grid-column:1;display:flex;flex-direction:column;gap:6px;align-items:flex-start;min-width:0}
body:is([data-mode=daily],[data-journey-editor=true]) .game-heading #level-title{font-size:25px;letter-spacing:-.7px;text-transform:none;color:var(--ink);margin:0;line-height:1.2}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-meta{grid-row:auto;grid-column:auto;font-size:12px;letter-spacing:0;color:var(--muted);margin:0}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-check-controls{grid-row:1;grid-column:2;display:flex;flex-direction:column;align-items:stretch;gap:8px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-check-controls .check-button{grid-row:auto;grid-column:auto;min-height:48px;height:48px;min-width:116px;width:116px;margin:0;padding:10px 15px;justify-content:space-between;background:var(--accent);font-size:15px;gap:10px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-check-controls .check-button:disabled{background:#aaa9a5}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-check-controls .check-button>span{font-size:22px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-check-controls .daily-attempts{grid-row:auto;grid-column:auto;display:flex;align-items:center;justify-content:center;gap:4px;font-size:11px;line-height:14px;color:var(--muted);white-space:nowrap}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts>b{display:grid;place-items:center;width:14px;height:14px;flex:none;color:#c2bcb1}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts>b svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts>b.remaining{color:var(--accent)}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts>b.remaining svg{fill:currentColor}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-attempts>span{margin-left:4px}
body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-row:2;grid-column:1/-1;grid-template-columns:repeat(var(--note-count),minmax(0,1fr));margin:0;gap:7px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:76px;gap:0;padding:0 2px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-index{top:3px;left:4px;line-height:1}
body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:16px;line-height:22px}
.music-symbol{width:24px;height:27px;display:block;flex:none}
body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-beat{height:24px;display:flex;align-items:center;color:var(--ink)}
body:is([data-mode=daily],[data-journey-editor=true]) .slot-beat .music-symbol{width:22px;height:24px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-control{grid-row:3;grid-column:1/-1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px 4px;align-items:center;max-width:max(284px,min(680px,calc(var(--white-count) * 60px)));width:100%;margin:0 auto}
.daily-note-durations{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0;min-width:0;grid-row:1;grid-column:1/span 5}
.daily-note-durations button,.dotted-button{height:44px;min-height:44px;min-width:0;padding:4px 3px;display:flex;align-items:center;justify-content:center;gap:3px;border:1px solid #d0cbbc;border-radius:8px;background:transparent;color:var(--ink)}
.daily-note-durations small{font-size:11px;font-weight:400;color:var(--muted)}
.daily-note-durations button[aria-pressed=true],.dotted-button[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);background:var(--accent-soft);color:var(--accent)}
.daily-note-durations button:disabled,.dotted-button:disabled{opacity:.4}
.daily-rhythm-control.capturing .daily-note-durations button,.daily-rhythm-control.capturing .dotted-button{transition:none}
.daily-rhythm-control.capturing .daily-note-durations button[aria-pressed=true],.daily-rhythm-control.capturing .dotted-button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:white;-webkit-text-fill-color:currentColor;opacity:1}
.daily-rhythm-control.capturing .daily-note-durations button[aria-pressed=true] small{color:inherit}
.dotted-button{grid-row:1;grid-column:6;width:100%;font-size:28px;line-height:1}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-tools{grid-row:2;grid-column:1/-1;display:flex;justify-content:flex-start;gap:8px;width:100%;align-items:center}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-tools .tool-button{height:44px;min-height:44px;min-width:44px;width:44px;margin:0;padding:9px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-tools .tool-button svg{width:22px;height:22px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-tools .listen-button{height:44px;min-height:44px;width:118px;min-width:118px;margin:0 0 0 auto;padding:8px 10px;gap:9px;font-size:14px;grid-row:auto;grid-column:auto;flex:none}
body:is([data-mode=daily],[data-journey-editor=true]) .listen-button #listen-icon{display:flex}
body:is([data-mode=daily],[data-journey-editor=true]) .listen-button #listen-icon svg{width:18px;height:18px}
body:is([data-mode=daily],[data-journey-editor=true]) .listen-button .audio-bars{display:none}
body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{grid-row:4;grid-column:1/-1;margin:0 auto;max-width:min(680px,calc(var(--white-count) * 60px));height:auto;aspect-ratio:calc(var(--white-count) * .34)}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key{touch-action:none;user-select:none;-webkit-user-select:none}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key-label{display:flex;flex-direction:column;align-items:center;gap:5px;bottom:12px;font-size:14px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key-label small{font-size:11px;opacity:.7}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key .piano-key-label{font-size:12px;letter-spacing:0;bottom:10px}
body:is([data-mode=daily],[data-journey-editor=true]) .game .feedback{grid-row:5;grid-column:1/-1;min-height:0;margin:0;padding:0;font-size:12px}
body:is([data-mode=daily],[data-journey-editor=true]) .feedback:empty{display:none}
body:is([data-mode=daily],[data-journey-editor=true]) .storage-notice{grid-row:6;grid-column:1/-1}
@media(max-width:800px){
  body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{gap:18px 12px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game-heading #level-title{font-size:22px;letter-spacing:-.7px}
  body:is([data-mode=daily],[data-journey-editor=true]) .answer-slots{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:68px;padding:0 1px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-index{top:4px;left:5px;font-size:9px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:14px;line-height:18px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-beat{height:22px}
  body:is([data-mode=daily],[data-journey-editor=true]) .slot-beat .music-symbol{width:20px;height:22px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * 44px);margin-top:0;aspect-ratio:calc(var(--white-count) * .34)}
  body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .piano-key-label{font-size:13px;bottom:11px;gap:4px}
  body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key .piano-key-label{font-size:11px;bottom:9px}
}
@media(max-width:800px) and (max-height:700px){
  body:is([data-mode=daily],[data-journey-editor=true]) .play-panel{gap:12px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .note-slot{height:54px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .note-slot{height:52px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * 35px)}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .slot-note{font-size:13px;line-height:17px}
  body:is([data-mode=daily],[data-journey-editor=true]) .slot-beat .music-symbol{width:18px;height:21px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .slot-index{top:3px;font-size:8px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .slot-note{line-height:14px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .slot-beat{height:14px}
  body:is([data-mode=daily],[data-journey-editor=true]) .game[data-many=true] .slot-beat .music-symbol{width:15px;height:14px}
}

/* Compact Daily finish: one result, one streak, one pair of share actions. */
body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel{width:100%;max-width:390px;min-height:0;margin:auto;padding:24px;text-align:center}
.daily-finish-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;width:100%;margin-bottom:25px;text-align:left}
.daily-finish-heading>span:first-child{font-size:18px;font-weight:700;letter-spacing:-.5px;line-height:1.3}
.daily-finish-heading>span:last-child{font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-star-stage{height:52px;min-height:52px;margin:0 0 12px}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-stars{gap:7px;min-height:52px}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-star svg{width:39px;height:39px}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-star:nth-child(2) svg{width:47px;height:47px}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-star.earned{filter:none}
.daily-replay-stars{position:absolute;inset:-4px;border:0;border-radius:6px;background:transparent;padding:0}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel #finish-title{font-size:28px;line-height:1.2;letter-spacing:-1px;margin:0}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel #finish-title:focus-visible{outline:none}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-summary{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px 19px;width:100%;margin-top:11px}
body:is([data-mode=daily],[data-journey-editor=true]) .finish-copy{font-size:13px;line-height:1.4;margin:0}
.daily-streak-finish{display:flex;align-items:center;gap:5px;font-size:13px;line-height:1.4;color:var(--ink)}
.daily-streak-finish svg{width:15px;height:17px;color:#b16c23}
.daily-work{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;margin:25px 0 0;padding-top:19px;border-top:1px solid #ded8ca;text-align:center}
.daily-work strong{font-size:15px;font-weight:500;line-height:1.4}
.daily-work>span{font-size:12px;line-height:1.5;color:var(--muted)}
.daily-work .music-credits-link{display:inline-block;font-size:12px;line-height:24px;color:inherit;text-underline-offset:3px}
.daily-actions .next-level-button,.daily-actions .finish-map-button{gap:9px;min-height:46px;padding:10px 14px;border-radius:9px;font-size:14px;font-weight:600;line-height:1.35}
.daily-actions #share-daily{font-weight:700}
.daily-actions .daily-journey-button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:10px 14px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:13px;font-weight:500;line-height:1.35}
.daily-actions .finish-action-icon{display:block;width:18px;height:18px;flex:none}
.daily-actions .daily-journey-button:hover{color:var(--accent)}
@media(max-width:380px){
  body:is([data-mode=daily],[data-journey-editor=true]) .finish-panel{padding:20px 8px}
  .daily-finish-heading>span:first-child{font-size:17px}
  body:is([data-mode=daily],[data-journey-editor=true]) .finish-copy,.daily-streak-finish{font-size:12px}
  body:is([data-mode=daily],[data-journey-editor=true]) .finish-summary{gap:10px 12px}
}
/* One shared header: navigation and overflow menu aligned to the right. */
body[data-mode]:has(.layout[data-screen]) .topbar{position:relative;z-index:10;display:flex;align-items:center;justify-content:flex-start;gap:22px;width:100%;max-width:1080px;height:64px;margin:0 auto;padding:0 24px;border-bottom:1px solid #ded8ca}
body[data-mode]:has(.layout[data-screen]) .topbar .brand{font-size:27px;letter-spacing:-1.5px;flex:none}
body[data-mode]:has(.layout[data-screen]) .topbar .mode-nav{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex:none;margin:0 0 0 auto;padding:0;border:0}
.topbar .mode-nav :is(button,a){position:relative;min-height:44px;padding:0 3px;font-size:14px;line-height:1.3}
.topbar .mode-nav :is(button,a)[aria-current=page]{box-shadow:none}
.topbar .mode-nav :is(button,a)[aria-current=page]:after{content:'';position:absolute;bottom:1px;left:3px;right:3px;height:2px;background:var(--accent)}
body[data-mode]:has(.layout[data-screen]) .topbar .header-actions{position:relative;display:flex;align-items:center;gap:0;flex:none}
.header-menu-button{display:grid;place-items:center;width:44px;height:44px;padding:10px;border:0;border-radius:7px;background:transparent}
.header-menu-button svg{width:24px;height:24px}
.header-menu-button:hover,.header-menu-button[aria-expanded=true]{background:#eeeae0}
.header-menu{position:absolute;top:calc(100% + 4px);right:0;width:220px;max-width:calc(100vw - 32px);padding:7px;border:1px solid #ded8ca;border-radius:10px;background:var(--paper);box-shadow:0 7px 25px #20211e12}
.header-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:44px;padding:9px 11px;border:0;border-radius:6px;background:transparent;font-size:14px;text-align:left}
.header-menu-item:hover{background:#eeeae0}
.header-menu-item svg{width:21px;height:21px;flex:none}
.menu-help-icon{display:grid;place-items:center;width:20px;height:20px;border:1.6px solid currentColor;border-radius:50%;font-size:14px;line-height:1;font-weight:700;flex:none}
.journey-heading-actions{display:flex;align-items:center;gap:26px}
.journey-heading-actions .star-count{font-size:13px;gap:6px;white-space:nowrap}
.journey-heading-actions .star-count>span:first-child{font-size:21px}
@media(max-width:800px){
  body[data-mode]:has(.layout[data-screen]) .topbar{height:60px;padding:0 16px;gap:8px}
  body[data-mode]:has(.layout[data-screen]) .topbar .brand{font-size:22px;letter-spacing:-1.2px}
  body[data-mode]:has(.layout[data-screen]) .topbar .mode-nav{gap:8px}
  .topbar .mode-nav :is(button,a){min-width:44px;font-size:13px;padding:0 4px}
  .journey-heading{padding-bottom:20px}
  .journey-heading-actions{display:contents}
  .journey-heading-actions .star-count{position:absolute;left:0;bottom:0;font-size:11px;gap:5px}
  .journey-heading-actions .star-count>span:first-child{font-size:16px}
  .journey-heading-actions .chapter-controls{margin-left:auto}
}
@media(max-width:360px){
  body[data-mode]:has(.layout[data-screen]) .topbar{padding-inline:12px;gap:4px}
  body[data-mode]:has(.layout[data-screen]) .topbar .brand{font-size:20px}
  body[data-mode]:has(.layout[data-screen]) .topbar .mode-nav{gap:4px}
}

/* Approved wordmark: the quarter note replaces the domain dot. */
.brand{display:inline-flex;align-items:baseline;white-space:nowrap}
.brand>span:not(.brand-note){line-height:1.12}
.brand-note{position:relative;display:inline-block;flex:none;width:.255em;height:.68em;margin:0 .05em 0 .035em;color:var(--accent);letter-spacing:0;transform:translateY(.005em)}
.brand-note:before{content:'';position:absolute;left:0;bottom:0;width:.18em;height:.13em;border-radius:50%;background:currentColor;transform:rotate(-23deg)}
.brand-note:after{content:'';position:absolute;left:.132em;bottom:.055em;width:.052em;height:.615em;border-radius:.02em;background:currentColor}

/* Scale the entire Daily keyboard uniformly; shorter workspaces reserve
   enough room for the heading, answer rows and rhythm controls. */
@media(max-width:800px){
  body:is([data-mode=daily],[data-journey-editor=true]) .game{--daily-keyboard-reserve:calc(310px + var(--daily-slot-rows,3) * 71px);--daily-key-width:clamp(35px,calc((100svh - var(--daily-keyboard-reserve)) * .34),64px)}
  body:is([data-mode=daily],[data-journey-editor=true]) .game .daily-piano{max-width:calc(var(--white-count) * var(--daily-key-width));aspect-ratio:calc(var(--white-count) * .34);height:auto}
}
@media(max-width:800px) and (max-height:700px){
  body:is([data-mode=daily],[data-journey-editor=true]) .game{--daily-keyboard-reserve:calc(280px + var(--daily-slot-rows,3) * 55px)}
}

/* Balance: a full-width rhythm row, then editing on the left and Listen
   on the right. Keep touch targets usable if a short screen shrinks the piano. */
@media(max-width:800px){
  body:is([data-mode=daily],[data-journey-editor=true]) .daily-rhythm-control{max-width:max(284px,calc(var(--white-count) * var(--daily-key-width)))}
}

/* Keep press/hold and repeated taps free of native text selection and iOS callouts.
   Editable inputs and share-link text retain their normal selection behavior. */
button,button *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* Protect nearby status/title text as well as buttons from iOS selection. */
.game,.game *,.topbar,.topbar *,.mode-nav,.mode-nav *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.game input,.game textarea,.game [contenteditable]:not([contenteditable=false]),.game [contenteditable]:not([contenteditable=false]) *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* Screen headings receive navigation focus for assistive technology, not a control ring. */
#level-title:focus,#journey-title:focus,#finish-title:focus{outline:none}

/* Piano buttons touch each other: an external focus ring paints on adjacent keys. */
#piano .piano-key:focus-visible{outline:none}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-white-key:active{transform:none}

.mode-nav a{display:inline-flex;align-items:center;justify-content:center}

/* Privacy keeps the game's light typography and restrained page chrome. */
.privacy-page .privacy-header{height:64px;max-width:1080px;margin:auto;padding:0 24px;border-bottom:1px solid #ded8ca}
.privacy-header .brand{font-size:27px;letter-spacing:-1.5px}
.privacy-back{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:13px;color:var(--muted)}
.privacy-back:hover{color:var(--accent)}
.privacy-content{max-width:728px;margin:auto;padding:48px 24px 32px;overflow-wrap:anywhere}
.privacy-content h1{font-size:36px;line-height:1.2;letter-spacing:-1.3px;margin:0;font-weight:800}
.privacy-content .privacy-updated{margin:12px 0 26px;color:var(--muted);font-size:12px}
.privacy-content p{font-size:14px;line-height:1.85;margin:12px 0;color:#55564f}
.privacy-content section{margin-top:30px}
.privacy-content h2{font-size:20px;line-height:1.35;letter-spacing:-.4px;margin:0;font-weight:700}
.privacy-content a:not(.brand){color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.privacy-credits{margin-top:34px;border-top:1px solid #ded8ca;border-bottom:1px solid #ded8ca;padding:14px 0;scroll-margin-top:20px}
.privacy-credits>summary{font-size:14px;font-weight:600;line-height:1.6;min-height:44px;display:list-item;align-content:center;cursor:pointer;padding:10px 0}
.privacy-credits-content{padding-bottom:8px}
.privacy-content .privacy-credit{margin-top:20px}
.privacy-credit h3{font-size:15px;line-height:1.5;margin:0;font-weight:700}
.privacy-credit p{margin:5px 0;font-size:12px}
.privacy-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px 24px;margin-top:24px;font-size:12px}
.privacy-footer a{display:inline-flex;align-items:center;min-height:44px}
.header-menu a.header-menu-item{text-align:left}
.feedback-content{max-width:584px}
#feedback-form{display:grid;gap:8px;margin-top:24px}
#feedback-form label{font-size:14px;font-weight:700}
#feedback-form input,#feedback-form textarea{
  width:100%;min-height:44px;margin-bottom:10px;padding:10px 12px;
  border:1px solid #aaa699;border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:16px;
}
#feedback-form textarea{min-height:118px;resize:vertical}
.feedback-content .feedback-disclosure,.feedback-content .feedback-status{margin:0;font-size:13px}
.feedback-submit{
  justify-self:start;min-height:44px;margin-top:8px;padding:10px 20px;
  border:0;border-radius:8px;background:var(--accent);color:white;font:inherit;font-weight:700;
}
.feedback-submit:disabled{opacity:.6;cursor:default}
.feedback-status:not(:empty){min-height:24px}
.feedback-content .feedback-status[data-state=error]{color:#85244c}
@media(max-width:600px){
 .privacy-page .privacy-header{height:60px;padding:0 16px}
 .privacy-header .brand{font-size:24px}
 .privacy-content{padding:30px 20px 24px}
 .privacy-content h1{font-size:29px;letter-spacing:-1px}
 .privacy-content h2{font-size:18px}
 .privacy-content p{font-size:13px;line-height:1.85}
 .privacy-content .privacy-credit p{font-size:12px}
}

.privacy-content .privacy-credit-group{margin-top:22px}
.privacy-credit-group h3{font-size:14px;line-height:1.5;font-weight:700;margin:0 0 10px}
.privacy-credit-group ul{list-style:none;margin:0;padding:0}
.privacy-content .privacy-credit{margin:12px 0;font-size:13px;line-height:1.6}
.privacy-credit>span{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.privacy-licences{padding-top:16px;border-top:1px solid #ded8ca}

/* First-visit practice tour, approved light design. */

#remido-first-tour{--rm-paper:#faf7ef;--rm-ink:#20211e;--rm-muted:#6f6e66;--rm-accent:#9f3566;--rm-soft:#f0e7eb;--rm-border:#dcd6c9;font-family:Manrope,Arial,sans-serif;color:var(--rm-ink)}
#remido-first-tour *{box-sizing:border-box}#remido-first-tour [hidden]{display:none!important}#remido-first-tour button{font:inherit;color:inherit;touch-action:manipulation;user-select:none;-webkit-user-select:none}#remido-first-tour button:focus-visible{outline:3px solid var(--rm-accent);outline-offset:4px}#remido-first-tour button:not(:disabled){cursor:inherit}#remido-first-tour button svg{width:18px;height:18px;flex:none}#remido-first-tour .rm-preview{container-type:inline-size;max-width:1024px;margin:auto}#remido-first-tour .rm-stage{position:relative;isolation:isolate;min-height:680px;background:var(--rm-paper);overflow:clip}
#remido-first-tour .rm-header{height:76px;margin:0 24px;border-bottom:1px solid var(--rm-border);display:flex;align-items:center;justify-content:space-between;gap:16px}#remido-first-tour .rm-logo{display:flex;align-items:baseline;font-size:30px;font-weight:800;letter-spacing:-1.8px;white-space:nowrap}#remido-first-tour .rm-brand-note{position:relative;display:inline-block;width:12px;height:27px;margin:0 4px 0 2px}#remido-first-tour .rm-brand-note:before{content:"";position:absolute;right:0;top:0;width:2px;height:23px;background:var(--rm-accent);border-radius:2px}#remido-first-tour .rm-brand-note:after{content:"";position:absolute;right:0;bottom:2px;width:10px;height:7px;background:var(--rm-accent);border-radius:50%;transform:rotate(-20deg)}#remido-first-tour nav{display:flex;align-items:center;gap:24px;font-size:15px;font-weight:700;color:var(--rm-muted)}#remido-first-tour nav>span{padding:24px 0 19px;border-bottom:3px solid transparent}#remido-first-tour nav .rm-active{border-color:var(--rm-accent);color:var(--rm-accent)}#remido-first-tour nav>svg{width:22px;height:22px;color:var(--rm-ink)}
#remido-first-tour .rm-game{max-width:800px;padding:30px 24px 32px;margin:auto}#remido-first-tour .rm-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px}#remido-first-tour h2{font-size:25px;line-height:1.2;font-weight:700;letter-spacing:-.8px;margin:4px 0 8px}#remido-first-tour .rm-meta{font-size:13px;color:var(--rm-muted)}#remido-first-tour .rm-check-wrap{display:grid;justify-items:center;gap:9px}#remido-first-tour .rm-check{display:flex;align-items:center;justify-content:center;gap:18px;min-height:46px;min-width:138px;padding:10px 16px;background:#a9a8a2;color:var(--rm-paper);border:0;border-radius:9px;font-size:16px;font-weight:700}#remido-first-tour .rm-attempts{display:flex;align-items:center;gap:7px;color:var(--rm-muted);font-size:12px}#remido-first-tour .rm-hearts{display:flex;gap:3px;color:var(--rm-accent)}#remido-first-tour .rm-hearts svg{width:13px;height:13px;fill:currentColor}
#remido-first-tour .rm-slots{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px;margin-bottom:22px}#remido-first-tour .rm-cell{height:76px;position:relative;display:flex;align-items:center;justify-content:center;padding:5px;border:1px solid #a5a294;border-radius:9px;background:var(--rm-paper);font-size:16px;font-weight:700}#remido-first-tour .rm-cell>small{position:absolute;top:6px;left:7px;font-size:11px;color:var(--rm-muted);font-weight:400}#remido-first-tour .rm-cell[aria-pressed=true]{border-color:var(--rm-accent);box-shadow:0 0 0 2px var(--rm-accent);background:var(--rm-soft)}#remido-first-tour .rm-cell.filled{background:#eeece4}
#remido-first-tour .rm-play-area{max-width:530px;margin:auto}#remido-first-tour .rm-toolbar{display:grid;gap:12px;margin-bottom:22px}#remido-first-tour .rm-rhythm{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}#remido-first-tour .rm-rhythm>button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:45px;padding:5px 2px;border:1px solid var(--rm-border);border-radius:9px;background:var(--rm-paper);font-size:26px;font-family:Georgia,serif}#remido-first-tour .rm-rhythm small{font:12px Arial,sans-serif;color:var(--rm-muted)}#remido-first-tour .rm-rhythm button[aria-pressed=true]{border-color:var(--rm-accent);color:var(--rm-accent);background:var(--rm-soft)}#remido-first-tour .rm-tools{display:flex;align-items:center;justify-content:space-between;gap:14px}#remido-first-tour .rm-tools>div{display:flex;gap:8px}#remido-first-tour .rm-icon{display:grid;place-items:center;width:44px;height:44px;background:var(--rm-paper);border:1px solid #a5a294;border-radius:9px}#remido-first-tour .rm-listen{min-height:44px;display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 22px;border:0;border-radius:9px;background:var(--rm-accent);color:var(--rm-paper);font-size:16px;font-weight:700}
#remido-first-tour .rm-piano{display:flex;position:relative;aspect-ratio:2.2;border:2px solid var(--rm-ink);border-radius:10px;overflow:clip;background:var(--rm-paper)}#remido-first-tour .rm-piano button{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;border:0;font-size:17px;gap:3px;touch-action:none}#remido-first-tour .rm-piano small{font-size:12px;opacity:.7}#remido-first-tour .rm-white{width:calc(100% / 6);padding:0 0 15px;background:var(--rm-paper);border-right:1.5px solid var(--rm-ink)!important}#remido-first-tour .rm-white:nth-child(6){border-right:0!important}#remido-first-tour .rm-black{position:absolute;left:calc(var(--key) * 100% / 6);transform:translateX(-50%);width:8%;height:61%;padding:0 0 13px;background:var(--rm-ink);color:var(--rm-paper);border-radius:0 0 5px 5px;font-size:12px!important;z-index:1}#remido-first-tour .rm-piano .sounding{background:var(--rm-accent);color:var(--rm-paper)}#remido-first-tour .rm-status{min-height:20px;margin-top:16px;color:var(--rm-muted);text-align:center;font-size:12px}#remido-first-tour .rm-restart{display:block;margin:8px auto 0;border:0;background:transparent;color:var(--rm-accent);min-height:44px;padding:8px 16px;font-size:13px}
#remido-first-tour .rm-veil{position:absolute;inset:0;z-index:3;background:rgba(32,33,30,.30);pointer-events:none}#remido-first-tour .rm-target{position:relative;z-index:4;outline:3px solid var(--rm-accent);outline-offset:6px;border-radius:9px}#remido-first-tour .rm-coach{position:absolute;z-index:5;width:min(320px,calc(100% - 32px));padding:18px;background:var(--rm-paper);border:1px solid var(--rm-border);border-radius:13px;box-shadow:0 10px 35px rgba(32,33,30,.12)}#remido-first-tour .rm-coach-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}#remido-first-tour .rm-step{font-size:12px;color:var(--rm-muted);letter-spacing:.3px}#remido-first-tour .rm-skip,#remido-first-tour .rm-back{border:0;background:transparent;color:var(--rm-muted);font-size:12px;min-height:44px;padding:4px 2px}#remido-first-tour .rm-back:disabled{opacity:.35}#remido-first-tour .rm-coach h3{font-size:20px;font-weight:700;letter-spacing:-.5px;margin:0 0 8px;line-height:1.2}#remido-first-tour .rm-coach p{font-size:14px;line-height:1.5;margin:0;color:#5f5e58;max-width:31ch}#remido-first-tour .rm-coach-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px}#remido-first-tour .rm-next{display:flex;align-items:center;gap:10px;background:var(--rm-accent);color:var(--rm-paper);border:0;border-radius:8px;min-height:44px;padding:9px 14px;font-size:14px;font-weight:700}
@container(max-width:600px){#remido-first-tour .rm-stage{min-height:700px}#remido-first-tour .rm-header{height:62px;margin:0 16px;gap:12px}#remido-first-tour .rm-logo{font-size:26px}#remido-first-tour nav{gap:18px;font-size:13px}#remido-first-tour nav>span{padding:18px 0 17px}#remido-first-tour .rm-game{padding:22px 16px 24px}#remido-first-tour h2{font-size:21px}#remido-first-tour .rm-heading{margin-bottom:26px;gap:10px}#remido-first-tour .rm-check{min-width:112px;font-size:15px;gap:12px}#remido-first-tour .rm-slots{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:20px}#remido-first-tour .rm-cell{height:62px;font-size:15px}#remido-first-tour .rm-cell>small{left:5px;font-size:11px}#remido-first-tour .rm-play-area{max-width:440px}#remido-first-tour .rm-piano{aspect-ratio:2.1}#remido-first-tour .rm-coach{padding:17px}#remido-first-tour .rm-rhythm>button{gap:5px;font-size:24px}#remido-first-tour .rm-rhythm small{font-size:11px}}
@container(max-width:350px){#remido-first-tour nav{gap:12px;font-size:12px}#remido-first-tour .rm-logo{font-size:23px}#remido-first-tour .rm-heading h2{font-size:19px}#remido-first-tour .rm-check{min-width:103px}#remido-first-tour .rm-attempts{font-size:11px;gap:5px}#remido-first-tour .rm-rhythm>button{gap:3px}}
#remido-first-tour .rm-note{display:inline-block;position:relative;width:20px;height:30px;flex:none}#remido-first-tour .rm-note:before{content:"";position:absolute;left:2px;bottom:3px;width:11px;height:8px;border-radius:50%;background:currentColor;transform:rotate(-18deg)}#remido-first-tour .rm-note:after{content:"";position:absolute;left:12px;top:1px;width:2px;height:24px;background:currentColor}#remido-first-tour .rm-note-eighth b:before,#remido-first-tour .rm-note-sixteenth b:before,#remido-first-tour .rm-note-sixteenth b:after{content:"";position:absolute;left:12px;top:2px;width:8px;height:10px;border-right:2px solid currentColor;border-top:2px solid currentColor;border-radius:0 9px 0 0;transform:skewY(25deg)}#remido-first-tour .rm-note-sixteenth b:after{top:9px}#remido-first-tour .rm-note-half:before,#remido-first-tour .rm-note-whole:before{background:transparent;border:2px solid currentColor}#remido-first-tour .rm-note-whole:before{width:16px;height:9px;left:2px;bottom:7px;transform:rotate(-10deg)}#remido-first-tour .rm-note-whole:after{display:none}

html.tour-open{overflow:hidden}
dialog.onboarding-tour{position:fixed;inset:0;max-width:none;max-height:none;width:100%;height:100%;height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:var(--paper);color:var(--ink);font:inherit;overflow:auto;overscroll-behavior:contain}
dialog.onboarding-tour::backdrop{background:var(--paper);backdrop-filter:none}
#remido-first-tour{height:100%;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#remido-first-tour .rm-preview{max-width:1280px;min-height:100%;height:auto}
#remido-first-tour .rm-stage{min-height:100dvh;overflow:visible}
#remido-first-tour .rm-coach{position:fixed;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
#remido-first-tour .rm-logo{font-size:30px}
#remido-first-tour .rm-header nav>svg{width:22px;height:22px;color:var(--rm-ink)}
#remido-first-tour .rm-cell{flex-direction:column;gap:4px}
#remido-first-tour .tour-slot-duration svg{width:20px;height:23px;display:block;fill:currentColor;stroke:none}
#remido-first-tour .rm-rhythm>button>svg{width:23px;height:29px;fill:currentColor;stroke:none;flex:none}
#remido-first-tour .rm-listen{min-width:127px}
#remido-first-tour .rm-check{margin:0}
#remido-first-tour .rm-check.ready{background:var(--rm-accent)}
#remido-first-tour .rm-coach p{font-size:14px;line-height:1.5}
#remido-first-tour .rm-coach .rm-step{line-height:1.4}
#remido-first-tour .rm-target{scroll-margin:20px}
#remido-first-tour button:not(:disabled){cursor:pointer}
#remido-first-tour .rm-back:disabled{cursor:default}
#remido-first-tour .rm-check-wrap{background:var(--rm-paper);border-radius:9px}
@media(max-height:500px) and (min-width:700px){#remido-first-tour .rm-play-area{max-width:400px;margin-left:0;margin-right:auto}#remido-first-tour .rm-stage{padding-bottom:24px}}
@media(max-width:600px){#remido-first-tour .rm-header{height:62px}#remido-first-tour .rm-logo{font-size:26px}}


/* New UTC Daily: preserve the open puzzle until its explicit invitation is used. */
.new-daily-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:14px;background:#f1e7ec;border:1px solid #ddc4d0;border-radius:10px;text-align:left}
.new-daily-banner>strong{font-size:14px;line-height:1.45;font-weight:600;color:var(--ink)}
.new-daily-banner>button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;border:0;border-radius:7px;background:var(--accent);color:var(--paper);font-size:12px;font-weight:700;white-space:nowrap}
.new-daily-banner>button:hover:not(:disabled){background:var(--accent-hover)}
.new-daily-banner>button:disabled{opacity:.5;cursor:default}
.new-daily-banner>button svg{width:15px;height:15px;flex:none}
body:is([data-mode=daily],[data-journey-editor=true]) #play-panel>.new-daily-banner{grid-row:2;grid-column:1/-1}
body:is([data-mode=daily],[data-journey-editor=true]) .game.has-new-daily .answer-slots{grid-row:3}
body:is([data-mode=daily],[data-journey-editor=true]) .game.has-new-daily .daily-rhythm-control{grid-row:4}
body:is([data-mode=daily],[data-journey-editor=true]) .game.has-new-daily .daily-piano{grid-row:5}
body:is([data-mode=daily],[data-journey-editor=true]) .game.has-new-daily .feedback{grid-row:6}
body:is([data-mode=daily],[data-journey-editor=true]) .game.has-new-daily .storage-notice{grid-row:7}
#finish-panel>.new-daily-banner{flex:none;margin:0 0 22px}
@media(max-width:800px){.new-daily-banner{grid-template-columns:1fr;gap:10px;padding:13px}.new-daily-banner>button{justify-content:space-between;font-size:13px}}

/* Journey v3: 30 chapters in three sections, one ten-level path at a time. */
body[data-mode=journey] .star-count{display:flex}
.journey-heading-actions{flex-wrap:wrap;justify-content:flex-end}
.journey-section-label select{max-width:190px;height:40px;padding:6px 28px 6px 11px;background:var(--paper);color:var(--ink);border:1px solid var(--line,#ccc7bb);border-radius:7px;font:inherit;font-size:13px}
.journey .chapter-controls>span{min-width:110px;text-align:center;white-space:nowrap;font-size:13px}
.journey .chapter-controls button{display:grid;place-items:center}
.journey .chapter-controls svg{width:20px;height:20px}
.journey-chapter-map .chapter-art{height:135px;margin-bottom:7px}
.journey-chapter-map .chapter-heading{max-width:700px;margin:0 auto 12px;justify-content:center;align-items:center}
.journey-chapter-map .chapter-heading h2{font-size:clamp(24px,3vw,34px);max-width:520px}
.journey-chapter-map .chapter-heading p{margin:6px 0 0;font-size:13px;color:var(--muted)}
.chapter-tines .terrain{background:#e2d2b6}
.chapter-listen{display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;margin:0 auto;padding:8px 16px;border:1px solid var(--ink);border-radius:8px;background:transparent;font-size:13px}
.chapter-listen svg{width:18px;height:18px}
.chapter-listen:disabled{opacity:.35}
.chapter-listen:not(:disabled):hover{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.journey-chapter-map .chapter-route{height:clamp(160px,27vh,230px);margin-top:4px}
body[data-mode=journey] .game:not([hidden]){display:block!important}
body[data-mode=journey] .play-panel>.back-button{grid-row:1;grid-column:1/-1;width:fit-content;margin:0;font-size:13px;min-height:24px}
body[data-mode=journey] .play-panel>.game-heading{grid-row:2}
body[data-mode=journey] .daily-check-controls{grid-row:2}
body[data-mode=journey] .answer-slots{grid-row:3;grid-template-columns:repeat(var(--slot-columns,6),minmax(0,1fr));max-width:calc(var(--slot-columns,6) * 82px);width:100%;margin-inline:auto}
body[data-mode=journey] .daily-rhythm-control{grid-row:4;max-width:680px}
body[data-mode=journey] .daily-piano{grid-row:5}
body[data-mode=journey] .feedback{grid-row:6}
body[data-mode=journey] .storage-notice{grid-row:7}
body[data-mode=journey] .daily-meta{max-width:500px}
.auto-rhythm .daily-rhythm-tools{grid-row:1!important}
body[data-mode=journey] .daily-rhythm-tools .hint-button{font-size:0;min-width:44px;width:44px;height:44px;padding:9px;margin:0;display:flex;align-items:center;justify-content:center}
body[data-mode=journey] .daily-rhythm-tools .hint-button svg{width:22px;height:22px}
.chapter-reward{display:flex;flex-direction:column;gap:6px;width:100%;border-top:1px solid #ddd6c8;margin:18px 0;padding:18px 0 0}
.chapter-reward>strong{font-size:18px}.chapter-reward>span{font-size:13px;color:var(--muted)}
.chapter-reward .chapter-listen{margin-top:8px}
.journey-guide{position:fixed;inset:auto;margin:0;width:min(330px,calc(100vw - 24px));max-height:calc(100svh - 24px);overflow:auto;padding:20px;border:1px solid #d7cfc2;border-radius:13px;background:var(--paper);color:var(--ink);box-shadow:0 12px 45px #2222}
.journey-guide::backdrop{background:#24231f25}
.journey-guide-target{outline:3px solid var(--accent);outline-offset:5px;border-radius:6px}
.journey-lesson-top{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-bottom:10px}
.journey-lesson-top button{border:0;background:none;color:var(--muted);font-size:12px;padding:4px}
.journey-guide h2{font-size:20px;letter-spacing:-.5px;margin:0 0 10px}.journey-guide p{font-size:14px;line-height:1.55;margin:0 0 16px}
.journey-lesson-actions{display:flex;gap:10px;justify-content:space-between}.journey-lesson-actions button{border:0;background:none;font-size:13px;padding:10px 12px}.journey-lesson-actions [data-lesson-next]{background:var(--accent);color:white;border-radius:6px;min-width:90px}
@media(max-width:800px){
 .journey-heading{gap:12px}.journey-heading-actions{width:100%;justify-content:space-between;gap:10px}.journey-heading .star-count{font-size:14px;gap:7px}.journey-heading .star-count>span:first-child{font-size:22px}
 .journey-section-label select{max-width:155px;font-size:12px;padding-left:7px}.journey .chapter-controls>span{min-width:83px;font-size:11px}.journey .chapter-controls button{width:32px;height:32px}
 .journey-chapter-map .chapter-art{height:110px;margin:0 auto 7px}.journey-chapter-map .chapter-heading{gap:12px}.journey-chapter-map .chapter-heading h2{font-size:25px}.journey-chapter-map .chapter-range{font-size:11px;white-space:nowrap}
 .journey-chapter-map .chapter-route{height:175px}
 body[data-mode=journey] .answer-slots{grid-template-columns:repeat(var(--mobile-slot-columns,6),minmax(0,1fr));max-width:none}
 body[data-mode=journey] .game .note-slot{height:54px}
 body[data-mode=journey] .daily-rhythm-control{max-width:100%}
 body[data-mode=journey] .play-panel{row-gap:12px}
 body[data-mode=journey] .daily-meta{font-size:11px;line-height:1.4}
 body[data-mode=journey] .game .daily-piano{max-width:calc(var(--white-count) * 40px)}
}
@media(max-width:380px){.journey-heading-actions .star-count{display:none}.journey-chapter-map .chapter-heading{display:block;text-align:center}.journey-chapter-map .chapter-range{display:block;margin-top:6px}.journey-chapter-map .chapter-art{height:90px}.journey-chapter-map .chapter-route{height:165px}}
/* Explicit Journey rows keep the shared Daily keyboard rule from overlapping rhythm controls. */
body[data-mode=journey] #play-panel>.daily-piano{grid-row:5}
body[data-mode=journey] #play-panel>.feedback{grid-row:6}
body[data-mode=journey] #play-panel>.storage-notice{grid-row:7}
@media(max-width:800px){body[data-mode=journey] .game .daily-piano{max-width:100%}}

body[data-mode=journey] .daily-note-durations{max-width:calc(var(--duration-count,5) * 70px);width:100%;justify-self:start}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.journey-heading-actions{display:flex;align-items:center;gap:18px;margin-left:auto}
.journey-chapter-map .chapter-heading>div{min-width:0}
.journey-chapter-map .chapter-heading h2{overflow-wrap:anywhere}
@media(max-width:800px){
 .journey-heading{display:grid;grid-template-columns:1fr auto;gap:16px}
 .journey-heading-actions{display:contents}
 .journey-heading-actions .star-count{grid-row:1;grid-column:2}
 .journey-section-label{grid-row:2;grid-column:1}
 .journey-heading .chapter-controls{grid-row:2;grid-column:2;margin:0;gap:5px}
 .journey-section-label select{max-width:150px}
 .journey-chapter-map .chapter-heading{display:block;text-align:center}
 .journey-chapter-map .chapter-heading h2{font-size:25px}
 .journey-chapter-map .chapter-range{display:block;margin-top:7px}
}
@media(max-width:350px){.journey-heading .chapter-controls>span{min-width:65px;font-size:10px}.journey-heading .chapter-controls button{width:26px;height:30px}.journey-section-label select{max-width:135px}}
@media(max-width:800px){.journey-heading{padding-bottom:0}.journey-heading-actions .star-count{position:static;align-self:center}}
body[data-mode=journey] .daily-rhythm-control{grid-template-columns:minmax(0,calc(var(--duration-count,5) * 58px)) 44px minmax(0,1fr)}
body[data-mode=journey] .daily-note-durations{grid-column:1;max-width:none;width:100%}
body[data-mode=journey] .dotted-button{grid-column:2;width:44px}
@media(min-width:801px){
 body[data-mode=journey] .play-panel{row-gap:14px}
 body[data-mode=journey] .game[data-many=true] .note-slot{height:62px}
}
@media(min-width:801px) and (max-height:640px){
 body[data-mode=journey] .play-panel{row-gap:10px}
 body[data-mode=journey] .game[data-many=true] .note-slot{height:52px}
 body[data-mode=journey] .game .daily-piano{max-width:calc(var(--white-count) * 44px)}
}
/* Lesson controls remain sharp and legible inside the guide's modal layer. */
.journey-guide::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:#24231f25}
.journey-lesson-preview{margin:0 0 18px;padding:12px;border:1px solid #ded8ca;border-radius:9px;background:var(--paper)}
.lesson-rhythm-example{display:flex;justify-content:center;gap:5px}
.lesson-duration-example{display:flex;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0;height:43px;border:1px solid #c9c2b5;border-radius:6px;color:var(--ink);background:var(--paper)}
.lesson-duration-example .music-symbol{height:29px;width:26px;flex:none}
.lesson-duration-example small{font-size:11px;color:var(--muted)}
.lesson-dot-example{max-width:35px;font-size:25px;color:var(--accent)}
.lesson-keyboard-example{position:relative;height:112px;overflow:hidden;border:1.5px solid var(--ink);border-radius:7px}
.lesson-key-example{position:absolute;top:0;display:flex;align-items:flex-end;justify-content:center;padding-bottom:9px}
.lesson-white-example{left:calc(var(--lesson-position) / var(--lesson-whites) * 100%);width:calc(100% / var(--lesson-whites));height:100%;border-right:1px solid var(--ink);background:var(--paper);color:var(--ink);font-size:11px}
.lesson-black-example{left:calc(var(--lesson-position) / var(--lesson-whites) * 100%);transform:translateX(-50%);width:calc(65% / var(--lesson-whites));height:62%;z-index:1;border-radius:0 0 3px 3px;background:var(--ink);color:white;box-shadow:inset 0 -3px var(--accent);font-size:9px;padding-bottom:8px}
body:is([data-mode=daily],[data-journey-editor=true]) .daily-piano .daily-black-key[data-available=false]{background:#aaa79f;color:#eae7dd;box-shadow:none;cursor:default}
@media(max-width:360px){.journey-guide{padding:16px}.journey-lesson-preview{padding:9px}.lesson-duration-example .music-symbol{width:21px}.lesson-duration-example{gap:1px}.lesson-duration-example small{font-size:10px}}

/* Desktop Journey: one compact row through 20 notes, two balanced rows after. */
@media(min-width:801px){
 body[data-mode=journey] .game .answer-slots{
  grid-template-columns:repeat(var(--slot-columns),minmax(0,1fr));
  max-width:min(100%,calc(var(--slot-columns) * 52px));gap:4px;min-height:62px;
 }
 body[data-mode=journey] .game .note-slot{height:62px;padding:0 1px;gap:0;border-radius:7px}
 body[data-mode=journey] .game .slot-index{top:2px;left:4px;font-size:9px;line-height:1}
 body[data-mode=journey] .game .slot-note{font-size:clamp(10px,calc(300px / var(--slot-columns)),15px);line-height:18px;white-space:nowrap}
 body[data-mode=journey] .game .slot-beat{height:22px;width:100%;justify-content:center}
 body[data-mode=journey] .game .slot-beat .music-symbol{width:min(20px,100%);height:22px}
 body[data-mode=journey] .game .slot-result{top:3px;right:3px;font-size:10px}
}
@media(min-width:801px) and (max-width:1100px){
 body[data-mode=journey] .game .answer-slots{gap:3px}
}

/* Desktop: centered rhythm above the keys, with a two-row toolbar at right. */
@media(min-width:801px){
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-control{
  grid-template-columns:minmax(0,1fr) 148px;grid-template-rows:auto;
  gap:0 12px;align-items:end;max-width:none;width:100%;min-height:96px;
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-note-durations{
  grid-column:1/-1;grid-row:1;justify-self:center;align-self:start;
  width:calc(var(--duration-count,5) * 58px);max-width:100%;margin:0 48px 0 0;
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #dotted-button{
  grid-column:1/-1;grid-row:1;justify-self:center;align-self:start;width:44px;
  margin:0 0 0 calc(var(--duration-count,5) * 58px + 4px);
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-control:has(#dotted-button[hidden]) #daily-note-durations{margin-right:0}
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-tools{
  grid-column:2;grid-row:1;align-self:start;display:grid;
  grid-template-columns:repeat(3,44px);grid-template-rows:44px 44px;
  gap:8px;width:148px;align-items:center;justify-content:end;
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-tools #listen-button{
  grid-column:1/-1;grid-row:1;justify-self:center;width:148px;min-width:148px;margin:0;
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-tools #play-answer{grid-column:1;grid-row:2}
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-tools #undo-button{grid-column:2;grid-row:2}
 body:is([data-mode=daily],[data-journey-editor=true]) #daily-rhythm-tools #hint-button{grid-column:3;grid-row:2}
 body[data-mode=daily] #daily-rhythm-tools{grid-template-columns:repeat(2,44px);justify-content:center}
 body:is([data-mode=daily],[data-journey-editor=true]) .game{--desktop-keyboard-room:calc(100svh - 390px)}
 body:is([data-mode=daily],[data-journey-editor=true]) .game:has(.note-slot:nth-child(21)){--desktop-keyboard-room:calc(100svh - 465px)}
 body:is([data-mode=daily],[data-journey-editor=true]) #piano.daily-piano{
  max-width:min(calc(100% - 320px),760px,calc(var(--white-count) * 76px),calc(max(115px,var(--desktop-keyboard-room)) * var(--white-count) * .34));
  margin-top:-52px;
  height:auto;aspect-ratio:calc(var(--white-count) * .34);
 }
 body:is([data-mode=daily],[data-journey-editor=true]) #piano .piano-key-label{font-size:16px;bottom:14px}
 body:is([data-mode=daily],[data-journey-editor=true]) #piano .piano-key-label small{font-size:12px}
 body:is([data-mode=daily],[data-journey-editor=true]) #piano .daily-black-key .piano-key-label{font-size:13px;bottom:12px}
}


/* Approved compact Journey map: ten levels within the first screen. */
.layout[data-screen=map]{max-width:900px;min-height:0;padding:22px 40px 24px}
.layout[data-screen=map] .journey-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:20px;padding:0}
.journey-sections{display:flex;gap:3px;padding:3px;min-width:0;background:#eeeae0;border-radius:9px}
.journey-sections button{min-height:36px;padding:7px 17px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.journey-sections button[aria-pressed=true]{background:var(--paper);color:var(--ink);box-shadow:0 1px 3px #20211e12}
.layout[data-screen=map] .journey .star-count{position:static;display:flex;gap:6px;font-size:12px;color:var(--muted);font-weight:600;align-items:center}
.layout[data-screen=map] .journey .star-count>svg{width:17px;height:17px;flex:none;color:var(--ink)}
.layout[data-screen=map] .journey .star-count strong{color:var(--ink);font-weight:700}
.layout[data-screen=map] #completion{min-height:0;margin:8px 0 0;padding:0;background:transparent;gap:8px;border:0;font-size:12px;line-height:20px}
.layout[data-screen=map] #completion .completion-stars{font-size:14px;line-height:20px}
.layout[data-screen=map] #completion strong{width:auto;font-size:12px;line-height:20px;font-weight:500}
#map.journey-chapter-map{display:block;min-height:0;height:auto;max-height:none;aspect-ratio:auto;max-width:none;flex:none;margin:24px 0 0;overflow:visible}
#map .chapter{display:block;max-width:none;width:100%;padding:0;border:0}
#map .chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:82px;max-width:none;margin:0;text-align:left}
#map .journey-chapter-copy{min-width:0;flex:1}
#map .journey-chapter-meta{color:var(--muted);font-size:11px;line-height:1.4;letter-spacing:.7px;text-transform:uppercase;margin:0 0 5px}
#map .chapter-heading h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:none;font-family:Manrope,Arial,sans-serif;font-size:28px;line-height:1.18;font-weight:800;letter-spacing:-1px;margin:0;overflow-wrap:anywhere}
#map .chapter-heading p{font-size:13px;line-height:1.4;color:var(--muted);margin:7px 0 0}
#map .chapter-controls{display:flex;align-items:center;flex:none;gap:8px;margin:0}
#map .chapter-controls button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:10px;border:1px solid #d8d2c6;border-radius:50%;background:transparent;font-size:14px}
#map .chapter-controls button:hover:not(:disabled){color:var(--ink);background:#eeeae0}
#map .chapter-controls svg{width:20px;height:20px;display:block}
#map .chapter-route{height:224px;min-height:0;width:100%;max-width:none;margin:8px 0 0}
#map .chapter-path path{stroke:#d8d0c1;stroke-width:2;stroke-dasharray:none;stroke-linecap:butt}
#map .map-node{
  --node-size:60px;
  width:var(--node-size);height:var(--node-size);min-height:var(--node-size);padding:0;
  border:1px solid #c1b9ab;background:var(--paper);color:var(--ink);font-size:19px;font-weight:700;
  box-shadow:0 0 0 4px var(--paper);
}
#map .map-node.complete{color:var(--paper);background:var(--ink);border-color:var(--ink)}
#map .map-node[data-unlocked=false]{background:#eeebe2;border-color:transparent;color:#837d70}
#map .map-node.current{
  color:var(--paper);background:var(--accent);border-color:var(--accent);
  box-shadow:0 0 0 4px var(--paper),0 0 0 6px color-mix(in srgb,var(--accent) 32%,var(--paper));
}
#map .map-node:focus-visible{outline:2px solid var(--accent);outline-offset:7px}
#map .node-caption,#map .node-stars{
  position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);
  color:var(--muted);font-size:13px;line-height:1.25;font-weight:600;white-space:nowrap;pointer-events:none;
}
#map .node-stars{display:flex;align-items:center;gap:1px;color:var(--reward-gold);text-shadow:none}
#map .node-stars svg{display:block;width:11px;height:11px;fill:currentColor;stroke:currentColor}
#map .node-lock{position:static;width:auto;height:auto;border:0;border-radius:0;background:transparent;transform:none}
#map .node-lock svg{display:block;width:18px;height:21px;fill:none;stroke:currentColor;stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round}
.journey-map-actions{display:flex;align-items:center;justify-content:space-between;gap:18px}
#map .chapter-listen{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 0;margin:0;border:0;border-radius:0;background:transparent;font-size:13px;color:var(--muted)}
#map .chapter-listen:disabled{opacity:1;cursor:default}
#map .chapter-listen:hover:not(:disabled){color:var(--accent);background:transparent}
#map .chapter-listen svg{width:16px;height:16px;display:block;flex:none}
#map .chapter-listen svg path{stroke:currentColor;stroke-width:1.5;fill:none}
#map .journey-play{display:flex;align-items:center;justify-content:center;gap:11px;width:204px;min-width:0;min-height:48px;height:48px;padding:10px 20px;border:0;border-radius:9px;background:var(--accent);color:var(--paper);font-size:15px;font-weight:700;white-space:nowrap}
#map .journey-play svg{width:18px;height:18px;display:block;flex:none}
#map .journey-play:hover:not(:disabled){background:var(--accent-hover)}
#map .journey-play:disabled{background:#aaa9a5;cursor:default}
@media(max-width:800px){
 .layout[data-screen=map]{max-width:560px;padding:16px 18px 12px}
 .layout[data-screen=map] .journey-heading{gap:10px}
 .journey-sections{flex:1;justify-content:space-between}
 .journey-sections button{flex:1;min-height:44px;padding:7px 10px;font-size:12px}
 .layout[data-screen=map] .journey .star-count{gap:4px;font-size:12px}
 .layout[data-screen=map] .journey .star-count>svg{width:15px;height:15px}
 .journey-star-max{display:none}
 #map.journey-chapter-map{margin-top:16px;overflow:visible}
 #map .chapter-heading{gap:12px;min-height:82px}
 #map .chapter-heading h2{font-size:23px;letter-spacing:-.8px}
 #map .chapter-heading p{font-size:12px;margin-top:6px}
 #map .journey-chapter-meta{letter-spacing:.4px}
 #map .chapter-controls{gap:4px}
 #map .chapter-route{height:176px}
 #map .map-node{--node-size:44px;font-size:15px}
 #map .node-caption{font-size:11px}
 #map .node-lock svg{width:15px;height:17px}
 .journey-map-actions{flex-direction:column-reverse;gap:4px}
 #map .journey-play{width:100%}
 #map .chapter-listen{width:100%}
}
@media(max-width:350px){
 .layout[data-screen=map]{padding-inline:12px}
 .journey-sections button{padding-inline:7px;font-size:11px}
}
@media(max-height:640px){
 .layout[data-screen=map]{padding-top:12px;padding-bottom:10px}
 #map.journey-chapter-map{margin-top:12px}
 #map .chapter-route{height:216px;margin-top:6px}
 #map .chapter-heading{min-height:72px}
}
@media(max-width:800px) and (max-height:640px){
 body[data-mode=journey]:has(.layout[data-screen=map]) .topbar{height:52px}
 #map .chapter-route{height:152px}
 #map .chapter-heading h2{font-size:21px}
 #map .chapter-heading p{margin-top:5px}
 #map .journey-chapter-meta{font-size:10px;letter-spacing:.25px}
 .journey-map-actions{flex-direction:row;gap:12px}
 #map .chapter-listen{width:auto;flex:none;font-size:12px}
 #map .journey-play{flex:1;min-height:44px;height:44px;padding-inline:12px;font-size:14px}
}
#map .chapter-listen svg path[fill=currentColor]{fill:currentColor;stroke:none}
.layout[data-screen=map] #completion .continue-button{width:auto;min-height:44px;margin-left:auto;padding:8px 12px;font-size:12px;white-space:nowrap}

/* Game identity and per-mode rules. The question mark is an icon-only action. */
.mode-title-row{display:flex;align-items:center;gap:8px;min-width:0}
.mode-title-row h1{margin:0;min-width:0;line-height:1.2;letter-spacing:-.7px;font-weight:800;text-transform:none;color:var(--ink)}
.mode-info-button{position:relative;display:grid;place-items:center;flex:none;width:32px;height:36px;min-height:36px;padding:4px;border:0;border-radius:50%;background:transparent;color:var(--muted)}
.mode-info-button:before{content:'';position:absolute;inset:-4px -6px}
.mode-info-button svg{display:block;width:24px;height:24px;pointer-events:none}
.mode-info-button:hover{color:var(--accent)}
body:is([data-mode=daily],[data-journey-editor=true]) .game-heading #level-title{margin:0;font-size:25px;line-height:1.2;letter-spacing:-.7px;text-transform:none;white-space:nowrap}
.journey-mode-title{margin-bottom:14px}
.journey-mode-title #journey-title{font-size:25px;line-height:1.2;margin:0}
#map .chapter-heading{min-height:44px}
#map .journey-chapter-meta{margin:0}
.daily-finish-heading{display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex-wrap:nowrap;margin-bottom:22px}
.daily-finish-heading h1{font-size:20px;letter-spacing:-.6px}
.daily-finish-heading>span:last-child{display:block}
.mode-info-dialog{width:min(560px,calc(100% - 32px));max-width:none;max-height:min(760px,calc(100svh - 32px));margin:auto;padding:0;border:1px solid #d8d2c6;border-radius:14px;background:var(--paper);color:var(--ink);overflow:hidden}
.mode-info-dialog[open]{display:flex;flex-direction:column}
.mode-info-dialog::backdrop{background:#20211e40;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.mode-info-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding:18px 20px 10px 24px}
.mode-info-header #mode-info-title{font-size:24px;font-weight:800;line-height:1.25;letter-spacing:-.8px;margin:0}
.mode-info-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:11px;border:0;border-radius:50%;background:transparent;color:var(--muted)}
.mode-info-close svg{width:22px;height:22px;display:block}
.mode-info-close:hover{background:#eeeae0;color:var(--ink)}
.mode-info-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 24px 8px;text-align:left;scrollbar-width:thin;font-size:14px;line-height:1.55}
.mode-info-body :is(p,li,dd){font-size:inherit;line-height:inherit;color:#706c60}
.mode-info-body p{margin:0 0 12px}
.mode-info-body .mode-info-intro{font-size:15px;line-height:1.55;margin:0 0 14px}
.mode-info-body strong{font-weight:700}
.mode-info-body .mode-info-callout{background:var(--accent-soft);border-radius:8px;padding:9px 12px}
.mode-info-steps{margin:14px 0;padding-inline-start:1.45em}
.mode-info-steps li{padding-inline-start:.25em}
.mode-info-steps li + li{margin-top:8px}
.mode-info-steps li::marker{color:var(--accent);font-weight:700}
.mode-info-milestones{margin:14px 0;border-bottom:1px solid #e4dfd3}
.mode-info-milestones > div{display:grid;grid-template-columns:7.75rem 1fr;gap:4px 12px;padding:8px 0;border-top:1px solid #e4dfd3}
.mode-info-milestones dt{font-weight:700}
.mode-info-milestones dd{margin:0}
.mode-info-body .mode-info-note{color:var(--muted);font-size:13px;margin:14px 0 8px}
.mode-info-footer{display:flex;justify-content:flex-end;flex:none;padding:14px 24px;border-top:1px solid #e4dfd3;background:var(--paper)}
.mode-info-footer button{min-height:44px;min-width:120px;padding:10px 24px;border:0;border-radius:8px;background:var(--accent);color:var(--paper);font-size:14px;font-weight:700}
.mode-info-footer button:hover{background:var(--accent-hover)}
body:has(#mode-info-dialog[open]){overflow:hidden}
@media(max-width:800px){
 body:is([data-mode=daily],[data-journey-editor=true]) .game-heading #level-title{font-size:clamp(17px,4.9vw,22px);letter-spacing:-.5px}
 .mode-title-row{gap:6px}
 .journey-mode-title{margin-bottom:12px}
 .journey-mode-title #journey-title{font-size:23px}
 .daily-finish-heading h1{font-size:20px}
 .mode-info-dialog{width:calc(100% - 24px);max-height:calc(100svh - 24px);border-radius:12px}
 .mode-info-header{padding:12px 12px 8px 18px}
 .mode-info-header #mode-info-title{font-size:22px}
 .mode-info-body{padding:0 18px 4px}
 .mode-info-milestones > div{grid-template-columns:6.25rem 1fr}
 .mode-info-footer{padding:12px 18px}
 .mode-info-footer button{width:100%}
}
@media(max-height:640px){
 .journey-mode-title{margin-bottom:10px}
 #map .chapter-heading{min-height:44px}
 .mode-info-header{padding-top:8px;padding-bottom:4px}
 .mode-info-body .mode-info-intro{margin-bottom:16px}
}

/* Journey toolbar: stars, custom instrument picker, then chapter navigation. */
.layout[data-screen=map] .journey-heading{display:grid;grid-template-columns:auto minmax(180px,260px) minmax(210px,1fr);gap:18px;align-items:center}
.layout[data-screen=map] .journey .star-count{gap:7px;font-size:16px;color:var(--ink);font-weight:700}
.layout[data-screen=map] .journey .star-count>svg{width:24px;height:24px}
.layout[data-screen=map] .journey-star-max{display:inline}
.journey-section-picker{display:block;position:relative;min-width:0;width:100%}
.journey-section-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;max-width:none;height:44px;padding:9px 12px 9px 14px;border:1px solid #cbc5b8;border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;font-size:15px;line-height:1.3;text-align:left;white-space:nowrap}
.journey-section-trigger:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.journey-section-trigger>svg{display:block;flex:none;width:18px;height:18px;pointer-events:none;transition:transform .15s}
.journey-section-trigger[aria-expanded=true]>svg{transform:rotate(180deg)}
.layout[data-screen=map] .journey-heading .chapter-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:260px;min-width:0;justify-self:end;margin:0}
.layout[data-screen=map] .journey-heading .chapter-controls button{display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:10px;border:1px solid #aaa496;border-radius:50%;background:transparent;color:var(--ink)}
.layout[data-screen=map] .journey-heading .chapter-controls button:hover:not(:disabled){background:#eeeae0;color:var(--ink)}
.layout[data-screen=map] .journey-heading .chapter-controls svg{display:block;width:20px;height:20px}
.layout[data-screen=map] #chapter-position{flex:1;min-width:0;text-align:center;white-space:nowrap;font-size:14px;line-height:1.4;color:var(--muted);text-transform:none;letter-spacing:0}
@media(max-width:800px){
 .layout[data-screen=map] .journey-heading{grid-template-columns:98px minmax(0,1fr);gap:12px;align-items:center}
 .layout[data-screen=map] .journey .star-count{grid-column:1;grid-row:1;font-size:14px;gap:5px}
 .layout[data-screen=map] .journey .star-count>svg{width:21px;height:21px}
 .journey-section-picker{grid-column:2;grid-row:1}
 .journey-section-trigger{font-size:14px}
 .layout[data-screen=map] .journey-heading .chapter-controls{grid-column:1/-1;grid-row:2;max-width:none;gap:12px}
}
@media(max-width:350px){
 body:is([data-mode=daily],[data-journey-editor=true]) .game-heading #level-title{font-size:16px}
}

/* Light, keyboard-accessible instrument menu; no operating-system select UI. */
.journey-section-options{position:absolute;top:calc(100% + 8px);left:0;z-index:40;min-width:100%;width:max-content;max-width:min(300px,calc(100vw - 24px));padding:6px;border:1px solid #d8d2c6;border-radius:10px;background:var(--paper);box-shadow:0 10px 30px #20211e24}
.journey-section-options [role=option]{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px;border:0;border-radius:6px;background:transparent;color:var(--ink);font-size:14px;line-height:1.3;text-align:left;white-space:nowrap}
.journey-section-options .journey-option-range{margin-left:auto;color:var(--muted);font-size:12px}
.journey-section-options [role=option]>svg{width:16px;height:16px;flex:none;opacity:0;color:var(--accent)}
.journey-section-options [aria-selected=true]{background:var(--accent-soft);color:var(--accent);font-weight:700}
.journey-section-options [aria-selected=true]>svg{opacity:1}
.journey-section-options [role=option]:hover,.journey-section-options [role=option]:focus-visible{background:#eeeae0;outline:2px solid var(--accent);outline-offset:-2px}
.journey-mode-title{margin-bottom:24px}
#map.journey-chapter-map{margin-top:36px}
.journey-map-actions{margin-top:28px}
@media(max-width:800px){
 .journey-mode-title{margin-bottom:18px}
 #map.journey-chapter-map{margin-top:24px}
 .journey-map-actions{margin-top:18px}
}
@media(max-height:640px){
 .journey-mode-title{margin-bottom:18px}
 #map.journey-chapter-map{margin-top:24px}
 .journey-map-actions{margin-top:18px}
}
@media(min-width:801px) and (max-height:500px){
 .journey-mode-title{margin-bottom:14px}
 #map.journey-chapter-map{margin-top:8px}
 #map .chapter-route{height:192px}
 #map .map-node{--node-size:52px}
 .journey-map-actions{margin-top:8px}
}
@media(max-width:800px) and (max-height:640px){
 .journey-mode-title{margin-bottom:14px}
 #map.journey-chapter-map{margin-top:18px}
 .journey-map-actions{margin-top:12px}
}

.script-notice{margin:24px auto;max-width:560px;padding:16px;line-height:1.6}

#remido-first-tour .rm-step,#remido-first-tour .rm-skip,.game .slot-index{color:#6f6e66}
