/* Doki metronome (js/doki-metronome.js): the course metronome look, copied from academy.css so pages without the course can use it. */
.metro-float{position:fixed;top:84px;right:24px;z-index:900;width:300px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);display:flex;flex-direction:column;overflow:auto;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:0 18px 50px rgba(29,20,70,.22)}
.metro-float[hidden]{display:none}
.metro-float.min{height:auto!important;min-height:0;resize:none}.metro-float.min .metro-body{display:none}
.metro-float.dragging iframe{pointer-events:none}
.metro-head{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);cursor:grab;user-select:none;touch-action:none;font-size:13px}
.metro-float.dragging .metro-head{cursor:grabbing}
.metro-head strong{flex:1;color:var(--ink);font-family:var(--serif);font-size:15px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.metro-head strong small{font-family:'Segoe UI',Arial,sans-serif;font-size:12px;color:var(--muted);font-weight:400;margin-left:4px}
.metro-grip{color:var(--muted)}
.metro-head a,.metro-head button{display:grid;place-items:center;width:26px;height:26px;border-radius:7px;border:0;background:transparent;color:var(--muted);text-decoration:none;font-size:15px;cursor:pointer}
.metro-head a:hover,.metro-head button:hover{background:var(--paper);color:var(--accent)}
.metro-body{flex:1;min-height:0}.metro-body iframe{width:100%;height:100%;border:0;display:block;background:var(--bg)}
@media(max-width:600px){.metro-float{left:8px!important;right:8px;top:auto!important;bottom:8px;width:auto;height:70vh;resize:none}.metro-btn{padding:6px 9px}}
.metro-body{padding:12px 14px 10px;font-size:13px;color:var(--ink)}
.mt-main{display:flex;align-items:center;gap:12px}
.mt-play{flex:none;width:52px;height:52px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:18px;cursor:pointer;box-shadow:0 6px 16px color-mix(in srgb,var(--accent) 35%,transparent)}
.mt-play.on{background:var(--gold,#d99a2b)}
.mt-bpm{flex:1;display:grid;grid-template-columns:auto 1fr;align-items:baseline;column-gap:6px;line-height:1}
.mt-bpm b{font:400 34px/1 var(--serif);color:var(--ink)}.mt-bpm span{font-size:11px;font-weight:700;color:var(--muted)}
.mt-bpm small{grid-column:1/-1;margin-top:4px;font-size:11px;color:var(--muted)}
.mt-tap{flex:none;padding:7px 12px;border:1px solid color-mix(in srgb,var(--gold,#d99a2b) 50%,transparent);border-radius:10px;background:color-mix(in srgb,var(--gold,#d99a2b) 12%,transparent);color:var(--gold,#d99a2b);font-size:12px;font-weight:700;cursor:pointer}
.mt-pendulum{display:block;width:36px;height:52px;flex:none;overflow:visible}
.mt-pendulum-case{fill:var(--paper);stroke:var(--gold,#d99a2b);stroke-width:1.2;stroke-linejoin:round}
.mt-pendulum-scale{fill:none;stroke:var(--line);stroke-width:1;stroke-linecap:round}
.mt-pendulum-arm{transform-origin:24px 56px}
.mt-pendulum-arm path{fill:none;stroke:var(--accent);stroke-width:1.6;stroke-linecap:round}
.mt-pendulum-arm rect{fill:var(--accent)}
.mt-pendulum-pivot{fill:var(--gold,#d99a2b)}
.mt-dots{display:flex;gap:6px;margin:12px 0 10px}
.mt-dots i{flex:1;height:6px;border-radius:3px;background:var(--line)}
.mt-dots i.acc{background:color-mix(in srgb,var(--accent) 35%,var(--line))}
.mt-dots i.on{background:var(--accent)}.mt-dots i.acc.on{background:var(--gold,#d99a2b)}
.mt-nudge{display:flex;align-items:center;gap:4px;margin-bottom:10px}
.mt-nudge button{flex:none;padding:5px 7px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink2);font-size:12px;font-weight:600;cursor:pointer}
.mt-range{flex:1;min-width:0;accent-color:var(--accent)}
.mt-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-bottom:8px}
.mt-row>span{width:100%;font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.mt-pills{display:inline-flex;flex-wrap:wrap;gap:3px;padding:2px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.mt-pills button{border:0;background:transparent;color:var(--ink2);font-size:12px;font-weight:600;padding:4px 8px;border-radius:8px;cursor:pointer}
.mt-pills button.active{background:var(--accent);color:#fff}
.mt-acc{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--ink2);cursor:pointer}
.mt-acc input{accent-color:var(--accent)}
.mt-keys{margin:4px 0 0;font-size:11px;color:var(--muted)}
@media(max-width:600px){.metro-float{height:auto}}
.mt-vol{width:100%;accent-color:var(--accent)}.mt-row>span b.mt-volv{color:var(--accent);font-weight:700}

/* Isolate compact controls from product-wide button padding and line height. */
.metro-head button,.metro-head a{box-sizing:border-box;flex:none;padding:0;line-height:1;align-items:center;justify-content:center}
.mt-play{display:grid;place-items:center;padding:0;line-height:1}

/* Floating content must be opaque even when Nebula surfaces are translucent. */
:root[data-theme="dark"]:not([data-look]) .metro-float,
:root[data-look="nebula-dark"] .metro-float{background:#27224f}

/* Match the course's 120% desktop reading scale for the floating controls. */
@media(min-width:601px){.metro-float{zoom:1.2}}
