/* Metronome page */
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:14px;text-align:center;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.bpm{font-size:88px;font-weight:800;line-height:1;margin-top:6px}
.bpm small{font-size:18px;color:var(--mut);margin-left:6px;font-weight:600}
/* the tempo marking under the number: its Italian name and what it means */
.mark{margin:6px 0 0;font-size:15px;color:var(--mut)}
.mark b{color:var(--acc);font-size:20px;font-weight:700;margin-right:4px}
/* every marking, slowest to fastest; the current one lit orange */
.marks{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:4px 0 14px}
.marks button{font:inherit;font-size:12px;font-weight:600;line-height:1.5;padding:2px 9px;border-radius:999px;border:1px solid var(--line);
  background:transparent;color:var(--mut);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.marks button:hover{border-color:var(--mut);color:var(--fg)}
.marks button.on{background:var(--acc);border-color:var(--acc);color:#fff}
.marks button:focus-visible{outline:2px solid var(--f1);outline-offset:2px}
input[type=range]{width:100%;accent-color:var(--acc);margin:14px 0 8px;touch-action:manipulation}
.nudge{display:flex;justify-content:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.controls{display:flex;justify-content:center;margin-bottom:8px}
.controls label{display:flex;flex-direction:column;font-size:13px;color:var(--mut);gap:4px;text-align:left}
select{padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--fg);font-size:15px}
.nudge button,.btn{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.nudge button{padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--fg);font-size:15px;font-weight:600}
.beats{display:flex;justify-content:center;gap:14px;margin:18px 0;flex-wrap:wrap}
.beat{width:46px;height:46px;border-radius:50%;border:2px solid var(--line);background:var(--card);transition:background .05s}
.beat.first{border-color:var(--acc)}
.beat.on{background:var(--ok);border-color:var(--ok)}
.beat.first.on{background:var(--acc);border-color:var(--acc)}
.row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.btn{padding:12px 28px;font-size:17px;font-weight:700;border:0;border-radius:10px;background:var(--acc);color:#fff}
.btn.alt{background:var(--card);color:var(--fg);border:1px solid var(--line)}
.hint{color:var(--mut);font-size:13px;margin-top:12px}
/* the pendulum behind the card: a faint orange line from a pivot at the bottom centre */
.mcard{position:relative;overflow:hidden}
.mcard>*:not(.arm):not(.pivot){position:relative}
.arm{position:absolute;left:50%;bottom:0;width:4px;margin-left:-2px;height:calc(100% - 24px);transform-origin:50% 100%;
  background:var(--acc);border-radius:2px;opacity:.15;pointer-events:none;will-change:transform}
.pivot{position:absolute;left:50%;bottom:-9px;width:18px;height:18px;margin-left:-9px;border-radius:50%;background:var(--acc);opacity:.24;pointer-events:none}