/* Web de Nuria L. Subires · cuaderno de hojas.
   Decisión de Nu (02/11/2026): fondo rosa empolvado, papel liso, hoja que voltea. */

@font-face { font-family: "Forum"; src: url("../fonts/Forum-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Biryani"; src: url("../fonts/Biryani-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Biryani"; src: url("../fonts/Biryani-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Luxurious Script"; src: url("../fonts/LuxuriousScript-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Italiana"; src: url("../fonts/Italiana-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --marron: #523E27;
  --terracota: #CE6857;
  --rosa-viejo: #C38B77;
  --marfil: #F7EEDF;
  --rosa-empolvado: #F5E9E4;
  --burdeos: #542B35;
  --frambuesa: #9B3D49;
  --rosa-suave: #C99D96;

  /* la cursiva de la firma: banner, "Bienvenidos…" y el "Nu" del saludo. Cambiarla aquí cambia las tres. */
  --cursiva: "Luxurious Script", cursive;

  --fondo: var(--rosa-empolvado);
  --hoja: #FAF3E6;
  --tinta: var(--marron);

  --banner: 136px;  /* alto del título de arriba */
  --pie: 44px;      /* alto de la franja de abajo */
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--fondo);
  color: var(--tinta);
  font-family: "Biryani", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  padding-top: calc(var(--banner) + 18px);   /* padding y no margin: así el documento no es más alto que la pantalla */
}
/* grano del fondo */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32  0 0 0 0 .24  0 0 0 0 .15  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .8;
}

/* motivos de línea terracota a los lados: flores y estanterías en SVG en línea (se generan con web/generar-fondo.py y se incrustan
   con web/aplicar-plus.py). Se pegan al cuaderno en vez de al borde de la pantalla, para que en pantallas anchas no quede hueco
   (Nu, 05/11/2026); si no hay sitio, se quedan en el borde y el cuaderno los tapa en parte, como antes.
   La base de las estanterías cae justo en el borde de abajo de la hoja (el SVG acaba en la línea de la última balda). */
.deco {
  position: absolute; bottom: 0; z-index: 0; pointer-events: none;
  height: calc(var(--eh) + 18px); width: var(--dw);
}
.deco.izq { left: max(0px, calc(50% - 250px - var(--dw))); }
.deco.der { right: max(0px, calc(50% - 300px - var(--dw))); }
.deco > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* ---------- Título de arriba (banner) y franja de abajo ---------- */
.banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--banner);
  background: var(--burdeos) url("../assets/img/banner.svg") center / cover no-repeat; color: var(--marfil);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center;
  box-shadow: 0 2px 8px rgba(82,62,39,.25), inset 0 -3px 0 rgba(247,238,223,.14);
}
/* decisión de Nu 02/11/2026: cursiva Luxurious Script (antes Pinyon Script: su S parecía una P) */
.banner h1 { margin: 0; color: var(--marfil); font: 400 clamp(52px, 6.8vw, 88px)/1.05 var(--cursiva); }
.banner .rol { display: block; font: 700 11px "Biryani", sans-serif; letter-spacing: .6em; text-transform: uppercase; color: var(--rosa-suave); padding-left: .6em; margin-top: -4px; }
.banner .arroba { font-size: 13px; letter-spacing: .04em; margin-top: 6px; color: var(--rosa-suave); text-decoration: none; }
.banner .arroba:hover { color: var(--marfil); text-decoration: underline; }
.pie {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; min-height: var(--pie);
  background: var(--burdeos) url("../assets/img/pie.svg") center / cover no-repeat; color: var(--marfil);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px;
  padding: 6px 16px; font-size: 12.5px; letter-spacing: .03em;
  box-shadow: 0 -2px 8px rgba(82,62,39,.2), inset 0 3px 0 rgba(247,238,223,.14);
}
.pie a { color: var(--marfil); }
.pie .hueco { outline-color: var(--rosa-suave); background: transparent; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Escenario ---------- */
.escena {
  --eh: min(calc(100vh - var(--banner) - var(--pie) - 90px), 780px);
  --eh: min(calc(100dvh - var(--banner) - var(--pie) - 90px), 780px);
  --dw: min(46vw, calc((var(--eh) + 18px) * 380 / 900));   /* ancho de cada motivo lateral: su proporción es 380 × 900 */
  position: relative; z-index: 1;
  height: var(--eh);
}
.stage {
  position: relative; z-index: 1;
  width: min(92vw, 540px);
  height: 100%;
  margin: 0 auto;
  perspective: 1800px;
}
/* "taco" de hojas debajo */
.stage::before, .stage::after {
  content: ""; position: absolute; inset: 0; background: var(--hoja);
  border-radius: 3px; box-shadow: 0 1px 4px rgba(82,62,39,.25); z-index: 0;
}
.stage::before { transform: translate(5px, 6px) rotate(.8deg); filter: brightness(.96); }
.stage::after  { transform: translate(-4px, 4px) rotate(-.6deg); filter: brightness(.93); }

.wrap {
  position: absolute; inset: 0; z-index: calc(20 - var(--i));
  transform-origin: left center;
  /* al volver (quitar .gone) la hoja aparece enseguida y gira de vuelta; --d escalona varias hojas seguidas */
  transition: transform .85s cubic-bezier(.5,.05,.25,1) var(--d, 0s), opacity .01s var(--d, 0s);
  filter: drop-shadow(0 6px 10px rgba(82,62,39,.22));
  backface-visibility: hidden;
}
/* al irse la hoja se desvanece al final del giro */
.wrap.gone {
  transform: rotateY(-172deg); opacity: 0; pointer-events: none;
  transition: transform .85s cubic-bezier(.5,.05,.25,1) var(--d, 0s), opacity .15s calc(.7s + var(--d, 0s));
}
.sin-anim .wrap { transition: none !important; }

.sheet {
  position: absolute; inset: 0; overflow: hidden;
  background-color: var(--hoja);
  border-radius: 2px;
}
/* papel liso con grano */
.sheet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .4  0 0 0 0 .3  0 0 0 0 .2  0 0 0 .13 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  mix-blend-mode: multiply;
}

/* perforaciones de espiral a la izquierda */
.holes {
  position: absolute; left: 12px; top: 0; bottom: 0; width: 18px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 9px 9px, var(--fondo) 0 6px, rgba(82,62,39,.28) 6.5px, transparent 7.5px) 0 0 / 18px 52px repeat-y;
}

/* esquina doblada: pasar hoja */
.esquina {
  position: absolute; right: 0; bottom: 0; z-index: 6; width: 58px; height: 58px; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #E6D4BB 0 50%, var(--fondo) 50% 100%);
  filter: drop-shadow(-2px -2px 3px rgba(82,62,39,.25));
  transition: width .2s, height .2s;
}
.esquina:hover, .esquina:focus-visible { width: 72px; height: 72px; }

