:root{--bg:#0f1115;--surface:#181b21;--surface-2:#22262e;--line:#2c313b;--text:#eef0f4;--muted:#8b93a3;--accent:#ff8a3d;--accent-ink:#1b0e04;--accent-soft:#ff8a3d29;--click:#e6e9ef;--soft:#6b7383;--danger:#ff5d5d;--radius:16px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}@media (prefers-color-scheme:light){:root{--bg:#f2f3f6;--surface:#fff;--surface-2:#eaecf1;--line:#dcdfe6;--text:#14171c;--muted:#636b79;--accent:#ee6a14;--accent-ink:#fff;--accent-soft:#ee6a141f;--click:#262a33;--soft:#a9b0bc;--danger:#d93636;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{background:var(--bg);height:100%;color:var(--text);overscroll-behavior:none;margin:0;font:16px/1.4 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}body{touch-action:manipulation;-webkit-user-select:none;user-select:none}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;background:0 0;border:0;padding:0}button:disabled{opacity:.35;cursor:default}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}h1,h2{margin:0}.app{height:100vh;flex-direction:column;max-width:560px;height:100dvh;margin:0 auto;display:flex}.screen{-webkit-overflow-scrolling:touch;flex:1;padding:0 16px 24px;overflow-y:auto}header.bar{z-index:5;min-height:56px;padding-top:env(safe-area-inset-top);background:color-mix(in srgb, var(--bg) 88%, transparent);-webkit-backdrop-filter:blur(12px);align-items:center;gap:8px;margin:0 -16px 8px;padding-left:16px;padding-right:16px;display:flex;position:sticky;top:0}header.bar h1{letter-spacing:-.01em;flex:1;font-size:20px;font-weight:700}header.bar h1 small{color:var(--muted);font-size:15px;font-weight:500}.icon-btn{border-radius:50%;place-items:center;width:40px;height:40px;margin-left:-8px;display:grid}.text-btn{color:var(--accent);padding:8px 4px;font-weight:600}.tabs{background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);display:flex}.tabs button{color:var(--muted);flex-direction:column;flex:1;align-items:center;gap:2px;padding:8px 0 6px;font-size:12px;font-weight:600;display:flex}.tabs button.on{color:var(--accent)}.ico{width:24px;height:24px;display:block}.hint{color:var(--muted);margin:8px 0 0;font-size:13px}.hint.center{text-align:center;margin-top:16px}.note{vertical-align:-.12em;width:.72em;height:1.05em;display:inline-block}.tq{white-space:nowrap;font-variant-numeric:tabular-nums}.stepper{background:var(--surface-2);border-radius:12px;align-items:center;display:inline-flex;overflow:hidden}.step{place-items:center;width:44px;height:44px;font-size:22px;font-weight:500;display:grid}.step:active:not(:disabled){background:var(--line)}.step-val{justify-content:center;align-items:baseline;gap:4px;min-width:64px;padding:0 4px;display:flex}.step-val input{width:3.2ch;color:var(--text);font:inherit;text-align:center;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;appearance:textfield;background:0 0;border:0;padding:0;font-size:18px;font-weight:700}.step-val input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.step-val input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.step-val .suffix{color:var(--muted);font-size:12px}.stepper.compact .step-val{min-width:40px}.seg{background:var(--surface-2);border-radius:12px;gap:2px;padding:3px;display:flex}.seg button{min-height:38px;color:var(--muted);white-space:nowrap;border-radius:9px;flex:1;justify-content:center;align-items:center;padding:0 8px;font-size:14px;font-weight:600;display:flex}.seg button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #00000040}.seg.notes button{padding:0 4px;font-size:22px}.seg.picker button{min-height:42px;font-size:20px}.seg.wrap{flex-wrap:wrap}.switch{justify-content:space-between;align-items:center;width:100%;padding:10px 0;font-weight:500;display:flex}.switch-track{background:var(--surface-2);border-radius:14px;width:46px;height:28px;transition:background .15s;position:relative}.switch-track.on{background:var(--accent)}.switch-knob{background:#fff;border-radius:50%;width:22px;height:22px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #0000004d}.switch-track.on .switch-knob{transform:translate(18px)}.btn{background:var(--surface-2);border-radius:12px;padding:12px 14px;font-weight:600}.btn.danger{color:var(--danger)}.btn.wide{width:100%;margin-top:12px}.dots{--s:1;gap:calc(4px * var(--s));flex-wrap:nowrap;margin:12px 0 4px;display:flex}.dot{width:calc(40px * var(--s));border-radius:calc(10px * var(--s));flex:none;place-items:center;height:44px;display:inline-grid}.dot.gap{margin-left:calc(8px * var(--s))}.dot i{border-radius:50%;transition:transform 60ms,background .1s;display:block}.dot.l3 i{width:calc(28px * var(--s));height:calc(28px * var(--s));background:var(--accent)}.dot.l2 i{width:calc(22px * var(--s));height:calc(22px * var(--s));background:var(--click)}.dot.l1 i{width:calc(13px * var(--s));height:calc(13px * var(--s));background:var(--soft)}.dot.l0 i{width:calc(13px * var(--s));height:calc(13px * var(--s));border:2px solid var(--soft);opacity:.6}.dot.now{background:var(--accent-soft)}.dot.now i{transform:scale(1.25)}button.dot:active{background:var(--surface-2)}.dots.small{gap:calc(2px * var(--s));margin:8px 0 2px}.dots.small .dot{width:calc(16px * var(--s));border-radius:calc(5px * var(--s));height:18px}.dots.small .dot.gap{margin-left:calc(4px * var(--s))}.dots.small .l3 i{width:calc(12px * var(--s));height:calc(12px * var(--s))}.dots.small .l2 i{width:calc(9px * var(--s));height:calc(9px * var(--s))}.dots.small .l1 i,.dots.small .l0 i{width:calc(5px * var(--s));height:calc(5px * var(--s))}.dots.small .l0 i{border-width:1px}.legend{color:var(--muted);flex-wrap:wrap;gap:4px 14px;font-size:13px;display:flex}.legend>span{align-items:center;display:inline-flex}.legend .dot{width:22px;height:22px}.legend .dot.l3 i{width:14px;height:14px}.legend .dot.l2 i{width:11px;height:11px}.legend .dot.l1 i,.legend .dot.l0 i{width:7px;height:7px}.simple{flex-direction:column;min-height:100%;display:flex}.tempo{text-align:center;padding:8px 0 4px}.marking{color:var(--muted);letter-spacing:.04em;text-transform:uppercase;font-size:13px;font-weight:600}.tempo-row{justify-content:space-between;align-items:center;margin:4px 0 8px;display:flex}.round{background:var(--surface-2);border-radius:50%;place-items:center;width:60px;height:60px;font-size:30px;display:grid}.round:active{background:var(--line)}.bpm{flex-direction:column;align-items:center;display:flex}.bpm-num{font-variant-numeric:tabular-nums;letter-spacing:-.04em;font-size:clamp(72px,24vw,104px);font-weight:800;line-height:1}.bpm-unit{color:var(--muted);letter-spacing:.1em;font-size:13px;font-weight:700}.slider{width:100%;accent-color:var(--accent);height:32px;margin:8px 0 12px}.tap{background:var(--surface);border:1px solid var(--line);border-radius:14px;width:100%;padding:14px;font-weight:700}.tap:active{background:var(--accent-soft);border-color:var(--accent)}.beats{margin:18px 0 6px}.beats .dots{justify-content:center;gap:calc(6px * var(--s))}.beats .dot{width:calc(48px * var(--s));height:52px}.settings{flex-direction:column;gap:4px;margin-top:8px;display:flex}.field{justify-content:space-between;align-items:center;gap:12px;padding:8px 0;display:flex}.field.col{flex-direction:column;align-items:stretch}.field-label{font-weight:500}.field.col .field-label{color:var(--muted);font-size:13px}.play-wrap{justify-content:center;margin-top:auto;padding-top:20px;display:flex}.play{background:var(--accent);width:64px;height:64px;color:var(--accent-ink);border-radius:50%;flex:none;place-items:center;transition:transform 80ms;display:grid;box-shadow:0 6px 20px #ff8a3d4d}.play:active{transform:scale(.94)}.play .ico{width:28px;height:28px}.play.big{width:88px;height:88px}.play.big .ico{width:36px;height:36px}.cards{flex-direction:column;gap:10px;display:flex}.card-row{display:flex}.gutter{flex:none;position:relative}.br{border-left:3px solid var(--accent);width:8px;position:absolute;top:-10px;bottom:0}.br.s{border-top:3px solid var(--accent);border-top-left-radius:4px;top:6px}.br.e{border-bottom:3px solid var(--accent);border-bottom-left-radius:4px;bottom:6px}.card{text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);flex:1;min-width:0;padding:12px 14px;transition:border-color .15s,background .15s}.card:active{background:var(--surface-2)}.card.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}.card-top{align-items:center;gap:10px;display:flex}.idx{color:var(--muted);min-width:1ch;font-size:13px;font-weight:700}.ts{flex-direction:column;align-items:center;font-size:17px;font-weight:800;line-height:.95;display:inline-flex}.ts span:first-child{border-bottom:2px solid;padding:0 2px}.bars{color:var(--muted);font-size:14px}.rep{background:var(--accent-soft);color:var(--accent);border-radius:99px;padding:2px 7px;font-size:12px;font-weight:700}.card-tempo{align-items:center;gap:4px;margin-left:auto;font-size:17px;font-weight:700;display:flex}.arrow{color:var(--muted);padding:0 2px}.card-detail{color:var(--muted);font-size:13px}.add{border:2px dashed var(--line);border-radius:var(--radius);width:100%;color:var(--muted);justify-content:center;align-items:center;gap:6px;margin-top:12px;padding:14px;font-weight:600;display:flex}.add:active{background:var(--surface)}.result{background:var(--accent-soft);border-radius:var(--radius);margin-bottom:12px;padding:12px 14px}.result-main{flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:22px;font-weight:800;display:flex}.result-label{color:var(--muted);width:100%;font-size:13px;font-weight:600}.result-pulse{color:var(--muted);font-size:15px;font-weight:600}.result-detail{color:var(--muted);margin-top:2px;font-size:14px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);margin-bottom:12px;padding:14px}.panel h2{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px;font-size:13px}.panel>.seg{margin-top:2px}.meter{align-items:center;gap:6px;display:flex}.meter .seg{flex:1}.meter .seg button{min-width:32px;padding:0 6px}.slash{color:var(--muted);font-size:22px}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{background:var(--surface-2);border-radius:99px;padding:8px 12px;font-size:14px;font-weight:600}.chip.on{background:var(--accent);color:var(--accent-ink)}.chip.custom{background:var(--surface-2);color:var(--text);box-shadow:inset 0 0 0 2px var(--accent)}.tempo-eq{justify-content:center;align-items:center;gap:10px;margin-top:6px;display:flex}.big-note{font-size:34px}.eq{color:var(--muted);font-size:22px}.actions{grid-template-columns:1fr 1fr;gap:8px;margin-top:4px;display:grid}.start-row{align-items:center;gap:8px;display:flex}.start-row .stepper{flex:1;justify-content:space-between}.note-btn{background:var(--surface-2);border-radius:12px;flex:none;place-items:center;min-width:44px;height:44px;padding:0 8px;font-size:26px;display:grid}.note-btn.on{box-shadow:inset 0 0 0 2px var(--accent)}.tap.small{flex:none;width:auto;height:44px;padding:0 14px}.hint.first{margin:0 0 10px}.tag{background:var(--surface-2);white-space:nowrap;border-radius:6px;margin-left:6px;padding:0 6px;font-size:12px;font-weight:600;display:inline-block}.title-btn{font:inherit;text-overflow:ellipsis;white-space:nowrap;text-align:left;max-width:100%;overflow:hidden}header.bar h1{min-width:0}.card.pat{align-items:center;gap:10px;display:flex}.pat-main{flex-direction:column;flex:1;min-width:0;display:flex}.pat-name{text-overflow:ellipsis;white-space:nowrap;font-size:17px;overflow:hidden}.pat-sum{color:var(--muted);font-size:13px}.card.pat .card-tempo{margin-left:0;font-size:15px}.chev{width:18px;height:18px;color:var(--muted);flex:none}.empty{text-align:center;padding:48px 12px}.empty h2{font-size:20px}.empty p{color:var(--muted);margin:8px 0 20px}.btn.primary{background:var(--accent);color:var(--accent-ink)}.sheet-item.danger b{color:var(--danger)}.sheet-actions{grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;display:grid}input.text{border:1px solid var(--line);background:var(--surface);width:100%;color:var(--text);font:inherit;border-radius:12px;padding:12px 14px;font-size:17px}.transport{background:var(--surface);border-top:1px solid var(--line);align-items:center;gap:14px;padding:10px 16px;display:flex}.loopbtn{color:var(--muted);flex-direction:column;align-items:center;width:44px;font-size:11px;font-weight:700;display:flex}.loopbtn.on{color:var(--accent)}.pos{min-width:0;color:var(--muted);flex-direction:column;flex:1;font-size:13px;display:flex}.pos b{color:var(--text);font-size:15px}.sheet-backdrop{z-index:20;background:#00000080;justify-content:center;align-items:flex-end;animation:.15s fade;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.sheet{width:100%;max-width:560px;max-height:85vh;background:var(--bg);max-height:85dvh;padding:8px 16px calc(16px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;animation:.2s ease-out up;overflow-y:auto}.sheet-handle{background:var(--line);border-radius:3px;width:40px;height:5px;margin:0 auto 12px}.sheet h2{font-size:20px}.sheet .hint{margin:2px 0 12px}.sheet-item{text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:2px;width:100%;margin-bottom:8px;padding:12px 14px;display:flex}.sheet-item span{color:var(--muted);font-size:14px}.sheet-item:active{background:var(--surface-2)}@keyframes fade{0%{opacity:0}}@keyframes up{0%{opacity:0;transform:translateY(40px)}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.bar-unit{letter-spacing:.02em;text-transform:uppercase;font-size:.72em;font-weight:700}.note-btn .bar-unit,.big-note .bar-unit{font-size:15px}
