/* Rasti Igrai 3.1: consistent responsive fixes, safe to apply after section CSS. */
html, body { max-width:100%; }
/* Decorative characters intentionally sit outside catalogue shells.  Clip only
 * the horizontal paint area so they cannot create a phantom side scroll. */
html, body.rasti-clean-theme {overflow-x:hidden;overflow-x:clip;}
img, svg, video, canvas {max-width:100%;}
img {height:auto;}
.rasti-clean-theme [hidden] {display:none!important;}
.rasti-clean-theme .site-menu a, .rasti-clean-theme button, .rasti-clean-theme .primary-button { -webkit-tap-highlight-color:transparent; }
.rasti-clean-theme button, .rasti-clean-theme a {touch-action: manipulation;}
.rasti-clean-theme .site-menu a:focus-visible, .rasti-clean-theme button:focus-visible, .rasti-clean-theme a:focus-visible {outline:3px solid #593ac8;outline-offset:3px;}
.rasti-clean-theme .games-grid, .rasti-clean-theme .coloring-grid, .rasti-clean-theme .reading-grid, .rasti-clean-theme .writing-grid, .rasti-clean-theme .logic-grid, .rasti-clean-theme .math-grid, .rasti-clean-theme .parents-grid {min-width:0;}
.rasti-clean-theme .games-grid > *, .rasti-clean-theme .coloring-grid > *, .rasti-clean-theme .reading-grid > *, .rasti-clean-theme .writing-grid > *, .rasti-clean-theme .logic-grid > *, .rasti-clean-theme .math-grid > *, .rasti-clean-theme .parents-grid > * {min-width:0;}
.rasti-clean-theme .rasti-preview-note {display:block;max-width:760px;margin:12px 0 16px;padding:12px 20px;border-radius:15px;color:#5e4f83;background:#f8f3ff;font-size:14px;font-weight:700;line-height:1.5;}
.rasti-clean-theme .demo-action {display:inline-flex!important;align-items:center;justify-content:center;padding:10px 15px;border-radius:13px;background:#eee8fa;color:#7658b4;font-size:13px;font-weight:800;cursor:default;}
.rasti-clean-theme .rasti-cms-meta {display:inline-block;margin:8px 0;color:#7657df;font-size:12px;font-weight:800;}
.rasti-clean-theme .rasti-single {padding:35px 0 70px;}
.rasti-clean-theme .rasti-breadcrumb {margin-bottom:18px;font-size:13px;color:#695a86;}
.rasti-clean-theme .rasti-single-panel {max-width:880px;margin:auto;padding:36px;border:1px solid #ece5ff;background:#fff;border-radius:30px;box-shadow:0 14px 40px rgba(75,60,125,.08);}
.rasti-clean-theme .rasti-single-panel h1 {font-size:clamp(27px,4vw,44px);line-height:1.18;color:#443286;overflow-wrap:anywhere;}
.rasti-clean-theme .rasti-single-image {margin:25px auto;max-width:680px;text-align:center;}
.rasti-clean-theme .rasti-single-image img {width:auto;max-width:100%;max-height:610px;object-fit:contain;border-radius:20px;}
.rasti-clean-theme .rasti-single-copy {line-height:1.7;overflow-wrap:anywhere;}
.rasti-clean-theme .rasti-single-copy iframe {max-width:100%;}
.rasti-clean-theme .rasti-single-panel>p:last-child a {display:inline-block;margin-top:20px;color:#6844bf;font-weight:800;}
/* Prevent any fixed-position art from capturing clicks on narrow screens. */
.rasti-clean-theme .catalog-decor, .rasti-clean-theme .coloring-side-art, .rasti-clean-theme .reading-side-art, .rasti-clean-theme .writing-side-art {pointer-events:none;}
@media(max-width:1040px) {
 .rasti-clean-theme .site-menu {max-height:calc(100dvh - 95px);overflow-y:auto;z-index:50;}
 .rasti-clean-theme .header-row {min-width:0;}
 .rasti-clean-theme .site-menu a {min-height:44px;display:flex;align-items:center;justify-content:center;}
}

/* 3.5.6: override the legacy 160px/contain rule for reading covers only. */
.rasti-clean-theme .reading-card .reading-picture{
 position:relative!important;
 height:auto!important;
 min-height:0!important;
 aspect-ratio:3/2!important;
 padding:0!important;
 background:transparent!important;
 overflow:hidden!important;
}

/* 3.5.7: the writing catalog uses the same 3:2 full-cover artwork. */
.rasti-clean-theme .writing-card .writing-picture{
 position:relative!important;
 height:auto!important;
 min-height:0!important;
 aspect-ratio:3/2!important;
 padding:0!important;
 background:transparent!important;
 overflow:hidden!important;
}
.rasti-clean-theme .writing-card .writing-picture>img{
 position:absolute!important;
 inset:0!important;
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 object-fit:cover!important;
 object-position:center!important;
 margin:0!important;
}
@media(max-width:720px){
 .rasti-clean-theme .writing-card{
  display:block!important;
  min-height:0!important;
  grid-template-columns:none!important;
 }
}

/* 3.5.8: full-cover math game cards. */
.rasti-clean-theme .math-card .math-picture{
 position:relative!important;
 height:auto!important;
 min-height:0!important;
 aspect-ratio:3/2!important;
 padding:0!important;
 background:transparent!important;
 overflow:hidden!important;
}
.rasti-clean-theme .math-card .math-picture>img{
 position:absolute!important;
 inset:0!important;
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 object-fit:cover!important;
 object-position:center!important;
 margin:0!important;
}
@media(max-width:720px){
 .rasti-clean-theme .math-card{
  display:block!important;
  min-height:0!important;
  grid-template-columns:none!important;
 }
}
.rasti-clean-theme .reading-card .reading-picture>img{
 position:absolute!important;
 inset:0!important;
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 object-fit:cover!important;
 object-position:center!important;
 margin:0!important;
}
@media(max-width:720px){
 .rasti-clean-theme .reading-card{
  display:block!important;
  min-height:0!important;
  grid-template-columns:none!important;
 }
}
@media(max-width:720px) {
 .rasti-clean-theme .shell {width:calc(100% - 28px);max-width:560px;}
 .rasti-clean-theme .site-header {z-index:100;}
 .rasti-clean-theme .header-row {gap:8px;}
 .rasti-clean-theme .brand {min-width:0;max-width:calc(100% - 100px);}
 .rasti-clean-theme .brand-copy {min-width:0;}
 .rasti-clean-theme .brand-copy b {white-space:nowrap;}
 .rasti-clean-theme .hero {min-height:0;height:min(680px,calc(100svh - 70px));}
 .rasti-clean-theme .hero-copy {padding:0 8px;z-index:5;}
 .rasti-clean-theme .hero-copy p {max-width:min(100%,350px);}
 .rasti-clean-theme .world-card, .rasti-clean-theme .activity, .rasti-clean-theme .family-panel {overflow:hidden;}
 .rasti-clean-theme .world-card h3, .rasti-clean-theme .world-card p, .rasti-clean-theme .activity h3 {overflow-wrap:break-word;}
 .rasti-clean-theme .site-footer .footer-row nav {gap:12px 18px;}
 .rasti-clean-theme .site-footer .footer-row nav a {min-height:32px;display:inline-flex;align-items:center;}
 .rasti-clean-theme .rasti-single-panel {padding:22px 16px;border-radius:22px;}
 .rasti-clean-theme .rasti-preview-note {padding:10px 14px;font-size:13px;}
 .rasti-clean-theme .games-hero-art, .rasti-clean-theme .coloring-hero-art, .rasti-clean-theme .reading-hero-art, .rasti-clean-theme .writing-hero-art, .rasti-clean-theme .logic-hero-art, .rasti-clean-theme .math-hero-art {max-width:100%;object-fit:contain;}
}
@media(max-width:390px) {
 .rasti-clean-theme .brand-copy b {font-size:15px;}
 .rasti-clean-theme .menu-toggle, .rasti-clean-theme .account-button {flex:0 0 42px;}
 .rasti-clean-theme .hero h1 {font-size:clamp(32px,10vw,40px);}
}
@media(prefers-reduced-motion:reduce) {
 .rasti-clean-theme * {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}
}

/* Published lessons' featured artwork fits the pre-existing card graphics areas. */
.rasti-clean-theme .reading-picture img,
.rasti-clean-theme .writing-picture img,
.rasti-clean-theme .logic-picture img,
.rasti-clean-theme .math-picture img,
.rasti-clean-theme .parents-picture img {display:block;width:100%;height:160px;object-fit:contain;margin:auto;}
.rasti-clean-theme .game-card .game-picture img {display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;}
.rasti-clean-theme .coloring-card img {object-fit:contain;}
@media(max-width:720px){
.rasti-clean-theme .reading-picture img, .rasti-clean-theme .writing-picture img, .rasti-clean-theme .logic-picture img, .rasti-clean-theme .math-picture img, .rasti-clean-theme .parents-picture img {height:135px;}
}

/* 3.5.9: parent article covers override the legacy CMS illustration sizing. */
.rasti-clean-theme .parents-card .parents-picture{position:relative!important;height:auto!important;min-height:0!important;aspect-ratio:3/2!important;padding:0!important;background:transparent!important;overflow:hidden!important}
.rasti-clean-theme .parents-card .parents-picture>img{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;object-position:center!important;margin:0!important}
@media(max-width:720px){.rasti-clean-theme .parents-card{display:block!important;min-height:0!important;grid-template-columns:none!important}}

/* Coloring catalog: preserve the entire source image without distortion. */
.rasti-clean-theme .coloring-card .rasti-cms-meta {display:none!important;}
.rasti-clean-theme .coloring-card .coloring-preview {padding:8px;overflow:hidden;background:#fff;}
.rasti-clean-theme .coloring-card .coloring-preview img {
 display:block;
 width:100%;
 height:100%;
 max-width:none;
 max-height:none;
 margin:0;
 object-fit:contain;
 object-position:center;
 background:#fff;
 mix-blend-mode:normal;
}
