
@font-face {
    font-family: "Open Sans";
    src: url("../fonts/Open_Sans/OpenSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Open Sans";
    src: url("../fonts/Open_Sans/OpenSans-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Noto Music";
    src: url("../fonts/Noto_Music/NotoMusic-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+1D100, U+1D10E, U+1D13B-1D13F, U+1D157-1D158, U+1D15D-1D161, U+1D165, U+1D16E-1D16F;
}

:root {
    --face-font: "Noto Music", Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", "Segoe UI Symbol", "Apple Symbols", serif;
    --s: clamp(4px, 1vmin, 7.6px);
    --chrome: max(44px, calc(var(--s) * 11));
}

html,
body  {
    height: 100%;
    margin: 0;
    color: #ffffff;
    background-color: #0C8A50;
    font-family: "Open Sans", "Segoe UI", sans-serif;

  }

body.bar-rest {
    background-color: #0977BB;
}

body.is-stopped,
body.is-count-in {
    background-color: #0C8A50;
    background-image: linear-gradient(to bottom, #0C8A50, #0977BB);
}
  


#divnote {

    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80%;
}

#noteStack {
    position: relative;
    display: flex;
    justify-content: center;
    max-width: 92vw;
}

#noteStack.reel-on {
    perspective: 1400px;
    perspective-origin: center center;
}

#note {
    position: relative;
    z-index: 2;
}

.reel-face {
    position: absolute;
    left: 50%;
    margin: 0;
    white-space: nowrap;
    line-height: 1.05;
    text-align: center;
    pointer-events: none;
    z-index: 1;
    font-family: var(--face-font);
    backface-visibility: hidden;
}

.reel-face[hidden] {
    display: none !important;
}

.reel-next {
    bottom: calc(100% + 0.2em);
    transform-origin: center bottom;
    transform: translateX(-50%) rotateX(62deg);
    opacity: 0.8;
}

.reel-prev {
    top: calc(100% + 0.2em);
    transform-origin: center top;
    transform: translateX(-50%) rotateX(-62deg);
    opacity: 0.66;
}

#reelMark {
    position: absolute;
    width: 22px;
    box-sizing: border-box;
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-right-color: transparent;
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
    z-index: 3;
}

#reelMark[hidden] {
    display: none !important;
}

#noteStack.reel-on.is-turning #note {
    animation: reelDrop 0.28s ease-out;
}

#noteStack.reel-on.is-turning .reel-prev {
    animation: reelDropPrev 0.28s ease-out;
}

#noteStack.reel-on.is-turning .reel-next {
    animation: reelDropNext 0.28s ease-out;
}

#noteStack.is-turning:not(.reel-on) #note {
    animation: reelNudge 0.22s ease-out;
}

@keyframes reelDrop {
    from { transform: translateY(-42%); }
    to { transform: none; }
}

@keyframes reelDropPrev {
    from { transform: translateX(-50%) translateY(-55%) rotateX(-62deg); }
    to { transform: translateX(-50%) rotateX(-62deg); }
}

@keyframes reelDropNext {
    from { transform: translateX(-50%) translateY(-28%) rotateX(62deg); opacity: 0; }
    to { transform: translateX(-50%) rotateX(62deg); opacity: 0.8; }
}

@keyframes reelNudge {
    from { transform: translateY(-0.22em); opacity: 0.4; }
    to { transform: none; opacity: 1; }
}

#topBar,
#bottomBar {
  width: 100%;
  overflow: hidden;
  display: flex;
}

#topBar {
  justify-content: flex-start;
}

#bottomBar {
  justify-content: flex-end;
  align-items: flex-end;
  flex: 0 0 auto;
}

#divfooter {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: calc(var(--s) * 1);
  width: max-content;
  box-sizing: border-box;
  padding: 0 calc(var(--s) * 1.2);
}

#selectdiv {
  display: block;
}

#linediv{


  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: calc(var(--s) * 1.2) calc(var(--s) * 2);
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: calc(var(--s) * 0.6) calc(var(--s) * 1.2) calc(var(--s) * 0.7);
  justify-content: space-between; 
}

#editdiv {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: max(0.6vmin, 6px);
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

#editTools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--s) * 1);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#noteMeasure {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  width: max-content;
  line-height: 1.05;
  font-family: var(--face-font);
}

.prog-changes,
.prog-name {
  display: block;
  white-space: nowrap;
}