/* contenido */
.content {
  /* texto de todas las hojas en Forum, la letra de los botones "Quiero romance…" (Nu, 02/11/2026) */
  font-family: "Forum", serif; font-size: 20px; line-height: 1.4;
  position: absolute; inset: 0; z-index: 3; overflow-y: auto; container-type: inline-size;
  padding: 34px 34px 40px 64px;
  scrollbar-width: thin; scrollbar-color: var(--rosa-suave) transparent;
}
.content:focus-visible, a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--frambuesa); outline-offset: 2px;
}
h1:focus, h2:focus { outline: none; }
h1, h2 { font-family: "Forum", serif; font-weight: 400; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(38px, 9vw, 52px); line-height: 1.02; color: var(--burdeos); }
h2 { font-size: 34px; line-height: 1.1; color: var(--burdeos); margin-bottom: 4px; }
.kicker { font: 400 16px/1.3 "Italiana", serif; letter-spacing: .22em; text-transform: uppercase; color: var(--frambuesa); margin: 0 0 14px; }
.handle { color: var(--terracota); text-decoration: none; }
.handle:hover { text-decoration: underline; }
/* encabezado de Inicio, centrado: cursiva del banner + Italiana (la de la propuesta F) */
/* "Bienvenidos…" siempre en una línea: el tamaño sigue al ancho útil de la hoja */
/* palabras resaltadas del saludo (opción E de Nu, 02/11/2026): la cursiva de la firma, en frambuesa */
.resalta { font-family: var(--cursiva); font-size: 1.6em; line-height: .5; margin: 0 .08em; letter-spacing: .02em; color: var(--frambuesa); }
.lema { font: 400 clamp(13px, 3.6vw, 17px)/1.5 "Italiana", serif; letter-spacing: .16em; text-transform: uppercase; color: var(--burdeos); -webkit-text-stroke: .18px currentColor; text-align: center; margin: 0 0 22px; }
p { margin: 0 0 12px; }
.lead { font-size: 22px; line-height: 1.35; }
/* subrayado a mano: una onda como las del fondo del banner que termina en un corazón (en vez de en una flor) */
.subraya { position: relative; white-space: nowrap; }
.subraya .onda { position: absolute; left: 0; bottom: -7px; width: calc(100% - 12px); height: 9px; fill: none; stroke: var(--terracota); stroke-width: 1.3; stroke-linecap: round; overflow: visible; }
.subraya .onda path { vector-effect: non-scaling-stroke; }
.subraya .cor { position: absolute; right: -1px; bottom: -11px; width: 14px; height: 13px; fill: none; stroke: var(--terracota); stroke-width: 1.2; stroke-linejoin: round; }
.small { font-size: 17px; opacity: .85; }

.btn {
  display: inline-block; font: 700 14px "Biryani", sans-serif; letter-spacing: .04em;
  background: var(--terracota); color: #fff; text-decoration: none;
  padding: 9px 18px; border-radius: 999px; border: 0; cursor: pointer; margin: 4px 6px 4px 0;
}
.btn:hover { background: var(--frambuesa); }
.btn.line { background: transparent; color: var(--burdeos); border: 1.5px solid var(--burdeos); }
.btn.line:hover { background: var(--burdeos); color: var(--marfil); }
.caminos { display: grid; gap: 10px; margin-top: 22px; }
.camino {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; color: var(--burdeos); font-family: "Forum", serif; font-size: 22px;
  padding: 10px 16px; border: 1.5px solid var(--rosa-viejo); border-radius: 4px;
  background: rgba(247,238,223,.7);
}
.camino span { color: var(--terracota); }
.camino:hover { border-color: var(--terracota); }

/* libros y cuentos */
.libro { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; margin: 14px 0; }
.libro h3 { font-family: "Forum", serif; font-weight: 400; font-size: 22px; margin: 0; color: var(--burdeos); }
/* bloques de la hoja de libros: Trilogía, proyectos en proceso… */
.bloque-titulo { font-family: "Forum", serif; font-weight: 400; font-size: 26px; margin: 22px 0 2px; color: var(--burdeos); padding-bottom: 4px; border-bottom: 1px solid var(--rosa-viejo); }
.bloque-titulo:first-of-type { margin-top: 14px; }
.portada {
  aspect-ratio: 2/3; background: var(--rosa-suave); border-radius: 2px;
  display: grid; place-items: center; text-align: center; color: var(--burdeos);
  font-size: 11px; padding: 6px; box-shadow: 2px 3px 6px rgba(82,62,39,.3);
}
/* "Conecta conmigo": botones redondos con el icono de cada red */
.conecta { clear: both; margin-top: 22px; text-align: center; }
.conecta h3 { font: 400 22px/1.3 "Italiana", serif; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 10px; color: var(--burdeos); }
.redes { display: flex; justify-content: center; gap: 14px; }
.red {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--burdeos); color: var(--marfil); box-shadow: 0 2px 6px rgba(82,62,39,.28);
  transition: background .2s, transform .2s;
}
.red svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.red svg .p { fill: currentColor; stroke: none; }
.red:hover, .red:focus-visible { background: var(--terracota); transform: translateY(-2px); }

.polaroid {
  width: 170px; background: #fff; padding: 8px 8px 26px; box-shadow: 2px 4px 10px rgba(82,62,39,.3);
  transform: rotate(3deg); float: right; margin: 0 0 8px 12px; position: relative;
}
.polaroid::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 62px; height: 20px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(201,157,150,.7); box-shadow: 0 1px 2px rgba(82,62,39,.18);
}
.polaroid .foto { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 12%; background: var(--rosa-suave); }
/* hoja Gratis: librería dibujada en la hoja. Los relatos son libros de línea fina terracota, ordenados por género
   (romance · humor · oscuro); al pulsar la portada se abre el relato en Wattpad. Decisiones de Nu, 03/11/2026. */
.libreria { --H: min(136px, calc((100cqw - 68px) / 1.42)); --P: 6px; position: relative; margin: 26px 0 10px; }
.cornisa { position: relative; height: 22px; margin: 0 -22px; }
.cornisa::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; border: 1.6px solid var(--terracota); background: rgba(206,104,87,.2); border-radius: 2px; }
.cornisa::after { content: ""; position: absolute; left: 8px; right: 8px; top: 9px; height: 11px; border: 1.6px solid var(--terracota); border-top: 0; background: rgba(206,104,87,.12); border-radius: 0 0 3px 3px; }
.estante {
  position: relative; display: grid; grid-template-columns: 14px max-content max-content 1fr; align-items: end;
  background: rgba(206,104,87,.07); box-shadow: inset 6px 0 8px -6px rgba(82,62,39,.25), inset -6px 0 8px -6px rgba(82,62,39,.25);
}
.estante::before, .estante::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12px; border: 1.6px solid var(--terracota); background: rgba(206,104,87,.12); }
.estante::before { left: -13px; }
.estante::after { right: -13px; }
.zocalo { position: relative; height: 20px; margin: 0 -13px; border: 1.6px solid var(--terracota); background: rgba(206,104,87,.2); border-radius: 0 0 3px 3px; }
.zocalo::before, .zocalo::after { content: ""; position: absolute; top: 100%; width: 16px; height: 9px; border: 1.6px solid var(--terracota); border-top: 0; background: rgba(206,104,87,.14); border-radius: 0 0 3px 3px; }
.zocalo::before { left: 14px; }
.zocalo::after { right: 14px; }

