/* Narzędzia z panelem bocznym obok podglądu (EduBajka, EduMalarz, EduWpisy i in.):
   na komputerze panel stoi z lewej, a obie kolumny przewijają się osobno.
   Na telefonie i tablecie (< 1024 px) stały panel 320–380 px zasłaniał wynik – tu panel
   ląduje NAD podglądem, a cała strona przewija się normalnie. Tylko ekran: wydruk ma własne reguły. */
@media screen and (max-width: 1023px) {
  html, body { overflow: auto !important; height: auto !important; }
  #root { height: auto !important; min-height: 100vh; }
  #root > div:has(> aside) {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
  }
  #root > div > aside {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    border-right: 0 !important;
  }
  #root > div > aside .overflow-y-auto,
  #root > div > main,
  #root > div > main .overflow-y-auto { overflow: visible !important; }
  #root > div > main { min-height: 70vh; }
}

/* Komputer: menu (ok. 64 px) + układ na pełną wysokość ekranu ucinały dół panelu (pole kodu PRO)
   i ostatnie 64 px przewijania podglądu. Układ zajmuje teraz dokładnie miejsce pod menu. */
@media screen and (min-width: 1024px) {
  body:has(> #root > div > aside) { height: 100vh; display: flex; flex-direction: column; }
  body:has(> #root > div > aside) > #root { flex: 1 1 0; min-height: 0; height: auto !important; }
  #root > div:has(> aside) { height: 100% !important; }
}