.simile {
  position: relative;
  top: 0.16em;
}

.prog-name {
  font-size: 0.42em;
  font-size: max(0.42em, 11px);
  line-height: 1.15;
  letter-spacing: 0.03em;
  opacity: 0.78;
  margin-top: 0.28em;
}

#note {

  margin: 0;
  display: inline-block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  line-height: 1.05;
  min-height: 1.25em;
  font-family: var(--face-font);
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;

} 


header {
  text-align: right;
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    max-height: 100dvh;
    max-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    text-align: right;
    padding-bottom: env(safe-area-inset-bottom);
  }



#beatsFace,
#grooveButton {
    font-size: calc(var(--s) * 6);
    color: #ffffff;
    background-color: transparent;
    text-align: center;
    padding: 0 1.6vmin;
    box-sizing: border-box;
    border: 3px solid #ffffff;
    -webkit-transition: 0.5s;
    transition: 0.5s;
    opacity: 0.75;
    touch-action: manipulation;
}

.combo {
    position: relative;
    display: inline-block;
}

.combo-face {
    font: inherit;
    color: #ffffff;
    background: transparent;
    border: 3px solid rgba(255, 255, 255, 0.85);
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
}

#linediv > *,
#divfooter > *,
.stepper,
.combo {
    flex-shrink: 0;
}

#exerciseCombo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

#exerciseFace {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#exerciseFace .combo-kicker,
#exerciseFace::after {
    flex: 0 0 auto;
}

#exerciseFace[aria-expanded="true"] .combo-kicker {
    display: none;
}

#exerciseFace .combo-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.combo-face::after {
    content: "";
    display: inline-block;
    margin-left: 1.4vmin;
    border-left: 0.38em solid transparent;
    border-right: 0.38em solid transparent;
    border-top: 0.46em solid currentColor;
    vertical-align: 0.12em;
}

#exercisePanel,
#groovePanel {
    box-sizing: border-box;
    padding: 2vmin 3vmin 1.5vmin;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.32);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

#exercisePanel {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 25;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-top: 8px;
}

#exercisePanel[hidden] {
    display: none !important;
}

#exerciseMenu {
    display: flex;
    flex-wrap: wrap;
    gap: 1vmin;
}

#exerciseMenu button {
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: max(14px, calc(var(--s) * 3.4));
    min-width: max(72px, calc(var(--s) * 12));
    max-width: 100%;
    min-height: 40px;
    padding: 0 calc(var(--s) * 1.6);
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

#exerciseMenu button[aria-selected="true"] {
    background: #ffffff;
    color: #0C8A50;
}

#exerciseMenu button.menu-new {
    border-style: dashed;
    opacity: 0.95;
}

#exerciseMenu button.menu-new {
    width: 100%;
    margin-bottom: 0.4vmin;
    opacity: 0.9;
}

#deskNote {
    position: fixed;
    left: 50%;
    top: 1.6vmin;
    z-index: 40;
    margin: 0;
    padding: 0.7vmin 1.6vmin;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.32);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
    font-size: clamp(14px, 2.8vmin, 20px);
    pointer-events: none;
    white-space: nowrap;
}

#deskNote[hidden] {
    display: none !important;
}

#status {
  display: flex;
  align-items: center;
  margin-left: 0;
}

#brand {
  display: flex;
  align-items: center;
  gap: calc(var(--s) * 0.9);
  height: var(--chrome);
  min-height: 44px;
  margin: 0;
  padding: 0 calc(var(--s) * 1.4) 0 calc(var(--s) * 0.9);
  box-sizing: border-box;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  opacity: 0.92;
}

#brand:hover,
#brand:focus-visible,
#brand[aria-expanded="true"] {
  opacity: 1;
}

#brand[aria-expanded="true"] {
  background: #ffffff;
  color: #0C8A50;
}

#brand[aria-expanded="true"] .combo-kicker {
  opacity: 1;
}

.brand-mark {
  width: max(26px, calc(var(--s) * 4.6));
  height: max(26px, calc(var(--s) * 4.6));
  min-width: 26px;
  min-height: 26px;
  display: block;
  flex: 0 0 auto;
}

.brand-word {
  font-weight: 600;
  font-size: max(15px, calc(var(--s) * 3.5));
  letter-spacing: 0.01em;
  line-height: 1;
}

