.fm-cue { display:grid; gap:.72rem; }
.fm-stage {
  position:relative; isolation:isolate; overflow:hidden; border-radius:1rem;
  background:#173437; color:#fff9ea;
  border:1px solid #344f4b;
}
.fm-scene { display:grid; place-items:center; overflow:hidden;
  background:radial-gradient(ellipse at 50% 85%,#284d48 0%,#17383a 58%,#112f32 100%);
}
.fm-indicator {
  width:min(100%,37rem);
  height:clamp(9rem,25dvh,14rem);
  display:grid; place-items:center;
}
.fm-indicator > svg { width:100%; height:100%; display:block; }
.fm-caption {
  position:relative; display:flex; justify-content:space-between; gap:.65rem;
  align-items:center; padding:.2rem .8rem; border-top:1px solid #67807a6b; background:#163536;
}
.fm-caption-text {display:flex; align-items:baseline; gap:.25rem .75rem; flex-wrap:wrap;}
.fm-count {
  --disc:1.85rem; position:relative; isolation:isolate; display:grid; grid-template-columns:repeat(4,1fr);
  width:min(80%,18rem); margin:0 auto; padding:.14rem 0 .4rem; list-style:none;
}
.fm-count[hidden] {display:none;}
.fm-count::before {
  content:""; position:absolute; inset-inline:12.5%; top:calc(.14rem + var(--disc) / 2);
  border-top:1px solid #52706a; z-index:-1;
}
.fm-count li {display:flex; align-items:center; flex-direction:column; gap:.12rem;}
.fm-digit {
  display:grid; place-items:center; box-sizing:border-box; width:var(--disc); height:var(--disc);
  border:1px solid #62817b; border-radius:50%; color:#d9e4dc; background:#193a3a;
  font:650 1rem/1 system-ui,sans-serif; font-variant-numeric:tabular-nums;
}
.fm-count-tag {font-size:.79rem; font-weight:650; line-height:1.16; color:#d6e0d6;}
.fm-count[data-annotated=false] .fm-count-tag {visibility:hidden;}
.fm-count li[aria-current=step] .fm-digit {
  color:#173b31; background:#c2ecd4; border-color:#c2ecd4; outline:2px solid #79b89c; outline-offset:2px;
}
.fm-stage:is([data-phase=hold],[data-phase=prepare]) li[aria-current=step] .fm-digit {
  color:#493719; background:#f9df9e; border-color:#f9df9e; outline-color:#c9a765;
}
.fm-count li[aria-current=step] .fm-count-tag {color:#fff2ca;}
.fm-caption .fm-count-toggle {
  display:inline-flex; align-items:center; justify-content:center; gap:.35rem; flex:none;
  min-height:44px; padding:.15rem .35rem; color:#e9eee6; background:transparent; border:0; font-size:.87rem;
}
.fm-count-toggle::before {
  content:""; display:grid; place-items:center; width:1.02rem; height:1.02rem;
  box-sizing:border-box; border:1px solid #acbeb0; border-radius:.23rem; font:800 .84rem/1 system-ui;
}
.fm-count-toggle[aria-pressed=true]::before {content:"✓"; color:#173f34; background:#c2e1cf; border-color:#c2e1cf;}
.fm-caption .fm-count-toggle:focus-visible {outline:2px solid #ffe3a2; outline-offset:1px;}
.fm-bar { color:#e1eae2; font-size:.93rem; }
.fm-signal { color:#faf5e4; font-size:1.12rem; }
.fm-stage[data-phase=hold] .fm-signal { color:#ffe8b3; }
.fm-stage[data-phase=prepare] .fm-signal { color:#ffe8b3; }
.fm-stage[data-phase=release] .fm-caption { background:#215747; }
.fm-stage[data-phase=release] .fm-signal { color:#fffce9; }
.fm-desk { display:grid; gap:.62rem; }
.fm-instruction,.fm-result { margin:0; font-size:1rem; line-height:1.6; }
.fm-instruction { color:#314f49; }
.fm-controls { display:flex; flex-wrap:wrap; gap:.48rem; }
.fm-cue .fm-controls button { min-height:46px; }
.fm-cue .fm-tap { min-width:min(100%,13rem); touch-action:manipulation; }
.fm-cue .fm-tap:disabled { opacity:.6; }
.fm-result { border-inline-start:.24rem solid #719389; background:#eef3ee;
  padding:.45rem .7rem; border-radius:.35rem; color:#2f4c43; }
.fm-result[data-level=good] { color:#124f37; background:#e0f1e5; border-color:#338357; }
.fm-result[data-level=near] { color:#69440c; background:#fff2d8; border-color:#bf8c39; }
.fm-result[data-level=adjust] { color:#733c32; background:#faede6; border-color:#ba7262; }
.fm-silent { color:#6a4e28; font-size:.88rem; }
@media(max-width:540px) {
  .fm-indicator { height:clamp(8.2rem,34vw,11rem); }
  .fm-caption { padding:.12rem .52rem; }
  .fm-caption-text {column-gap:.4rem;}
  .fm-bar { font-size:.87rem; }
  .fm-signal { font-size:1.02rem; }
  .fm-controls button { flex:1 1 8rem; }
  .fm-controls .fm-stop { flex:0 1 auto; }
  .fm-controls .fm-tap { flex:1; min-width:0; }
}
@media(max-height:480px) and (orientation:landscape) and (min-width:550px) {
  .fm-cue { grid-template-columns:minmax(0,1.13fr) minmax(0,1fr); align-items:center; }
  .fm-indicator { height:clamp(7rem,33dvh,10rem); }
  .fm-caption { padding:.3rem .55rem; }
  .fm-desk { gap:.35rem; }
}


.fm-baseline,.fm-contact,.fm-arc,.fm-guide,.fm-trail,.fm-ring,.fm-grip { fill:none; stroke-linecap:round; }
.fm-baseline { stroke:#8eada1; opacity:.49; stroke-width:.8; }
.fm-contact { stroke:#e4d7ad; stroke-width:1.55; }
.fm-marker { color:#c8ebd9; }
.fm-shaft { fill:#fff2d2; stroke:#183b35; stroke-width:.65; stroke-linejoin:round; }
.fm-grip { stroke:#caac7c; stroke-width:3.5; }
.fm-tip { fill:currentColor; stroke:#102d2e; stroke-width:.75; }
.fm-marker-rim { fill:none; stroke:currentColor; stroke-width:.95; opacity:.6; }
.fm-arc { stroke:#f0cd88; stroke-width:1.6; opacity:0; }
.fm-guide { stroke:#f1cd88; stroke-width:1.25; stroke-dasharray:1 5; opacity:0; }
.fm-trail { stroke:#cde7d7; opacity:.46; stroke-width:2.4; stroke-linejoin:round; }
.fm-ring { stroke:#b0edcf; stroke-width:1.6; visibility:hidden; }
.fm-indicator svg[data-phase=hold] .fm-arc { opacity:.95; }
.fm-stage[data-mode=example] .fm-indicator svg:is([data-phase=ready],[data-phase=prepare]) .fm-guide { opacity:.60; }
.fm-indicator svg:is([data-phase=hold],[data-phase=prepare]) .fm-marker { color:#ffde9c; }
.fm-indicator svg[data-phase=prepare] .fm-trail { stroke:#ffdf9e; }
.fm-stage[data-mode=example] .fm-indicator svg[data-phase=release] .fm-ring { visibility:visible; }
.fm-indicator svg[data-phase=release] .fm-marker { color:#b2f6d7; }
.fm-indicator svg[data-phase=finish] .fm-marker { opacity:.74; }
.fm-stage[data-mode=trial] .fm-caption { background:#163536; }
.fm-stage[data-mode=trial] .fm-signal { color:#faf5e4; }
.fm-stage[data-mode=trial] .fm-indicator svg .fm-marker { color:#d6e9d9; }
.fm-stage[data-mode=trial] .fm-arc { visibility:hidden; }
.fm-stage[data-mode=trial] .fm-indicator svg .fm-trail { stroke:#cde7d7; }
@media(prefers-reduced-motion:reduce) {
  .fm-stage[data-mode=trial][data-phase=release] .fm-signal { color:#b2f6d7; }
}
