:root{font-family:"Arial Rounded MT Bold","Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;color:#30364d;background:#eef7fc;font-synthesis:none;--purple:#7355df;--purple-dark:#5738bd;--teal:#158979;--line:#dde9f0;--muted:#758297}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 6% 28%,#e4f2fb,transparent 42%),radial-gradient(ellipse at 95% 4%,#fff8e8,transparent 28%),#eef7fc}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{cursor:default;opacity:.45}button:focus-visible{outline:3px solid #a089ed;outline-offset:4px}button:not(:disabled):active{transform:translateY(2px)}button,span,div{-webkit-tap-highlight-color:transparent}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.app-shell{max-width:1700px;height:100vh;height:100dvh;min-height:560px;margin:auto;padding:0 clamp(18px,3.2vw,64px) 14px;display:grid;grid-template-rows:64px 108px minmax(0,1fr) 76px 48px 72px;gap:8px}.site-header{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #dce8ef}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--purple);color:white;font-size:30px;font-weight:900;box-shadow:0 3px 0 #d5c9f7;transform:rotate(-5deg)}.brand-overline{display:block;font-size:11px;letter-spacing:1.2px;font-weight:700;color:#8290a3;margin-bottom:3px}.brand h1{margin:0;font-size:clamp(16px,1.35vw,23px);font-weight:800;letter-spacing:-.6px}.utilities{display:flex;gap:8px}.icon-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:1px solid #dce6ee;border-radius:12px;background:#ffffffb0;color:#6a728b;padding:9px 13px;font-size:13px;font-weight:700}.icon-button:hover{background:white;border-color:#bdb0e7}.sound-off{display:none}#soundButton[aria-pressed=false] .sound-off{display:block}#soundButton[aria-pressed=false] .sound-waves{display:none}
.turn-heading{display:grid;grid-template-columns:125px minmax(0,1fr) 125px;align-items:center;text-align:center;padding:0 0 2px;gap:10px}.eyebrow{color:#8c7ba9;font-size:clamp(11px,1vw,15px);font-weight:800;letter-spacing:.8px;margin-bottom:6px}.turn-copy h2{font-size:clamp(29px,3.1vw,52px);font-weight:900;letter-spacing:-1.8px;margin:0;line-height:1.28;word-break:keep-all}.turn-copy p{color:var(--muted);font-size:clamp(13px,1.12vw,18px);font-weight:500;margin:8px 0 0;word-break:keep-all}.round-card{justify-self:end;background:#ffffffb3;border:1px solid #dde8ef;border-radius:17px;padding:12px 16px;min-width:115px}.round-label{display:block;font-size:11px;color:#8a91a4;font-weight:800;letter-spacing:1.2px;margin-bottom:4px}.round-card strong{font-size:30px;color:var(--purple);font-variant-numeric:tabular-nums}.round-card div>span{font-size:16px;color:#9ba3b4;font-weight:700}.round-dots{display:flex;gap:3px;margin-top:6px}.round-dots i{display:block;width:5px;height:5px;border-radius:50%;background:#e1e5ee}.round-dots i.done{background:var(--purple)}.round-dots i.current{background:#b3a1eb}
.stage{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);gap:0;position:relative}.player-panel{min-height:0;display:flex;flex-direction:column;position:relative;align-items:center;border:2px solid #fff;border-radius:32px;background:#ffffff69;padding:19px 14px 17px;overflow:hidden;transition:background .18s,border-color .18s,box-shadow .18s}.player-label{display:flex;align-items:center;justify-content:center;gap:9px;flex-shrink:0;position:relative;z-index:2}.player-label h3{font-size:clamp(15px,1.35vw,22px);font-weight:800;margin:0;letter-spacing:-.5px;color:#626f85}.label-dot{width:8px;height:8px;border-radius:50%;background:#b7aecf}.student-panel .label-dot{background:#9bc6c1}.turn-tag{font-size:11px;font-weight:700;color:#948ba7;background:#eeeaf5;border-radius:7px;padding:5px 8px;margin-left:4px}.student-panel .turn-tag{background:#e6f1ef;color:#6f9590}.art-space{position:relative;width:100%;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}.character-art{position:relative;width:100%;height:100%;z-index:1;max-width:560px}.character-art>svg{display:block;width:100%;height:100%;overflow:visible}.art-halo{position:absolute;width:min(75%,380px);height:90%;max-height:360px;border-radius:50%;background:#eee9fb80}.student-panel .art-halo{background:#e0f1ed80;width:min(75%,340px);height:79%;max-height:340px}.action-caption{display:flex;align-items:center;justify-content:center;text-align:center;flex-shrink:0;min-height:36px;font-size:clamp(17px,1.65vw,27px);font-weight:800;letter-spacing:-.5px;color:#9185a6;padding:0 7px}.student-panel .action-caption{color:#7f9b98}.exchange{display:grid;place-items:center;position:relative;z-index:3;color:#9aabd0;font-size:34px}.exchange>div{grid-area:1/1}.exchange #countDisplay{display:grid;place-items:center;background:#fff5db;color:#b47b20;border:3px solid white;border-radius:50%;width:74px;height:74px;font-size:43px;font-weight:900;box-shadow:0 5px 20px #b69d6320}.deco{position:absolute;color:#c2b2e8;font-size:32px;font-weight:700;transform:rotate(-12deg)}.note-one{left:13%;top:23%}.note-two{right:10%;top:46%;font-size:24px;transform:rotate(10deg)}.sparkle-one{left:15%;top:24%;color:#c2d8c3}.sparkle-two{right:12%;top:54%;color:#9bc9c0}
body[data-phase=demo] .monkey-panel{background:#f5f0ff;border-color:#b29aee;box-shadow:0 5px 0 #dbcefa}body[data-phase=demo] .monkey-panel h3,body[data-phase=demo] #monkeyCaption{color:var(--purple-dark)}body[data-phase=demo] .monkey-panel .label-dot{background:var(--purple)}body[data-phase=demo] .monkey-panel .turn-tag{background:var(--purple);color:white}body[data-phase=demo] #statusText{color:#5c42aa}body[data-phase=student] .student-panel{background:#e8f7f1;border-color:#64b9a7;box-shadow:0 5px 0 #c6e9de}body[data-phase=student] .student-panel h3,body[data-phase=student] #studentCaption{color:#147663}body[data-phase=student] .student-panel .turn-tag{background:#268f7b;color:white}body[data-phase=student] .student-panel .label-dot{background:#23947e}body[data-phase=student] #statusText{color:#167b68}body[data-phase=student] .eyebrow{color:#419786}body[data-phase=countin] #statusText{color:#946a2d}body[data-phase=paused] #statusText{color:#756589}
.beat-section{display:flex;align-items:center;justify-content:center;gap:26px;align-self:center;width:min(750px,100%);height:76px;margin:auto;background:#ffffffde;border:1px solid #e4eaf1;border-radius:21px;box-shadow:0 3px 0 #e2eaf14d;padding:9px 26px}.beat-info{display:flex;flex-direction:column;gap:5px;min-width:110px}.beat-label{font-size:12px;font-weight:800;color:#8f91a5}#barLabel{font-size:17px;font-weight:800;white-space:nowrap;color:#68728a}.beat-track{display:flex;gap:14px}.beat-track>span{display:grid;place-items:center;width:51px;height:51px;border-radius:50%;font-size:26px;font-weight:800;color:#adb1c3;background:#f0f1f8;border:2px solid transparent;font-variant-numeric:tabular-nums}.beat-track>span.active{color:white;background:var(--purple);border-color:#5e3fc6;box-shadow:0 3px 0 #d7ccf5;transform:scale(1.06)}body[data-phase=student] .beat-track>span.active{background:#29967e;border-color:#16866b;box-shadow:0 3px 0 #c3e6db}body[data-phase=countin] .beat-track>span.active{background:#e7b75e;border-color:#d9a248;box-shadow:0 3px 0 #f7e7c5}.measure-track{display:flex;gap:6px}.measure-track span{width:20px;height:7px;border-radius:4px;background:#e7e6ee}.measure-track span.active{background:#ae96e9}body[data-phase=student] .measure-track span.active{background:#62bba3}
.tempo-row{display:flex;align-items:center;justify-content:center;gap:12px;align-self:center;font-size:12px;color:#8f92a6}.tempo-heading{font-weight:800;color:#818599}.tempo-options{display:flex;border:1px solid #dddfe9;border-radius:12px;padding:4px;gap:3px;background:#e9edf5}.tempo-options button{border:0;border-radius:8px;padding:8px 15px;font-size:13px;font-weight:800;background:transparent;color:#8b8d9f;white-space:nowrap}.tempo-options button small{font-size:11px;opacity:.7;margin-left:5px}.tempo-options button[aria-pressed=true]{background:#fff;color:var(--purple);box-shadow:0 2px 5px #45415b0a}.tempo-options button:disabled{opacity:.45}.tempo-options button[aria-pressed=true]:disabled{opacity:1}#tempoLock{font-size:11px;display:none}.teacher-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.teacher-controls{display:flex;justify-content:center;gap:12px;width:100%}.primary-button,.secondary-button,.text-button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:51px;border-radius:13px;padding:10px 24px;font-size:15px;font-weight:800;white-space:nowrap}.primary-button{border:1px solid var(--purple);background:var(--purple);box-shadow:0 4px 0 #5c40bf;color:white;min-width:181px}.primary-button svg{fill:currentColor;stroke:none;width:17px;height:17px}.primary-button:hover{background:#6848d2}.secondary-button{border:1px solid #d5c9eb;background:#fff;color:#84729d}.secondary-button>span{font-size:22px;line-height:1}.secondary-button:hover:not(:disabled){background:#f4eefb}.text-button{border:1px solid transparent;background:transparent;color:#9291a5;padding:10px 17px}.text-button:hover:not(:disabled){background:#e5eaf2}.text-button svg{width:18px;height:18px}.footer-note{margin:0;color:#9a9eaf;font-size:11px;font-weight:500}#pauseSymbol{font-size:17px}.notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:20;max-width:90%;padding:13px 20px;border-radius:13px;color:white;background:#4a405f;box-shadow:0 8px 30px #42314d20;font-size:14px;line-height:1.6;word-break:keep-all}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
dialog{border:1px solid #e8ddf7;border-radius:32px;padding:0;width:660px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 28px);background:#fffcf8;color:#34304a;box-shadow:0 25px 100px #34245440;overflow:auto}dialog::backdrop{background:#35314755;backdrop-filter:blur(6px)}.result-content{padding:30px 36px 35px;text-align:center;position:relative}.result-kicker{font-size:12px;font-weight:800;letter-spacing:1px;color:#9c87b2}.result-monkey{height:min(28dvh,240px);margin:6px auto -5px}.result-monkey svg{height:100%;width:100%}.confetti{position:absolute;top:17%;left:6%;right:6%;display:flex;justify-content:space-between;color:#e9bd66;font-size:27px;pointer-events:none}.confetti span{color:#b5a1e8}.result-content h2{font-size:clamp(27px,3.5vw,42px);letter-spacing:-1.5px;margin:4px 0 12px}.result-content p{font-size:17px;color:#90859b;margin:0 0 29px}.result-actions{display:flex;justify-content:center;gap:12px}.result-actions .primary-button{min-height:55px}.expanded-view{position:fixed;inset:0;z-index:50;background:#eef7fc;overflow:auto}:fullscreen{background:#eef7fc}
@media(min-width:1600px) and (min-height:950px){.app-shell{grid-template-rows:90px 140px minmax(0,1fr) 100px 72px 98px;gap:16px;padding-bottom:24px}.player-panel{padding-top:25px;padding-bottom:24px}.beat-section{height:86px}.beat-track>span{width:57px;height:57px}.primary-button,.secondary-button,.text-button{min-height:55px;font-size:16px}}
@media(max-width:1000px){.app-shell{padding-left:20px;padding-right:20px;grid-template-rows:64px 108px minmax(0,1fr) 76px 48px 76px}.turn-heading{grid-template-columns:90px minmax(0,1fr) 90px}.round-card{min-width:87px;padding:9px}.round-card strong{font-size:25px}.round-dots{gap:2px}.round-dots i{width:4px;height:4px}.turn-tag{display:none}.stage{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}.player-panel{border-radius:25px;padding:16px 10px}.exchange #countDisplay{width:60px;height:60px;font-size:35px}.action-caption{font-size:18px}.beat-section{width:min(660px,100%)}}
@media(max-width:600px){.app-shell{padding:0 12px 10px;min-height:620px;grid-template-rows:64px auto minmax(0,1fr) 80px 57px 108px;gap:8px}.brand{gap:8px}.brand-mark{width:33px;height:33px;font-size:25px;border-radius:10px}.brand-overline{font-size:9px;letter-spacing:.3px}.brand h1{font-size:14px;letter-spacing:-.7px}.utilities{gap:5px}.icon-button{width:37px;height:39px;min-height:39px;padding:8px;border-radius:10px}.icon-button span{display:none}.icon-button svg{width:19px;height:19px}.turn-heading{grid-template-columns:1fr 61px;text-align:left;gap:5px;padding:7px 3px}.heading-spacer{display:none}.eyebrow{font-size:9px;letter-spacing:.1px;margin-bottom:7px}.turn-copy h2{font-size:clamp(22px,5.9vw,33px);letter-spacing:-1.1px}.turn-copy p{font-size:11px;line-height:1.6;margin-top:8px}.round-card{min-width:61px;border-radius:12px;padding:7px;text-align:center}.round-card strong{font-size:23px}.round-card div>span{font-size:11px}.round-label{font-size:9px;letter-spacing:.5px}.round-dots{flex-wrap:wrap;gap:3px;max-width:33px;margin:5px auto 0}.stage{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr)}.player-panel{padding:15px 2px 12px;border-radius:22px}.player-label{gap:5px}.player-label h3{font-size:13px}.label-dot{width:6px;height:6px}.art-space{overflow:visible}.character-art{width:112%;max-width:none;flex-shrink:0}.art-halo{width:90%;height:70%}.student-panel .art-halo{width:90%;height:62%}.deco{font-size:20px}.note-one{left:6%}.note-two{right:2%;font-size:18px}.exchange{font-size:22px}.exchange #countDisplay{width:44px;height:44px;font-size:27px}.action-caption{font-size:13px;letter-spacing:-.6px;min-height:24px;padding:0 3px;word-break:keep-all}.beat-section{height:69px;border-radius:18px;gap:12px;padding:10px 13px}.beat-info{min-width:74px;gap:5px}.beat-label{font-size:9px}#barLabel{font-size:12px}.beat-track{gap:7px}.beat-track>span{width:38px;height:38px;font-size:21px}.measure-track{display:none}.tempo-row{gap:7px;font-size:10px}.tempo-options{padding:3px}.tempo-options button{font-size:11px;padding:8px 10px}.tempo-options button small{font-size:10px;margin-left:3px}.tempo-unit{display:none}.teacher-controls{display:grid;grid-template-columns:1fr 1.35fr;gap:10px}.primary-button,.secondary-button,.text-button{font-size:12px;min-height:45px;padding:8px 11px;border-radius:11px;gap:5px;min-width:0}.teacher-controls .text-button{grid-column:1/-1;min-height:25px;padding:0;font-size:11px}.text-button svg{width:14px;height:14px}.teacher-footer{gap:7px}.footer-note{font-size:9px}.result-content{padding:25px 16px}.result-content p{font-size:14px}.result-actions{gap:9px}.result-actions button{padding:12px 14px}}
@media(orientation:landscape) and (max-height:600px){.app-shell{min-height:330px;padding:0 18px 6px;grid-template-rows:46px 65px minmax(0,1fr) 52px 44px;gap:6px}.site-header{min-height:0}.brand-mark{width:30px;height:30px;border-radius:9px;font-size:23px}.brand h1{font-size:14px}.brand-overline{display:none}.icon-button{min-height:32px;height:32px;padding:5px 9px;font-size:11px}.icon-button svg{width:16px;height:16px}.turn-heading{padding:0;grid-template-columns:90px minmax(0,1fr) 90px;text-align:center}.heading-spacer{display:block}.eyebrow{font-size:9px;margin-bottom:3px}.turn-copy h2{font-size:27px;letter-spacing:-1px}.turn-copy p{font-size:10px;margin-top:3px}.round-card{padding:5px 9px;min-width:78px;border-radius:11px}.round-label{display:none}.round-card strong{font-size:21px}.round-dots{margin-top:2px}.player-panel{padding:7px 10px 5px;border-radius:20px}.player-label h3{font-size:12px}.player-label{gap:6px}.action-caption{font-size:13px;min-height:20px}.stage{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}.character-art{max-width:330px}.art-halo{width:45%}.student-panel .art-halo{width:45%}.deco{font-size:19px}.exchange #countDisplay{width:50px;height:50px;font-size:31px}.beat-section{height:46px;max-width:480px;border-radius:13px;gap:20px;padding:4px 15px}.beat-info{gap:0;min-width:95px}.beat-label{font-size:9px}#barLabel{font-size:12px}.beat-track{gap:10px}.beat-track>span{width:33px;height:33px;font-size:19px}.tempo-row{position:absolute;left:20px;bottom:60px;flex-direction:column;gap:2px}.tempo-heading,.tempo-unit{display:none}.tempo-options{gap:0;padding:2px;border-radius:8px}.tempo-options button{font-size:9px;padding:6px 7px;border-radius:6px}.tempo-options button small{display:none}.teacher-footer{gap:0}.teacher-controls{display:flex;gap:9px}.teacher-controls button{min-height:36px;font-size:11px;padding:6px 16px;min-width:0;border-radius:9px}.primary-button{box-shadow:0 3px 0 #5c40bf}.footer-note{display:none}.result-content{padding:15px 20px}.result-monkey{height:95px}.result-content h2{font-size:25px;margin:0 0 5px}.result-content p{font-size:12px;margin-bottom:12px}.result-actions button{min-height:38px;font-size:12px}.result-kicker{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important}.confetti{display:none}}

/* Keep the entire eight-beat phrase on one row at every screen size. */
.beat-section{width:min(880px,100%);gap:20px}
.beat-track{gap:12px;flex-wrap:nowrap;flex-shrink:0}
@media(max-width:1000px){.beat-section{width:min(740px,100%)}.beat-track{gap:8px}.beat-track>span{width:46px;height:46px}}
@media(max-width:600px){.beat-section{height:76px;flex-direction:column;gap:5px;padding:6px 10px}.beat-info{flex-direction:row;align-items:center;justify-content:center;gap:8px;min-width:0;line-height:15px}.beat-track{display:grid;width:100%;grid-template-columns:repeat(8,minmax(0,34px));justify-content:center;gap:4px}.beat-track>span{width:100%;height:auto;aspect-ratio:1;font-size:20px}}
@media(orientation:landscape) and (max-height:600px){.beat-section{flex-direction:row;height:46px;gap:12px;padding:4px 15px;max-width:480px}.beat-info{flex-direction:column;gap:0;min-width:78px}.beat-track{display:flex;width:auto;gap:5px}.beat-track>span{width:31px;height:31px;aspect-ratio:auto;font-size:18px}}