@media (max-width: 840px) {
  .brand-word {
    display: none;
  }
}

@media (max-width: 520px) {
  #brand .combo-kicker,
  #exerciseFace .combo-kicker,
  #bpmStepper .step-label {
    display: none;
  }

  #brand {
    width: var(--chrome);
    min-width: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
}

#counter {
  margin: 0;
  padding-right: 0.2vmin;
  font-size: clamp(14px, calc(var(--s) * 3.4), 26px);
  line-height: 1;
  color: #ffffff;
  opacity: 0.9;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#countIn {
  position: fixed;
  left: 2.4vmin;
  top: 8px;
  z-index: 12;
  margin: 0;
  font-size: clamp(48px, 11vmin, 160px);
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  pointer-events: none;
}

#countIn[hidden] {
  display: none !important;
}

#countIn.flash {
  animation: countFlash 220ms ease-out;
}

@keyframes countFlash {
  0% { opacity: 0.2; transform: scale(0.86); }
  100% { opacity: 1; transform: scale(1); }
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.checkbox-label input:focus-visible {
  outline: none;
}

#helloArrow {
  position: fixed;
  z-index: 35;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

#helloCaption {
  position: fixed;
  z-index: 36;
  margin: 0;
  padding: 0.55vmin 1.5vmin;
  max-width: min(22rem, calc(100vw - 24px));
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  font-size: clamp(15px, 2.8vmin, 22px);
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  white-space: normal;
}

#helloCaption[hidden],
#helloSkip[hidden] {
  display: none !important;
}

#helloSkip {
  position: fixed;
  z-index: 37;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

#helloArrow[hidden] {
  display: none !important;
}

#helloArrow.points-down {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid #ffffff;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

#helloArrow.points-up {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 18px solid #ffffff;
  transform: translate(-50%, 0);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

body.is-hello #brand,
body.is-hello #exerciseFace,
body.is-hello #resetExercise,
body.is-hello #edit,
body.is-hello #counter,
body.is-hello #divfooter > .checkbox-label,
body.is-hello #grooveButton,
body.is-hello #next,
body.is-hello #tempoToggle,
body.is-hello #bpmStepper .step-label,
body.is-hello #bpmStepper .step-down,
body.is-hello #bpmStepper .step-up,
body.is-hello #bpmStepper input {
  opacity: 0.38;
  pointer-events: none;
}

body.is-hello[data-hello="note"] #note,
body.is-hello[data-hello="counter"] #counter {
  opacity: 1;
}

body.is-hello[data-hello="exerciseFace"] #exerciseFace,
body.is-hello[data-hello="next"] #next,
body.is-hello[data-hello="resetExercise"] #resetExercise,
body.is-hello[data-hello="grooveButton"] #grooveButton,
body.is-hello[data-hello="bpm"] #bpm,
body.is-hello[data-hello="tempoToggle"] #tempoToggle,
body.is-hello[data-hello="edit"] #edit {
  opacity: 1;
  animation: helloBlink 0.9s ease-in-out infinite;
}

@keyframes helloBlink {
  0%, 100% {
    background: transparent;
    color: #ffffff;
  }
  42%, 58% {
    background: #ffffff;
    color: #0C8A50;
  }
}

@media (prefers-reduced-motion: reduce) {
  #countIn.flash {
    animation: none;
  }
  .reel-next,
  .reel-prev {
    transform: translateX(-50%);
  }
  #noteStack.is-turning #note,
  #noteStack.is-turning .reel-next,
  #noteStack.is-turning .reel-prev {
    animation: none;
  }
  body.is-hello[data-hello="exerciseFace"] #exerciseFace,
  body.is-hello[data-hello="next"] #next,
  body.is-hello[data-hello="resetExercise"] #resetExercise,
  body.is-hello[data-hello="grooveButton"] #grooveButton,
  body.is-hello[data-hello="bpm"] #bpm,
  body.is-hello[data-hello="tempoToggle"] #tempoToggle,
  body.is-hello[data-hello="edit"] #edit {
    animation: none;
    background: #ffffff;
    color: #0C8A50;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--chrome);
  height: var(--chrome);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
  font-size: calc(var(--s) * 5.2);
  line-height: 1;
  color: #ffffff;
  background: transparent;
  border: 3px solid #ffffff;
  opacity: 0.85;
  touch-action: manipulation;
}


