/* ============================================================
   styles.css — Mate con amigos
   Autor: Sebastián Satke
   ============================================================ */


/* ── Variables globales ── */
:root {
  --accent:    #7a4f2b;
  --borde:     rgba(180, 160, 140, .35);
  --tinta:     rgba(15, 10, 5, .95);
  --blanco65:  rgba(255, 255, 255, .65);
}


/* ── Overlay de brillo ── */
#brightness-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  transition: background .2s ease;
}


/* ── Reset y base ── */
* { box-sizing: border-box }

html {
  scroll-behavior: smooth;
}

/* Scrollbar personalizado — solo desktop */
@media (min-width: 761px) {
  html { scrollbar-width: thin; scrollbar-color: rgba(40,30,20,.6) transparent; }
  html::-webkit-scrollbar { width: 6px; }
  html::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb { background: rgba(40,30,20,.6); border-radius: 999px; }
  html::-webkit-scrollbar-thumb:hover { background: rgba(40,30,20,.9); }
}

@media (max-width: 760px) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--blanco65);
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 0;
  pointer-events: none;
}


/* ── Layout ── */
.wrap,
footer.footer-contacto {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}


/* ── Menú hamburguesa ── */
.nav-top {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1000;
  opacity: 1;
  transition: opacity .5s ease;
}
.nav-top.oculto { opacity: 0; pointer-events: none; }

.hamburger {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: rgba(251,240,217,.25);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .2s, background .2s;
}
.hamburger:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
}
.hamburger:hover span { background: rgba(255, 255, 255, .90); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tinta);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-menu {
  position: absolute;
  top: 44px;
  right: 0;
  background: rgba(253,246,235,.50);
  backdrop-filter: blur(6px);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 10px 15px 6px;
  min-width: 180px;
  display: none;
  flex-direction: column;
}
.nav-menu.open { display: flex; }

.nav-menu a {
  text-decoration: none;
  color: var(--tinta);
  font-size: 18px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  display: block;
  margin: 4px 0;
  text-align: center;
  transition: box-shadow .2s, color .2s;
}
.nav-menu a:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255, 255, 255, .90);
}

/* Controles del menú (fuente y brillo) */
.menu-ctrl-fila {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
}

.menu-ctrl-btn {
  font-family: Georgia, "Times New Roman", serif;
  background: transparent;
  border: 1px solid var(--borde);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  color: var(--tinta);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: box-shadow .2s, color .2s, transform .2s;
}
.menu-ctrl-btn:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255, 255, 255, .90);
  transform: scale(1.05);
}

.menu-ctrl-label {
  font-size: 13px;
  color: var(--tinta);
  min-width: 30px;
  text-align: center;
}


/* ── Botón flotante volver arriba ── */
.floating-top-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.floating-top-wrap.visible { opacity: 1; pointer-events: auto; }

.floating-top {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 20px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s;
}
.floating-top:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}

.floating-top-label {
  font-size: 14px;
  color: var(--blanco65);
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.95);
}


/* ── Tipografía ── */
h1 {
  font-size: 60px;
  line-height: 1.04;
  margin: 0 0 18px;
  font-weight: 700;
  color: var(--blanco65);
}

h2 {
  font-size: 36px;
  margin: 0 0 16px;
  color: var(--blanco65);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1);
}

.eyebrow {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 20px;
  color: var(--blanco65);
  margin-bottom: 12px;
}

.lead {
  font-size: 26px;
  max-width: 780px;
  color: var(--blanco65);
  margin: 0 0 28px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}

blockquote {
  margin: 24px 0;
  padding-left: 18px;
  border-left: 3px solid rgba(15, 10, 5, .3);
  color: rgba(15, 10, 5, .85);
  font-style: italic;
  font-size: 21px;
  max-width: 700px;
}


/* Card de cita del autor */
.cita-autor blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.7;
  text-align: justify;
  padding-left: 0;
  border-left: none;
  max-width: 100%;
  margin: 0;
  color: rgba(15,10,5,.85);
}


.page-header {
  padding: 80px 0 40px;
  text-align: center;
}
.page-header .eyebrow {
  color: var(--blanco65);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.9);
}
.page-header h1 {
  color: var(--blanco65);
  text-shadow: 0 2px 20px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.9);
}
.page-header .lead {
  color: var(--blanco65);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.9);
  margin: 0 auto 28px;
}


