/* Neutral library landing – only when no direction is selected */
.psy-direction-welcome{min-height:clamp(390px,calc(100vh - 240px),820px);display:flex;align-items:center;justify-content:center;padding:38px 34px;text-align:center;background:radial-gradient(circle at 56% 32%,#fbfdfb 0,#eef5ef 76%);border:1px solid #d8e8dc;border-radius:26px;margin:18px 0 30px}
.psy-direction-welcome[hidden]{display:none!important}
.psy-welcome-content{max-width:720px}
.psy-welcome-arrow{display:block;width:190px;height:115px;margin:0 auto 24px;color:#548e6d;transform:translateX(-115px);filter:drop-shadow(0 8px 10px #2c694321)}
.psy-welcome-arrow path{fill:none;stroke:currentColor;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}
.psy-direction-welcome h2{font-size:clamp(30px,3.1vw,50px);line-height:1.14;letter-spacing:-.03em;color:#224b3a;margin:0 0 16px}
.psy-direction-welcome p{font-size:clamp(16px,1.3vw,19px);color:#647e6c;max-width:570px;margin:0 auto}
@media(max-width:800px){.psy-direction-welcome{min-height:420px;padding:26px 16px}.psy-welcome-arrow{transform:rotate(-28deg);width:125px;height:100px;margin-bottom:14px}}
html.dark .psy-direction-welcome{background:radial-gradient(circle at 60% 30%,#203c33,#162b25);border-color:#365447}
html.dark .psy-direction-welcome h2{color:#ebf4ee}html.dark .psy-direction-welcome p{color:#b1cabe}

/* Начальная библиотека без направления – НИКАКОГО баннера школы.
   Не полагаемся только на [hidden], который перебивают стили hero. */
html.psy-library-choose-only body.library-page .main > .hero,
html.psy-library-choose-only body.library-page .main > .hero[hidden],
html.psy-library-choose-only body.library-page .main:has(> .psy-direction-welcome) :is(#schoolView,#preschoolView,#specialView,#pmpkView,#resourceView){
 display:none!important;
 visibility:hidden!important;
}
html.psy-library-choose-only body.library-page .main .psy-direction-welcome{
 display:flex!important;
 box-sizing:border-box;
 margin:0!important;
 min-height:clamp(420px,calc(100dvh - 130px),790px);
 padding:clamp(28px,4vw,56px);
 position:relative;
 align-items:center;
 justify-content:center;
 overflow:visible!important;
 background:linear-gradient(145deg,#f9fcf8,#edf5ef)!important;
 border:1px solid #d7e7dd;
 border-radius:24px;
}
html.psy-library-choose-only body.library-page .main .psy-welcome-content{
 display:flex;flex-direction:column;align-items:center;
 gap:0;position:relative;max-width:min(100%,700px);
}
html.psy-library-choose-only body.library-page .main .psy-welcome-arrow{
 display:block!important;
 position:relative!important;
 width:clamp(160px,21vw,240px)!important;
 height:clamp(105px,13vw,150px)!important;
 margin:0 0 18px!important;
 transform:translateX(-18%)!important;
 color:#3b8b60!important;
 opacity:1!important;
 visibility:visible!important;
 filter:drop-shadow(0 5px 5px rgba(39,91,61,.12));
}
html.psy-library-choose-only body.library-page .main .psy-welcome-arrow path{
 stroke-width:7.5!important;
}
html.psy-library-choose-only body.library-page .main .psy-direction-welcome h2{
 margin:0 0 13px!important;
}
html.psy-library-choose-only body.library-page .main .psy-direction-welcome p{
 max-width:530px!important;
 line-height:1.6!important;
}
html.dark.psy-library-choose-only body.library-page .main .psy-direction-welcome{
 background:linear-gradient(155deg,#213b30,#172d25)!important;
 border-color:#405b4b!important;
}
html.dark.psy-library-choose-only body.library-page .main .psy-welcome-arrow{
 color:#9ecab0!important;
}
@media(max-width:820px){
 html.psy-library-choose-only body.library-page .main .psy-direction-welcome{
  min-height:calc(100dvh - 185px);
  padding:26px 14px;
  border-radius:20px;
 }
 html.psy-library-choose-only body.library-page .main .psy-welcome-arrow{
  width:135px!important;height:95px!important;
  margin:0 0 14px!important;transform:translateX(-7%)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 html.psy-library-choose-only body.library-page .main .psy-welcome-arrow{
  transition:none!important;animation:none!important;
 }
}

/* The fallback catalog stays usable even if the welcome script fails.
   Only hide sections once the actual welcome screen exists in the DOM. */
html.psy-library-choose-only body.library-page .main:not(:has(> .psy-direction-welcome)) > #schoolView{
 display:block!important;visibility:visible!important;
}
