/* B077VX: fit desktop activities without clipping content or changing audio. */
@media (min-width: 1100px) and (min-height: 700px) and (max-height: 1100px) {
  /* Replace old 920–980px floors with the content's natural height. */
  html.cwLearningSystem body.cwViewportManaged:is(.cwViewportCompact,.cwViewportDense) > .app,
  html.cwLearningSystem body.cwViewportManaged:is(.cwViewportCompact,.cwViewportDense) :is(.main,.wrap,.academyShell,.lesson,.introMain,.stagePanel.active),
  html.cwLearningSystem body.cwViewportRhythm:is(.cwViewportCompact,.cwViewportDense) :is(.workspace,.lessonCard,.studio) {
    min-height: 0 !important;
  }
  html.cwLearningSystem body.cwViewportManaged .main {
    padding-top: 6px !important;
    padding-bottom: 12px !important;
  }
  html.cwLearningSystem body.cwViewportManaged .cwLessonOrientation {
    margin: 6px 0 8px !important;
    padding: 8px 12px !important;
  }
  html.cwLearningSystem body.cwViewportManaged .cwLessonOrientationMeta {
    margin-bottom: 3px !important;
  }
  html.cwLearningSystem body.cwViewportManaged .cwLessonOrientationOutcome strong {
    max-width: none !important;
    line-height: 1.3 !important;
  }
  html.cwLearningSystem body.cwViewportIntroduction #academyLessonTitle {
    margin: 4px 0 5px !important;
    font-size: clamp(26px, 2vw, 36px) !important;
    line-height: 1.1 !important;
  }
  html.cwLearningSystem body.cwViewportIntroduction #academyLessonCategory {
    margin: 5px 0 9px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  html.cwLearningSystem body.cwViewportIntroduction .stage > .panel {
    padding: 10px !important;
  }
  html.cwLearningSystem body.cwViewportIntroduction #visual {
    min-height: 0 !important;
  }
  html.cwLearningSystem body.cwViewportIntroduction .navFooter {
    margin-top: 10px !important;
  }
  /* Both the class and the actual canvas identify this dynamically rendered lesson. */
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .seriesLiveCanvas {
    height: clamp(140px, 19vh, 195px) !important;
    min-height: 0 !important;
    margin-top: 6px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) #birthFrequencyCanvas {
    height: 44px !important;
    max-height: 44px !important;
    margin-top: 4px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas),.cwCompactSeries) .seriesCard {
    padding: 5px !important;
    min-height: 0 !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas),.cwCompactSeries) .seriesCard .noteName {
    font-size: 24px !important;
    margin: 3px 0 !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .whiteNoteRow {
    margin: 4px 0 6px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .whiteNoteBtn {
    padding: 6px 10px !important;
    font-size: 16px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .birthGrid {
    margin-top: 5px !important;
    gap: 6px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .birthCard {
    padding: 6px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .birthEquation {
    font-size: 24px !important;
    margin: 5px 0 !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .miniWhite {
    height: 52px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .miniBlackMark {
    height: 30px !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual:is(.cwCompactBirth,:has(#birthFrequencyCanvas)) .takeaway {
    padding: 6px 8px !important;
    margin-top: 5px !important;
    line-height: 1.35 !important;
  }
  html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactSeries .seriesLiveCanvas {
    height: clamp(170px, 22vh, 220px) !important;
    min-height: 0 !important;
  }
}

/* B077VY: compact the actual chord panels beneath the corrected canvas. */
@media (min-width:1100px) and (min-height:700px) and (max-height:1100px) {
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .seriesCard .ratio {font-size:16px!important;line-height:1.15!important;margin:0!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .seriesCard .noteName {font-size:22px!important;line-height:1.1!important;margin:4px 0!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .seriesCard .tiny {font-size:11px!important;line-height:1.3!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .noteToken {height:36px!important;min-width:44px!important;font-size:22px!important;margin:3px!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .birthCard {font-size:13px!important;line-height:1.25!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .birthCard .tiny {font-size:11px!important;line-height:1.25!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .miniKeyboard {margin-top:4px!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .miniWhite {height:44px!important}
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .miniBlackMark {height:26px!important}
}

/* B077VZ: caption stays in readable HTML, outside the waveform drawing. */
html.cwLearningSystem #visual .cwBirthWaveCaption {font-size:12px!important;line-height:1.35!important;color:#c8d6eb;padding:4px 6px 2px;}
@media (min-width:1100px) and (min-height:700px) and (max-height:1100px) {
 html.cwLearningSystem.cwIntroFlowFamily #visual.cwCompactBirth .seriesLiveCanvas {height:clamp(190px,23vh,230px)!important;}
}

/* B077WA: native playable cards keep the established card geometry. */
html.cwLearningSystem #visual .cwBirthHarmonicCard {font-family:inherit;color:inherit;width:100%;appearance:none;}
html.cwLearningSystem #visual .cwBirthHarmonicCard > span {display:block;}
html.cwLearningSystem #visual .cwBirthHarmonicCard:focus-visible {outline:2px solid #c1b7ff;outline-offset:2px;}
html.cwLearningSystem #visual .cwBirthHarmonicCard.cwHarmonicSounding {outline:2px solid #c1b7ff;outline-offset:-2px;background:#26364d!important;}

/* B077WB: keep all three metronome identity rows inside the existing desktop pane. */
@media (min-width:1100px) {
 html.cwLearningSystem.cwRhythmFamily body:is([data-lesson-focus="performance"],[data-lesson-focus="sync"]) #metronomePane {
   min-height:66px!important;
   flex-basis:66px!important;
   padding-block:5px!important;
 }
 html.cwLearningSystem.cwRhythmFamily body:is([data-lesson-focus="performance"],[data-lesson-focus="sync"]) #metroIdentity {
   display:grid!important;
   grid-template-rows:11px 13px 26px!important;
   gap:2px!important;
   align-content:center!important;
   margin:0!important;
   min-height:54px!important;
 }
 html.cwLearningSystem.cwRhythmFamily body:is([data-lesson-focus="performance"],[data-lesson-focus="sync"]) #metroIdentity > span {
   position:static!important;
   margin:0!important;
   font-size:9px!important;
   line-height:11px!important;
   white-space:nowrap!important;
 }
 html.cwLearningSystem.cwRhythmFamily body:is([data-lesson-focus="performance"],[data-lesson-focus="sync"]) #metroIdentity > b {
   margin:0!important;
   font-size:12px!important;
   line-height:13px!important;
   white-space:nowrap!important;
 }
 html.cwLearningSystem.cwRhythmFamily body:is([data-lesson-focus="performance"],[data-lesson-focus="sync"]) #metroMute {
   min-height:26px!important;
   height:26px!important;
   margin:0!important;
   padding:3px 8px!important;
   font-size:12px!important;
   line-height:18px!important;
   justify-self:start!important;
 }
}