/* balda: plano superior y canto, con grosor */
.balda { display: block; position: relative; z-index: 0; align-self: start; width: 0; min-width: 100%; height: 20px; margin-top: -7px; overflow: visible; }
.balda * { vector-effect: non-scaling-stroke; stroke: var(--terracota); stroke-linejoin: round; }
.balda .plano { fill: rgba(206,104,87,.07); stroke-width: 1.2; }
.balda .canto { fill: rgba(206,104,87,.2); stroke-width: 1.6; }

/* objetos sobre las baldas (maceta, pila de libros, jarrón); sin taza */
.obj { position: relative; z-index: 1; align-self: end; justify-self: start; margin: 0 0 -7px 4px; color: var(--terracota); }
.obj * { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* cada libro: título arriba en Forum mayúsculas reforzado, portada con la línea terracota por encima */
.bk {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  width: calc(var(--H) * var(--r) + var(--P)); margin: 16px 12px 0 0; color: inherit; text-decoration: none;
}
.bk .t {
  width: calc(var(--H) * var(--r)); margin-bottom: 8px; text-align: center;
  font: 12.5px/1.25 "Forum", serif; letter-spacing: .085em; text-transform: uppercase;
  color: #43202a; -webkit-text-stroke: .25px currentColor;
}
.bk .t small { display: block; margin-top: 2px; font: 12px/1.2 "Forum", serif; letter-spacing: 0; text-transform: none; color: var(--terracota); -webkit-text-stroke: 0; }
.tapa { position: relative; display: block; width: calc(var(--H) * var(--r)); height: var(--H); border-radius: 2px 4px 4px 2px; box-shadow: 3px 3px 5px rgba(82,62,39,.32); transition: transform .2s; }
.tapa img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tapa::after { content: ""; position: absolute; inset: 0; border: 1.3px solid var(--terracota); border-radius: 3px; filter: drop-shadow(0 0 1px rgba(247,238,223,.55)); pointer-events: none; }
.tapa::before { content: ""; position: absolute; z-index: 1; left: 4.2px; top: 1px; bottom: 1px; width: 1.3px; border-left: 1.3px solid var(--terracota); border-right: 1.3px solid var(--terracota); filter: drop-shadow(0 0 1px rgba(247,238,223,.55)); pointer-events: none; }
.pag {
  position: absolute; left: 100%; top: 4px; bottom: 3px; width: var(--P); border: 1.3px solid var(--terracota); border-left: 0; border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #f6ecd9 1.6px, rgba(206,104,87,.75) 1.6px 2.2px, #f6ecd9 2.2px 3.2px, rgba(206,104,87,.75) 3.2px 3.8px, #f6ecd9 3.8px);
  box-shadow: 1px 2px 3px rgba(82,62,39,.22);
}
.bk:hover .tapa, .bk:focus-visible .tapa { transform: translateY(-3px); }

/* colocación en estrecho (móvil): 2 libros por balda, el último solo con su maceta */
.b1 { grid-area: 1 / 2; } .b2 { grid-area: 1 / 3; }
.s1 { grid-area: 2 / 1 / 3 / -1; }
.b3 { grid-area: 3 / 2; } .b4 { grid-area: 3 / 3; }
.s2 { grid-area: 4 / 1 / 5 / -1; }
.b5 { grid-area: 5 / 2; } .b6 { grid-area: 5 / 3; }
.s3 { grid-area: 6 / 1 / 7 / -1; }
.b7 { grid-area: 7 / 2; }
.s4 { display: block; grid-area: 8 / 1 / 9 / -1; }
.o1, .o2 { display: none; }
.o3 { display: block; grid-area: 7 / 3; }

/* colocación en ancho (hoja de escritorio y tablet): 2 · 2 · 3 libros por balda, con objetos en los huecos */
@container (min-width: 400px) {
  .libreria { --H: min(182px, calc((100cqw - 82px) / 2.093), calc((100cqw - 208px) / 1.34)); }
  .bk .t { font-size: 14.5px; }
  .b5 { grid-area: 5 / 2; } .b6 { grid-area: 5 / 3; } .b7 { grid-area: 5 / 4; }
  .s4, .o3 { display: none; }
  .o1 { display: block; grid-area: 1 / 4; }
  .o2 { display: block; grid-area: 3 / 4; }
}
.lista { padding-left: 18px; margin: 6px 0 14px; }

/* formularios */
form { display: grid; gap: 10px; margin-top: 12px; }
input, textarea {
  font: inherit; color: var(--tinta); background: rgba(255,255,255,.7); border: 0; border-bottom: 1.5px solid var(--rosa-viejo);
  padding: 8px 6px; border-radius: 2px; width: 100%;
}
form .btn { justify-self: start; }
.estado { min-height: 1.4em; margin: 0; font-size: 14px; color: var(--frambuesa); }

/* huecos por rellenar: se ven a propósito. Buscar class="hueco" antes de publicar */
.hueco { outline: 1.5px dashed var(--frambuesa); outline-offset: 1px; background: rgba(201,157,150,.18); border-radius: 3px; }
.portada.hueco, .foto.hueco { outline-offset: -3px; }

/* ---------- Marcapáginas (índice) ---------- */
/* pestañas verticales que, juntas, ocupan todo el alto de la hoja */
.marks {
  position: absolute; z-index: 30; top: 0; bottom: 0; left: calc(100% - 6px); width: 40px;
  display: flex; flex-direction: column; gap: 6px;
}
.marks button {
  flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; font: 400 16px "Italiana", serif; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 1px rgba(82,62,39,.35); cursor: pointer;
  border: 0; padding: 0 0 0 6px; border-radius: 0 10px 10px 0;
  box-shadow: 1px 2px 4px rgba(82,62,39,.25); transition: transform .2s;
}
.marks button:hover, .marks button[aria-current="true"] { transform: translateX(6px); }
.marks button:nth-child(1) { background: var(--rosa-viejo); }   /* Conóceme: el rosa viejo que antes tenía Libros (Nu, 03/11/2026) */
.marks button:nth-child(2) { background: var(--terracota); }    /* Novelas: el terracota que tenía Conóceme */
.marks button:nth-child(3) { background: var(--frambuesa); }    /* Cuentos */
.marks button:nth-child(4) { background: var(--burdeos); }      /* Gratis */
.marks button:nth-child(5) { background: var(--marron); }
.marks button:nth-child(6) { background: var(--terracota); }
.marks button:nth-child(7) { background: var(--rosa-viejo); }
.marks .c { display: none; }

/* ---------- Pasar hoja ---------- */
.pager {
  position: absolute; z-index: 30; left: 0; right: 0; bottom: -46px; display: flex; justify-content: center; align-items: center; gap: 14px;
  font-size: 13px; color: var(--burdeos);
}
.pager button, .pager select {
  font: 700 13px "Biryani", sans-serif; color: var(--burdeos); background: transparent;
  border: 1.5px solid var(--burdeos); border-radius: 999px; padding: 4px 14px; cursor: pointer;
}
.pager button:disabled { opacity: .3; cursor: default; }
.pager .ir { display: none; }

@media (max-width: 760px) {
  :root { --banner: 104px; --pie: 52px; }
  .banner h1 { font-size: 54px; }
  .banner .rol { font-size: 10px; letter-spacing: .5em; padding-left: .5em; }
  .banner .arroba { font-size: 12px; margin-top: 4px; }
  /* en móvil las pestañas quedan pegadas al borde de la pantalla, todo el alto de la hoja */
  .marks { left: calc(100% - 17px); width: 32px; gap: 5px; }
  .marks button { font-size: 14px; letter-spacing: .1em; padding: 0 0 0 8px; }
  .marks button:hover { transform: none; }
  .marks button[aria-current="true"] { transform: translateX(-4px); }
  .marks .l { display: none; }
  .marks .c { display: inline; }
  #cuenta { display: none; }
  .content { padding: 28px 36px 40px 58px; }
  /* la foto sigue junto al texto, más pequeña; el saludo puede ocupar el ancho que le deja */
  .polaroid { width: 118px; padding: 6px 6px 20px; margin: 4px 0 8px 10px; }
  .pie .copy { display: none; }
  .pie { gap: 4px 12px; }
  .libro .btn { padding: 8px 14px; font-size: 13px; }
  .pager { gap: 8px; }
  .pager button, .pager select { padding: 4px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wrap, .marks button, .esquina { transition: none; }
}

/* ---------- Sin JavaScript: todas las hojas, una debajo de otra ---------- */
.no-js body { overflow: auto; }
.no-js body { padding-bottom: calc(var(--pie) + 12px); }
.no-js .escena { height: auto; }
.no-js .deco { display: none; }
.no-js .stage { height: auto; perspective: none; }
.no-js .stage::before, .no-js .stage::after { display: none; }
.no-js .wrap { position: relative; inset: auto; margin: 0 0 28px; transform: none; }
.no-js .sheet { position: relative; }
.no-js .content { position: relative; overflow: visible; }
.no-js .esquina, .no-js .marks, .no-js .pager { display: none; }

/* casilla de privacidad del formulario */
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.check input { width: auto; margin-top: 5px; }
.check a { color: var(--frambuesa); }

/* ---------- Páginas legales (aviso legal, privacidad) ---------- */
body.legal { overflow: auto; height: auto; min-height: 100%; padding-bottom: calc(var(--pie) + 28px); }
.banner h1 a { color: inherit; text-decoration: none; }
.hoja-legal {
  position: relative; z-index: 1; width: min(92vw, 720px); margin: 0 auto; padding: 34px 40px 44px;
  background: var(--hoja); border-radius: 2px; box-shadow: 0 6px 14px rgba(82,62,39,.22);
}
.hoja-legal h2 { font-size: 32px; }
.hoja-legal h3 { font: 700 16px "Biryani", sans-serif; color: var(--burdeos); margin: 22px 0 4px; }
.hoja-legal a { color: var(--frambuesa); }
.hoja-legal ul { padding-left: 20px; margin: 4px 0 12px; }
.borrador { padding: 10px 14px; margin: 14px 0 6px; font-size: 14px; }
.legal .pager { display: none; }
@media (max-width: 760px) { .hoja-legal { padding: 26px 22px 36px; } }


/* ---------- Conóceme (decisiones de Nu, 03/11/2026) ---------- */
/* fila: recuadro del titular centrado en el eje de la foto; el segundo párrafo empieza debajo de la foto */
.fila-pres { display: flex; align-items: center; gap: 22px; margin: 6px 0 18px; }
.fila-pres .polaroid { float: none; margin: 0; flex: none; width: 150px; }
.titular {
  flex: 1 1 auto; margin: 0; white-space: nowrap; text-align: center; padding: 16px 14px 18px;
  font: 400 min(26px, 5.8cqw)/1.2 "Forum", serif; letter-spacing: .005em;
  background: var(--burdeos); color: var(--marfil);
  box-shadow: inset 0 0 0 5px var(--burdeos), inset 0 0 0 6.4px rgba(247,238,223,.45), 2px 3px 8px rgba(82,62,39,.25);
}
.titular .nu, .recuadro .nu { font-family: var(--cursiva); color: var(--rosa-suave); font-size: 1.75em; line-height: .7; letter-spacing: .03em; }
/* recuadro pequeño de la hoja Gratis («Para empezar»): mismo recuadro, color y tipografía que el titular de Conóceme */
.centro { text-align: center; margin: 0 0 6px; }
.recuadro {
  display: inline-block; padding: 11px 20px 13px; white-space: nowrap;
  font: 400 22px/1.2 "Forum", serif; letter-spacing: .005em; background: var(--burdeos); color: var(--marfil);
  box-shadow: inset 0 0 0 4px var(--burdeos), inset 0 0 0 5.2px rgba(247,238,223,.45), 2px 3px 8px rgba(82,62,39,.25);
}
/* la O del «NO», en mayúscula pero más pequeña y pegada a la N (en la cursiva parecían separadas por un espacio) */
.titular .nu .o { font-size: .7em; margin-left: -.16em; }
.p2 { clear: both; }
.resalta { white-space: nowrap; }
/* frase subrayada: en la cursiva y del mismo color que su línea (la línea acaba en un corazón dibujado sin soltar el trazo) */
.subraya { position: relative; display: inline-block; white-space: nowrap; margin-bottom: 26px; font-family: var(--cursiva); font-size: 1.6em; line-height: .8; color: var(--frambuesa); }
.subraya .onda { position: absolute; left: -2px; top: 100%; margin-top: 2px; width: 112%; height: auto; overflow: visible; fill: none; }
@container (max-width: 399px) {
  .fila-pres { flex-direction: column; align-items: stretch; }
  .fila-pres .polaroid { align-self: center; }
  .titular { font-size: 22px; }
}

/* ---------- Novelas (Nu, 04/11/2026): pila de libros, libreta, recuadros y portadas en ciruela ---------- */
.estrella { width: 10px; height: 10px; fill: var(--terracota); vertical-align: -1px; margin: 0 1px 0 0; }
.arte { display: block; width: 100%; height: 100%; border-radius: inherit; }
.bk.mk { margin: 0; justify-content: flex-start; --P: 6px; }
.bk.mk .t { width: calc(var(--H) * var(--r) + var(--P)); font-size: 11.5px; letter-spacing: .05em; margin: 8px 0 0; }
.bk.mk .t small { font-size: 12px; }
.mk:hover .tapa { transform: none; }
.giro-i { transform: rotate(-2.2deg); }
.giro-d { transform: rotate(2.2deg); }
.res { font-family: var(--cursiva); font-size: 1.4em; line-height: .9; color: var(--frambuesa); }
.todo { font-family: "Forum", serif; color: var(--frambuesa); font-size: .95em; letter-spacing: .06em; }
.fila-3 { display: flex; justify-content: center; gap: 12px; margin: 14px 0 6px; }
.a-prox { display: flex; justify-content: center; gap: 26px; margin: 22px 0 10px; }

/* portadas «en proceso editorial» en ciruela, el color de los recuadros */
.bk.ciruela .tapa::after { border-color: var(--burdeos); }
.bk.ciruela .tapa::before { border-left-color: var(--burdeos); border-right-color: var(--burdeos); }
.bk.ciruela .pag { border-color: var(--burdeos);
  background: linear-gradient(90deg, #f6ecd9 1.6px, rgba(84,43,53,.8) 1.6px 2.2px, #f6ecd9 2.2px 3.2px, rgba(84,43,53,.8) 3.2px 3.8px, #f6ecd9 3.8px); }

/* filas en zigzag: libro 1 con su texto (sin recuadro) y recuadro ciruela con el libro 2 */
.c-fila { display: flex; align-items: center; gap: 20px; margin: 26px 0; }
.c-txt { flex: 1 1 0; min-width: 0; font-size: 17px; line-height: 1.55; text-align: center; }
.c-txt p { margin: 0 0 10px; }
.c-txt .ln { display: block; white-space: nowrap; }
.c-txt .res { font-size: 1.3em; white-space: nowrap; }
.c-txt .subraya.sg { margin-bottom: 5px; }
.c-txt .subraya.sg .onda { width: 118%; margin-top: -4px; }
.c-caja {
  flex: 1 1 0; min-width: 0; padding: 20px 20px 22px; font: 400 18px/1.5 "Forum", serif; text-align: center;
  background: var(--burdeos); color: var(--marfil);
  box-shadow: inset 0 0 0 5px var(--burdeos), inset 0 0 0 6.4px rgba(247,238,223,.45), 2px 3px 8px rgba(82,62,39,.25);
}
.c-caja .ln { display: block; white-space: nowrap; }
.c-caja .ln + .ln { margin-top: 2px; }
.fo { font-family: "Forum", serif; text-transform: uppercase; letter-spacing: .08em; font-size: .86em; color: var(--rosa-suave); white-space: nowrap; }
.cur { font-family: var(--cursiva); font-size: 1.4em; line-height: .95; color: var(--rosa-suave); letter-spacing: .01em; }
.c-caja .cur { white-space: nowrap; font-size: 1.32em; }
.c-caja .subraya { font-size: 1em; line-height: inherit; color: inherit; margin-bottom: 6px; }
.c-caja .subraya .onda { width: 112%; left: -2px; margin-top: 1px; }

/* la pregunta, como título en el lomo de un libro de la pila */
.lomo-q { position: relative; margin: 22px -16px 22px -20px; padding: 13px 44px 14px; text-align: center;
  border: 1.3px solid var(--terracota); border-radius: 3px; background-color: var(--marfil);
  background-image: linear-gradient(var(--terracota), var(--terracota)), linear-gradient(var(--terracota), var(--terracota)),
    linear-gradient(var(--terracota), var(--terracota)), linear-gradient(var(--terracota), var(--terracota));
  background-repeat: no-repeat; background-size: 1px calc(100% - 8px);
  background-position: 11px 4px, 16px 4px, calc(100% - 11px) 4px, calc(100% - 16px) 4px; }
.lomo-q .rot { display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid rgba(206,104,87,.7); padding: 9px 12px 11px; }
.q-sig { font-family: var(--cursiva); font-size: 74px; line-height: .5; color: var(--rosa-suave); display: block; transform: translateY(var(--sy, 10px)); }
.q-sig:first-child { --sy: -12px; margin-right: -3px; }
.q-sig:last-child { --sy: 4px; margin-left: -1px; }
.q-mid { display: flex; flex-direction: column; align-items: center; }
.q-cur { display: block; white-space: nowrap; font-family: var(--cursiva); font-size: 44px; line-height: .95; color: var(--frambuesa); }
.q-peq { display: block; font: 400 12.5px/1.3 "Forum", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--burdeos); margin-top: 6px; text-align: center; text-wrap: balance; }

/* marcos dibujados con líneas finas (los traza js/hojas.js): pila de libros y libreta */
.marco { position: relative; margin: 34px 0 0; padding: 0 0 26px; }
.marco > * { position: relative; z-index: 1; }
.marco > .marco-svg { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.marco-pila { margin-top: 0; margin-bottom: 110px; }   /* misma distancia «Mis novelas» → recuadro que en las otras hojas (Nu, 04/11/2026) */
.marco-libreta { margin-top: 0; margin-bottom: 30px; }
.marco-libreta .lema-2 { margin: 0 0 18px; }
.marco h3.recuadro { margin-top: 0; }   /* el h3 traía margen superior propio: sobraba aire entre el lema y el recuadro (en las otras hojas el recuadro va en un <p>/<span>) */
.marco-svg path { fill: none; stroke: var(--terracota); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 1; }  /* «1 2»: el hueco es mayor que el trazo, así no queda un punto visible al inicio antes de dibujarse */
.marco-svg .l2 { stroke-width: 1.1; }
.marco-svg .l3 { stroke-width: .9; opacity: .8; }
.marco-svg .p1 { stroke-width: 1.1; opacity: .85; }
.marco-svg .p2 { stroke-width: 1; opacity: .6; }
.marco-svg .p3 { stroke-width: .9; opacity: .4; }
.marco-svg .anilla { fill: none; stroke: var(--terracota); stroke-width: 1.2; opacity: 0; }
.marco-svg .agujero { fill: var(--rosa-viejo); opacity: 0; }
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }
.wrap.actual .marco-svg path { animation: trazar 1.7s cubic-bezier(.35,.6,.3,1) var(--ad, 0s) forwards; }
.wrap.actual .marco-svg .anilla, .wrap.actual .marco-svg .agujero { animation: aparece .5s ease var(--ad, .8s) forwards; }
/* al redibujar por un cambio de tamaño no se repite la animación; sin JS no hay marcos */
.marco.ya .marco-svg path { animation: none !important; stroke-dashoffset: 0; }
.marco.ya .marco-svg .anilla, .marco.ya .marco-svg .agujero { animation: none !important; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marco-svg path { animation: none !important; stroke-dashoffset: 0; }
  .marco-svg .anilla, .marco-svg .agujero { animation: none !important; opacity: 1; }
}

/* hoja estrecha (móvil): libros más pequeños, resaltados que se parten y fila del libro 2 apilada */
@container (max-width: 399px) {
  .c-fila { gap: 14px; }
  .c-fila .bk { --H: 138px !important; }
  .c-txt { font-size: 16px; line-height: 1.5; }
  .c-txt .ln { white-space: normal; }
  .c-txt .res { font-size: 1.2em; white-space: normal; }
  .c-caja { font-size: 16px; padding: 16px 14px 18px; }
  .c-caja .cur { font-size: 1.18em; }
  .c-caja .fo { font-size: .84em; letter-spacing: .06em; }
  .c-inv { flex-direction: column; align-items: stretch; }
  .c-inv .bk { align-self: flex-end; margin-right: 10px; }
  .a-prox { gap: 18px; }
  .a-prox .bk { --H: 150px !important; }
  .fila-3 { gap: 8px; }
  .fila-3 .bk { --H: 98px !important; }
  .lomo-q { margin: 18px -10px 18px -10px; padding: 12px 26px 13px; }
  .lomo-q .rot { padding: 8px 6px 10px; }
  .q-sig { font-size: 42px; }
  .q-sig:first-child { --sy: -9px; margin-right: 5px; }
  .q-sig:last-child { --sy: 3px; margin-left: 5px; }
  .q-cur { font-size: 27px; }
  .q-peq { font-size: 10.5px; letter-spacing: .1em; max-width: 130px; }
  .marco-libreta { padding-left: 14px; }
  .marco .recuadro { font-size: 20px; padding: 10px 16px 12px; }
}


/* ---------- «Mis proyectos» (Nu, 04/11/2026): portadas en línea, estado en destellos y post-its de ideas ---------- */
.pr-fila { display: flex; align-items: center; gap: 22px; margin: 22px 0; padding: 0 6px; }
.pr-fila.inv { flex-direction: row-reverse; }
.pr-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.pr-nom { font: 400 24px/1.1 "Forum", serif; letter-spacing: .12em; color: var(--burdeos); margin-bottom: 2px; }
.pr-gen { font: 400 12.5px/1.3 "Forum", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--burdeos); }
.pr-trope { font-family: var(--cursiva); font-size: 27px; line-height: 1; color: var(--frambuesa); }
.pasos { width: 122px; height: auto; margin-top: 8px; }
.pr-est { font: 400 11.5px/1.3 "Forum", serif; letter-spacing: .12em; text-transform: uppercase; color: var(--terracota); }
.idea { display: flex; margin: 8px 0; padding: 0 6px; }
.idea.izq { justify-content: flex-start; padding-left: 36px; }
.idea.der { justify-content: flex-end; padding-right: 36px; }
.postit { position: relative; width: 150px; padding: 18px 12px 14px; text-align: center; box-shadow: 1px 3px 7px rgba(82,62,39,.25); }
.idea.izq .postit { transform: rotate(-3.2deg); }
.idea.der .postit { transform: rotate(2.6deg); }
.postit.p1 { background: #F4DDD6; }
.postit.p2 { background: #F1E1C3; }
.postit.p3 { background: #EAD2D2; }
.postit small { display: block; font: 400 10px/1 "Forum", serif; letter-spacing: .15em; text-transform: uppercase; color: var(--burdeos); margin-bottom: 4px; }
.postit b { display: block; font: 400 33px/1 var(--cursiva); color: var(--frambuesa); }
.postit em { display: block; margin-top: 6px; font: 400 11.5px/1 "Forum", serif; font-style: normal; letter-spacing: .06em; color: var(--burdeos); opacity: .72; }
.postit .celo { position: absolute; left: 50%; top: -9px; margin-left: -27px; width: 54px; height: 17px; transform: rotate(-2deg);
  background: rgba(201,157,150,.62); box-shadow: 0 1px 2px rgba(82,62,39,.15);
  clip-path: polygon(0 8%,5% 0,10% 8%,15% 0,20% 8%,100% 0,100% 100%,20% 92%,15% 100%,10% 92%,5% 100%,0 92%); }
.marco-svg .rg { stroke: var(--rosa-viejo); stroke-width: .9; opacity: .5; }
@container (max-width: 399px) {
  .pr-fila { gap: 12px; padding: 0 0 0 10px; }
  .pr-fila .bk { --H: 128px !important; }
  .pr-nom { font-size: 20px; letter-spacing: .08em; }
  .pr-trope { font-size: 23px; }
  .pr-gen { font-size: 11px; letter-spacing: .1em; }
  .pasos { width: 104px; }
  .idea.izq { padding-left: 14px; }
  .idea.der { padding-right: 14px; }
  .postit { width: 134px; }
  .postit b { font-size: 27px; }
}


/* ---------- Cuentos (Nu, 04/11/2026): publicado, proyectos y detalles infantiles ---------- */
.centro, .idea { position: relative; }
.pub-fila { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 26px 0 8px; }
.pub-libro { --H: 150px; }
.pub-libro .tapa { box-shadow: 3px 3px 6px rgba(82,62,39,.32); }
.pub-info { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; max-width: 330px; }
.pub-nom { font: 400 23px/1.15 "Forum", serif; letter-spacing: .02em; color: var(--burdeos); }
.pub-sin { margin: 4px 0 4px; font-size: 16.5px; line-height: 1.5; }
.pub-sin .res { font-size: 1.3em; white-space: nowrap; }
#cuentos .marco-pila { margin-bottom: 90px; }
/* destellos, espirales y rizos: adornos infantiles que no estorban (no reciben clics) */
.dec { position: absolute; z-index: 2; pointer-events: none; overflow: visible; }
@keyframes flota { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 50% { transform: translateY(-5px) rotate(14deg) scale(1.12); } }
.chispa { animation: flota 4.6s ease-in-out infinite; }
.chispa:nth-of-type(2n) { animation-duration: 5.6s; animation-delay: -1.7s; }
.chispa:nth-of-type(3n) { animation-duration: 3.9s; animation-delay: -2.6s; }
@media (prefers-reduced-motion: reduce) { .chispa { animation: none; } }
@container (max-width: 399px) {
  .d-in { display: none; }
  .pub-nom { font-size: 20px; }
  .pub-sin { font-size: 15.5px; }
  .pub-sin .res { white-space: normal; font-size: 1.2em; }
}


/* ---------- Plus (Nu, 05/11/2026): pila de libros con notas encima, rincón de lectura y detalles que se mueven ---------- */

/* Pila (opción B de Nu): ningún corte en las líneas; lo que va sobre la pila descansa en papeles y etiquetas, con sombra */
.marco-pila .c-txt, .marco-pila .pub-info { background: #FAF3E6; padding: 14px 12px 10px; border: 1px solid rgba(195,139,119,.55); border-radius: 3px; box-shadow: 1px 3px 6px rgba(82,62,39,.2); }
.marco-pila .c-txt { transform: rotate(.5deg); padding: 14px 9px 10px; font-size: 16.5px; }
/* la primera línea («Charlie es la rubia más desgraciada del universo») se salía de la nota: más ajustada y, si aun así no cabe, pasa a dos líneas */
.marco-pila .c-txt .ln { white-space: normal; }
.marco-pila .c-txt .res { font-size: 1.25em; }
.marco-pila .pub-info { padding: 16px 18px 14px; transform: rotate(-.4deg); }
.marco-pila .bk.mk .t { background: #FAF3E6; padding: 4px 6px 3px; border-radius: 3px; border: 1px solid rgba(195,139,119,.45); box-shadow: 1px 2px 4px rgba(82,62,39,.15); margin-top: 7px; }
.marco-pila .lomo-q { box-shadow: 1px 3px 6px rgba(82,62,39,.2); }
/* los adornos sueltos sobre la pila llevan un halo suave del color del papel (sin bordes) */
.marco-pila .dec { background: radial-gradient(circle, #FAF3E6 0 45%, rgba(250,243,230,0) 72%); border-radius: 50%; }

/* Espirales del cuento: giran despacio */
@keyframes gira { to { transform: rotate(360deg); } }
.dec.espiral { transform-box: fill-box; transform-origin: center; animation: gira 11s linear infinite; }
.dec.espiral:nth-of-type(2n) { animation-duration: 15s; animation-direction: reverse; }

/* Rincón de lectura: delante de la estantería de la derecha (solo se ve en pantallas anchas; en estrechas queda tras el cuaderno) */
.rincon .gato, .rincon .manta { pointer-events: auto; }
.rincon .gato { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rincon .humo path, .rincon .zz text, .rincon .resp, .rincon .cola, .rincon .fl, .rincon .co { transform-box: fill-box; }
.rincon .zz text, .rincon .bocadillo text { font-family: "Forum", serif; }
.rincon .ojos-c, .rincon .bocadillo { display: none; }
.rincon .gato.desp .ojos-d { display: none; }
.rincon .gato.desp .ojos-c, .rincon .gato.desp .bocadillo { display: block; }
.rincon .gato.desp .zz { display: none; }
@keyframes respira { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.05) translateY(-.4px); } }
@keyframes cola { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(6deg); } }
@keyframes humo { 0% { opacity: 0; transform: translateY(5px) scaleY(.7); } 35% { opacity: .9; } 100% { opacity: 0; transform: translateY(-9px) scaleY(1.2) skewX(6deg); } }
@keyframes zzz { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 20% { opacity: .95; } 72% { opacity: .55; } 100% { opacity: 0; transform: translate(7px,-26px) scale(1.25) rotate(8deg); } }
@keyframes fleco { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(16deg); } 55% { transform: rotate(-12deg); } 80% { transform: rotate(5deg); } }
@keyframes salta { 0% { transform: none; } 22% { transform: translateY(-7px) scaleY(1.08); } 48% { transform: translateY(0) scaleY(.93); } 68% { transform: translateY(-3px); } 100% { transform: none; } }
@keyframes latido { from { transform: scale(1); } to { transform: scale(1.3); } }
@keyframes bocadillo { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .rincon .resp { transform-origin: 50% 100%; animation: respira 4.4s ease-in-out infinite; }
  .rincon .cola { transform-origin: 90% 0; animation: cola 6s ease-in-out infinite; }
  .rincon .humo path { transform-origin: 50% 100%; animation: humo 3.4s ease-in-out infinite; }
  .rincon .humo path:nth-child(2) { animation-delay: 1.2s; }
  .rincon .zz text { opacity: 0; transform-origin: 50% 50%; animation: zzz 5.4s ease-in-out infinite; }
  .rincon .zz text:nth-child(2) { animation-delay: 1.8s; }
  .rincon .zz text:nth-child(3) { animation-delay: 3.6s; }
  .rincon .manta:hover .fl { transform-origin: 50% 0; animation: fleco .95s ease-in-out both; animation-delay: calc(var(--k) * .06s); }
  .rincon .gato.desp .resp { animation: salta .9s ease; }
  .rincon .gato.desp .co { transform-origin: 50% 50%; animation: latido .5s ease-in-out infinite alternate; }
  .rincon .gato.desp .bocadillo { transform-box: fill-box; transform-origin: 20% 100%; animation: bocadillo .35s cubic-bezier(.3,1.6,.5,1) both; }
}
@media (prefers-reduced-motion: reduce) { .rincon .zz text { opacity: .7; } }

/* Gato travieso de la estantería izquierda: empuja con la pata una maceta de corazones colgantes (la maceta se tambalea y las hojas se mecen) */
.deco .gt-cola, .deco .gt-pata, .deco .gt-maceta, .deco .gt-hojas { transform-box: fill-box; }
@keyframes gt-pata { 0%, 52%, 100% { transform: translate(0,0); } 58% { transform: translate(-5px,1px) rotate(-6deg); } 66% { transform: translate(5px,-.5px); } 76% { transform: translate(0,0); } }
@keyframes gt-maceta { 0%, 60%, 100% { transform: rotate(0deg); } 67% { transform: rotate(7deg); } 75% { transform: rotate(-2.5deg); } 84% { transform: rotate(1.5deg); } 92% { transform: rotate(0deg); } }
@keyframes gt-hojas { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
@keyframes gt-cola { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-9deg); } }
@media (prefers-reduced-motion: no-preference) {
  .deco .gt-pata { transform-origin: 0% 50%; animation: gt-pata 5.5s ease-in-out infinite; }
  .deco .gt-maceta { transform-origin: 100% 100%; animation: gt-maceta 5.5s ease-in-out infinite; }
  .deco .gt-hojas { transform-origin: 50% 0%; animation: gt-hojas 3.6s ease-in-out infinite; }
  .deco .gt-cola { transform-origin: 100% 100%; animation: gt-cola 3s ease-in-out infinite; }
}

/* Detalles que se mueven. Todo respeta «reducir movimiento» y los de cursor solo actúan con ratón (en móvil no hay «pasar por encima») */
@keyframes mece { from { transform: rotate(-1.7deg); } to { transform: rotate(1.7deg); } }
@keyframes pop { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes brilla { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5) rotate(20deg); opacity: .55; } }
@keyframes celo { 0%, 100% { transform: rotate(-2deg); } 30% { transform: rotate(-9deg) translateY(-1px); } 65% { transform: rotate(4deg); } }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sale { 0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(120deg); } }
/* flores de los lados: cada grupo se mece a su ritmo (los agrupa js/hojas.js) */
@media (prefers-reduced-motion: no-preference) {
  .deco svg .sway { animation: mece var(--d, 8s) ease-in-out infinite alternate; transform-box: view-box; transform-origin: var(--ox, 150px) 342px; }
}
/* portadas que se levantan e inclinan hacia el cursor */
html:root .bk .tapa { transition: transform .18s ease-out, box-shadow .25s; transform: perspective(520px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); }
html:root .bk:hover .tapa { --ty: -7px; box-shadow: 8px 14px 18px rgba(82,62,39,.32); }
/* en Gratis, el libro sale de la balda */
html:root .libreria .bk .tapa { transition: transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
html:root .libreria .bk:hover .tapa, html:root .libreria .bk:focus-visible .tapa { transform: translateY(-12px) translateX(3px) rotate(-3.5deg) scale(1.06); box-shadow: 8px 14px 16px rgba(82,62,39,.3); z-index: 3; }
/* esquina que se despega más */
html:root .esquina { transition: width .3s cubic-bezier(.3,1.4,.5,1), height .3s cubic-bezier(.3,1.4,.5,1), filter .3s; }
html:root .esquina:hover, html:root .esquina:focus-visible { width: 104px; height: 104px; filter: drop-shadow(-5px -5px 7px rgba(82,62,39,.32)); }
/* post-its que se enderezan */
html:root .postit { transition: transform .3s cubic-bezier(.3,1.5,.5,1), box-shadow .3s; }
html:root .idea:hover .postit { transform: rotate(0deg) translateY(-8px) scale(1.07); box-shadow: 4px 12px 16px rgba(82,62,39,.3); }
html:root .idea:hover .postit .celo { animation: celo .6s ease; }
/* iconos de redes con corazoncito */
.red { position: relative; }
html:root .red { transition: transform .3s cubic-bezier(.3,1.7,.5,1), background .2s; }
html:root .red:hover, html:root .red:focus-visible { transform: translateY(-5px) scale(1.14) rotate(-7deg); }
html:root .red::after { content: ""; position: absolute; top: -7px; right: -4px; width: 16px; height: 15px; opacity: 0; transform: translateY(8px) scale(.4);
  transition: opacity .25s, transform .35s cubic-bezier(.3,1.7,.5,1); pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'><path d='M8,14 C1,9 0,4 3.5,2.2 C5.5,1.3 7.3,2.4 8,4 C8.7,2.4 10.5,1.3 12.5,2.2 C16,4 15,9 8,14Z' fill='%239B3D49'/></svg>") center / contain no-repeat; }
html:root .red:hover::after, html:root .red:focus-visible::after { opacity: 1; transform: translateY(0) scale(1); }
/* brillo que cruza las cajas ciruela */
.recuadro, .titular, .c-caja { position: relative; overflow: hidden; }
.recuadro::after, .titular::after, .c-caja::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(247,238,223,.3) 50%, transparent 65%); transform: translateX(-130%); }
.recuadro:hover::after, .titular:hover::after, .c-caja:hover::after { transform: translateX(130%); transition: transform .9s ease; }
/* destellos de la portada del cuento */
.xd { position: absolute; pointer-events: none; z-index: 60; }
.xd.sale { animation: sale .95s ease-out forwards; }
@media (prefers-reduced-motion: no-preference) {
  /* subrayados que se dibujan al llegar a la hoja */
  .subraya .onda path.trz { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
  .wrap.actual .subraya .onda path.trz { animation: trazar 1.5s ease-out forwards; animation-delay: calc(.9s + var(--k, 0) * .45s); }
  /* destellos de estado que se encienden, y el siguiente paso parpadea al pasar por la fila */
  .pasos .st { transform-box: fill-box; transform-origin: center; }
  .wrap.actual .pasos .st { animation: pop .55s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(.7s + var(--i, 0) * .2s); }
  .wrap.actual .pr-fila:hover .pasos .st.next { animation: pop .55s cubic-bezier(.3,1.6,.5,1) calc(.7s + var(--i, 0) * .2s) both, brilla 1.1s ease-in-out infinite; }
  /* entrada escalonada: los bloques de cada hoja aparecen uno tras otro */
  .wrap.actual .content .c-fila, .wrap.actual .content .pub-fila, .wrap.actual .content .pr-fila, .wrap.actual .content .idea, .wrap.actual .content .lomo-q,
  .wrap.actual .content .a-prox, .wrap.actual .content .centro, .wrap.actual .content .conecta, .wrap.actual .content .libreria { animation: entra .7s ease both; animation-delay: calc(var(--n, 0) * .09s + .15s); }
}
@media (prefers-reduced-motion: reduce) { .dec.espiral, .chispa { animation: none; } }


/* ---------- Ajustes (Nu, 05/11/2026): foto con celo que se endereza, y el gato dormilón de la hoja Gratis ---------- */
@keyframes celo-foto { 0%, 100% { transform: translateX(-50%) rotate(-3deg); } 30% { transform: translateX(-50%) rotate(-10deg) translateY(-1px); } 65% { transform: translateX(-50%) rotate(4deg); } }
html:root .polaroid { transition: transform .3s cubic-bezier(.3,1.5,.5,1), box-shadow .3s; }
html:root .polaroid:hover { transform: rotate(0deg) translateY(-8px) scale(1.07); box-shadow: 4px 12px 16px rgba(82,62,39,.3); }
html:root .polaroid:hover::before { animation: celo-foto .6s ease; }

/* gato dormilón (sin rayas) en el hueco de la balda de Gratis */
.obj .rell { fill: #F7E9DC; }
.obj .fino { stroke-width: .8; }
.obj .nof { fill: none; }
.obj .nos { stroke: none; }
.obj text { fill: currentColor; stroke: none; font-family: "Forum", serif; }
.obj .dz-resp, .obj .dz-zz text, .obj .dz-cola { transform-box: fill-box; }
@keyframes dz-respira { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.045); } }
@keyframes dz-cola { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-7deg); } }
.obj .dz-zz text { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .obj .dz-resp { transform-origin: 50% 100%; animation: dz-respira 4.4s ease-in-out infinite; }
  .obj .dz-cola { transform-origin: 7% 17%; animation: dz-cola 3.2s ease-in-out infinite; }
  .obj .dz-zz text { transform-origin: 50% 50%; animation: zzz 5.4s ease-in-out infinite; }
  .obj .dz-zz text:nth-child(2) { animation-delay: 1.8s; }
  .obj .dz-zz text:nth-child(3) { animation-delay: 3.6s; }
}
@media (prefers-reduced-motion: reduce) { .obj .dz-zz text { opacity: .7; } }