#editdiv .combo,
#divfooter .combo,
#divfooter .stepper,
#divfooter .checkbox-label,
#grooveButton {
  height: var(--chrome);
  min-height: 44px;
  box-sizing: border-box;
}

#editdiv .combo,
#divfooter .combo {
  display: flex;
}

#editdiv .combo-face,
#divfooter .combo-face {
  display: inline-flex;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#exerciseFace {
  gap: calc(var(--s) * 1.1);
  font-size: max(15px, calc(var(--s) * 4.2));
  white-space: nowrap;
  padding: 0 calc(var(--s) * 1.6);
}

.combo-kicker {
  font-size: max(11px, calc(var(--s) * 2.4));
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

#beatsFace:focus,
#grooveButton:focus,
#grooveButton[aria-expanded="true"],
.stepper:focus-within {
    opacity: 1;
}

#groovePanel {
    flex: 1 1 auto;
    min-height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    text-align: left;
}

#groovePanel[hidden] {
    display: none !important;
}

.groove-label {
    margin: 1vmin 0 0.6vmin;
    font-size: clamp(12px, 3vmin, 16px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
}

.click-kind {
    margin: 0.4vmin 0 0.5vmin;
    font-size: clamp(12px, 2.6vmin, 15px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.tone-zone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.4vmin 0 0.8vmin;
    padding: 0.3vmin 1.4vmin 1.1vmin;
    border-radius: 1.6vmin;
}

.tone-zone.play,
#cycleRow .stepper.play {
    background: rgba(12, 138, 80, 0.5);
}

.tone-zone.rest,
#cycleRow .stepper.rest {
    background: rgba(9, 119, 187, 0.5);
}

#cycleRow .stepper.play,
#cycleRow .stepper.rest {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
}

#cycleRow,
#clickGrid,
#restClickGrid,
#meterRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.6vmin;
}

#meterPresets {
    display: flex;
    flex-wrap: wrap;
    gap: 1vmin;
    max-width: min(46vmin, 28rem);
}

#meterPresets button {
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: clamp(14px, 3.4vmin, 20px);
    min-width: max(72px, calc(var(--s) * 12));
    min-height: 40px;
    padding: 0 1.2vmin;
    cursor: pointer;
}

#meterPresets button[aria-pressed="true"] {
    background: #ffffff;
    color: #0C8A50;
}

.meter-sig {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 28vmin;
    padding: 0.2vmin 0.4vmin 0;
    border: 0;
    color: #ffffff;
}

.meter-sig .stepper,
.sig-unit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vmin;
    border: 0;
    opacity: 1;
}

.meter-sig .stepper button,
.meter-sig .stepper input,
.sig-unit button,
#meterBottom {
    box-sizing: border-box;
    width: 1.7em;
    min-width: 1.7em;
    height: 1.15em;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: clamp(20px, 5.4vmin, 40px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.meter-sig .stepper button,
.sig-unit button {
    width: 0.9em;
    min-width: 0.9em;
    cursor: pointer;
}

.sig-rule {
    width: 72%;
    height: 2px;
    margin: 0.15em 0;
    background: #ffffff;
}

.meter-hint {
    margin: 0.2vmin 0 0;
    font-size: clamp(12px, 2.6vmin, 16px);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    opacity: 0.7;
}

.panel-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2.2vmin;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: clamp(15px, 3.6vmin, 20px);
    cursor: pointer;
    opacity: 0.85;
}

.panel-toggle[aria-pressed="true"] {
    background: #ffffff;
    color: #0C8A50;
    opacity: 1;
}

#practiceToggles {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.2vmin 3.2vmin;
}

.practice-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#aboutDeviceActions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.2vmin 0 2vmin;
}

#aboutDeviceActions button {
    min-height: 44px;
    padding: 0 14px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
}

#uploadAllFile {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#restoreDefaults.is-armed,
#uploadAllExercises.is-armed {
    background: #ffffff;
    color: #0C8A50;
    opacity: 1;
}

.chrome-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
}

.chrome-icon[hidden],
.chrome-icon.is-hidden,
.checkbox-label .chrome-icon[hidden],
.checkbox-label .chrome-icon.is-hidden {
  display: none !important;
}

.checkbox-label .chrome-icon {
  width: 1.35em;
  height: 1.35em;
}

#tempoToggle .chrome-icon {
  width: 0.9em;
  height: 0.9em;
}

