/* Tema de nivel educativo: mismos componentes, ambiente visual adaptado. */
:root[data-nivel="preescolar"] {
  --ld-primary:#e96b5d; --ld-primary-2:#f39a4a; --ld-primary-soft:#fff0e8;
  --ld-coral:#f2a33f; --ld-coral-soft:#fff5df; --ld-mint:#55b99e; --ld-blue:#6a8fd8;
  --ld-bg:#fffaf5; --ld-ink:#493744; --ld-cream:#fff8ed;
}
:root[data-nivel="preescolar"] body { background:var(--ld-bg); }
.platform-shell[data-nivel="preescolar"] { border-radius:28px; background:linear-gradient(145deg,#fffdf9 0%,#fff7ee 100%); }
.platform-shell[data-nivel="preescolar"] .platform-welcome { background:linear-gradient(120deg,#fff0e7 0%,#fff9ed 72%); border-color:#f4d9c6; }
.platform-shell[data-nivel="preescolar"] .platform-welcome::after { content:'✦  ●  ▲'; color:rgba(233,107,93,.22); letter-spacing:12px; font-size:1.4rem; position:absolute; right:24px; bottom:18px; }
.platform-shell[data-nivel="preescolar"] .quick-icon { border-radius:14px; }
.platform-shell[data-nivel="preescolar"] .quick-start button,.platform-shell[data-nivel="preescolar"] .compact-tools button { border-radius:17px; }
.platform-shell[data-nivel="preescolar"] .platform-level-badge { background:#fff0e7; color:#b85d4e; }
.platform-level-badge { border-radius:999px; padding:5px 9px; font-size:.68rem; font-weight:800; background:var(--ld-primary-soft); color:var(--ld-primary); }
.topbar-secondary { border:1px solid var(--ld-line); background:#fff; color:#696579; border-radius:10px; padding:8px 10px; font:inherit; font-size:.72rem; font-weight:750; cursor:pointer; }
.topbar-secondary:hover { border-color:var(--ld-primary); color:var(--ld-primary); }
@media(max-width:620px){.platform-shell[data-nivel="preescolar"] .platform-welcome::after{right:14px;bottom:11px;font-size:1rem}.platform-level-badge{order:1}.topbar-secondary{order:2}}
@media(prefers-reduced-motion:no-preference){.platform-shell[data-nivel="preescolar"] .platform-welcome::after{animation:ld-pre-float 5s ease-in-out infinite}@keyframes ld-pre-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-4px) rotate(2deg)}}}
/* Detalles de exploración para Preescolar: discretos, legibles y exclusivos del tema. */
.platform-shell[data-nivel="preescolar"] .platform-welcome { position:relative; overflow:hidden; }
.platform-shell[data-nivel="preescolar"] .platform-welcome::after { content:none; }
.preescolar-doodles { position:absolute; right:24px; top:17px; width:170px; height:110px; pointer-events:none; }
.preescolar-doodles svg { position:absolute; display:block; filter:drop-shadow(0 7px 8px rgba(113,78,71,.10)); }
.doodle-crayon { width:112px; right:26px; top:3px; transform:rotate(-8deg); }
.doodle-search { width:55px; left:8px; bottom:5px; transform:rotate(-12deg); }
.doodle-star { position:absolute; color:#f2a33f; font-family:Georgia,serif; line-height:1; }
.doodle-star-one { right:7px; bottom:3px; font-size:1.4rem; }
.doodle-star-two { left:50px; top:3px; color:#55b99e; font-size:1rem; }
.platform-shell[data-nivel="preescolar"] .quick-start button:nth-child(1) .quick-icon::after { content:'✦'; position:absolute; font-size:.55rem; transform:translate(10px,-11px); color:#f39a4a; }
.platform-shell[data-nivel="preescolar"] .quick-icon { position:relative; }
@media(max-width:850px) {
  .preescolar-doodles { right:17px; opacity:.82; transform:scale(.82); transform-origin:top right; }
}
@media(max-width:620px) {
  .preescolar-doodles { right:8px; top:10px; transform:scale(.63); transform-origin:top right; opacity:.68; }
  .platform-shell[data-nivel="preescolar"] .platform-welcome { padding-right:105px; }
}
@media(prefers-reduced-motion:no-preference) {
  .doodle-crayon { animation:ld-doodle-sway 5s ease-in-out infinite; transform-origin:90% 90%; }
  .doodle-search { animation:ld-doodle-search 6s ease-in-out infinite; }
  @keyframes ld-doodle-sway { 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(-3deg) translateY(-3px)} }
  @keyframes ld-doodle-search { 0%,100%{transform:rotate(-12deg)} 50%{transform:rotate(-6deg) translateY(-2px)} }
}

/* Ajuste de jerarquía visual: los detalles preescolares viven en el fondo y nunca cubren controles. */
.platform-shell[data-nivel="preescolar"] .platform-main { position:relative; overflow:hidden; }
.platform-shell[data-nivel="preescolar"] .platform-main::before,
.platform-shell[data-nivel="preescolar"] .platform-main::after {
  content:''; position:absolute; pointer-events:none; z-index:0; border-radius:50%;
  opacity:.42; filter:blur(1px);
}
.platform-shell[data-nivel="preescolar"] .platform-main::before {
  width:210px; height:210px; right:-105px; top:125px;
  background:radial-gradient(circle at 35% 35%,rgba(243,154,74,.20),rgba(243,154,74,0) 70%);
}
.platform-shell[data-nivel="preescolar"] .platform-main::after {
  width:170px; height:170px; left:-105px; bottom:80px;
  background:radial-gradient(circle at 65% 45%,rgba(85,185,158,.16),rgba(85,185,158,0) 70%);
}
.platform-shell[data-nivel="preescolar"] .platform-main > * { position:relative; z-index:1; }
.platform-shell[data-nivel="preescolar"] .platform-welcome { isolation:isolate; }
.platform-shell[data-nivel="preescolar"] .platform-welcome > div:first-child { position:relative; z-index:2; max-width:78%; }
.platform-shell[data-nivel="preescolar"] .preescolar-doodles {
  z-index:0; right:-22px; top:auto; bottom:-30px; width:190px; height:120px;
  opacity:.16; filter:blur(.35px) saturate(.72); transform:rotate(-2deg);
}
.platform-shell[data-nivel="preescolar"] .preescolar-doodles svg { filter:none; }
.platform-shell[data-nivel="preescolar"] .doodle-star { opacity:.72; }
.platform-shell[data-nivel="preescolar"] .quick-start,
.platform-shell[data-nivel="preescolar"] .home-columns { position:relative; z-index:2; }
@media (max-width:620px) {
  .platform-shell[data-nivel="preescolar"] .platform-welcome > div:first-child { max-width:100%; }
  .platform-shell[data-nivel="preescolar"] .preescolar-doodles { right:-34px; bottom:-38px; opacity:.11; transform:scale(.76) rotate(-2deg); }
  .platform-shell[data-nivel="preescolar"] .platform-main::before { right:-135px; top:140px; opacity:.26; }
  .platform-shell[data-nivel="preescolar"] .platform-main::after { left:-135px; bottom:60px; opacity:.20; }
}
@media (prefers-reduced-motion: no-preference) {
  .platform-shell[data-nivel="preescolar"] .doodle-crayon,
  .platform-shell[data-nivel="preescolar"] .doodle-search { animation:none; }
}
/* La decoración pertenece únicamente al tema Preescolar. */
.preescolar-doodles { display:none; }
.platform-shell[data-nivel="preescolar"] .preescolar-doodles { display:block; }
