:root{--bg:#f3f4f6;--card:#fff;--text:#111827;--muted:#4b5563;--line:#d1d5db;--accent:#1d4ed8;--ok:#15803d;--ng:#b91c1c;-webkit-text-size-adjust:100%}*{box-sizing:border-box}[hidden]{display:none!important}html,body{background:var(--bg);color:var(--text);margin:0;font-family:-apple-system,BlinkMacSystemFont,Hiragino Sans,Noto Sans JP,sans-serif;font-size:17px;line-height:1.5;overflow-x:hidden}.top{color:#fff;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:#1f2937}.top h1{margin:0;font-size:19px}.banner{color:#dcfce7;background:#14532d;border-radius:999px;margin:6px 0 0;padding:3px 10px;font-size:14px;display:inline-block}.banner.tuned{color:#451a03;background:#fbbf24;font-weight:700}main{padding:12px max(12px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));max-width:720px;margin:0 auto}.card{background:var(--card);border-radius:12px;margin-bottom:14px;padding:14px;box-shadow:0 1px 2px #00000014}h2{margin:0 0 8px;font-size:19px}h3{color:var(--muted);margin:14px 0 6px;font-size:15px}.howto{margin:0 0 12px;padding-left:1.3em;font-size:15px}button{font:inherit;border:1px solid var(--line);min-height:48px;color:var(--text);touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:#fff;border-radius:10px;padding:8px 14px}button:disabled{opacity:.45}button.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}button.danger{background:var(--ng);border-color:var(--ng);color:#fff;font-weight:600}button.danger-outline{color:var(--ng);border-color:var(--ng)}button.big{width:100%;font-size:19px}button.small{min-height:40px;font-size:15px}.choices{flex-wrap:wrap;gap:8px;display:flex}.choices button{flex:auto}.choices button[aria-pressed=true]{border-color:var(--accent);color:#1e3a8a;background:#dbeafe;font-weight:700}.stages button{text-align:left;flex:45%}.row{flex-wrap:wrap;gap:8px;margin-top:12px;display:flex}.row button{flex:45%}.status{color:var(--muted);margin:8px 0;font-size:15px}.instruction{font-size:18px;font-weight:600}.big-note{text-align:center;word-break:keep-all;overflow-wrap:anywhere;margin:6px 0;font-size:44px;font-weight:800;line-height:1.2}.big-note .hand{font-size:30px;display:block}.big-note .sub{color:var(--muted);font-size:16px;font-weight:400;display:block}.seq{text-align:center;margin-bottom:8px;font-size:18px}.seq .done{color:var(--ok)}.seq .cur{background:#fde68a;border-radius:4px;padding:0 4px;font-weight:700}.kb-wrap{width:100%}.kb{width:100%;height:auto;display:block}.flash{text-align:center;border-radius:8px;margin-top:8px;padding:10px;font-weight:700}.flash.ok{color:var(--ok);background:#dcfce7}.flash.ng{color:var(--ng);background:#fee2e2}.kb-stack{border-radius:10px;position:relative}.kb-stack:after{content:"";pointer-events:none;opacity:0;border-radius:10px;position:absolute;inset:0}.kb-stack.hit:after{animation:.45s ease-out hit-ripple}@keyframes hit-ripple{0%{opacity:.9;background:#94a3b82e;box-shadow:0 0 #64748b8c}to{opacity:0;background:#94a3b800;box-shadow:0 0 0 14px #64748b00}}.kb-stack.hit-ok:after{animation:.6s ease-out hit-ok}.kb-stack.hit-ok{animation:.3s ease-out hit-bounce}@keyframes hit-ok{0%{opacity:1;background:#22c55e33;box-shadow:0 0 #16a34a99}to{opacity:0;background:#22c55e00;box-shadow:0 0 0 16px #16a34a00}}@keyframes hit-bounce{0%{transform:scale(1)}40%{transform:scale(1.03)}to{transform:scale(1)}}@media (prefers-reduced-motion:reduce){.kb-stack.hit:after,.kb-stack.hit-ok:after,.kb-stack.hit-ok{animation:none}.kb-stack.hit:after{opacity:1;background:#94a3b838}.kb-stack.hit-ok:after{opacity:1;background:#22c55e38}}.flash.voice{color:#3730a3;background:#e0e7ff;font-weight:600}.beat{color:#374151;background:#e5e7eb;border-radius:50%;justify-content:center;align-items:center;width:96px;height:96px;margin:8px auto;font-size:32px;font-weight:800;display:flex}.beat.on{color:#fff;background:#f59e0b}.beat.count.on{background:#6b7280}.live{border-top:1px solid var(--line);margin-top:12px}.live p{margin:6px 0;font-size:17px}.guide{color:#78350f;background:#fef3c7;border-radius:8px;margin:6px 0;padding:6px 10px;font-weight:700;line-height:1.4}.live.guiding h3,.live.guiding .live-a{display:none}.tag{background:#e5e7eb;border-radius:6px;margin-right:4px;padding:1px 6px;font-size:13px;display:inline-block}.meter{background:#e5e7eb;border-radius:6px;height:12px;position:relative;overflow:hidden}#meter-bar{background:#10b981;width:0;height:100%}#meter-floor{background:#ef4444;width:2px;position:absolute;top:0;bottom:0}.ok{color:var(--ok)}.ng{color:var(--ng)}.sum-group{border-top:1px solid var(--line);padding:8px 0}.sum-group h4{margin:0 0 4px;font-size:15px}.sum-group ul{margin:0;padding-left:1.1em;font-size:14px}.param{margin:10px 0}.param label{font-size:15px;display:block}.param input[type=range]{width:100%;height:32px}body.teacher #sec-teacher-entry,body.teacher #sec-collect-entry,body.teacher #sec-ambient,body.teacher #sec-mock,body.teacher #free-head,body.teacher #sec-prepare,body.teacher #sec-stage,body.teacher #sec-summary,body.teacher #sec-params,body.teacher .top .banner,body.teacher #task-count,body.teacher #task-running,body.teacher #task-verdict,body.teacher .live h3,body.teacher .live p:not(.guide),body.teacher #meter-floor{display:none}.teacher-pianos{gap:10px;display:grid}.teacher-piano-state{opacity:.9;font-size:15px;font-weight:400;display:block}.teacher-piano-state.done:before{content:"✓ "}.free-head{margin:18px 4px 6px;font-size:14px}.teacher-notice{text-align:center;padding:24px 8px;font-size:24px;font-weight:700;line-height:1.45}#sec-teacher .howto{font-size:16px}#sec-teacher #btn-teacher-back,#sec-teacher #btn-teacher-back2{margin-top:10px}#teacher-controls button{flex:1 1 0;min-width:0;padding-left:6px;padding-right:6px}#btn-t-miss{border-color:var(--ng);color:var(--ng);font-weight:700}#teacher-msg{margin:8px 0 0}.collect-form{gap:8px;margin:10px 0;display:grid}.collect-form label{gap:4px;font-size:15px;display:grid}.collect-form select{min-height:44px;font-size:16px}.collect-form .collect-consent{grid-template-columns:auto 1fr;align-items:start;column-gap:8px}.collect-form .collect-consent input{width:24px;height:24px}body:not(.collect-child) .collect-form .collect-child,body.only-collect #btn-teacher-back{display:none}body.collect-child #teacher-controls button{flex:45%}#teacher-warn{white-space:pre-line}@media (orientation:landscape) and (height<=540px){body.teacher .top{padding:3px max(12px, env(safe-area-inset-left)) 3px max(12px, env(safe-area-inset-right))}body.teacher .top h1{font-size:15px}body.teacher main{padding-top:6px}body.teacher #sec-teacher{margin-bottom:0;padding:8px 12px}#teacher-intro{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:start;column-gap:16px;display:grid}#teacher-intro h2{grid-column:1/-1;margin:0 0 4px;font-size:16px}#teacher-intro .howto{grid-row:2/span 4;margin:0;font-size:14px;line-height:1.4}#teacher-intro .guide{margin:0 0 6px;font-size:13px}#teacher-intro .status{margin:4px 0;font-size:13px}#sec-teacher #btn-teacher-back,#sec-teacher #btn-teacher-back2{margin-top:4px}.teacher-notice{padding:12px 8px}body.running #sec-teacher-entry,body.running #sec-collect-entry,body.running #sec-ambient,body.running #free-head,body.running #sec-prepare,body.running #sec-stage,body.running #sec-summary,body.running #sec-params{display:none}body.running .top{padding:3px max(12px, env(safe-area-inset-left)) 3px max(12px, env(safe-area-inset-right));align-items:center;gap:12px;display:flex}body.running .top h1{font-size:13px;font-weight:600}body.running .banner{margin:0;padding:0 8px;font-size:12px}body.running main{max-width:none;padding:6px max(8px, env(safe-area-inset-left)) 0 max(8px, env(safe-area-inset-right))}body.running #sec-task{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start;gap:14px;margin:0;padding:8px 12px;display:grid}body.running .task-head{flex-wrap:wrap;align-items:baseline;column-gap:10px;display:flex}body.running #task-title{margin:0;font-size:15px}body.running #task-count{margin:0;font-size:12px}body.running .instruction{margin:4px 0;font-size:14px;line-height:1.35}body.running .task-notes{justify-content:center;align-items:center;gap:10px;display:flex}body.running .big-note{margin:2px 0;font-size:32px}body.running .big-note .hand{font-size:21px}body.running .big-note .sub{font-size:12px;line-height:1.2}body.running .seq{margin:2px 0 0;font-size:15px}body.running .beat{flex:none;width:56px;height:56px;margin:0;font-size:22px}body.running .task-right{position:relative}body.running .kb{width:auto;max-width:100%;height:84px;margin:0 auto}body.running .flash{z-index:2;opacity:.95;margin:0;padding:6px;position:absolute;top:0;left:0;right:0}body.running .gate-mark{top:auto;bottom:0}body.running .live{margin-top:4px}body.running .live h3{margin:2px 0;font-size:13px}body.running .live p{margin:2px 0;font-size:14px;line-height:1.35}body.running .live .guide{padding:2px 8px;font-size:13px;line-height:1.3}body.running #sec-task h3{margin:4px 0 2px;font-size:13px}body.running #sec-task .row{gap:6px;margin-top:6px}body.running #sec-task button{min-height:44px;padding:4px 10px;font-size:14px}body.running #sec-task .row button,body.running #sec-task .choices button{flex:auto}body.running #task-verdict .instruction{margin:2px 0}}@media (orientation:portrait) and (width<=600px){body.running #sec-teacher-entry,body.running #sec-collect-entry,body.running #sec-ambient,body.running #free-head,body.running #sec-prepare,body.running #sec-stage,body.running #sec-summary,body.running #sec-params{display:none}body.running .top{padding:calc(4px + env(safe-area-inset-top)) 12px 4px;flex-wrap:wrap;align-items:center;column-gap:10px;display:flex}body.running .top h1{font-size:14px;font-weight:600}body.running .banner{margin:0;padding:0 8px;font-size:12px}body.running main{padding:6px 8px calc(8px + env(safe-area-inset-bottom))}body.running #sec-task{margin:0;padding:8px 10px}body.running .task-head{flex-wrap:wrap;align-items:baseline;column-gap:8px;display:flex}body.running #task-title{margin:0;font-size:16px;line-height:1.3}body.running #task-count{margin:0;font-size:12px;line-height:1.3}body.running .instruction{margin:4px 0;font-size:15px;line-height:1.35}body.running .task-notes{flex-wrap:nowrap;column-gap:8px}body.running .big-note{flex:0 auto;margin:2px 0;font-size:34px}body.running .big-note .hand{font-size:22px}body.running .big-note .sub{font-size:12px;line-height:1.2}body.running .staff{flex:0 auto}body.running .staff-svg{width:auto;max-height:170px;margin:0}body.running .seq{margin:2px 0 4px;font-size:15px}body.running .beat{flex:none;width:56px;height:56px;margin:0;font-size:22px}body.running .task-right{position:relative}body.running .kb{width:auto;max-width:100%;height:84px;margin:0 auto}body.running .flash{z-index:2;opacity:.95;margin:0;padding:6px;position:absolute;top:0;left:0;right:0}body.running .gate-mark{top:auto;bottom:0}body.running .live{margin-top:6px}body.running .live h3{margin:2px 0;font-size:13px}body.running .live p{margin:2px 0;font-size:14px;line-height:1.35}body.running .live .guide{padding:2px 8px;font-size:13px;line-height:1.3}body.running #sec-task h3{margin:4px 0 2px;font-size:13px}body.running #sec-task .row{gap:6px;margin-top:6px}body.running #sec-task button{padding:4px 8px;font-size:15px;line-height:1.3}body.running #task-verdict .row button,body.running #sec-task .choices button{flex:auto}body.running #task-verdict .instruction{margin:2px 0}}.rh-marker line{stroke:#1d4ed8;stroke-width:2.5px}.rh-marker path{fill:#1d4ed8}.rh-band{fill:#fde68a}.rh-band.hit{fill:#f59e0b}body.running.rhythm .task-notes{flex-wrap:wrap;row-gap:2px}body.running.rhythm .task-notes .staff{flex:100%}body.running.rhythm .task-notes .staff-svg{width:100%;max-width:560px;max-height:none;margin:0 auto}@media (orientation:portrait) and (width<=600px){body.running.rhythm .task-notes .staff-svg{width:auto;max-width:100%;max-height:240px}}.task-notes{flex-wrap:wrap;justify-content:center;align-items:center;column-gap:14px;display:flex}.staff{min-width:0}.staff-svg{max-width:100%;height:auto;margin:0 auto 4px;display:block}@media (orientation:landscape) and (height<=540px){body.running .staff{flex:0 auto}body.running .staff-svg{width:auto;max-height:min(250px,100vh - 200px);margin:0}}.listen{border-top:1px solid var(--line);margin-top:10px;padding-top:4px}.listen .listen-label{color:var(--muted);margin:6px 0 2px;font-size:13px}.listen .listen-choices button{font-size:14px}.listen-count{margin:8px 0 4px;font-size:18px;font-weight:700}.listen-list{border:1px solid var(--line);border-radius:8px;max-height:180px;margin:0;padding:0;list-style:none;overflow-y:auto}.listen-list li{border-bottom:1px solid var(--line);gap:10px;padding:3px 8px;font-size:14px;display:flex}.listen-list li:last-child{border-bottom:none}.listen-list li.counted{color:var(--ng);font-weight:700}.listen-list li.dropped{color:var(--muted)}.listen-time{min-width:4.5em}.listen-note{min-width:3.5em}.times{border-collapse:collapse;width:100%;margin:4px 0 8px;font-size:13px}.times th,.times td{border:1px solid var(--line);text-align:right;padding:3px 6px}.times th:first-child,.times td:first-child{text-align:left;overflow-wrap:anywhere}.listen-table{border-collapse:collapse;width:100%;margin:2px 0 6px;font-size:12px;line-height:1.25}.listen-table th,.listen-table td{border:1px solid var(--line);text-align:center;white-space:nowrap;padding:1px 3px}