.swing-modes {
    display: flex;
    width: 100%;
    max-width: min(420px, 100%);
    border: 3px solid rgba(255, 255, 255, 0.85);
}

.swing-modes button {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: clamp(13px, 3.2vmin, 16px);
    white-space: nowrap;
    cursor: pointer;
    opacity: 0.85;
}

.swing-modes button + button {
    border-left: 2px solid rgba(255, 255, 255, 0.45);
}

.swing-modes button[aria-checked="true"] {
    background: #ffffff;
    color: #0C8A50;
    opacity: 1;
}

#swingAmount {
    width: 100%;
    max-width: min(420px, 100%);
    margin-top: 8px;
}

#swingAmount[hidden] {
    display: none !important;
}

#swingSlider {
    position: relative;
    height: 44px;
    margin: 0 12px;
    touch-action: none;
}

.swing-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%);
}

.swing-ghost,
.swing-handle {
    position: absolute;
    top: 50%;
    left: 0;
    padding: 0;
    border: 0;
    transform: translate(-50%, -50%);
}

.swing-ghost {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    z-index: 1;
}

.swing-handle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    z-index: 2;
    cursor: grab;
}

.swing-handle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

#swingReadout {
    margin: 0;
    font-size: clamp(14px, 2.6vmin, 16px);
    text-align: center;
    opacity: 0.75;
}

.click-pair {
    display: inline-flex;
    gap: 1.2vmin;
}

.stepper[hidden] {
    display: none !important;
}

.stepper {
    display: inline-flex;
    align-items: stretch;
    border: 3px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
    background: transparent;
    opacity: 0.9;
    touch-action: manipulation;
}

.stepper button,
.stepper input {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    margin: 0;
    padding: 0 calc(var(--s) * 1);
    min-width: max(32px, calc(var(--s) * 7));
    min-height: 40px;
    touch-action: manipulation;
}

#divfooter .stepper button,
#divfooter .stepper input,
#divfooter .stepper .step-label {
    min-height: 0;
    height: 100%;
}

.stepper input {
    width: calc(var(--s) * 14);
    min-width: 52px;
    text-align: center;
    font-size: calc(var(--s) * 6);
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper .step-down,
.stepper .step-up,
#tempoToggle {
    font-size: calc(var(--s) * 6);
    line-height: 1;
    cursor: pointer;
}

.step-label {
    display: flex;
    align-items: center;
    padding: 0 calc(var(--s) * 1.2);
    font-size: max(12px, calc(var(--s) * 3));
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

#bpmStepper .step-label {
    font-size: max(13px, calc(var(--s) * 3.4));
    font-weight: 600;
    opacity: 1;
}

#bpmStepper input {
    width: calc(var(--s) * 11);
}

.stepper-sm input {
    width: calc(var(--s) * 11);
    min-width: 40px;
    font-size: calc(var(--s) * 5);
}

.stepper-sm .step-down,
.stepper-sm .step-up {
    font-size: calc(var(--s) * 5);
    min-width: max(28px, calc(var(--s) * 6));
}

#bpmStepper.is-paused .step-down,
#bpmStepper.is-paused .step-up,
#bpmStepper.is-paused input {
    opacity: 0.4;
}

#tempoToggle {
    border-left: 2px solid rgba(255, 255, 255, 0.45);
    min-width: max(40px, calc(var(--s) * 9));
}

#bpmStepper.is-paused #tempoToggle {
    opacity: 1;
}

.click-pad {
    position: relative;
    width: clamp(40px, 9vmin, 64px);
    height: clamp(40px, 9vmin, 64px);
    min-width: 40px;
    min-height: 40px;
    font-size: clamp(14px, 3.4vmin, 18px);
    color: #ffffff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.85);
    touch-action: manipulation;
    overflow: hidden;
}

.click-pad.on,
.click-pad.accent {
    color: #0C8A50;
    background: #ffffff;
    border-color: #ffffff;
}

body.bar-rest .click-pad.on,
body.bar-rest .click-pad.accent {
    color: #0977BB;
}

.click-pad.on::after,
.click-pad.accent::after {
    content: "";
    position: absolute;
    bottom: 14%;
    width: 42%;
    height: 3px;
    background: currentColor;
    pointer-events: none;
}

.click-pad.on::after {
    left: 8%;
}

.click-pad.accent::after {
    right: 8%;
}

.click-pad.beat {
    animation: padBeat 120ms linear;
}

