/* Portada de cuento, acotada al rectángulo del juego para mantener el mismo encuadre. */
#portada.portada-modos { color: #302751; color-scheme: light; }
.portada-marco {
  position: absolute;
  container-type: size;
  width: min(100vw, 177.78vh);
  height: min(100vh, 56.25vw);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.portada-marco[data-encuadrada] { transform: none; }
.portada-hoja {
  position: absolute;
  inset: 8.8% auto auto 4.25%;
  box-sizing: border-box;
  width: 41%;
  padding: 2cqw 2.12cqw 1.8cqw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: .25cqw solid #fffdfa;
  border-radius: 2.2cqw 2cqw 2.1cqw 2.15cqw;
  background:
    radial-gradient(ellipse at 85% -10%, #ffe9b7 1%, transparent 48%),
    radial-gradient(circle at 25% 35%, #98634014 0 .055cqw, transparent .074cqw) 0 0 / .52cqw .59cqw,
    linear-gradient(144deg, #fffcf2, #fff1d6 84%);
  box-shadow: .38cqw .45cqw 0 #d29c57, .65cqw .8cqw 0 #956740a8, .6cqw 1.25cqw 2.6cqw #48321c4f;
  pointer-events: auto;
  animation: portada-hoja .66s cubic-bezier(.18,.8,.27,1) both;
}
.portada-hoja::before {
  content: '';
  position: absolute;
  inset: .5cqw;
  border: .085cqw dashed #bd8b484d;
  border-radius: 1.73cqw;
  pointer-events: none;
}
.portada-hoja::after {
  content: '';
  position: absolute;
  inset: -.48cqw auto auto 69%;
  width: 6cqw;
  height: 1.4cqw;
  transform: rotate(6deg);
  background: repeating-linear-gradient(125deg, #f6b73b 0 .38cqw, #ffd765 .38cqw .78cqw);
  clip-path: polygon(2% 0,100% 0,98% 100%,0 100%,3% 82%,0 60%,3% 45%,0 26%);
  opacity: .87;
  pointer-events: none;
}
.portada-marca { width: 10.8cqw; height: 2.98cqw; object-fit: contain; object-position: left; }
.portada-titulo {
  display: grid;
  gap: .27cqw;
  margin: .86cqw 0 0;
  text-align: left;
  font-weight: 700;
  line-height: .96;
}
.portada-kiara {
  display: flex;
  gap: .02em;
  font-size: 5.85cqw;
  letter-spacing: -.028em;
  filter: drop-shadow(0 .24cqw 0 #d9b98785);
}
.portada-kiara i { font-style: normal; paint-order: stroke fill; -webkit-text-stroke: .60cqw #fffdf7; }
.portada-kiara i:nth-child(1) { color: #f07b31; transform: rotate(-5deg); }
.portada-kiara i:nth-child(2) { color: #f45668; transform: rotate(4deg); }
.portada-kiara i:nth-child(3) { color: #159e94; transform: rotate(-4deg); }
.portada-kiara i:nth-child(4) { color: #edab1d; transform: rotate(3deg); }
.portada-kiara i:nth-child(5) { color: #73b940; transform: rotate(2deg); }
.portada-hogar { color: #176d64; font-size: 3.34cqw; letter-spacing: -.023em; }
.portada-lema { margin: .78cqw 0 1.39cqw; font-size: 1.46cqw; color: #5b4564; font-weight: 600; }
.portada-elecciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .86cqw;
  width: 100%;
}
.portada-opcion {
  --borde: #f1c46d;
  --sombra: #dca652;
  --papel: #fff5dc;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  align-items: center;
  grid-template-columns: 4.35cqw minmax(0,1fr) 1.35cqw;
  column-gap: .62cqw;
  min-height: 6.08cqw;
  text-align: left;
  color: #3e2c53;
  padding: .49cqw .68cqw;
  border: .125cqw solid var(--borde);
  border-radius: 1.05cqw;
  background: var(--papel);
  box-shadow: 0 .30cqw 0 var(--sombra), 0 .5cqw .83cqw #65422322;
  transform-origin: 50% 100%;
  transition: transform .18s, box-shadow .18s;
  animation: portada-tarjeta .62s cubic-bezier(.18,.8,.27,1) backwards;
}
.portada-opcion:nth-child(1) { animation-delay: .12s; }
.portada-opcion:nth-child(2) { animation-delay: .19s; }
.portada-opcion:nth-child(3) { animation-delay: .24s; }
.portada-opcion:is(:hover, :focus-visible) { transform: translateY(-.24cqw) rotate(-.65deg); z-index: 1; }
.portada-opcion:active { transform: translateY(.18cqw); box-shadow: 0 .13cqw 0 var(--sombra); }
.portada-opcion:focus-visible, .portada-reiniciar:focus-visible { outline: .16cqw solid #6a4093; outline-offset: .16cqw; }
.portada-opcion img { width: 100%; height: 4.4cqw; object-fit: contain; filter: drop-shadow(0 .19cqw .13cqw #553a3b3a); }
.portada-opcion-texto { min-width: 0; display: grid; justify-items: start; gap: .24cqw; }
.portada-opcion strong { font-size: 1.46cqw; line-height: 1.01; font-weight: 700; }
.portada-opcion small { font-weight: 500; font-size: .97cqw; line-height: 1.15; color: #655571; }
.portada-flecha {
  display: grid;
  align-items: center;
  justify-content: center;
  width: 1.35cqw;
  height: 1.35cqw;
  border-radius: 50%;
  font-size: 1.55cqw;
  font-weight: 600;
  line-height: 1;
  background: #fff9ed;
  color: #584675;
  box-shadow: 0 .11cqw 0 #44315b21;
}
#portada .portada-aprender {
  --borde: #baffdb;
  --sombra: #0b665a;
  grid-column: 1 / -1;
  grid-template-columns: 5.4cqw minmax(0,1fr) 2.3cqw;
  column-gap: .88cqw;
  min-height: 7.45cqw;
  padding: .64cqw 1.03cqw .65cqw .78cqw;
  color: #fffdf4;
  background:
    radial-gradient(circle, #d4fff321 0 .055cqw, transparent .082cqw) 0 0 / .5cqw .56cqw,
    linear-gradient(108deg,#158679,#116f65 86%);
}
.portada-aprender strong { font-size: 2.18cqw; letter-spacing: -.01em; }
.portada-aprender small { color: #e3f9e7; font-size: 1.11cqw; }
.portada-aprender .portada-flecha { width: 2.05cqw; height: 2.05cqw; font-size: 1.32cqw; color: #106b5f; }
.portada-recomendada {
  margin-bottom: .03cqw;
  padding: .24cqw .48cqw;
  background: #ffd97d;
  color: #503516;
  font-size: .89cqw;
  font-weight: 700;
  line-height: 1;
  border-radius: .44cqw;
  box-shadow: 0 .11cqw #5e603b;
}
.portada-icono {
  width: 5.25cqw;
  height: 5.25cqw;
  background: #fff2c0;
  border: .16cqw solid #ffe6ac;
  border-radius: 1.2cqw;
  box-shadow: 0 .23cqw 0 #0d5b52;
  transform: rotate(-6deg);
}
.portada-icono-kiara {
  background-color: #fff2c0;
  background-image: url('../v4/stickers-kiara-botones.webp');
  background-size: 326% 219%;
  background-position: 0 1%;
}
.portada-juegos { --papel: #fff1ce; }
.portada-calendario { --papel: #fae9ff; --borde: #e8bfeb; --sombra: #bc8cc8; }
.portada-calendario img { transform: rotate(-7deg); }
.portada-reiniciar { align-self: flex-start; margin-top: .85cqw; padding: .1cqw .13cqw; border: 0; font: 600 1.02cqw var(--display); color: #645275; background: transparent; }
.portada-reiniciar:hover { text-decoration: underline; }
.portada-reiniciar[hidden] { display: none; }
.portada-modos:not(.listo) button { pointer-events: none; }
.portada-lector { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portada-personaje {
  position: absolute;
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: transparent;
  border: 0;
  border-radius: 25%;
  padding: 0 0 .5cqw;
}
.portada-personaje:focus-visible { outline: .2cqw dashed #fff7bb; outline-offset: .17cqw; }
.portada-actor-kiara { left: 53.1%; bottom: 10%; width: 19.5%; height: 34%; }
.portada-actor-mateo { left: 73.6%; bottom: 10%; width: 19%; height: 48%; }
.portada-personaje span {
  opacity: 0;
  transform: translateY(.2cqw);
  transition: opacity .18s, transform .18s;
  padding: .34cqw .63cqw;
  border: .12cqw solid #fffdf4;
  border-radius: 2cqw;
  background: #ffe395;
  color: #59350d;
  box-shadow: 0 .18cqw .5cqw #45352255;
  font-size: 1.19cqw;
  font-weight: 700;
}
.portada-personaje:is(:hover, :focus-visible, .saludando) span { opacity: 1; transform: none; }
@keyframes portada-hoja { from { opacity: 0; transform: translate(-2.3cqw,.5cqw) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes portada-tarjeta { from { opacity: 0; transform: translateY(.7cqw) rotateX(-24deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .portada-hoja, .portada-opcion { animation: none; }
  .portada-opcion, .portada-personaje span { transition: none; }
  .portada-opcion:is(:hover, :focus-visible, :active) { transform: none; }
}