/* ── Nav links (bajo el header) ── */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  padding: 12px 32px;
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 20px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
  transition: box-shadow .2s, transform .2s, color .2s;
}
.nav-links a:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}


/* ── Secciones ── */
section { padding: 40px 0; border: none; }

section h2 {
  border-top: 2px solid rgba(255, 255, 255, .4);
  padding-top: 32px;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.95);
}

section .grid,
section > div {
  border-bottom: 2px solid rgba(255, 255, 255, .4);
  padding-bottom: 32px;
}

.section-head {
  margin-bottom: 24px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.section-presentacion {
  padding: 0;
  border: none;
  margin-bottom: 24px;
}
.section-presentacion h2 { margin-bottom: 16px; }

.section-intro {
  font-size: 23px;
  color: rgba(15, 10, 5, .85);
  max-width: 100%;
  margin: 0;
  text-align: justify;
  line-height: 1.7;
  letter-spacing: 0.01em;
}


/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.grid.single { grid-template-columns: 1fr; }


/* ── Cards ── */
.card {
  background: rgba(251,240,217,.55);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}

.card p {
  margin: 0 0 18px;
  color: rgba(15,10,5,.85);
  line-height: 1.7;
  text-align: justify;
  letter-spacing: 0.01em;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.card p:last-child { margin-bottom: 0; }

.card h3 { margin: 0 0 12px; font-size: 24px; color: var(--tinta); }

.card .autor {
  font-size: 23px;
  color: var(--tinta);
  font-style: italic;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
}

.card .excerpt {
  font-size: 23px;
  color: rgba(15, 10, 5, .85);
  line-height: 1.7;
  margin: 0 0 20px;
  text-align: justify;
  letter-spacing: 0.01em;
  max-width: 100%;
  flex: 1;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}


/* ── Botones ── */
.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  padding: 12px 32px;
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 18px;
  font-family: Georgia, "Times New Roman", serif;
  backdrop-filter: blur(4px);
  transition: box-shadow .2s, transform .2s, color .2s;
  cursor: pointer;
}
.btn:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}

.card .btn {
  align-self: flex-start;
  background: transparent;
  border: 2px solid rgba(15, 10, 5, .3);
  backdrop-filter: none;
}
.card .btn:hover {
  background: transparent;
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}

/* Botón volver (páginas internas) */
a.volver {
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 16px;
  display: inline-block;
  margin-bottom: 30px;
  backdrop-filter: blur(4px);
  transition: box-shadow .2s, transform .2s, color .2s;
}
a.volver:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}


/* ── Libros ── */
.libro-fila { display: flex; gap: 24px; align-items: flex-start; }
.libro-img  { width: 120px; border-radius: 10px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(70,50,30,.1); }
.libro-contenido { flex: 1; }
.libro-contenido h3 { margin: 0 0 12px; font-size: 24px; }


/* ── Compartir (páginas de relatos) ── */
.share-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.share-wrap .share-btn {
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.3);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.share-label {
  font-size: 16px;
  color: rgba(255,255,255,1);
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 2px 12px rgba(0,0,0,1);
}
.share { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, color .2s;
}
.share-btn:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  transform: scale(1.03);
  color: rgba(255, 255, 255, .90);
}




.footer-contacto {
  background: rgba(0, 0, 0, .45);
  border-top: 2px solid rgba(255, 255, 255, .4);
  margin-top: 60px;
  padding: 60px 20px;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}
.footer-inner  { max-width: 980px; margin: 0 auto; }
.footer-titulo { letter-spacing: .18em; text-transform: uppercase; font-size: 16px; color: var(--blanco65); margin-bottom: 10px; }
.footer-subtitulo { font-size: 22px; font-weight: 700; color: var(--blanco65); margin: 0 0 8px; }
.footer-copy {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .3);
  font-size: 16px;
  color: var(--blanco65);
  text-align: center;
}

.contacto-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.contacto-form input,
.contacto-form textarea {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  color: var(--blanco65);
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: border-color .2s;
  resize: none;
  backdrop-filter: blur(4px);
}
.contacto-form input::placeholder,
.contacto-form textarea::placeholder { color: rgba(255, 255, 255, .6); }
.contacto-form input:focus,
.contacto-form textarea:focus { border-color: var(--blanco65); }
.contacto-form textarea { height: 140px; }