.click-pad.on.beat,
.click-pad.accent.beat {
    animation-name: padBeatOn;
}

body.bar-rest .click-pad.beat {
    animation-name: padBeatRest;
}

body.bar-rest .click-pad.on.beat,
body.bar-rest .click-pad.accent.beat {
    animation-name: padBeatOnRest;
}

@keyframes padBeat {
    0%, 45% { background-color: #ffffff; color: #0C8A50; }
    100% { background-color: transparent; color: #ffffff; }
}

@keyframes padBeatOn {
    0%, 45% { background-color: #0C8A50; color: #ffffff; }
    100% { background-color: #ffffff; color: #0C8A50; }
}

@keyframes padBeatRest {
    0%, 45% { background-color: #ffffff; color: #0977BB; }
    100% { background-color: transparent; color: #ffffff; }
}

@keyframes padBeatOnRest {
    0%, 45% { background-color: #0977BB; color: #ffffff; }
    100% { background-color: #ffffff; color: #0977BB; }
}

#beatFlash {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: #ffffff;
    opacity: 0;
    z-index: 8;
}

#beatFlash.strong {
    animation: flashStrong 140ms linear forwards;
}

#beatFlash.weak {
    animation: flashWeak 80ms linear forwards;
}

@keyframes flashStrong {
    0% { opacity: 0.22; }
    100% { opacity: 0; }
}

@keyframes flashWeak {
    0% { opacity: 0.07; }
    100% { opacity: 0; }
}

#beatFlash.accent {
    animation: flashStrong 140ms linear forwards;
}

#beatFlash.accent-strong {
    animation: flashAccent 160ms linear forwards;
}

@keyframes flashAccent {
    0% { opacity: 0.42; }
    100% { opacity: 0; }
}

#phraseRow {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 1.6vmin;
    width: 100%;
    box-sizing: border-box;
    padding: 1.1vmin 2vmin 0.3vmin;
}

#phraseTrack {
    display: flex;
    flex: 1;
    gap: 1.2vmin;
    min-width: 0;
    height: clamp(8px, 1.4vmin, 12px);
    min-height: 8px;
}

#repeatMark {
    margin: 0;
    font-size: clamp(12px, 2.8vmin, 16px);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: 0.85;
}

#repeatMark[hidden] {
    display: none !important;
}

.phrase-seg {
    flex: 1;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 99px;
    overflow: hidden;
}

.phrase-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #ffffff;
}
  

#grooveButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--chrome);
    min-width: 44px;
    padding: 0;
}

.metro-icon {
    width: clamp(28px, 6.4vmin, 46px);
    height: clamp(28px, 6.4vmin, 46px);
    display: block;
}

body.is-editing #divnote,
body.is-picking #divnote,
body.is-setup #divnote {
  visibility: hidden;
}

body.is-editing #counter {
  display: none;
}

#edit[aria-pressed="true"] {
  background: #ffffff;
  color: #0C8A50;
  opacity: 1;
}

#textdiv {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 18;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

#textdiv.is-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#editHead,
#editMeta,
#editNameRow,
#editDanger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#editHint,
#editCount,
#editError {
  margin: 0;
}

#editHint {
  flex: 1 1 160px;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.9;
}

#editCount {
  font-size: 14px;
  opacity: 0.9;
}

#editNameRow label {
  flex: 0 0 auto;
  font-size: 14px;
  opacity: 0.9;
}

#editName {
  flex: 1 1 160px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

#editCancel,
#editSaveAs,
#editUpdate,
#editDuplicate,
#editClearList,
#editSave,
#editOpen,
#editDelete {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

#editCancel.edit-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  opacity: 0.9;
}

#editUpdate {
  background: #ffffff;
  color: #0C8A50;
}

#editUpdate:disabled,
#editSaveAs:disabled {
  opacity: 0.45;
  cursor: default;
}

#editFile {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#editDanger {
  justify-content: flex-start;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

#editDelete {
  opacity: 0.85;
}

#editSymbols {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#editSymbols button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #ffffff;
  font-family: var(--face-font);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#allEdit {
  flex: 1 1 auto;
  width: 100%;
  min-height: 140px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  white-space: pre;
  overflow-wrap: normal;
  overflow: auto;
  overscroll-behavior: contain;
  color: #ffffff;
  font-family: var(--face-font);
  font-size: 18px;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.28);
  resize: none;
  box-sizing: border-box;
}

