/* Private metronome console: preserves the HertzKit palette and existing controls. */
body.hk-tool.hk-metronome-console main{padding-top:12px}
.hk-metronome-console .skip-link:not(:focus){position:fixed;left:-10000px;top:0;transform:none}
.hk-metronome-console .studio-toolbar{padding-bottom:8px;margin-bottom:12px}
.hk-metronome-console .tool-header{padding-bottom:12px;margin-bottom:12px}
.hk-metronome-console .tool-header h1{font-size:clamp(1.8rem,3vw,2.15rem);line-height:1.2;margin:0 0 8px}
.hk-metronome-console .tool-header .hk-workspace-category{margin-bottom:8px}
.hk-metronome-console .tool-header .tool-intro{font-size:1rem;line-height:1.5}
.hk-metronome-console .tool-panel.mm-console{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:0;padding:0;margin:0 0 14px;box-shadow:none;overflow:hidden;border:1px solid #34474f;border-radius:12px;background:#17242b}
.mm-console-controls,.mm-console-visual{padding:18px;min-width:0}
.mm-console-visual{border-left:1px solid #34474f;background:#111d23;display:flex;flex-direction:column;justify-content:center}
.mm-console label{display:block;color:#d4e1e6;font-size:.9rem;font-weight:500;line-height:1.5}
.mm-console-tempo>label{margin:0 0 4px}
.mm-console-tempo-edit{display:flex;align-items:center;justify-content:center;gap:10px;margin:0}
.mm-console-tempo-edit>button{width:44px;height:44px;border-radius:6px;border:1px solid #47616c;background:#253943;color:#eef7f8;font:inherit;font-size:1.4rem;cursor:pointer}
body.hk-metronome-console #metro-bpm{width:150px;max-width:60%;min-height:60px;height:60px;box-sizing:border-box;padding:4px 8px;font:500 2.7rem/1.2 'IBM Plex Sans',sans-serif;font-variant-numeric:tabular-nums;text-align:center;color:#69d2ce;background:#101a20;border:1px solid #47616c;border-radius:7px}
body.hk-metronome-console #metro-bpm-slider{display:block;width:100%;max-width:none;min-height:32px;margin:4px 0;padding:0;accent-color:#57c4c0}
.mm-console #metro-tempo-name{text-align:center;margin:0 0 12px;font-size:.78rem;line-height:1.4;color:#c3d0d5}
.mm-console-transport{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.mm-console-transport>button{margin:0!important;min-height:44px;font-size:.9rem}
.mm-console-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.mm-console-fields>label{margin:0!important;min-width:0;font-size:.85rem;color:#d4e1e6}
.mm-console-fields select{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:44px;margin:6px 0 0;color:#edf4f5;background:#101a20;border:1px solid #47616c;border-radius:6px;padding:8px;font:inherit;font-size:.9rem}
.mm-console select:disabled{color:#bac9cf;opacity:.8}
body.hk-metronome-console #metro-unit{font:inherit;font-size:.82rem;line-height:1.6;color:#c3d0d5;margin:8px 0 10px;text-align:left;min-height:0}
.mm-console-volume label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.85rem;margin:0!important}
.mm-console-volume input{min-width:80px;width:120px;min-height:32px;padding:0;accent-color:#57c4c0}
.mm-console-volume output,.mm-console-volume span{font-size:.8rem}
body.hk-metronome-console .mm-console #metro-canvas{width:100%;height:215px;min-height:215px;display:block;margin:0;border:0;background:transparent}
.mm-console .mm-accents-wrap{margin:6px 0 0}
.mm-console .mm-accents-label{font-size:.8rem;line-height:1.5;color:#c3d0d5;margin:0 0 8px}
.mm-console .mm-accents{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.mm-console .mm-beat{min-width:38px;min-height:44px;padding:6px;font:inherit;border-radius:6px}
.mm-console #metro-accents-note,.mm-console #metro-legend{font-size:.78rem;line-height:1.5;margin:6px 0 0;color:#c3d0d5}
.mm-console #metro-legend:empty,.mm-console #metro-accents-note:empty{display:none}
body.hk-metronome-console #metro-status{grid-column:1/-1;margin:0;padding:10px 18px;min-height:44px;box-sizing:border-box;border-top:1px solid #34474f;font-size:.9rem;line-height:1.5;background:#111d23;color:#d6e3e7}
.hk-metronome-console :is(.mm-console-options,.mm-console-settings,.mm-console-help){padding:0 18px;margin:0 0 14px;box-shadow:none}
.hk-metronome-console :is(.mm-console-options,.mm-console-settings,.mm-console-help)>summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:600;line-height:1.4;box-sizing:border-box}
.hk-metronome-console :is(.mm-console-options,.mm-console-settings,.mm-console-help)>summary h2{display:inline;font-size:1rem;margin:0}
.hk-metronome-console :is(.mm-console-options,.mm-console-settings,.mm-console-help)[open]{padding-bottom:16px}
.hk-metronome-console .mm-console-options :is(.mm-trainer,.mm-sync){margin:16px 0 0;text-align:left}
.hk-metronome-console .mm-console-options :is(.mm-trainer,.mm-sync)>summary{cursor:pointer;min-height:44px;align-content:center}
.hk-metronome-console .mm-console-options .controls-row{justify-content:flex-start!important;gap:12px}
.hk-metronome-console .mm-console-options input[type=number]{box-sizing:border-box;min-height:44px}
.hk-metronome-console .mm-help-body>ol>li{margin:10px 0}
.hk-metronome-console .mm-help-body>details>summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}
.hk-metronome-console .mm-help-body>details p{font-size:.95rem;line-height:1.7}
.hk-metronome-console :is(button,summary,input,select,a):focus-visible{outline:2px solid #7de3dd;outline-offset:3px}
.hk-metronome-console .hk-session-options:empty{display:none}
@media(max-width:760px){.hk-metronome-console .tool-panel.mm-console{grid-template-columns:minmax(0,1fr)}.mm-console-visual{border-left:0;border-top:1px solid #34474f;padding:12px 16px}.mm-console-controls{padding:16px}body.hk-metronome-console .mm-console #metro-canvas{height:190px;min-height:190px}.mm-console-fields{gap:10px}.mm-console-transport{gap:6px}.mm-console-transport>button{flex:1 1 auto}.mm-console .mm-beat{min-width:36px}.mm-console #metro-tempo-name{margin-bottom:10px}.mm-console-volume input{min-height:44px}.hk-metronome-console .mm-console-options .mm-console-fields{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.hk-metronome-console *{scroll-behavior:auto!important}}

.hk-metronome-guide .skip-link:not(:focus){position:fixed;left:-10000px;top:0;transform:none}

/* Silent-bar practice keeps the canvas geometry and only changes the visible cue. */
.mm-gap-stage{position:relative;width:100%;min-width:0}.mm-gap-stage.mm-gap-hidden canvas{visibility:hidden}.mm-gap-mask{position:absolute;inset:0;display:grid;place-items:center;border:1px solid #34474f;border-radius:8px;color:#8dd9d4;font-size:1.05rem;background:#111d23}.mm-gap-mask[hidden]{display:none}
.mm-gap-live{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 12px;min-height:3.2em;margin:8px 0 0;font-size:.8rem;line-height:1.6;color:#b8c5ca;font-variant-numeric:tabular-nums}.mm-gap-live[hidden]{display:none}#metro-gap-phase{color:#8dd9d4;font-weight:500}
.hk-metronome-console .mm-gap-options{margin:16px 0 0}.mm-gap-options>summary{cursor:pointer;min-height:44px;align-content:center}.mm-gap-options p{font-size:.85rem;line-height:1.7;max-width:70ch}.mm-gap-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:430px;margin:8px 0}.mm-gap-fields label{display:block;font-size:.85rem;min-width:0}.mm-gap-fields select{display:block;width:100%;min-height:44px;box-sizing:border-box;margin-top:6px}.mm-gap-options .mm-gap-check{display:flex;align-items:center;gap:8px;min-height:44px;font-size:.85rem;line-height:1.6}.mm-gap-check input{width:18px;height:18px;margin:0;accent-color:#57c4c0;color-scheme:dark;flex-shrink:0}

/* Compact phone workspace. Desktop keeps the existing open controls. */
.mm-main-settings>summary,.mm-accents-wrap>summary,.mm-label-short,.mm-mobile-unit{display:none}
.mm-main-settings{margin:0;padding:0;border:0}.mm-settings-current{font-weight:400}
@media(max-width:760px){
 body.hk-metronome-console .mm-console-context{grid-template-columns:minmax(0,1fr) auto auto;gap:6px;padding:8px 12px}
 .mm-console-context>span{grid-column:auto;font-size:.73rem;line-height:1.5}.mm-console-context button{padding:8px;font-size:.75rem;min-width:0}
 .mm-label-full{display:none}.mm-label-short{display:inline}
 .mm-console-controls{padding:12px}.mm-console #metro-tempo-name{font-size:.68rem;margin:0 0 6px}
 body.hk-metronome-console #metro-bpm{height:52px;min-height:52px;font-size:2.3rem}
 .mm-console-tempo>label{font-size:.8rem}.mm-console-transport{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:4px}.mm-console-transport>.btn{min-width:0;min-height:44px;padding:8px 6px;font-size:.78rem}
 .mm-mobile-unit{display:block;font-size:.75rem;line-height:1.6;color:#c3d0d5;min-height:3.2em;margin:4px 0}
 .mm-main-settings>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:6px 0;border-top:1px solid #34474f;cursor:pointer;font-size:.82rem;line-height:1.5;list-style:none}
 .mm-main-settings>summary>span:first-child{flex-shrink:0;font-weight:600}.mm-main-settings>summary>span:first-child::before{content:'▸';display:inline-block;margin-right:6px}.mm-main-settings[open]>summary>span:first-child::before{content:'▾'}
 .mm-settings-current{text-align:right;font-size:.72rem;color:#b8c5ca;overflow-wrap:anywhere}
 .mm-main-settings #metro-unit{display:none}.mm-main-settings[open]{padding-bottom:4px}.mm-main-settings .mm-console-volume{margin-top:12px}
 .mm-console-visual{padding:10px 12px}.mm-console #metro-canvas{touch-action:pan-y}
 body.hk-metronome-console .mm-console #metro-canvas{height:150px;min-height:150px}
 body.hk-metronome-console .mm-console.mm-detailed-grid #metro-canvas{height:190px;min-height:190px}
 .mm-console .mm-accents-wrap>summary{display:list-item;list-style-position:inside;min-height:44px;align-content:center;font-size:.8rem;cursor:pointer;text-align:left}
 .mm-console.mm-fixed-pattern #metro-accent-settings{display:none}.mm-console .mm-accents-wrap[open]{padding-bottom:8px}
 .mm-console .mm-accents-label{font-size:.75rem}.mm-console #metro-status{font-size:.78rem;padding:8px 12px;min-height:44px}
}
@media(max-width:760px){body.hk-metronome-console .mm-console .mm-console-context{grid-template-columns:minmax(0,1fr) auto auto;gap:6px;padding:8px 12px}.mm-console .mm-console-context>span{grid-column:auto;font-size:.73rem;line-height:1.5}.mm-console .mm-console-context button{padding:8px;font-size:.75rem;min-width:0}.mm-console .mm-console-transport>button.btn{width:100%;box-sizing:border-box;justify-self:stretch}}

.mm-console .mm-return-practice{display:none}@media(max-width:760px){.mm-console .mm-return-practice{display:flex;justify-content:center;width:100%;min-height:44px;box-sizing:border-box;margin-top:12px;font-size:.8rem}}
@media(max-width:760px){.mm-console .mm-console-context>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-width:0}}

@media(max-width:760px){.mm-console .mm-console-transport>button.btn{white-space:normal;overflow-wrap:anywhere;flex-wrap:wrap;column-gap:5px;row-gap:2px}.mm-console .mm-return-practice{white-space:normal;overflow-wrap:anywhere}}
.hk-metronome-console .studio-toolbar{flex-wrap:wrap;gap:8px}.hk-metronome-console .studio-toolbar>*{min-width:0;max-width:100%}