.contacto-submit {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: var(--blanco65);
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  align-self: flex-start;
  backdrop-filter: blur(4px);
  transition: background .2s, transform .2s;
}
.contacto-submit:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255, 255, 255, .90);
}
.contacto-ok { display: none; font-size: 16px; color: var(--accent); font-style: italic; }


/* ── Portada (solo index) ── */
.portada {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #1a1208;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.portada.oculta { opacity: 0; visibility: hidden; pointer-events: none; }

.portada-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.portada-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); }

.portada-contenido {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  animation: fadeUp .8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portada-eyebrow {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 18px;
  color: var(--blanco65);
  margin-bottom: 14px;
  animation: fadeUp .8s .1s ease both;
  text-shadow: 0 2px 8px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,1), 0 8px 48px rgba(0,0,0,.9);
}
.portada-titulo {
  font-size: 54px;
  line-height: 1.05;
  color: var(--blanco65);
  margin: 0 0 16px;
  font-weight: 700;
  animation: fadeUp .8s .2s ease both;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.95), 0 16px 80px rgba(0,0,0,.8);
}
.portada-subtitulo {
  font-size: 24px;
  color: var(--blanco65);
  margin: 0 0 36px;
  font-style: italic;
  max-width: 600px;
  animation: fadeUp .8s .3s ease both;
  text-shadow: 0 2px 8px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,1), 0 8px 48px rgba(0,0,0,.9);
}
.portada-btn {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  color: var(--blanco65);
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 12px 32px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .2s, transform .2s;
  animation: fadeUp .8s .4s ease both;
}
.portada-btn:hover {
  background: rgba(255, 255, 255, .25);
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255, 255, 255, .90);
}


/* ── Ticker (solo index) ── */
.chalk-tip {
  position: absolute;
  bottom: 36px;
  left: 100%;
  font-family: 'Caveat', cursive;
  font-size: 30px;
  color: rgba(255, 255, 255, .85);
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0,0,0,.4), 0 0 8px rgba(255,255,255,.15);
  opacity: 0;
}
.chalk-tip.animando {
  opacity: 1;
  animation: ticker-slide linear forwards;
}
@keyframes ticker-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100vw - 100%)); }
}


.nav-menu-titulo { display: none; }

/* ── Drawer móvil ── */
@media (max-width: 760px) {
  .nav-menu-titulo {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--tinta);
    padding: 16px 24px 12px;
    border-bottom: 1px solid var(--borde);
    margin-bottom: 8px;
    text-align: center;
  }
  .nav-top {
    z-index: 1200;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 50vw;
    border-radius: 0 0 0 12px;
    padding: 16px 0 20px;
    display: flex !important;
    flex-direction: column;
    transition: right .3s ease;
    z-index: 1100;
    overflow-y: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: 1px solid var(--borde);
  }
  .nav-menu.open { right: 0; }

  .nav-top {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1300;
  }

  .nav-menu a {
    font-size: 16px;
    padding: 12px 24px;
    text-align: left;
    margin: 0;
    border-radius: 0;
    font-weight: 700;
    color: rgba(255,255,255,.85);
  }

  .nav-menu-titulo { color: rgba(255,255,255,.65) !important; }
  .menu-ctrl-btn { color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.3) !important; }
  .menu-ctrl-fila { padding: 6px 24px; }
  .menu-ctrl-label { font-size: 12px; color: rgba(255,255,255,.65); }
  .hamburger span { background: rgba(255,255,255,.85) !important; }
  .floating-nav-btn { color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.3) !important; box-shadow: 0 2px 12px rgba(255,255,255,.15), 0 4px 24px rgba(0,0,0,.3); }
  .floating-top { color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.3) !important; box-shadow: 0 2px 12px rgba(255,255,255,.15), 0 4px 24px rgba(0,0,0,.3); }
  .floating-top-label { color: rgba(255,255,255,.90) !important; text-shadow: 0 1px 4px rgba(0,0,0,1), 0 2px 12px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,.9) !important; }
  .floating-nav-label { color: rgba(255,255,255,.90) !important; text-shadow: 0 1px 4px rgba(0,0,0,1), 0 2px 12px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,.9) !important; }
  .indice-link { color: rgba(255,255,255,.85) !important; }
  .indice-panel-titulo { color: rgba(255,255,255,.65) !important; }
  .nav-overlay { display: none; }
  .nav-menu.open ~ .hamburger,
  .nav-links a { font-size: 16px; padding: 6px 12px; }
  .card .btn { font-size: 16px; padding: 8px 16px; }
  h2 { font-size: 28px; }
  blockquote { font-size: 17px; }
  blockquote[style*="text-align:right"] { text-align: right !important; }
  .nav-top.menu-abierto .hamburger { display: none; }

  /* Espacio para el hamburguesa dentro del panel */
  .nav-menu.open { padding-top: 8px; }
}

