/* Learning Corner — Kasia & Mati frame the search area */
.learning-search-character-layout{
  width:min(1180px, 100%);
  margin:24px auto 12px;
  display:grid;
  grid-template-columns:minmax(120px, 210px) minmax(0, 760px) minmax(120px, 210px);
  align-items:end;
  justify-content:center;
  gap:clamp(14px, 2.2vw, 34px);
}

.learning-search-character-layout .learning-quick-search{
  width:100%;
  max-width:760px;
  margin:0 auto;
  align-self:center;
}

.learning-search-character{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-width:0;
  pointer-events:none;
}

.learning-search-character img{
  display:block;
  width:auto;
  max-width:100%;
  height:clamp(185px, 17vw, 255px);
  object-fit:contain;
  object-position:center bottom;
  filter:drop-shadow(0 10px 14px rgba(74,91,69,.12));
}

.learning-search-kasia{justify-content:flex-end;}
.learning-search-mati{justify-content:flex-start;}

@media (max-width:900px){
  .learning-search-character-layout{
    grid-template-columns:minmax(90px, 145px) minmax(0, 1fr) minmax(90px, 145px);
    gap:12px;
  }
  .learning-search-character img{
    height:clamp(145px, 20vw, 190px);
  }
}

@media (max-width:680px){
  .learning-search-character-layout{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "kasia mati"
      "search search";
    align-items:end;
    gap:4px 14px;
    margin-top:16px;
  }
  .learning-search-kasia{grid-area:kasia; justify-content:flex-end;}
  .learning-search-mati{grid-area:mati; justify-content:flex-start;}
  .learning-search-character-layout .learning-quick-search{grid-area:search; margin-top:0;}
  .learning-search-character img{
    height:150px;
    max-width:150px;
  }
}

@media (max-width:420px){
  .learning-search-character img{
    height:125px;
    max-width:125px;
  }
}


/* Kasia visibility safeguard — 2026-09-05 */
.learning-search-character-layout > .learning-search-kasia{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  grid-column:1;
}
.learning-search-character-layout > .learning-search-mati{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  grid-column:3;
}
.learning-search-kasia img,
.learning-search-mati img{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
}
@media (max-width:680px){
  .learning-search-character-layout > .learning-search-kasia{grid-column:auto; grid-area:kasia;}
  .learning-search-character-layout > .learning-search-mati{grid-column:auto; grid-area:mati;}
}


/* Reliable character image sizing — 2026-09-05 */
.learning-search-kasia img,
.learning-search-mati img{
  width:min(100%, 205px) !important;
  height:auto !important;
  max-height:270px;
  object-fit:contain;
  object-position:center bottom;
}
@media (max-width:900px){
  .learning-search-kasia img,
  .learning-search-mati img{width:min(100%, 155px) !important; max-height:205px;}
}
@media (max-width:680px){
  .learning-search-kasia img,
  .learning-search-mati img{width:145px !important; max-width:145px; max-height:190px;}
}
@media (max-width:420px){
  .learning-search-kasia img,
  .learning-search-mati img{width:120px !important; max-width:120px; max-height:160px;}
}


/* Transparent Kasia & Mati artwork — force no card/background around PNGs */
.learning-search-character,
.learning-search-character img{
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  border-radius:0 !important;
}
.learning-search-kasia img,
.learning-search-mati img{
  filter:drop-shadow(0 10px 14px rgba(74,91,69,.12));
}


/* Learning Corner — move Kasia & Mati higher beside search, 2026-09-06 */
@media (min-width:901px){
  .learning-search-character-layout > .learning-search-kasia,
  .learning-search-character-layout > .learning-search-mati{
    transform:translateY(-72px);
  }
}
@media (min-width:681px) and (max-width:900px){
  .learning-search-character-layout > .learning-search-kasia,
  .learning-search-character-layout > .learning-search-mati{
    transform:translateY(-45px);
  }
}
