/* BANDA DE LA CALA · METRÒNOM v0.74 */
.metronome-launcher{
  width:100%;margin:10px 0 0;border:1px solid rgba(57,58,134,.22);border-radius:17px;
  background:linear-gradient(145deg,#fff,#f4f4fb);color:var(--blue-deep);padding:16px 18px;
  display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;font:900 13px/1.2 inherit;
  letter-spacing:.055em;box-shadow:0 8px 18px rgba(36,33,31,.07);transition:transform .15s ease,box-shadow .15s ease;
}
.metronome-launcher:active{transform:scale(.985)}
.metronome-launcher-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--gold);color:var(--blue-deep);font-size:19px;box-shadow:0 0 0 4px rgba(212,172,95,.14)}
.metronome-overlay[hidden]{display:none!important}
.metronome-overlay{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px;overflow:auto}
.metronome-backdrop{position:absolute;inset:0;background:rgba(24,24,36,.72);backdrop-filter:blur(5px)}
.metronome-dialog{position:relative;z-index:1;width:min(620px,100%);max-height:calc(100dvh - 40px);overflow:auto;background:#fbfaf7;border:1px solid rgba(212,172,95,.36);border-radius:28px;box-shadow:0 30px 80px rgba(0,0,0,.35);padding:24px;isolation:isolate}
.metronome-dialog::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:url('assets/brand/imago-banda-de-la-cala.png') center 58%/74% auto no-repeat;opacity:.11;filter:saturate(1.05)}
.metronome-dialog>*{position:relative;z-index:1}
.metronome-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.metronome-head .eyebrow{color:var(--gold-deep)}
.metronome-head h2{margin:3px 0 0;font-size:2rem;line-height:1;color:var(--blue-deep)}
.metronome-close{width:42px;height:42px;min-width:42px;border:0;border-radius:50%;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue);font-size:28px;line-height:1;cursor:pointer}
.metronome-display{text-align:center;padding:28px 0 18px}
.metronome-kicker{font-size:.7rem;font-weight:950;letter-spacing:.12em;color:var(--gold-deep)}
.metronome-bpm-line{display:flex;align-items:flex-end;justify-content:center;gap:9px;margin-top:3px}
.metronome-bpm-line strong{font-size:5rem;line-height:.9;color:var(--blue-deep);letter-spacing:-.05em}
.metronome-bpm-line span{font-size:1rem;font-weight:950;color:var(--muted);padding-bottom:8px}
.metronome-beat-dots{display:flex;justify-content:center;gap:10px;min-height:22px;margin-top:24px}
.metronome-beat-dots span{width:13px;height:13px;border-radius:50%;background:#d8d5ce;transition:transform .06s ease,background .06s ease,box-shadow .06s ease}
.metronome-beat-dots span.is-accent{box-shadow:inset 0 0 0 2px var(--gold)}
.metronome-beat-dots span.is-active{transform:scale(1.55);background:var(--blue)}
.metronome-beat-dots span.is-active.is-accent{background:var(--gold);box-shadow:0 0 0 5px rgba(212,172,95,.16)}
.metronome-controls{display:grid;grid-template-columns:50px 1fr 50px;align-items:center;gap:12px;margin:14px 0}
.metronome-controls input[type="range"]{width:100%;accent-color:var(--blue)}
.metronome-step-btn{width:50px;height:50px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--blue-deep);font-size:28px;font-weight:800;cursor:pointer}
.metronome-options{display:grid;grid-template-columns:1fr;gap:12px;margin:18px 0}
.metronome-options label{display:grid;gap:6px;font-size:.69rem;font-weight:900;letter-spacing:.08em;color:var(--muted)}
.metronome-options select{width:100%;min-height:48px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);padding:0 12px;font:800 14px/1 inherit}
.metronome-secondary-btn{min-height:48px;align-self:end;border:1px solid rgba(57,58,134,.25);border-radius:13px;background:var(--blue-soft);color:var(--blue);font:900 12px/1 inherit;letter-spacing:.05em;cursor:pointer}
.metronome-start-btn{width:100%;min-height:56px;border:0;border-radius:999px;background:var(--blue);color:#fff;font:950 14px/1 inherit;letter-spacing:.07em;cursor:pointer;box-shadow:0 10px 24px rgba(57,58,134,.23)}
.metronome-start-btn.is-active{background:#9a3434;box-shadow:0 10px 24px rgba(154,52,52,.22)}
.metronome-status{display:block;min-height:20px;text-align:center;margin:11px 0 0;color:var(--muted);font-size:.76rem;font-weight:700}
.metronome-note{margin:16px 0 0;padding:12px 14px;border-radius:14px;background:var(--blue-soft);color:#55527a;text-align:center;font-size:.72rem;line-height:1.45}
body.metronome-open{overflow:hidden}
@media(max-width:780px){
  .metronome-overlay{padding:0;place-items:stretch}.metronome-dialog{width:100%;max-height:100dvh;min-height:100dvh;border-radius:0;border:0;padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom))}.metronome-dialog::before{background-size:auto 100%;background-position:center center}.metronome-head h2{font-size:1.7rem}.metronome-bpm-line strong{font-size:4.4rem}
}

/* v0.73 · X sempre circular */
.metronome-close{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;min-height:42px!important;max-height:42px!important;flex:0 0 42px!important;aspect-ratio:1/1!important;border-radius:999px!important;padding:0!important;box-sizing:border-box!important;line-height:1!important}


/* v0.74 · Els botons − / + són cercles reals també en MOBILE. */
.metronome-step-btn{
  width:50px!important;height:50px!important;
  min-width:50px!important;max-width:50px!important;
  min-height:50px!important;max-height:50px!important;
  aspect-ratio:1/1!important;border-radius:999px!important;
  padding:0!important;box-sizing:border-box!important;
  display:grid!important;place-items:center!important;
  line-height:1!important;justify-self:center!important;
}
@media(max-width:780px){
  .metronome-controls{grid-template-columns:50px minmax(0,1fr) 50px!important}
  .metronome-step-btn{width:50px!important;height:50px!important;min-width:50px!important;max-width:50px!important;min-height:50px!important;max-height:50px!important}
}
