/* Estante 3D (libros / audiolibros) · estilo munditolibros.com adaptado a Guardián en el Muro */
.shelf{position:relative;min-height:100svh;overflow:hidden;
  background:radial-gradient(70% 55% at 50% 44%,rgba(217,169,84,.13),transparent 72%),var(--bg);}
.shelf-canvas{position:absolute;inset:0;width:100%;height:100%;display:none;z-index:1;}
.shelf.webgl .shelf-canvas{display:block;}
.shelf-veil{position:absolute;inset:0;z-index:5;pointer-events:none;opacity:0;transition:opacity .55s ease;
  background:radial-gradient(circle at 50% 50%,rgba(244,215,140,.55),rgba(8,7,10,.96) 70%);}
.shelf-veil.flash{opacity:1;}
.shelf-content{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;
  justify-content:space-between;padding:7.4rem 1.25rem 2.6rem;text-align:center;pointer-events:none;}
.shelf-top{display:flex;flex-direction:column;align-items:center;}
.shelf-kicker{font-size:.72rem;letter-spacing:.32em;text-transform:uppercase;color:var(--gold-2);margin-bottom:.9rem;}
.shelf-word{font-family:'Fraunces',serif;font-weight:600;font-size:clamp(3rem,10vw,6.6rem);line-height:.95;letter-spacing:.01em;
  background:linear-gradient(180deg,#FFF1CC 0%,var(--gold-1) 45%,var(--gold-2) 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 8px 30px rgba(217,169,84,.25));}
.shelf-sub{font-family:'Fraunces',serif;font-style:italic;color:var(--text-2);font-size:clamp(1rem,2.2vw,1.25rem);margin-top:.9rem;min-height:1.5em;}
.shelf-sub .car{display:inline-block;width:.5ch;height:1.05em;vertical-align:-.15em;background:var(--gold-1);margin-left:2px;
  animation:shelf-blink 1s steps(1) infinite;}
@keyframes shelf-blink{50%{opacity:0}}
.shelf-mid{flex:1;display:flex;align-items:center;justify-content:center;width:100%;min-height:0;}
.shelf-bottom{display:flex;flex-direction:column;align-items:center;gap:1rem;}
.shelf-pick{display:none;gap:.55rem;flex-wrap:wrap;justify-content:center;align-items:center;pointer-events:auto;}
.shelf.webgl .shelf-pick{display:flex;}
.shelf-pick .lbl{width:100%;font:500 .66rem/1 'Inter',sans-serif;letter-spacing:.26em;text-transform:uppercase;color:var(--text-3);margin-bottom:.2rem;}
.shelf-pick a{font-size:.9rem;font-weight:500;color:var(--text-1);text-decoration:none;border:1px solid var(--border-strong);
  border-radius:999px;padding:.55rem 1.05rem;background:rgba(8,7,10,.55);backdrop-filter:blur(6px);transition:all .25s;}
.shelf-pick a:hover,.shelf-pick a:focus-visible{color:var(--gold-1);border-color:var(--gold-2);transform:translateY(-2px);}
.shelf-hint{pointer-events:auto;}
.shelf-hint a{color:var(--gold-1);text-decoration:none;font-size:.92rem;border-bottom:1px solid rgba(244,215,140,.35);padding-bottom:2px;}
.shelf-label{position:fixed;left:0;top:0;z-index:6;pointer-events:none;opacity:0;transition:opacity .25s,transform .25s;
  transform:translate(0,-50%) translateY(6px);max-width:250px;text-align:left;padding:.85rem 1rem;border-radius:12px;
  background:rgba(14,12,18,.82);border:1px solid rgba(244,215,140,.28);backdrop-filter:blur(8px);
  box-shadow:0 18px 50px -18px rgba(0,0,0,.8);color:var(--text-1);}
.shelf-label b{display:block;font-family:'Fraunces',serif;font-weight:500;font-size:1.12rem;line-height:1.2;}
.shelf-label i{display:block;font-family:'Fraunces',serif;font-size:.86rem;color:var(--text-2);line-height:1.35;margin:.2rem 0 .45rem;}
.shelf-label span{font:600 .8rem 'Inter',sans-serif;color:var(--gold-1);}
.shelf-label.on{opacity:1;transform:translate(0,-50%);}
/* respaldo (móvil / sin WebGL): portadas en abanico */
.shelf-fallback{display:flex;gap:clamp(.8rem,3vw,2rem);justify-content:center;align-items:flex-end;pointer-events:auto;}
.shelf.webgl .shelf-fallback{display:none;}
.shelf-fallback a{flex:0 1 230px;max-width:31%;transition:transform .45s cubic-bezier(.2,.8,.2,1);}
.shelf-fallback a:nth-child(2){transform:translateY(-20px);}
.shelf-fallback a:hover,.shelf-fallback a:focus-visible{transform:translateY(-10px);outline:none;}
.shelf-fallback img{width:100%;height:auto;border-radius:8px;border:1px solid var(--border-strong);display:block;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.85),0 0 40px -10px rgba(217,169,84,.25);}
.shelf.audio .shelf-fallback a{flex-basis:240px;}
@media (max-width:759px){ .shelf.audio .shelf-fallback a{flex-basis:auto;} }
.shelf.audio .shelf-fallback img{border-radius:14px;}
@media (max-width:759px){
  .shelf{min-height:0;}
  .shelf-content{position:relative;padding:7rem 1rem 2.4rem;gap:1.6rem;}
  .shelf-fallback{flex-direction:row;align-items:flex-end;gap:0;margin-top:.6rem;}
  .shelf-fallback a{flex:0 0 auto;max-width:none;width:34vw;margin:0 -2.2vw;}
  .shelf-fallback.n2 a{width:40vw;margin:0 -1.5vw;}
  .shelf-fallback.n1 a{width:56vw;}
  .shelf-fallback a:nth-child(1){transform:rotate(-6deg) translateY(6px);z-index:1;}
  .shelf-fallback a:nth-child(2){transform:translateY(-14px);z-index:2;}
  .shelf-fallback a:nth-child(3){transform:rotate(6deg) translateY(6px);z-index:1;}
  .shelf-fallback.n2 a:nth-child(2){transform:rotate(6deg) translateY(6px);}
  .shelf-fallback.n1 a:nth-child(1){transform:none;}
  .shelf-pick{display:flex;}
  .shelf-pick .lbl{display:none;}
  .shelf-pick a{font-size:.88rem;padding:.6rem .95rem;min-height:44px;display:inline-flex;align-items:center;}
}
@media (prefers-reduced-motion:reduce){ .shelf-pick{display:flex;} }

/* ---- tarjetas estilo «trilogía» ---- */
.tri-head{text-align:center;margin-bottom:2.6rem;}
.tri-head .k{font-size:.74rem;letter-spacing:.3em;text-transform:uppercase;color:var(--gold-2);margin-bottom:.8rem;}
.tri-head h2{font-family:'Fraunces',serif;font-weight:500;font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.15;color:var(--text-1);}
.tri-grid > article{background:linear-gradient(180deg,rgba(30,24,18,.92),rgba(12,10,14,.96)) !important;
  border:1px solid rgba(217,169,84,.2) !important;border-radius:18px !important;padding:16px;backdrop-filter:none !important;
  transition:transform .45s cubic-bezier(.2,.8,.2,1),border-color .3s,box-shadow .3s;scroll-margin-top:110px;}
.tri-grid > article:hover{transform:translateY(-6px);border-color:rgba(244,215,140,.45) !important;
  box-shadow:0 30px 70px -30px rgba(0,0,0,.9),0 0 50px -20px rgba(217,169,84,.3);}
.tri-grid .book-cover{border-radius:10px;box-shadow:0 22px 40px -22px rgba(0,0,0,.9);}
.tri-grid .book-cover img{transition:transform .8s cubic-bezier(.2,.8,.2,1);}
.tri-grid > article:hover .book-cover img{transform:scale(1.035);}
.tri-grid article > div.p-6{padding:1.1rem .25rem .4rem !important;}
.tri-k{font:600 .68rem/1.3 'Inter',sans-serif;letter-spacing:.22em;text-transform:uppercase;color:var(--gold-2);margin:0 0 -.35rem;}
.tri-grid h2{font-family:'Fraunces',serif !important;font-weight:500;font-size:1.55rem !important;line-height:1.2;color:var(--text-1);}
.tri-grid h2 + p{font-family:'Fraunces',serif;font-style:italic;font-size:1rem !important;color:var(--text-2) !important;}
.tri-grid .pill{background:rgba(255,255,255,.04);}
.shelf-flash{animation:shelf-glow 1.6s ease;}
@keyframes shelf-glow{0%,100%{box-shadow:none}30%{box-shadow:0 0 0 2px var(--gold-1),0 0 60px -10px rgba(244,215,140,.6)}}
/* audiolibro: portada cuadrada */
.tri-grid.audio .book-cover{aspect-ratio:1/1 !important;}