/* ── Páginas de escritores ── */
.perfil-fila {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.perfil-foto {
  width: 280px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.perfil-datos {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.perfil-datos h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  color: var(--tinta);
  text-shadow: none;
}
.perfil-profesion {
  font-size: 22px;
  color: rgba(15,10,5,.65);
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}
.cierre {
  font-style: italic;
  color: rgba(15,10,5,.65) !important;
  text-align: right !important;
  margin-top: 28px !important;
}
@media (max-width: 760px) {
  .perfil-fila { flex-direction: column; align-items: center; text-align: center; }
  .perfil-foto { width: 200px; }
}

/* ── Páginas de libros ── */

.libro-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.libro-img-grande {
  width: 180px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.libro-data {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.libro-data p {
  margin: 0 !important;
  font-size: inherit;
  text-align: left;
  line-height: 1.4;
  letter-spacing: normal;
}
.libro-data h1 {
  margin: 0 0 4px;
  font-size: 36px;
  line-height: 1.1;
  color: var(--tinta);
  text-shadow: none;
}
.libro-subtitulo {
  font-size: 20px;
  color: rgba(15,10,5,.85);
  font-style: italic;
  font-weight: 700;
  margin: 0;
}
.libro-meta {
  font-size: 18px;
  color: rgba(15,10,5,.85);
  margin: 0;
}
.libro-meta a {
  color: rgba(15,10,5,.85);
  text-decoration: none;
  border: none;
  padding: 0;
  background: transparent;
  font-size: inherit;
  display: inline;
}
.compra-label,
.dia-card .compra-label {
  font-size: 16px !important;
  color: rgba(15,10,5,.75);
  margin: 4px 0 !important;
  font-style: italic;
  line-height: 1.4;
  text-align: left;
  letter-spacing: normal;
}
.compra-label-oscuro {
  font-size: 16px;
  color: rgba(15,10,5,.75);
  margin: 0 0 8px;
  font-style: italic;
}

/* Botón Sobre el autor — dentro de card, alineado a la derecha */
.sobre-autor-wrap {
  text-align: right;
  margin-top: 32px;
}
.sobre-autor-wrap .share-btn {
  font-size: 18px;
  padding: 10px 24px;
}

@media (max-width: 760px) {
  .libro-top { flex-direction: column; align-items: center; text-align: center; }
  .libro-img-grande { width: 140px; }
}



/* Header del relato */
.relato-header {
  padding-bottom: 28px;
  border-bottom: 2px solid rgba(255,255,255,.4);
  margin-bottom: 34px;
}
.relato-header h1 {
  margin: 0 0 14px;
  font-size: 48px;
  line-height: 1.05;
  color: var(--blanco65);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1);
}
.relato-header .autor {
  font-size: 22px;
  color: var(--blanco65);
  margin: 0;
  font-style: italic;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}
.relato-header .reading-time {
  font-size: 20px;
  color: var(--blanco65);
  margin: 8px 0 0;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}

/* Card angosta de contenido */
.dia-card {
  background: rgba(251,240,217,.55);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 32px;
  margin: 0 auto 24px;
  backdrop-filter: blur(4px);
  max-width: 780px;
}
.dia-card p {
  margin: 0 0 18px;
  font-size: 21px;
  color: rgba(15,10,5,.85);
  text-align: justify;
  line-height: 1.7;
  letter-spacing: 0.01em;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.dia-card p:last-child { margin-bottom: 0; }
.dia-card blockquote,
.card blockquote { color: rgba(15,10,5,.85); }

/* Títulos de sección */
.dia-titulo {
  font-size: 24px;
  font-weight: 700;
  color: rgba(15,10,5,.90);
  margin: 32px auto 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(15,10,5,.35);
  max-width: 780px;
}
.dia-titulo.flotante {
  color: var(--blanco65);
  border-top-color: rgba(255,255,255,.4);
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}

/* Firma */
.firma {
  margin-top: 28px !important;
  font-weight: 700;
  text-align: right !important;
}
.card .firma,
.dia-card .firma {
  color: rgba(15,10,5,.85);
}

/* Índice flotante */
.floating-nav {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  align-items: flex-end;
}
.floating-nav.visible { opacity: 1; pointer-events: auto; }

.floating-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.floating-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 18px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  transition: transform .2s ease, box-shadow .2s ease, color .2s;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  padding: 0;
}
.floating-nav-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255,255,255,.90);
}
.floating-nav-label {
  font-size: 14px;
  color: var(--blanco65);
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.95);
  user-select: none;
}

