/* A white practice surface; the two neon colours always identify the two hands. */
#metronome-open{position:absolute;top:9px;right:9px;z-index:3;display:grid;place-items:center;width:44px;height:44px;padding:9px;border:1px solid #ccebed;border-radius:16px;background:#f1fcfe;color:#26899d;box-shadow:0 3px 12px #079bae0b;touch-action:manipulation}
#metronome-open svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#metronome-open:hover{background:#e6fbff}#metronome-open.is-running{box-shadow:0 0 0 3px #00bcd426,0 0 18px #00bcd438}
#lab-metronome{position:fixed;z-index:90;top:max(78px,calc(env(safe-area-inset-top) + 68px));left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 28px));max-height:calc(var(--workspace-height,100dvh) - 96px - env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden;border:1px solid #e5edef;border-radius:28px;background:#fff;box-shadow:0 20px 75px #304f6626;color:#2e4552;font-size:15px;line-height:1.45;isolation:isolate}
#lab-metronome[hidden],#metro-mini[hidden],#lab-metronome [hidden],#metro-mini [hidden]{display:none!important}
.metro-header{display:flex;align-items:center;gap:8px;padding:18px 20px 12px;flex:none}.metro-header>div{flex:1;min-width:0}.metro-eyebrow{display:block;color:#748b95;font-size:11px;font-weight:600;letter-spacing:.15em}.metro-header h2{margin:3px 0 0;font-size:23px;font-weight:600;letter-spacing:-.04em;outline:none}
.metro-icon{display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:0;border:1px solid #e4ecef;border-radius:13px;background:#f6f9fb;color:#536e7c;font-size:24px;line-height:1;touch-action:manipulation}.metro-icon:hover{background:#edf7fa}
.metro-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 20px 16px}.metro-mode{display:flex;gap:4px;padding:4px;border:1px solid #e8eef0;background:#f5f8fa;border-radius:14px;margin-bottom:14px}.metro-mode button{flex:1;min-width:0;border:0;border-radius:10px;background:none;color:#687c89;font-size:14px;padding:8px 10px;min-height:38px}.metro-mode button[aria-pressed=true]{background:#fff;color:#294b5c;box-shadow:0 2px 8px #3f708018}
.metro-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.metro-visual-column{min-width:0}.metro-orbit{position:relative;width:min(280px,100%);margin:0 auto;aspect-ratio:1}#metro-geometry{display:block;width:100%;height:100%;overflow:visible}.metro-guide{fill:none;stroke:#e9eff1;stroke-width:1;stroke-dasharray:2 6}.metro-shape{fill:none;stroke:var(--rhythm-color);stroke-width:2;stroke-linejoin:round;filter:drop-shadow(0 0 3px color-mix(in srgb,var(--rhythm-color) 35%,transparent))}.metro-shape polygon,.metro-shape>circle:not(.metro-vertex){fill:color-mix(in srgb,var(--rhythm-color) 3%,transparent)}.metro-vertex{fill:#fff;stroke-width:2;transition:fill .08s,r .08s}.metro-vertex.is-silent{stroke-dasharray:2 2;opacity:.5}.metro-vertex.is-beating{fill:var(--rhythm-color);r:8;filter:drop-shadow(0 0 6px var(--rhythm-color))}#metro-needle{stroke:#17212a;stroke-width:1.4;stroke-linecap:round;will-change:transform}.metro-center{fill:#17212a}.metro-cycle{position:absolute;left:50%;top:58%;transform:translateX(-50%);font-size:12px;font-variant-numeric:tabular-nums;color:#85959e}
.metro-ratio{display:flex;align-items:center;justify-content:center;gap:18px;margin:-3px 0 4px}.metro-roller{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:64px;height:86px;border:1px solid #d9eef3;border-radius:18px;background:linear-gradient(#faffff,#edfbff 50%,#faffff);color:#087f97;touch-action:none;cursor:ns-resize;user-select:none;overflow:hidden;outline-offset:3px;font-variant-numeric:tabular-nums}.metro-roller[data-count=b]{color:#b9307c;border-color:#f3dfeb;background:linear-gradient(#fffafd,#fdf0f7 50%,#fffafd)}.metro-roller strong{font-size:31px;line-height:1.2;font-weight:550}.metro-roller>span{font-size:15px;line-height:20px;opacity:.35}.metro-ratio-separator{font-size:24px;color:#92a0a8}
.metro-clock-hint,.metro-dial-hint,.metro-pattern-hint,.metro-small{font-size:12px;line-height:1.5;color:#738792}.metro-clock-hint,.metro-dial-hint{text-align:center;margin:9px 0}.metro-tempo-controls{display:flex;align-items:center;justify-content:center;gap:9px;margin:12px 0 0;direction:ltr}.metro-tempo-dial{position:relative;display:grid;place-items:center;flex:none;width:100px;height:100px;border-radius:50%;background:repeating-conic-gradient(#cddde4 0deg 1deg,transparent 1deg 10deg),#f0f5f8;box-shadow:inset 0 1px 3px #70839228,0 3px 14px #4b7c8c14;touch-action:none;cursor:grab;user-select:none;outline-offset:4px}.metro-tempo-dial:active{cursor:grabbing}.metro-tempo-dial:after{content:'';position:absolute;inset:6px;border-radius:50%;border:2px solid #e2f1f6;border-top-color:#00a9c5;transform:rotate(var(--dial-angle));pointer-events:none}.metro-tempo-face{width:76px;height:76px;border-radius:50%;background:linear-gradient(135deg,#fff,#f1f8fb);display:flex;flex-direction:column;justify-content:center;align-items:center;box-shadow:0 2px 8px #5c819025;pointer-events:none}.metro-tempo-face strong{font-size:27px;line-height:1.1;font-variant-numeric:tabular-nums;font-weight:550}.metro-tempo-face span{font-size:10px;color:#7b8c94;letter-spacing:.08em;margin-top:3px}.metro-tap{border:1px solid #e0e8ed;background:#fff;border-radius:13px;min-height:38px;padding:8px 11px;font-size:13px;font-weight:600;letter-spacing:.04em;color:#546c78}.metro-tap.is-tapped{animation:metro-tap .2s ease-out}@keyframes metro-tap{50%{background:#dcf8ff;box-shadow:0 0 16px #00a9c533}}
.metro-controls{min-width:0}.metro-track{border:1px solid color-mix(in srgb,var(--rhythm-color) 18%,#eaf0f2);border-radius:18px;padding:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--rhythm-color) 4%,white),#fff);margin-bottom:12px}.metro-track-heading{display:flex;align-items:center;gap:6px;margin-bottom:10px}.metro-track-heading strong{font-size:14px;font-weight:600;white-space:nowrap;color:var(--rhythm-color)}#lab-metronome select{font-size:14px;min-height:36px;padding:6px 24px 6px 8px;border:1px solid #e0e8ec;border-radius:10px;background-color:#fff;color:#45616f;min-width:0;width:100%;margin:0;box-shadow:none}.metro-track-heading select{flex:1}.metro-mute{width:30px;height:30px;min-width:30px;border:0;border-radius:10px;background:color-mix(in srgb,var(--rhythm-color) 9%,white);color:var(--rhythm-color);font-size:19px;padding:0}.metro-mute[aria-pressed=true]{background:#f1f4f5;color:#a4adb2}.metro-bank-label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;font-size:13px;color:#6a828c}.metro-steps{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.metro-steps button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:36px;min-height:45px;padding:4px;border:1px solid #dde8ed;border-radius:9px;background:#fff;color:#536b77;transition:background .07s,border-color .07s}.metro-steps span{font-size:12px;line-height:1}.metro-steps i{display:grid;place-items:center;font-size:12px;font-weight:600;font-style:normal;line-height:19px;width:19px;border-radius:6px;background:color-mix(in srgb,var(--rhythm-color) 12%,white);color:var(--rhythm-color)}.metro-steps button[data-tone='2'] i{background:color-mix(in srgb,var(--rhythm-color) 25%,white)}.metro-steps button[data-tone='3'] i{background:var(--rhythm-color);color:#fff}.metro-steps button[data-tone='0']{border-style:dashed;opacity:.6}.metro-steps button[data-tone='0'] i{background:#edf0f2;color:#8c9aa2}.metro-steps .is-beating{border-color:var(--rhythm-color);background:color-mix(in srgb,var(--rhythm-color) 9%,white);box-shadow:0 0 10px color-mix(in srgb,var(--rhythm-color) 20%,transparent)}
.metro-pattern-hint{margin:0 0 15px}#lab-metronome details{border-top:1px solid #e8edef;padding:12px 0;font-size:14px}#lab-metronome summary{cursor:pointer;font-weight:500;color:#506a77}#lab-metronome details p{margin:12px 0 0;font-size:13px;line-height:1.6;color:#6a808b}.metro-note-selects{display:grid;gap:8px;margin-top:12px}.metro-note-selects label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;font-size:13px}.metro-classic-config{display:flex;gap:8px;margin-top:10px;align-items:flex-end}.metro-classic-config label{flex:1;font-size:12px;color:#6b828f}.metro-classic-config select{margin-top:5px!important}.metro-footer{flex:none;display:flex;align-items:center;gap:18px;padding:12px 20px 16px;border-top:1px solid #edf1f3;background:#fff}.metro-play{display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid #c5eaf2;border-radius:16px;min-height:46px;min-width:130px;padding:10px 18px;color:#087b92;background:#e9faff;font-size:15px;font-weight:550}.metro-play[aria-pressed=true]{background:#f5eef8;color:#a04687;border-color:#ecd8e9}.metro-play svg,.metro-mini-play svg{width:22px;height:22px;fill:currentColor}.metro-volume{display:flex;align-items:center;gap:10px;font-size:12px;color:#6a808d;flex:1;min-width:0}.metro-volume input{width:100%;min-width:40px;accent-color:#23a9c1;margin:0}
#metro-mini{position:absolute;z-index:76;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;max-width:calc(100% - 20px);padding:7px 9px;border:1px solid #e4edf1;border-radius:22px;background:#ffffffef;box-shadow:0 8px 32px #3d718720;backdrop-filter:blur(16px)}.metro-mini-open{display:flex;align-items:center;gap:8px;border:0;padding:0;background:none;color:#395966;font-size:14px;white-space:nowrap}.metro-mini-open>svg{width:37px;height:37px;flex:none;fill:none;stroke:#c8e8ef;stroke-width:1.5}.metro-mini-open .mini-needle{stroke:#1e313c;stroke-width:1}.metro-mini-open b{font-size:15px;font-variant-numeric:tabular-nums}.metro-mini-open small{font-size:10px;font-weight:400;color:#7b929e}.metro-mini-ratio{font-weight:600}.metro-mini-hands{display:flex;gap:3px}.metro-mini-hands i{font-size:10px;font-weight:550;font-style:normal;min-width:23px;text-align:center;padding:5px 2px;border:1px solid color-mix(in srgb,var(--rhythm-color) 20%,white);border-radius:7px;color:var(--rhythm-color)}.metro-mini-hands .is-beating{background:var(--rhythm-color);color:#fff;box-shadow:0 0 9px color-mix(in srgb,var(--rhythm-color) 40%,transparent)}.metro-mini-play{display:grid;place-items:center;width:36px;height:36px;flex:none;border:0;border-radius:12px;background:#eafaff;color:#168a9f;padding:7px}#metro-mini>.metro-icon{width:28px;height:32px;min-width:28px;border:0;background:none;font-size:22px}
#instrument-view.metronome-visible #music-floating,#instrument-view.metronome-visible .workspace-edge-controls,#instrument-view.metronome-visible #fullscreen-controls,#instrument-view.metronome-visible .inspire-floating-transport{visibility:hidden!important;pointer-events:none!important}
.handpan-note.metro-note-hit{border-color:var(--metro-hand-color)!important;box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--metro-hand-color) 75%,transparent),0 0 22px color-mix(in srgb,var(--metro-hand-color) 45%,transparent)!important;transition:none!important}.metro-hand-tag{position:absolute;left:50%;top:12%;transform:translateX(-50%) rotate(calc(-1 * var(--rotation,0deg)));z-index:6;border-radius:7px;padding:2px 5px;background:var(--metro-hand-color);color:#fff;font-size:11px;font-weight:600;line-height:1.2;pointer-events:none}
/* Keep the tempo dial visible beside the ratio on desktop as well. */
@media(min-width:621px){.metro-visual-column{display:grid;grid-template-columns:1fr 1fr;gap:0 8px;align-items:center}.metro-orbit{grid-column:1/-1;width:240px}.metro-ratio{grid-column:1;grid-row:2;gap:10px;margin:5px 0}.metro-roller{width:55px;height:78px}.metro-tempo-controls{grid-column:2;grid-row:2;margin:0;gap:4px;flex-wrap:wrap}.metro-tempo-controls .metro-icon{width:28px;height:30px;min-width:28px;font-size:20px}.metro-tempo-dial{width:78px;height:78px}.metro-tempo-face{width:58px;height:58px}.metro-tempo-face strong{font-size:23px}.metro-tap{min-height:28px;padding:4px 10px;font-size:11px}.metro-clock-hint{grid-column:1;grid-row:3}.metro-dial-hint{grid-column:2;grid-row:3}.metro-clock-hint,.metro-dial-hint{font-size:11px;margin:6px 0}.metro-classic-config{grid-column:1/-1;grid-row:2}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-tempo-controls{grid-column:1/-1;grid-row:3;margin-top:10px}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-clock-hint{grid-column:1/-1;grid-row:4}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-dial-hint{display:none}}
@media(max-width:620px){#lab-metronome{width:calc(100vw - 24px);top:max(74px,calc(env(safe-area-inset-top) + 65px));max-height:calc(var(--workspace-height,100dvh) - 90px - env(safe-area-inset-bottom));border-radius:24px}.metro-header{padding:14px 15px 10px}.metro-header h2{font-size:21px}.metro-scroll{padding:0 14px 14px}.metro-columns{grid-template-columns:1fr;gap:16px}.metro-visual-column{display:grid;grid-template-columns:1fr 1fr;gap:0 8px;align-items:center}.metro-orbit{grid-column:1/-1;width:min(226px,100%)}.metro-ratio{grid-column:1;gap:9px;margin:5px 0}.metro-roller{width:51px;height:70px;border-radius:14px}.metro-roller strong{font-size:27px}.metro-roller>span{font-size:12px;line-height:17px}.metro-tempo-controls{grid-column:2;grid-row:2;margin:0;gap:4px;flex-wrap:wrap}.metro-tempo-controls .metro-icon{width:28px;height:30px;min-width:28px;font-size:20px;border-radius:10px}.metro-tempo-dial{width:76px;height:76px}.metro-tempo-face{width:57px;height:57px}.metro-tempo-face strong{font-size:23px}.metro-tempo-face span{font-size:9px}.metro-tap{min-height:27px;padding:4px 10px;font-size:11px}.metro-clock-hint{grid-column:1;grid-row:3;text-align:center;font-size:11px;margin:6px 0}.metro-dial-hint{grid-column:2;grid-row:3;font-size:11px;margin:6px 0}.metro-classic-config{grid-column:1/-1;grid-row:2;margin:8px 0}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-tempo-controls{grid-column:1/-1;grid-row:3;margin-top:6px}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-clock-hint{grid-column:1/-1;grid-row:4}.metro-visual-column:has(.metro-classic-config:not([hidden])) .metro-dial-hint{display:none}.metro-footer{padding:10px 14px 12px;gap:12px}.metro-play{min-width:120px}.metro-volume{flex-direction:column;gap:3px;align-items:stretch;font-size:11px}.metro-mode{margin-bottom:8px}.metro-track{padding:10px}.metro-pattern-hint{font-size:12px}.metro-mini-open{gap:5px}.metro-mini-open>svg{width:30px;height:30px}#metro-mini{gap:5px}.metro-mini-hands i{min-width:21px}}
@media(max-height:550px) and (min-width:621px){#lab-metronome{top:68px;max-height:calc(100dvh - 80px)}.metro-header{padding:10px 16px}.metro-orbit{width:210px}.metro-columns{gap:15px}.metro-footer{padding:8px 16px}.metro-scroll{padding-inline:16px}}
@media(prefers-reduced-motion:reduce){.metro-vertex,.metro-steps button{transition:none}.metro-tap.is-tapped{animation:none}}
/* Two explicit tool entries share the Lab menu header, clear of the wheel. */
#wheel-dock.is-floating .dock-panel:has(#tuner-open){padding-top:66px}
#metronome-open,#tuner-open{position:absolute;top:9px;right:9px;width:auto;height:44px;min-width:105px;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 10px;border:1px solid #d4e8ee;border-radius:14px;background:#f0fbff;color:#267d93;font-size:13px;font-weight:550;z-index:3}
#metronome-open{right:119px}#tuner-open{min-width:100px;background:#fff8e6;border-color:#ebdeba;color:#96752f}#tuner-open svg,#metronome-open svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.metro-note-picker{border-top:1px solid #ddeaf0;margin-top:12px;padding-top:12px}.metro-note-picker>div:first-child{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#4c697a;margin-bottom:9px}.metro-note-picker [data-picker-close]{border:0;background:none;color:#738d9c;font-size:24px;min-width:32px;min-height:32px}.metro-note-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px;max-height:230px;overflow:auto}.metro-note-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #d7e8ef;border-radius:11px;background:white;color:#4b6b7b;min-height:48px;padding:7px 4px}.metro-note-grid button:hover{border-color:var(--rhythm-color);background:color-mix(in srgb,var(--rhythm-color) 7%,white)}.metro-note-grid b{font-size:16px;font-weight:600}.metro-note-grid small{font-size:12px;color:#839aa8}.metro-note-grid [data-pick-tone='0']{font-size:12px;border-style:dashed}.metro-steps i{min-width:22px;width:auto;padding-inline:3px}.metro-steps i span{font-size:13px}
@media(max-width:360px){#metronome-open,#tuner-open{padding:7px;min-width:0;font-size:12px;gap:4px}#metronome-open{right:102px}#tuner-open{width:86px}#metronome-open svg,#tuner-open svg{width:18px;height:18px}}
#lab-tools{position:absolute;top:9px;left:62px;right:9px;display:flex;justify-content:flex-end;gap:6px;z-index:3}#lab-tools #metronome-open,#lab-tools #tuner-open{position:static;min-width:0;width:auto;max-width:60%;height:44px;padding:7px 9px;flex:0 1 auto;font-size:13px;line-height:1.2;text-align:center}#lab-tools span{min-width:0}html[dir=rtl] #lab-tools{direction:rtl}