#editPreview {
  flex: 0 0 auto;
  min-height: 2.4em;
  margin: 0;
  overflow: hidden;
  text-align: center;
  font-family: var(--face-font);
  font-size: 22px;
  line-height: 1.15;
}

#editPreview.is-empty::before {
  content: "Preview";
  opacity: 0.45;
  font-size: 14px;
}

#editPreview .prog-changes,
#editPreview .prog-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

#editError {
  font-size: 14px;
  color: #ffe08a;
}

#editError.is-note {
  color: #ffffff;
}

#editDelete.is-armed,
#editOpen.is-armed {
  background: #ffffff;
  color: #0C8A50;
}

#textdiv .stepper {
  flex: 0 0 auto;
}

#textdiv .step-label {
  font-size: 13px;
}

.checkbox-label {
  cursor: pointer;
  position: relative;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.checkbox-label:focus-within {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}
.checkbox-label .fa,
.checkbox-label .chrome-icon {
  font-size: calc(var(--s) * 5.2);
  color: #ffffff;
  opacity: 0.75;
  width: 1.4em;
  height: 1.4em;
  display: inline-block;
  text-align: center;
  line-height: 1;
  vertical-align: middle;
}

body.is-about #divnote {
  visibility: hidden;
}

body.is-about #counter {
  display: none;
}

.about-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  margin: 0 0.18em;
  vertical-align: -0.28em;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
  font-size: 0.92em;
  line-height: 1;
}

.about-icon svg {
  width: 0.92em;
  height: 0.92em;
  display: block;
}

#about {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 18;
  box-sizing: border-box;
  padding: 10px 16px 16px;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#about.is-open {
  display: block;
}

#aboutHead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#aboutBack[hidden],
#aboutHome[hidden],
#aboutHow[hidden],
#aboutAuthor[hidden],
#aboutDevice[hidden] {
  display: none !important;
}

#about h1,
#about h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#about h1 {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 22px;
  line-height: 1.2;
}

#about h2 {
  margin-top: 22px;
  font-size: 18px;
}

#aboutHow h2:first-child {
  margin-top: 0;
}

#aboutBack,
#aboutClose,
#aboutShare,
.about-show,
#aboutNav button,
#aboutNav a,
#supportReveal,
#sendPractice,
#shareFeedback,
.support-path,
.support-copy,
#aboutLinks button {
  min-height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

#aboutBack,
#aboutClose {
  flex: 0 0 auto;
  padding: 0 14px;
}

#aboutShare,
.about-show {
  padding: 0 16px;
}

#aboutShare {
  margin: 0 0 16px;
}

.about-show {
  margin: 0 0 4px;
}

#aboutNav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 4px 0 0;
}

#aboutNav button,
#aboutNav a {
  padding: 0 16px;
  font-size: 16px;
  text-align: left;
}

#aboutNav a:link,
#aboutNav a:visited,
#aboutNav a:hover,
#aboutNav a:active {
  color: #ffffff;
  text-decoration: none;
}

#aboutNav a {
  display: flex;
  align-items: center;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

#aboutBody {
  max-width: 38rem;
}

#aboutBody p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.45;
}

#aboutLockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.about-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

#aboutLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#aboutLinks button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
}

#aboutLinks svg {
  width: 22px;
  height: 22px;
  display: block;
}

#emailLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 0;
  max-width: 38rem;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#emailLine[hidden] {
  display: none !important;
}

.support-paths {
  display: flex;
  gap: 8px;
  padding-top: 12px;
}

.support-path {
  flex: 1 1 0;
  padding: 0 8px;
}

.support-path.is-on {
  background: #ffffff;
  color: #0C8A50;
}

#supportEurope[hidden],
#supportWorld[hidden] {
  display: none !important;
}

#supportReveal,
#sendPractice,
#shareFeedback {
  padding: 0 16px;
}

#supportCard {
  margin-top: 12px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

#supportCard[hidden] {
  display: none !important;
}

#supportCard.is-shown {
  animation: supportIn 220ms ease;
}

@keyframes supportIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.support-note {
  margin: 12px 0 4px;
  font-size: 14px;
  line-height: 1.4;
}

.support-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.support-label {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

.support-value {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.support-copy {
  flex: 0 0 auto;
  min-width: 7.2em;
  padding: 0 10px;
}