.indice-panel {
  position: fixed;
  right: 20px;
  bottom: 156px;
  width: min(210px, calc(100vw - 40px));
  max-height: min(58vh, 400px);
  overflow: auto;
  scrollbar-width: none;
  background: rgba(251,240,217,.25);
  backdrop-filter: blur(6px);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 8px 0;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease;
}
.indice-panel::-webkit-scrollbar { display: none; }
.indice-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.indice-panel-titulo {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tinta);
  margin: 0;
  padding: 6px 16px 8px;
}
.indice-links { display: flex; flex-direction: column; }
.indice-link {
  display: block;
  text-decoration: none;
  color: var(--tinta);
  font-size: 16px;
  line-height: 1.25;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  transition: box-shadow .15s ease, color .15s;
}
.indice-link:hover { box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2); color: rgba(255,255,255,.90); }
.indice-link.active { font-weight: 700; }

/* Popup RAE */
#rae-popup {
  position: fixed;
  z-index: 9999;
  background: rgba(251,240,217,.25);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  color: var(--tinta);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  display: none;
  white-space: nowrap;
}
#rae-popup a { color: var(--tinta); text-decoration: none; font-style: italic; }
#rae-popup a:hover { text-decoration: underline; }

/* Botones dentro de cualquier card — transparentes con efecto flotante */
.card .share-btn,
.dia-card .share-btn,
.card .btn,
.dia-card .btn {
  background: transparent !important;
  border: 1px solid rgba(15,10,5,.3);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.card .share-btn:hover,
.dia-card .share-btn:hover,
.card .btn:hover,
.dia-card .btn:hover {
  background: transparent !important;
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255,255,255,.90);
  transform: translateY(-1px);
}


@media (max-width: 760px) {
  .relato-header h1 { font-size: 32px; }
  .autor { font-size: 18px; }
  .dia-card { padding: 24px; }
  .indice-panel { right: 14px; bottom: 136px; }
  .floating-nav { right: 14px; bottom: 14px; }
  h1                              { font-size: 38px; }
  .lead                           { font-size: 18px; text-align: justify; }
  .card .excerpt,
  .section-intro,
  blockquote                      { font-size: 19px; }
  .grid                           { grid-template-columns: 1fr; }
  .libro-fila                     { flex-direction: column; }
  .libro-img                      { width: 140px; }
  .floating-top-wrap              { right: 14px; bottom: 14px; }
  .chalk-tip                      { display: none; }
  .portada-titulo                 { font-size: 36px; }
  .portada-subtitulo              { font-size: 17px; }

  /* Botones oscuros en móvil */
  .volver, .nav-links a {
    background: rgba(15,10,5,.90) !important;
    color: rgba(255,255,255,.85) !important;
    border-color: rgba(255,255,255,.3) !important;
    box-shadow: 0 2px 12px rgba(255,255,255,.15), 0 4px 24px rgba(0,0,0,.3);
  }
  .share-wrap .share-btn {
    background: rgba(15,10,5,.90) !important;
    color: rgba(255,255,255,.85) !important;
    border-color: rgba(255,255,255,.3) !important;
    box-shadow: 0 2px 12px rgba(255,255,255,.15), 0 4px 24px rgba(0,0,0,.3);
  }
}
