/* Keep the classroom module inside one viewport on tablets, laptops and boards. */
.passive-home-button { flex: 0 0 40px; }

@media (min-width: 681px) {
  .passive-page { height: 100vh; height: 100dvh; overflow: hidden; }
  .passive-page .if-appbar-inner { min-height: 58px; }
  .passive-shell { height: calc(100vh - 58px); height: calc(100dvh - 58px); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: .65rem 0 .75rem; overflow: hidden; }
  .passive-toolbar { min-height: 68px; margin-bottom: .65rem; padding: .5rem .75rem; }
  .passive-segmented button, .passive-random { min-height: 42px; padding: .5rem .8rem; }
  .passive-panel { min-height: 0; height: 100%; }
  #panel-board { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .passive-board { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: clamp(.7rem, 1.6vh, 1.15rem) 1.25rem; }
  .sentence-stage { min-height: 0; height: 100%; grid-template-rows: auto minmax(48px, 1fr) clamp(22px, 4vh, 42px) auto minmax(48px, 1fr); padding: clamp(.25rem, 1vh, .7rem) 1.2rem; }
  .grammar-token { min-height: clamp(46px, 8vh, 74px); padding: .45rem .75rem; font-size: clamp(1rem, min(2.35vw, 3.8vh), 1.85rem); }
  .board-navigation { margin: .15rem 0 .55rem; }
  .board-navigation button { min-height: 44px; }
  .memory-cards article { padding: clamp(.45rem, 1vh, .75rem) .8rem; }
  .memory-cards strong { font-size: clamp(.75rem, 1.5vh, .9rem); }
  .pen-dock { min-height: 50px; margin: .45rem auto 0; padding: .35rem; }
  .pen-dock button { min-height: 38px; padding: .4rem .65rem; }
  .passive-exercise-card { height: 100%; min-height: 0; }
  .passive-exercise-content { padding: clamp(1.25rem, 4vh, 3rem); }
}

@media (min-width: 681px) and (max-width: 980px) {
  .passive-page { overflow: hidden; }
  .grammar-row, .swap-arrows { grid-template-columns: 1fr minmax(130px, .55fr) 1.4fr; }
  .swap-arrows { display: grid; }
  .sentence-stage { grid-template-rows: auto minmax(44px, 1fr) clamp(20px, 3vh, 34px) auto minmax(44px, 1fr); padding: .25rem; }
  .passive-board { min-height: 0; }
  .memory-cards { grid-template-columns: 1.15fr 1fr 1fr; }
  .pen-dock { overflow: visible; }
  .passive-exercise-card { min-height: 0; }
}

@media (max-width: 680px) {
  .passive-page { height: auto; min-height: 100vh; overflow-y: auto; }
  .passive-page .passive-home-button { display: grid; width: 38px; height: 38px; flex-basis: 38px; }
  .passive-segmented:has(#mixed-tense[hidden]) { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 430px) {
  .passive-page .if-appbar-inner { gap: .3rem; }
  .passive-page .if-app-brand span { width: 42px; height: 42px; }
  .passive-tabs button { min-width: 60px; padding: 0 .3rem; font-size: 0; }
  .passive-tabs button::after { font-size: .68rem; white-space: nowrap; }
  .passive-tabs button:nth-child(1)::after { content: "Tafel"; }
  .passive-tabs button:nth-child(2)::after { content: "Lücke"; }
  .passive-tabs button:nth-child(3)::after { content: "Übung"; }
}
