/* ===============================================================
   SELENE-7 · RETO 5 · HOJA DE LA LISTA DE GARMAN
   Hoja escrita a mano, con tachones, una mancha de café, una huella
   de Tang y la nota de la Dra. Vidal al margen: la hoja imprimible
   del sobre C (props/lista-garman.html). Más abajo, la libreta de
   espiral en la que se ve la lista en pantalla.
   El texto sale de js/alarmas.js.
   =============================================================== */
/* Textos que solo salen en un modo (comun/nave.js pone la clase en el body; la hoja impresa, también) */
body.nave-explorador .solo-master, body.nave-master .solo-explorador { display: none !important; }

.hoja-garman {
  --tinta: #1b2766;
  --tinta-2: #3c4a86;
  --boli-rojo: #c22e27;
  --mano: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --mano-irene: "Ink Free", "Segoe Script", "Segoe Print", "Bradley Hand", cursive;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 1.6em 2.2em 1.3em 3.6em;
  color: var(--tinta); font: 400 15px/1.5 var(--mano); text-align: left;
  background:
    radial-gradient(circle at 1.45em 12%, #6b6250 0 .42em, transparent .47em),     /* agujeros de archivador */
    radial-gradient(circle at 1.45em 50%, #6b6250 0 .42em, transparent .47em),
    radial-gradient(circle at 1.45em 88%, #6b6250 0 .42em, transparent .47em),
    radial-gradient(ellipse 60% 40% at 85% 8%, rgba(160, 130, 60, .07), transparent 70%),
    linear-gradient(172deg, #fdfbf2 0%, #f7f1de 55%, #efe6cb 100%);
}
.hoja-garman b { font-weight: 700; }
.hoja-garman u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* Tachón a boli: dos rayas, una algo torcida */
.hoja-garman s { position: relative; text-decoration: none; color: var(--tinta-2); }
.hoja-garman s::before, .hoja-garman s::after { content: ""; position: absolute; left: -3px; right: -3px; height: 2px; background: var(--tinta); border-radius: 2px; }
.hoja-garman s::before { top: 52%; transform: rotate(-3deg); }
.hoja-garman s::after { top: 60%; transform: rotate(2deg); }

/* Sello de goma rojo */
.hg-sello {
  position: absolute; right: 1.6em; top: 1.1em; z-index: 2; padding: .3em .7em .25em; text-align: center;
  font: 700 .72em/1.25 Consolas, "Courier New", monospace; letter-spacing: .18em; color: rgba(185, 38, 32, .72);
  border: 3px double rgba(185, 38, 32, .62); border-radius: 4px; transform: rotate(-9deg); mix-blend-mode: multiply;
}

.hg-cab { margin: 0 7.5em .7em 0; }
.hg-titulo { display: inline-block; margin: 0; font: 700 1.42em/1.2 var(--mano); letter-spacing: .02em; border-bottom: 2.5px solid var(--tinta); padding-bottom: .1em; transform: rotate(-.6deg); }
.hg-quien { margin: .35em 0 0; font-size: .92em; color: var(--tinta-2); }

/* Normas generales, dentro de un recuadro dibujado a mano */
.hg-generales { margin: 0 0 .9em; padding: .45em .9em .45em 2.2em; border: 2px solid var(--tinta); border-radius: 18px 6px 22px 5px / 6px 20px 5px 18px; transform: rotate(.3deg); }
.hg-generales li { padding-left: .15em; }
.hg-generales li::marker { font-weight: 700; color: var(--boli-rojo); }

/* Cada alarma */
.hg-alarma { position: relative; margin: 0 0 .85em; break-inside: avoid; page-break-inside: avoid; }
.hg-alarma-cab { display: flex; align-items: center; gap: .6em; }
.hg-codigo {
  display: inline-block; padding: .02em .38em 0; font: 700 1.5em/1.25 var(--mano); letter-spacing: .08em;
  border: 2.5px solid var(--tinta); border-radius: 8px 3px 9px 4px / 4px 9px 3px 8px; transform: rotate(-1.5deg);
}
.hg-nombre { font-weight: 700; font-size: 1.02em; letter-spacing: .03em; }
.hg-rama { margin: .12em 0 .12em .2em; padding-left: .2em; }
/* SI · SI NO, SI · SI NO: las palabras clave del condicional, en rojo y recuadradas */
.hoja-garman .kw {
  display: inline-block; padding: 0 .35em; margin-right: .1em; font: 700 .76em/1.45 var(--mano); letter-spacing: .08em;
  color: var(--boli-rojo); border: 1.5px solid var(--boli-rojo); border-radius: 5px 3px 6px 3px; vertical-align: .08em; white-space: nowrap;
}
.hoja-garman .fl { font-weight: 700; margin: 0 .1em; }
.hoja-garman .acl { font-size: .92em; }
.hg-pasos { list-style: none; counter-reset: paso; margin: .05em 0 .1em 1.6em; padding: 0; }
.hg-pasos li { counter-increment: paso; position: relative; padding-left: 2em; }
.hg-pasos li::before { content: counter(paso) ".º"; position: absolute; left: 0; font-weight: 700; color: var(--boli-rojo); }

/* Nota de la Dra. Vidal al margen, con otra letra y en rojo */
.hg-margen {
  float: right; position: relative; z-index: 1; width: 9.2em; margin: -.2em -.4em .2em .8em; padding: .2em .3em;
  font: 400 .98em/1.3 var(--mano-irene); color: var(--boli-rojo); transform: rotate(-5deg); text-align: center;
}
.hg-margen b { font-weight: 700; }
.hg-margen .doble { text-decoration: underline double; text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 700; }
.hg-flecha { position: absolute; left: -2.6em; bottom: -1.2em; width: 3.2em; height: 2.2em; fill: none; stroke: var(--boli-rojo); stroke-width: 2.2; stroke-linecap: round; overflow: visible; }

.hg-firma { margin: .4em 0 0; text-align: right; font-size: 1.02em; }
.hg-firma::after { content: ""; display: block; width: 9em; height: 2px; margin: .1em 0 0 auto; background: var(--tinta); border-radius: 2px; transform: rotate(-2deg); }

/* Cerco de una taza de café y huella de Tang */
.hg-cafe {
  position: absolute; z-index: -1; left: 38%; bottom: 1.4em; width: 7.5em; height: 7em; border-radius: 50%; pointer-events: none;
  border: .35em solid rgba(125, 78, 30, .16); box-shadow: inset 0 0 .6em rgba(125, 78, 30, .12), 0 0 .3em rgba(125, 78, 30, .08);
  transform: rotate(-14deg);
}
.hg-huella {
  position: absolute; z-index: -1; right: 12.5em; bottom: .8em; width: 2.8em; height: 2.8em; opacity: .38; transform: rotate(24deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='%236b3f18'%3E%3Cellipse cx='20' cy='27' rx='9' ry='7.5'/%3E%3Cellipse cx='8.5' cy='16' rx='3.6' ry='4.6'/%3E%3Cellipse cx='15.5' cy='9.5' rx='3.6' ry='4.6'/%3E%3Cellipse cx='24.5' cy='9.5' rx='3.6' ry='4.6'/%3E%3Cellipse cx='31.5' cy='16' rx='3.6' ry='4.6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* ===============================================================
   LA LIBRETA EN PANTALLA
   La libreta de espiral abierta (assets/libreta-abierta.webp, 2850×1731 px
   de trabajo, ver diseno de la imagen en el LEEME) y la lista escrita a boli
   encima de sus renglones. Los renglones están a distancia fija: el primero
   a 202 px del borde de arriba y uno cada 88 px, así que todo el texto
   usa como alto de línea exactamente esa distancia (--p) y cae encima.
   =============================================================== */
.libreta {
  /* Alto de la libreta: lo más grande que quepa en la pantalla sin tapar el aspa */
  --alto: min(calc(100vh - 84px), calc((100vw - 32px) / 1.6464));
  --p: calc(var(--alto) * .050838);          /* distancia entre renglones (88 / 1731) */
  --bajar: .3;                               /* cuánto baja el texto para apoyarse en el renglón (en renglones) */
  --tinta: #1b2766;
  --tinta-2: #3c4a86;
  --boli-rojo: #c22e27;
  --mano: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --mano-irene: "Ink Free", "Segoe Script", "Segoe Print", "Bradley Hand", cursive;
  position: relative; height: var(--alto); aspect-ratio: 2850 / 1731; margin-top: 22px;
  background: url("../assets/libreta-abierta.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .7));
  animation: libreta-entra .38s var(--suave, ease-out);
}
@keyframes libreta-entra { from { opacity: 0; transform: translateY(26px) scale(.94) rotate(-2deg); } }

/* Cada página: una caja de 17 líneas (la de arriba, sin renglón, para el título) */
.lb-pag {
  position: absolute; top: calc(1.502% + var(--p) * var(--bajar)); width: 38.91%; height: calc(var(--p) * 17);
  color: var(--tinta); font: 400 calc(var(--p) * .5)/var(--p) var(--mano); text-align: left;
}
.lb-izq { left: 4.42%; }
.lb-dcha { left: 56.67%; }
.lb-pag * { margin: 0; line-height: var(--p); }
.lb-pag b { font-weight: 700; }
.lb-pag u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lb-pag s { position: relative; text-decoration: none; color: var(--tinta-2); }
.lb-pag s::before, .lb-pag s::after { content: ""; position: absolute; left: -3px; right: -3px; height: 2px; background: var(--tinta); border-radius: 2px; }
.lb-pag s::before { top: 52%; transform: rotate(-3deg); }
.lb-pag s::after { top: 60%; transform: rotate(2deg); }

.lb-titulo { font-size: 1.28em; font-weight: 700; letter-spacing: .02em; white-space: nowrap; text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: .2em; }
.lb-quien { font-size: .92em; color: var(--tinta-2); }
.lb-normas { list-style: none; padding: 0; font-size: .95em; }
.lb-normas li::before { content: "★ "; color: var(--boli-rojo); font-size: .8em; }
.lb-sello {
  position: absolute; right: 1%; top: calc(var(--p) * .72); padding: .15em .6em; text-align: center;
  font: 700 .62em/1.3 Consolas, "Courier New", monospace !important; letter-spacing: .18em; color: rgba(185, 38, 32, .72);
  border: 3px double rgba(185, 38, 32, .62); border-radius: 4px; transform: rotate(-9deg); mix-blend-mode: multiply;
}

/* Cada alarma: una línea en blanco antes, la cabecera y sus ramas, una por renglón */
.lb-alarma { position: relative; margin-top: var(--p) !important; }
.lb-alarma-cab { white-space: nowrap; }
.lb-codigo {
  display: inline-block; padding: 0 .32em; font-size: 1.14em; line-height: 1.12 !important; letter-spacing: .07em;
  border: 2.5px solid var(--tinta); border-radius: 8px 3px 9px 4px / 4px 9px 3px 8px; transform: rotate(-1.5deg);
}
.lb-nombre { margin-left: .3em; font-weight: 700; letter-spacing: .03em; }
.lb-rama { padding-left: 1.1em; text-indent: -1.1em; }
.lb-pag .kw {
  display: inline-block; padding: 0 .35em; margin-right: .15em; text-indent: 0; font: 700 .72em/1.4 var(--mano); letter-spacing: .08em;
  color: var(--boli-rojo); border: 1.5px solid var(--boli-rojo); border-radius: 5px 3px 6px 3px; vertical-align: .12em; white-space: nowrap;
}
.lb-pag .fl { font-weight: 700; margin: 0 .1em; }
.lb-pag .acl { font-size: .92em; }
.lb-pasos { list-style: none; counter-reset: paso; padding: 0 0 0 1.6em; }
.lb-pasos li { counter-increment: paso; position: relative; padding-left: 1.9em; }
.lb-pasos li::before { content: counter(paso) ".º"; position: absolute; left: 0; font-weight: 700; color: var(--boli-rojo); }

/* Nota de la Dra. Vidal, en rojo y con otra letra, junto a la 1202 */
.lb-margen {
  position: absolute; right: -2%; top: calc(var(--p) * 1.2); width: 36%; z-index: 1;
  font: 400 .92em/1.22 var(--mano-irene); color: var(--boli-rojo); text-align: center; transform: rotate(-6deg);
}
.lb-margen * { line-height: 1.22 !important; }
.lb-margen .doble { display: inline-block; font-weight: 700; text-decoration: underline double; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.lb-flecha { position: absolute; left: -2.2em; bottom: -1.4em; width: 2.8em; height: 2em; fill: none; stroke: var(--boli-rojo); stroke-width: 2.2; stroke-linecap: round; overflow: visible; }
/* Con la página llena (MASTER), a la derecha de las dos líneas cortas de la 1202 */
.lb-dcha.llena .lb-margen { top: calc(var(--p) * 2.05); right: -3%; width: 40%; }
/* Con solo la 1202 en la página hay sitio: la nota va debajo, más grande */
.lb-dcha:not(.llena) .lb-margen { top: calc(var(--p) * 7.3); right: 6%; width: 52%; font-size: 1.15em; transform: rotate(-4deg); }
.lb-dcha:not(.llena) .lb-flecha { left: 10%; bottom: auto; top: -1.9em; transform: scaleY(-1) rotate(30deg); }

.lb-firma { position: absolute; right: 2%; bottom: 0; font-size: .95em; }
.lb-huella {
  position: absolute; right: 10%; bottom: calc(var(--p) * .5); width: 2.6em; height: 2.6em; opacity: .32; transform: rotate(24deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='%236b3f18'%3E%3Cellipse cx='20' cy='27' rx='9' ry='7.5'/%3E%3Cellipse cx='8.5' cy='16' rx='3.6' ry='4.6'/%3E%3Cellipse cx='15.5' cy='9.5' rx='3.6' ry='4.6'/%3E%3Cellipse cx='24.5' cy='9.5' rx='3.6' ry='4.6'/%3E%3Cellipse cx='31.5' cy='16' rx='3.6' ry='4.6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
/* Cerco de una taza de café, debajo de lo escrito */
.lb-cafe {
  position: absolute; z-index: -1; left: 4%; bottom: calc(var(--p) * 1.2); width: 6.2em; height: 5.8em; border-radius: 50%; pointer-events: none;
  border: .32em solid rgba(125, 78, 30, .14); box-shadow: inset 0 0 .5em rgba(125, 78, 30, .1); transform: rotate(-14deg);
}
/* Con la página llena (MASTER), sin flecha ni café: que no tapen lo escrito */
.lb-dcha.llena .lb-flecha, .lb-dcha.llena .lb-cafe { display: none; }
