/* ==========================================================================
   WP Exercices rythmiques — UI
   ========================================================================== */

body.wprex-modal-open{
  overflow: hidden;
}

.wprex{
  --wprex-panel-offset: 392px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
}
.wprex .is-hidden{ display: none !important; }

.wprex__layout{
  position: relative;
  min-height: 560px;
  background: #fff;
}

/* Panel drawer */
.wprex__panel{
  position: absolute;
  inset: 0 auto 0 0;
  width: 380px;
  max-width: calc(100% - 24px);
  height: auto;
  display: flex;
  flex-direction: column;
  background: #fbfbfb;
  border-right: 1px solid #eee;
  box-shadow: 0 6px 22px rgba(0,0,0,.10);
  z-index: 12;
  transform: translateX(calc(-100% - 8px));
  transition: transform 180ms ease;
  overflow: hidden;
  pointer-events: none;
}

.wprex__panel.is-open{
  transform: translateX(0);
  pointer-events: auto;
}

.wprex__panel--exercise{ z-index: 12; }
.wprex__panel--metronome{ z-index: 12; }
.wprex__panelClose{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.wprex__panelClose:hover{ background: #f4f4f4; }

.wprex__panelBody{
  flex: 1 1 auto;
  min-height: 0;
  padding: 40px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Main */
.wprex__main{
  position: relative;
  min-height: 560px;
  padding: 16px;
  transition: padding-left 180ms ease;
}

.wprex.wprex--panel-open .wprex__main{
  padding-left: calc(16px + var(--wprex-panel-offset));
}

.wprex__stage{
  position: relative;
  width: 100%;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 100px 12px 24px;
}
.wprex.wprex--dictation:not(.wprex--fullscreen) .wprex__main{
  padding-top: 0;
}
.wprex.wprex--dictation:not(.wprex--fullscreen) .wprex__stage{
  padding-top: 118px;
}
.wprex.wprex--assignment.wprex--dictation:not(.wprex--fullscreen) .wprex__main{
  padding-top: 18px !important;
}
.wprex.wprex--assignment.wprex--dictation:not(.wprex--fullscreen) .wprex__stage{
  padding-top: 124px !important;
}
.wprex.wprex--assignment.wprex--dictation:not(.wprex--fullscreen) .wprex__dictation{
  margin-top: 34px !important;
}
.wprex.wprex--assignment [data-action="toggleExercisePanel"]{
  display: none !important;
}
.wprex.wprex--assignment [data-action="toggleTeacherMenu"]{
  display: none !important;
}
.wprex.wprex--dictation.wprex--fullscreen .wprex__stage{
  position: relative;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}
.wprex.wprex--dictation.wprex--fullscreen .wprex__dictation{
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin: 0;
}
.wprex.wprex--assignment.wprex--dictation.wprex--fullscreen .wprex__assignmentInfo{
  position: absolute;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  z-index: 6;
  pointer-events: none;
}
.wprex.wprex--fullscreen .wprex__stage{
  width: 100%;
  min-height: 100vh;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 24px;
}
.wprex.wprex--fullscreen{
  width: 100vw !important;
  max-width: none !important;
  height: 100vh;
  margin: 0 !important;
  border-radius: 0;
}
.wprex.wprex--fullscreen .wprex__layout{
  min-height: 100vh;
  height: 100vh;
}
.wprex.wprex--fullscreen .wprex__main{
  padding-left: 16px !important;
  padding-right: 16px;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.wprex.wprex--fullscreen.wprex--panel-open .wprex__main{
  padding-left: 16px !important;
}
.wprex.wprex--fullscreen .wprex__score{
  width: min(90vw, 1800px);
  max-width: min(90vw, 1800px);
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
.wprex.wprex--fullscreen .wprex__mainControls--floating{
  left: 18px;
}
.wprex__score{
  width: 100%;
  max-width: 1800px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: -14px;
}
.wprex__score.is-hidden{
  display: none;
}

.wprex__dictation{
  width: min(100%, 980px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}
.wprex.wprex--dictation .wprex__dictation{
  margin-bottom: 6px;
}
.wprex__dictActions{
  width: 100%;
  display: flex;
  justify-content: center;
}
.wprex__dictRevealAll{
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wprex__dictRevealAll svg{
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.wprex__dictation.is-hidden{
  display: none;
}
.wprex__dictation.is-locked .wprex__dictSlot{
  cursor: default !important;
  pointer-events: none;
}

/* Source of truth for mode visibility */
.wprex__dictPlaceholder{
  min-height: 56px;
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  background: #f9fbff;
  color: #546579;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
}
.wprex__dictAnswer{
  --wprex-dict-cols: 4;
  --wprex-dict-beat-w: 136px;
  width: 100%;
  min-height: 152px;
  display: grid;
  grid-template-columns: repeat(var(--wprex-dict-cols), minmax(0, var(--wprex-dict-beat-w)));
  gap: 8px;
  align-items: stretch;
  justify-content: center;
  overflow: visible;
}
.wprex__dictSlot{
  height: 152px;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fff;
  display: grid;
  grid-template-rows: 1fr 25px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.wprex__dictSlot--revealed{
  border-color: #d4deea;
}
.wprex__dictSlot--revealed[data-span="2"]{
  justify-content: center;
}
.wprex__dictSlotMain{
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 2px 4px;
}
.wprex__dictSlotPrev{
  width: 100%;
  height: 100%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.wprex__dictRenderFallback{
  font-size: 18px;
  color: #607489;
  line-height: 1;
}
.wprex__dictSlotBand{
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f6fb;
  border-top: 1px solid #e4e9f0;
  color: #5a6b7d;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}
.wprex__dictSlotPrev svg{
  width: auto !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
}
.wprex__dictSlot--revealed[data-span="2"] .wprex__dictSlotPrev{
  justify-content: center;
}
.wprex__dictSlot--revealed[data-span="2"] .wprex__dictSlotPrev svg{
  transform: scale(0.5);
  transform-origin: 50% 50%;
}
.wprex .wprex__dictSlotPrev .abcjs-top-line{
  display: none !important;
}
.wprex__dictSlot--placeholder{
  border-radius: 10px;
}
.wprex__dictSlot--placeholder .wprex__dictSlotMain{
  background: repeating-linear-gradient(
    -45deg,
    #f5f7fb,
    #f5f7fb 6px,
    #eef2f8 6px,
    #eef2f8 12px
  );
}
.wprex__dictSlot.is-hit{
  transform: scale(1.03);
  border-color: #2b3f55;
}
.wprex__dictSlot.is-error{
  border-color: #d14545;
  background: #fff3f3;
  transform: scale(1.02);
}

.wprex__score svg{
  width: auto;
  max-width: 94%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.wprex__status{
  width: 100%;
  max-width: 900px;
  text-align: center;
  font-size: 12px;
  color: #444;
}
.wprex__assignmentInfo{
  width: 100%;
  max-width: 900px;
  text-align: center;
  font-size: 12px;
  color: #3f5a74;
  margin-top: -4px;
}
.wprex__assignmentInfo.is-hidden{
  display: none;
}
.wprex__assignmentReveal{
  position: relative;
  z-index: 14;
  display: inline-flex;
  align-items: center;
}
.wprex__assignmentReveal.is-hidden{
  display: none;
}
.wprex__assignmentRevealBtn{
  padding: 0 !important;
}
.wprex__assignmentRevealBtn.is-valid{
  background: #dff3e6 !important;
  border-color: #a9d9b8 !important;
  color: #2f6e48 !important;
}
.wprex__assignmentRevealBtn.is-valid:hover{
  background: #d3ecdd !important;
}
.wprex__assignmentRevealIcon{
  width: 16px;
  height: 16px;
  display: block;
}
.wprex__assignmentRevealPanel{
  display: none;
  position: absolute;
  top: 46px;
  right: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,.98);
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  white-space: nowrap;
}
.wprex__assignmentReveal.is-open .wprex__assignmentRevealPanel{
  display: inline-flex;
}
.wprex__assignmentPinInput{
  width: 84px;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: center;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  padding: 6px 8px;
}
.wprex__assignmentPinInput.is-invalid{
  border-color: #d64d4d;
  background: #fff3f3;
  box-shadow: 0 0 0 3px rgba(214,77,77,.28);
  animation: wprex-shake .28s linear 1;
}
.wprex__assignmentPinInput.is-valid{
  border-color: #3aa66a;
  box-shadow: 0 0 0 2px rgba(58,166,106,.22);
}
.wprex__btnMini{
  border: 1px solid #cdd7e2;
  background: #f7fbff;
  color: #1f5fae;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.wprex__btnMini.is-copied{
  background: #e8f7ec;
  border-color: #b9e4c4;
  color: #1e7a3d;
}
.wprex__btnMini.is-hidden{ display: none; }
.wprex__assignmentAnswersActions{
  width: min(100%, 1100px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.wprex__assignmentAnswersActions.is-hidden{
  display: none;
}
.wprex__assignmentAnswers{
  width: min(100%, 1100px);
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 6px;
}
.wprex__assignmentAnswersHead{
  font-size: 12px;
  color: #38526d;
  margin-bottom: 4px;
}
.wprex__assignmentAnswersHeadTop{
  display: block;
}
.wprex__assignmentAnswersHeadOpen{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.wprex__assignmentAnswersHeadCode{
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9d7e8;
  background: #f5f9ff;
  border-radius: 6px;
  padding: 2px 8px;
}
.wprex__assignmentAnswersHeadTitle{
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .01em;
  color: #1e2f43;
  margin-bottom: 5px;
}
.wprex__assignmentAnswersHeadLine{
  line-height: 1.35;
}
.wprex__assignmentAnswers.is-hidden{ display: none; }
.wprex__assignmentAnswerItem{
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
}
.wprex__assignmentAnswerTitle{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #425a73;
  margin-bottom: 0;
  align-self: center;
  margin-top: 6px;
}
.wprex__assignmentPlayOne{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #2a6fcb;
  background: #2f7be5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(20,60,120,.18);
  padding: 0;
}
.wprex__assignmentPlayOne:hover{
  background: #2a70d2;
}
.wprex__assignmentPlayOneIcon{
  width: 14px;
  height: 14px;
  display: block;
  transform: translateX(1px);
}
.wprex__assignmentPlayOneIcon--pause{
  display: none;
  transform: none;
}
.wprex__assignmentPlayOne.is-playing .wprex__assignmentPlayOneIcon--play{
  display: none;
}
.wprex__assignmentPlayOne.is-playing .wprex__assignmentPlayOneIcon--pause{
  display: block;
}
.wprex__assignmentAnswerScore{
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-top: 20px;
}
.wprex__assignmentAnswerScore svg{
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
}
.wprex__assignmentModal{
  position: fixed;
  inset: 0;
  background: #f4f8fd;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 34px 18px 38px;
  overflow-y: auto;
}
.wprex__assignmentModal.is-hidden{ display: none; }
.wprex__assignmentModalCard{
  width: min(1180px, 98vw);
  overflow: visible;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 18px;
  border: 1px solid #dbe4ef;
  box-shadow: 0 20px 48px rgba(10,33,58,.16);
  padding: 18px;
  margin: 0 auto;
}
.wprex__assignmentModalHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wprex__assignmentModalTitle{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}
.wprex__assignmentModalClose{
  border: 0;
  background: transparent;
  color: #cf3f3f;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
}
.wprex__assignmentModalClose:hover{
  color: #b93535;
}
.wprex__assignmentModalClose svg{
  width: 24px;
  height: 24px;
  display: block;
}
.wprex__assignmentEditWarning{
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f0a9a9;
  background: #fff2f2;
  color: #8d2d2d;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}
.wprex__assignmentRetentionNotice{
  border: 1px solid #ead28b;
  background: #fff6d9;
  color: #6b5418;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}
.wprex__assignmentEditWarningIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffe08a;
  color: #6f5600;
  font-size: 12px;
  line-height: 1;
}
.wprex__assignmentGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wprex__assignmentGrid--type{
  grid-template-columns: 1fr;
  align-items: stretch;
}
.wprex__assignmentGrid--general{
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.wprex__assignmentGrid label{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #4a5e72;
  background: #fff;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  padding: 8px;
}
.wprex__assignmentFormSection{
  border: 1px solid #dfe8f2;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  margin-bottom: 10px;
}
.wprex__assignmentSectionTitle{
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #2d4660;
}
.wprex__assignmentModeButtons{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wprex__assignmentModeBtn{
  border: 1px solid #dce6f1;
  border-radius: 10px;
  background: #fff;
  color: #2f465e;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
  display: grid;
  gap: 3px;
}
.wprex__assignmentModeBtn:hover{
  border-color: #c7d7e8;
  background: #f7fbff;
}
.wprex__assignmentModeBtn.is-selected{
  border-color: #92badf;
  background: #eaf3ff;
  box-shadow: 0 0 0 2px rgba(99,154,210,.18);
}
.wprex__assignmentModeBtnHead{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #24425f;
}
.wprex__assignmentModeBtnIcon{
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.wprex__assignmentModeBtnDesc{
  font-size: 11px;
  color: #5d7084;
  line-height: 1.2;
}
.wprex__assignmentModeHelp{
  font-size: 12px;
  color: #50667d;
  line-height: 1.25;
  display: grid;
  gap: 2px;
}
.wprex__assignmentFormSection--type .wprex__assignmentGrid label{
  padding: 7px 8px;
}
.wprex__assignmentTypeSelect{
  align-self: stretch;
}
.wprex__assignmentFormSection--type .wprex__assignmentToggles{
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 10px;
  border: 1px solid #e2eaf3;
  border-radius: 10px;
  background: #fcfeff;
  padding: 6px 8px;
}
.wprex__assignmentFormSection--type .wprex__assignmentToggles label{
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 4px 2px;
  margin: 0;
}
.wprex__assignmentFormSection--type .wprex__assignmentToggles .wprex__assignmentHint{
  margin-left: 18px;
  margin-top: 1px;
  line-height: 1.2;
}
.wprex__assignmentPinField{
  border-color: #e9d49a !important;
  background: #fff8e6 !important;
}
.wprex__assignmentHint{
  margin-top: -1px;
  font-size: 10px;
  line-height: 1.2;
  color: #8a96a3;
}
.wprex__assignmentGrid select,
.wprex__assignmentGrid input{
  border: 1px solid #d6e0ea;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}
.wprex__assignmentToggles{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.wprex__assignmentToggles label{
  display: block;
  font-size: 12px;
  color: #41566b;
  background: #fff;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  padding: 7px 8px;
}
.wprex__assignmentToggles input[type="checkbox"]{
  margin-right: 6px;
  vertical-align: middle;
  transform: translateY(-1px);
}
.wprex__assignmentToggles .wprex__assignmentHint{
  display: block;
  margin-left: 20px;
  margin-top: 2px;
}
.wprex__assignmentCells{
  margin-top: 0;
  border: 1px solid #e0e8f1;
  border-radius: 10px;
  padding: 8px;
  max-height: none;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}
.wprex__assignmentCellRow{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3f5367;
}
.wprex__assignmentCellCard{
  display: flex;
  flex-direction: column;
  min-height: 88px;
}
.wprex__assignmentCardPrev{
  height: 56px;
  padding: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.wprex__assignmentCellCaption{
  border-top: 1px solid #eef2f7;
  background: #fbfdff;
  color: #4f6174;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 6px;
  text-align: center;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wprex__assignmentActions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.wprex__assignmentActions [data-action="assignmentCreateNow"]{
  min-width: 210px;
}
.wprex__assignmentCreateReady{
  color: #b33b3b !important;
  background: #fff !important;
  border-color: #e3caca !important;
}
.wprex__assignmentCreateSuccess{
  color: #2c7650 !important;
  background: #e7f7ee !important;
  border-color: #9bd5b4 !important;
  cursor: default !important;
}
.wprex__assignmentResult{
  margin-top: 10px;
  border: 1px solid #d9e6f5;
  background: #f6fbff;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wprex__assignmentResult.is-hidden{ display: none; }
.wprex__assignmentError{
  margin-top: 8px;
  border: 1px solid #f0caca;
  background: #fff1f1;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 12px;
  color: #933636;
}
.wprex__assignmentError.is-hidden{ display: none; }
.wprex__assignmentResultText{
  white-space: pre-line;
  font-size: 12px;
  color: #2f4f70;
  flex: 1 1 auto;
}
.wprex__assignmentResultCloseWrap{
  display: none;
  margin-top: 8px;
  justify-content: flex-end;
}
.wprex__assignmentResult:not(.is-hidden) + .wprex__assignmentResultCloseWrap{
  display: flex;
}
@media (max-width: 1200px){
  .wprex__assignmentGrid--general{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .wprex__assignmentCells{
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
@media (max-width: 980px){
  .wprex__assignmentGrid--type{
    grid-template-columns: 1fr;
  }
  .wprex__assignmentModeButtons{
    grid-template-columns: 1fr;
  }
  .wprex__assignmentGrid--general{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wprex__assignmentCells{
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 760px){
  .wprex__assignmentModal{
    padding: 14px 10px 18px;
  }
  .wprex__assignmentGrid--general{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wprex__assignmentCells{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .wprex__assignmentFormSection--type .wprex__assignmentToggles{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px){
  .wprex__assignmentGrid--general{
    grid-template-columns: 1fr;
  }
  .wprex__assignmentCells{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.wprex__continuousLabel{
  width: 100%;
  max-width: 900px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #1f2f44;
  font-family: "Avenir Next", "Segoe UI", Roboto, Arial, sans-serif;
  margin-top: -2px;
}
.wprex__continuousLabel.is-hidden{ display: none; }
.wprex__continuousLabelInline{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-left: 2px;
  margin-top: 0;
  position: relative;
  top: -8px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #1f2f44;
  font-family: "Avenir Next", "Segoe UI", Roboto, Arial, sans-serif;
  white-space: nowrap;
}
.wprex__continuousLabelInline.is-hidden{ display: none; }

.wprex__metViz{
  width: 100%;
  max-width: 900px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -2px;
}
.wprex.wprex--dictation .wprex__metViz{
  margin-top: 0;
  min-height: 36px;
}
.wprex__metViz.is-hidden{ visibility: hidden; }
.wprex__metVizDot{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d7dfe7;
  background: #eef3f8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
  transition: background-color 0ms linear, border-color 0ms linear;
}
.wprex__metVizDot.is-hit{
  background: #2b3f55;
  border-color: #2b3f55;
}
.wprex__countinViz{
  width: 100%;
  max-width: 900px;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
}
.wprex__countinViz.is-hidden{ display: none; }
.wprex__vizDot{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d7dfe7;
  background: #eef3f8;
  color: #506175;
  font-size: 12px;
  line-height: 1;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
  transition: background-color 0ms linear, border-color 0ms linear, color 0ms linear;
}
.wprex__vizDot.is-hit{
  transform: none;
  background: #2b3f55;
  border-color: #2b3f55;
  color: #fff;
}
.wprex__vizDot--count{
  width: 30px;
  height: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #506175;
}
.wprex__score .wprex__karaoke-active{
  fill: #cf2020 !important;
  stroke: #cf2020 !important;
}
.wprex__score .wprex__karaoke-active *{
  fill: #cf2020 !important;
  stroke: #cf2020 !important;
}

/* Floating controls */
.wprex__mainControls--floating{
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 13;
  transition: left 180ms ease;
}
.wprex__controlsSep{
  width: 1px;
  height: 22px;
  background: #d9d9d9;
  opacity: .9;
}
.wprex__controlsSep.is-hidden{ display: none; }

.wprex.wprex--panel-open .wprex__mainControls--floating{
  left: calc(18px + var(--wprex-panel-offset));
}

.wprex__teacherControls{
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 13;
}
.wprex__fab--teacher{
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}
.wprex__teacherMenu{
  position: absolute;
  top: 52px;
  right: 0;
  width: 340px;
  max-width: min(90vw, 340px);
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wprex__teacherModeOption{
  appearance: none;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.wprex__teacherModeHead{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wprex__teacherModeIcon{
  width: 16px;
  height: 16px;
  display: inline-block;
  color: #2a3a4a;
  flex: 0 0 16px;
}
.wprex__teacherModeOption:hover{
  border-color: #bbb;
}
.wprex__teacherModeOption.is-selected{
  border-color: #8fb5ff;
  background: #eaf2ff;
}
.wprex__teacherModeSettings[hidden],
.wprex__teacherToggleRow[hidden]{
  display: none !important;
}
.wprex__teacherModeTitle{
  font-size: 13px;
  font-weight: 750;
  color: #1a1a1a;
}
.wprex__teacherModeDesc{
  font-size: 12px;
  color: #4f4f4f;
}
.wprex__teacherCreate{
  appearance: none;
  border: 0;
  background: transparent;
  color: #1e5ea9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 2px 0;
  cursor: pointer;
  align-self: flex-end;
}
.wprex__teacherCreate:hover{
  color: #154a85;
}
.wprex__teacherCreateIcon{
  width: 15px;
  height: 15px;
  display: inline-block;
}
.wprex__teacherOpenBox{
  border: 1px solid #f0d6ad;
  background: #fff4e4;
  border-radius: 10px;
  padding: 5px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: none;
}
.wprex__teacherOpenTitle{
  font-size: 11px;
  font-weight: 700;
  color: #6f4a1e;
  white-space: nowrap;
}
.wprex__teacherOpenInput{
  width: 84px;
  min-width: 84px;
  border: 1px solid #d9c2a0;
  border-radius: 8px;
  padding: 2px 5px;
  background-color: #fff !important;
  color: #3d2a16;
  font-size: 11px;
  text-transform: uppercase;
  line-height: 1.2;
  height: 22px;
  -webkit-appearance: none;
  appearance: none;
}
.wprex__teacherOpenInput:focus,
.wprex__teacherOpenInput:active{
  background-color: #fff !important;
  box-shadow: inset 0 0 0 999px #fff;
  outline: none;
}
.wprex__teacherOpenInput:-webkit-autofill,
.wprex__teacherOpenInput:-webkit-autofill:hover,
.wprex__teacherOpenInput:-webkit-autofill:focus{
  -webkit-text-fill-color: #3d2a16;
  box-shadow: inset 0 0 0 999px #fff;
}
.wprex__teacherOpenBtn{
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #6b4721;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wprex__teacherOpenBtn:hover{
  background: #fff8ef;
  color: #4f3418;
}
.wprex__teacherOpenBtnIcon{
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
.wprex__teacherOpenInput.is-invalid{
  border-color: #d94d4d;
  box-shadow: 0 0 0 2px rgba(217,77,77,.2);
  animation: wprex-shake .28s linear 1;
}
.wprex__teacherOpenInput.is-valid{
  border-color: #3aa66a;
  box-shadow: 0 0 0 2px rgba(58,166,106,.22);
}
@keyframes wprex-shake{
  0%{ transform: translateX(0); }
  25%{ transform: translateX(-3px); }
  50%{ transform: translateX(3px); }
  75%{ transform: translateX(-2px); }
  100%{ transform: translateX(0); }
}
.wprex__teacherToggleRow{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 5px 9px;
  background: #fafafa;
}
.wprex__teacherModeOption .wprex__teacherToggleRow{
  width: 100%;
  margin-top: 4px;
}
.wprex__teacherToggleMain{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wprex__teacherToggleLabel{
  font-size: 12px;
  color: #444;
  font-weight: 650;
}
.wprex__teacherToggleHint{
  display: block;
  margin-top: -1px;
  font-size: 10px;
  line-height: 1.1;
  color: #8b8b8b;
}

/* Compact switches in teacher-mode settings only */
.wprex__teacherMenu .wprex__switch{
  width: 38px;
  height: 20px;
}
.wprex__teacherMenu .wprex__slider:before{
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
}
.wprex__teacherMenu .wprex__switch input:checked + .wprex__slider:before{
  transform: translateX(18px);
}

.wprex__fab{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}

.wprex__fab:hover{ opacity: .92; }
.wprex__fab:focus{ outline: 2px solid rgba(0,0,0,.15); outline-offset: 3px; }
.wprex__fab--secondary{ background: #fff; color: #111; }
.wprex__fab--secondary:hover{ background: #f3f3f3; }

/* Control icons */
.wprex__iconSvg{
  width: 22px;
  height: 22px;
  display: block;
}
.wprex__iconSvg--nav{
  width: 21px;
  height: 21px;
}
.wprex__iconSvg--metro{
  width: 24px;
  height: 24px;
}
.wprex__pauseGlyph{ display: none; }
.wprex__fab.is-playing .wprex__playGlyph{ display: none; }
.wprex__fab.is-playing .wprex__pauseGlyph{ display: inline; }
.wprex__fsExit{ display: none; }
.wprex__fab.is-fullscreen .wprex__fsEnter{ display: none; }
.wprex__fab.is-fullscreen .wprex__fsExit{ display: inline; }

@media print{
  @page{
    size: A4;
    margin: 0;
  }
  body.wprex-printing > *{
    display: none !important;
  }
  body.wprex-printing > .wprex-print-target{
    display: block !important;
  }
  body.wprex-printing .wprex-print-target{
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  body.wprex-printing .wprex__layout,
  body.wprex-printing .wprex__main,
  body.wprex-printing .wprex__stage{
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  body.wprex-printing .wprex__mainControls--floating,
  body.wprex-printing .wprex__teacherControls,
  body.wprex-printing .wprex__panel,
  body.wprex-printing .wprex__panel--exercise,
  body.wprex-printing .wprex__panel--metronome,
  body.wprex-printing .wprex__status,
  body.wprex-printing .wprex__assignmentReveal,
  body.wprex-printing .wprex__assignmentInfo,
  body.wprex-printing .wprex__metViz,
  body.wprex-printing .wprex__countinViz,
  body.wprex-printing .wprex__assignmentPlayOne{
    display: none !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__stage > *{
    display: none !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswers{
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    border: 0 !important;
    padding: 15mm 15mm 12mm 15mm !important;
    margin: 0 !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    -webkit-box-decoration-break: clone !important;
    box-decoration-break: clone !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHead{
    display: block !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    border-bottom: 0 !important;
    color: #111 !important;
    font-size: 10.5px !important;
    font-weight: 500;
    line-height: 1.2;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadTop{
    margin-top: 0 !important;
    padding-bottom: 2px !important;
    border-bottom: 1px solid #d6dee8 !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadAuthor{
    margin: 0 0 1px 0 !important;
    color: #0f1b2a !important;
    font-size: 10.6px !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadOpen{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 0 0 1px 0 !important;
    flex-wrap: nowrap !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadCode{
    border: 1px solid #8fa7c1 !important;
    background: #eef4fb !important;
    border-radius: 6px !important;
    padding: 1px 8px !important;
    white-space: nowrap !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadExpiry{
    margin: 0 0 1px 0 !important;
    color: #1f2c3c !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadTitle{
    text-align: center !important;
    font-size: 20px !important;
    margin: 10mm 0 10mm 0 !important;
    color: #111 !important;
    letter-spacing: .02em;
    font-weight: 800 !important;
    text-transform: uppercase;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswersHeadLine strong{
    color: #0f1b2a !important;
    font-weight: 700 !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswerItem{
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 1px 0 !important;
    margin: 0 !important;
    break-inside: avoid;
    grid-template-columns: 95px 1fr !important;
    gap: 6px !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswerTitle{
    margin-bottom: 0 !important;
    font-size: 11px !important;
    color: #111 !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
    position: relative !important;
    top: 8px !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswerScore{
    min-height: 48px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 0 !important;
  }
  body.wprex-printing.wprex-print-answers .wprex__assignmentAnswerScore svg{
    margin: 0 !important;
    max-width: 100% !important;
  }
}
.wprex [data-action="playStop"]{
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}
.wprex [data-action="playStop"]:hover{
  background: #0f6bdd;
  border-color: #0f6bdd;
}
.wprex [data-action="continuousBack"]{
  display: inline-flex;
  background: #e9f2ff;
  color: #1f5fae;
  border-color: #c6ddff;
}
.wprex [data-action="continuousBack"]:hover{
  background: #dcecff;
}
.wprex [data-action="refresh"]{
  background: #e9f2ff;
  color: #1f5fae;
  border-color: #c6ddff;
}
.wprex [data-action="refresh"]:hover{
  background: #dcecff;
}

/* Panel sections */
.wprex__section{
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wprex__section--plain{
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.wprex__sectionTitle{
  font-size: 12px;
  font-weight: 800;
  color: #222;
  opacity: .9;
}

.wprex__group{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}
.wprex__group--split{
  gap: 12px;
}
.wprex__groupItem{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wprex__groupItem--countin{
  margin-left: auto;
}

.wprex__label{
  font-size: 12px;
  font-weight: 650;
  color: #555;
  white-space: nowrap;
}

.wprex__row2{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.wprex__seg{
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid #ddd;
  border-radius: 999px;
  overflow: hidden;
  background: #fafafa;
}

.wprex__seg input{
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.wprex__seg label{
  min-width: 56px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  border-right: 1px solid #e5e5e5;
}
.wprex__seg label:last-child{ border-right: none; }
.wprex__seg label.is-selected{ background: #111; color: #fff; }

.wprex__switch{ position: relative; width: 44px; height: 24px; display: inline-block; }
.wprex__switch input{ opacity: 0; width: 0; height: 0; }
.wprex__slider{ position: absolute; inset: 0; border-radius: 999px; background: #d0d0d0; transition: 160ms; cursor: pointer; }
.wprex__slider:before{ content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.18); transition:160ms; }
.wprex__switch input:checked + .wprex__slider{ background:#111; }
.wprex__switch input:checked + .wprex__slider:before{ transform:translateX(20px); }

.wprex__tempo{ display:flex; flex-direction:row; align-items:center; gap:10px; width:100%; max-width:220px; }
.wprex__tempoRange{ width: 120px; max-width:100%; }
.wprex__tempoBox{ display:inline-flex; align-items:center; padding:6px 8px; border:1px solid #ddd; border-radius:10px; background:#fff; }
.wprex__tempoNumber{ width: 6ch; border:none; outline:none; background:transparent; font-size:14px; text-align:right; font-variant-numeric: tabular-nums; padding:0; margin:0; }
.wprex__tempoNumber::-webkit-outer-spin-button,
.wprex__tempoNumber::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.wprex__tempoNumber{ -moz-appearance:textfield; }
.wprex__instrument{
  min-width: 150px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 6px 10px;
  font-size: 13px;
  color: #222;
}
.wprex__note{
  min-width: 72px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
  color: #222;
}
.wprex__inlineSelects{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cards */
.wprex .wprex__cells{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.wprex .wprex__card{
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  cursor:pointer;
  transition:border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.wprex .wprex__card:hover{ border-color:#bbb; }
.wprex .wprex__card.is-selected{ border-color:#1b7f3a; background:#e8f6ee; box-shadow:0 0 0 2px rgba(27,127,58,.15); }
.wprex .wprex__cardPrev{
  padding: 4px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.wprex .wprex__cardPrev svg{
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
/* Hide staff lines in card previews without touching note glyphs */
.wprex .wprex__cardPrev .abcjs-staff,
.wprex .wprex__cardPrev .abcjs-top-line{
  display: none !important;
}

@media (max-width: 980px){
  .wprex{ --wprex-panel-offset: 332px; }
  .wprex__panel{ width: 320px; }
}

@media (max-width: 720px){
  .wprex{ --wprex-panel-offset: 0px; }
  .wprex__mainControls--floating{ left: 10px; top: 10px; gap: 6px; }
  .wprex.wprex--panel-open .wprex__mainControls--floating{ left: 12px; }
  /* Put teacher controls on a second row so left and right button groups never collide. */
  .wprex__teacherControls{ right: 10px; top: 56px; gap: 6px; }
  .wprex__teacherMenu{ top: 48px; right: 0; width: min(92vw, 340px); }
  .wprex__fab{ width: 36px; height: 36px; }
  .wprex__iconSvg{ width: 18px; height: 18px; }
  .wprex__iconSvg--metro{ width: 22px; height: 22px; }
  /* Keep visual count-in visible below the two control rows. */
  .wprex__countinViz{ top: 96px; }
  .wprex:not(.wprex--fullscreen) .wprex__stage{ padding-top: 132px; }
  .wprex.wprex--dictation:not(.wprex--fullscreen) .wprex__stage{ padding-top: 160px; }
  .wprex__panel{ inset: 0 auto 0 0; }
  .wprex.wprex--panel-open .wprex__main{ padding-left: 16px; }
  .wprex .wprex__cells{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .wprex.wprex--dictation .wprex__dictAnswer{
    --wprex-dict-beat-w: 78px;
    min-height: 132px;
    gap: 6px;
  }
  .wprex.wprex--dictation .wprex__dictSlot{
    height: 132px;
    grid-template-rows: 1fr 22px;
  }
  .wprex.wprex--dictation .wprex__dictSlotBand{
    height: 22px;
    font-size: 12px;
  }
  .wprex.wprex--dictation .wprex__metViz{
    min-height: 34px;
    margin-top: 2px;
  }
  .wprex__score svg{ width: auto; max-width: 94%; }
  .wprex__row2{ grid-template-columns: 1fr; }
  .wprex__inlineSelects{ flex-wrap: wrap; justify-content: flex-end; }
  .wprex__group--split{ flex-wrap: wrap; }
  .wprex__groupItem--countin{ margin-left: 0; }
}
