body { padding-bottom: 120px; }

.head { padding: 26px 0 6px; }
.head h1 {
  font-size: clamp(64px, 20vw, 104px);
  font-weight: 300;
  margin-top: 8px;
}
.head-script {
  display: block;
  width: fit-content;
  margin: -22px 0 0 auto;
  font-size: clamp(46px, 12vw, 64px);
}
.stats { font-size: 13px; font-weight: 300; color: var(--ink-soft); margin-top: 10px; }
.stats b { color: var(--ink); font-weight: 500; }

/* ahora leyendo: bloque de color invertido */
.now {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 26px;
  padding: 16px;
  border-radius: var(--radius);
  background: #8b2c2a;
  color: #f6d6e3;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.now + .now { margin-top: 10px; }
.now .cover { width: 84px; aspect-ratio: 2/3; border-radius: 3px; object-fit: cover; background: var(--c); }
.now .label { color: #f2c14e; }
.now h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 22px; line-height: 1; margin: 6px 0 4px; }
.now p { opacity: .75; font-size: 13px; font-weight: 300; }

.filters {
  display: flex;
  gap: 8px;
  margin: 34px -20px 6px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

/* estanterías */
.shelf { margin-top: 30px; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.shelf-head h2 { font-family: var(--display); font-weight: 300; font-size: 40px; line-height: 1; }

.row-line {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  row-gap: 18px;
  width: 100%;
  padding: 14px 0 0;
  margin-bottom: 18px;
}

.spine {
  position: relative;
  width: var(--w);
  height: var(--h);
  background: var(--c);
  color: var(--t);
  border-radius: 3px 3px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
  animation: rise .6s cubic-bezier(.2,.8,.2,1) backwards;
  animation-delay: calc(var(--i) * 35ms);
  overflow: hidden;
}
.spine:hover, .spine:focus-visible { transform: translateY(-12px); outline: none; }
.spine .t {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--serif);
  text-transform: uppercase;
  font-size: var(--fs);
  letter-spacing: .03em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(var(--h) - 46px);
}
.spine .r { display: flex; flex-direction: column; gap: 3px; }
.spine .r i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor var(--p), transparent var(--p)); }
.spine.lean { transform: rotate(-6deg); transform-origin: bottom left; margin-left: calc(var(--h) * .11); }
.spine.lean:hover { transform: rotate(-6deg) translateY(-12px); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

.empty {
  margin-top: 40px;
  padding: 36px 24px;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
}
.empty h3 { font-family: var(--display); text-transform: uppercase; font-weight: 300; font-size: 30px; line-height: 1; margin-bottom: 10px; }
.empty p { color: var(--ink-soft); font-weight: 300; }

.add {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  box-shadow: 0 12px 30px -8px rgba(42,20,22,.5);
  z-index: 10;
}
.add { white-space: nowrap; } /* en móviles estrechos el texto se partía en dos líneas */
.add:active { transform: translateX(-50%) scale(.97); }
.add svg { width: 18px; height: 18px; }

.top-icons { display: flex; gap: 10px; }

/* aviso para crear cuenta (solo a quien ya tiene libros y no la tiene) */
#nudge { margin-top: 22px; padding: 20px 20px 18px; border-radius: 26px; background: #f7ebd8; box-shadow: var(--shadow); animation: fadeIn .4s ease; }
#nudge[hidden] { display: none; }
#nudge .script { font-size: 38px; line-height: .9; color: var(--accent); }
#nudge h3 { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; margin: 6px 0 8px; text-transform: uppercase; }
#nudge p { font-size: 14px; font-weight: 300; line-height: 1.55; color: var(--ink-soft); }
#nudge .acts { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: 14px; }
#nudge .pill { height: 46px; }
#nudge .later { font-size: 13px; color: var(--ink-soft); text-decoration: underline; padding: 8px 6px; }
