/* PZB Academy – Phase 8.1: warmer, mehrschichtiger Hintergrund */
@media screen {
  body:has(#protected:not([hidden])) {
    background: #eadfcf !important;
  }
  #protected:not([hidden]),
  #protected:not([hidden]) > #catalogView:not([hidden]),
  #protected:not([hidden]) > #courseView:not([hidden]),
  #protected:not([hidden]) > #teacherView:not([hidden]) {
    position: relative;
    isolation: isolate;
    background-color: #efe6d8 !important;
    background-image:
      radial-gradient(ellipse 65% 48% at 12% 12%, rgba(250,223,179,.84) 0%, rgba(250,223,179,0) 82%),
      radial-gradient(ellipse 53% 63% at 93% 10%, rgba(168,192,168,.56) 0%, rgba(168,192,168,0) 80%),
      radial-gradient(ellipse 66% 60% at 84% 86%, rgba(227,186,137,.60) 0%, rgba(227,186,137,0) 81%),
      radial-gradient(ellipse 52% 52% at 9% 83%, rgba(204,182,151,.42) 0%, rgba(204,182,151,0) 78%),
      linear-gradient(128deg, #f4e7d4 0%, #f0e6d7 33%, #e4e8d9 64%, #f1dcc1 100%) !important;
    background-attachment: local !important;
  }
  #catalogView:not([hidden])::before,
  #courseView:not([hidden])::before,
  #teacherView:not([hidden])::before {
    content: '';
    position: absolute;
    pointer-events: none;
    right: 4%;
    top: 16%;
    width: min(39vw, 620px);
    height: min(46vw, 660px);
    background: url('/static/pzb-logo.png') center / contain no-repeat;
    opacity: .055;
    z-index: -1;
  }
  #catalogView:not([hidden])::after,
  #courseView:not([hidden])::after,
  #teacherView:not([hidden])::after {
    content: 'ACADEMY';
    position: absolute;
    right: 5%;
    top: 67%;
    pointer-events: none;
    color: #345b4f;
    font-size: clamp(35px, 7vw, 124px);
    letter-spacing: .16em;
    font-weight: 800;
    opacity: .055;
    z-index: -1;
  }
}
@media (max-width: 850px) {
  #catalogView:not([hidden])::before,
  #courseView:not([hidden])::before,
  #teacherView:not([hidden])::before { opacity: .025; width: 65vw; right: 1%; }
  #catalogView:not([hidden])::after,
  #courseView:not([hidden])::after,
  #teacherView:not([hidden])::after { opacity: .025; font-size: 9vw; right: 1%; }
}
@media (prefers-contrast: more) {
  #catalogView:not([hidden])::before,
  #courseView:not([hidden])::before,
  #catalogView:not([hidden])::after,
  #courseView:not([hidden])::after,
  #teacherView:not([hidden])::after { display: none; }
}

/* Durchgängige warme Flächen für alle übrigen Academy-Bereiche,
   auch wenn diese dynamisch in #protected eingefügt werden. */
#protected:not([hidden]) {
  background-color: #efe6d8 !important;
  min-height: 100vh;
}
#protected:not([hidden]) > main:not(#catalogView):not(#courseView):not(#teacherView):not([hidden]) {
  background-color: transparent !important;
}
/* Unterrichtsfolien und Dialoginhalte behalten ihren Kontrast. */
#teacherSlide, #teacherSlide .slide-paper, #overlay .dialog,
#protected .slide-board, #protected .slide-paper {
  background-image: none;
}
