:root {
  --bg:        #f7f4ef;
  --surface:   #ffffff;
  --ink:       #2a2622;
  --muted:     #6f675e;
  --line:      #e7e0d6;
  --accent:    #2fb3a5;
  --accent-dk: #1b8577;
  --radius:    14px;
  --shadow:    0 10px 30px rgba(42, 38, 34, .08);
  --shadow-h:  0 16px 44px rgba(42, 38, 34, .16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 239, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1600px; margin: 0 auto; padding: 0 28px; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { font-size: 1.3rem; }
.brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { font-size: .86rem; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; white-space: nowrap; padding: 5px 11px; border-radius: 20px; }
.nav-links a:hover { color: var(--ink); background: rgba(0,0,0,.05); }
.visit-counter {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px;
  background: var(--light-sky, #eef4f1); color: var(--accent-dk);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.visit-counter .vc-icon { font-size: .9rem; }
.visit-counter strong { font-weight: 700; color: var(--accent-dk); }
.visit-counter .vc-label { color: var(--muted); font-weight: 500; }
.visit-counter .vc-sep { color: var(--line); margin: 0 2px; }
@media (max-width: 1080px) { .visit-counter .vc-label { display: none; } }
@media (max-width: 880px) { .visit-counter { display: none; } }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(1200px 400px at 70% -10%, rgba(181, 137, 90, .14), transparent 60%),
    var(--bg);
  text-align: center;
}
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem;
  font-weight: 600; color: var(--accent-dk); margin-bottom: 18px;
}
.hero-title {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08;
  letter-spacing: -.02em; max-width: 16ch; margin: 0 auto 22px;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--muted);
  max-width: 56ch; margin: 0 auto 32px;
}
.hero-actions { margin-bottom: 26px; }
.btn-primary {
  display: inline-block; background: var(--accent-dk); color: #fff;
  font-weight: 600; font-size: .98rem; padding: 14px 30px; border-radius: 999px;
  transition: transform .15s, background .2s, box-shadow .2s; box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-h); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--accent-dk);
  font-weight: 600; font-size: .98rem; padding: 13px 28px; border-radius: 999px;
  border: 1.5px solid var(--accent); transition: all .18s;
}
.btn-secondary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.hero-disclosure { font-size: .8rem; color: var(--muted); opacity: .85; }

/* Encabezado de sección con subtítulo (colecciones) */
.section-head { margin-bottom: 24px; }
.section-head .cat-heading { margin-bottom: 6px; }
.section-sub { color: var(--muted); font-size: .98rem; }
.band-heading {
  font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 600;
  text-align: center; margin-bottom: 18px;
}

/* ── Chips de categorías ─────────────────────────────── */
.chips-band { padding: 8px 0 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  font-size: .85rem; font-weight: 500; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); transition: all .18s;
}
.chip:hover { border-color: var(--c); color: var(--c); transform: translateY(-1px); box-shadow: var(--shadow); }

/* ── Secciones por categoría ─────────────────────────── */
.cat-section { padding: 30px 0; }
.cat-heading {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.7rem;
  letter-spacing: -.01em; margin-bottom: 24px; padding-left: 14px;
  border-left: 4px solid var(--c);
}

/* ── Grid de tarjetas ────────────────────────────────── */
.grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: transparent; }

.card-cover { display: block; aspect-ratio: 3 / 4; background: #efe9e0; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-gen {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  justify-content: center; gap: 14px; padding: 26px 22px; text-align: center;
  color: #fff;
  background: linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 62%, #2a2622));
  position: relative;
}
.cover-gen::before {
  content: ''; position: absolute; left: 0; top: 12%; bottom: 12%; width: 5px;
  background: rgba(255, 255, 255, .35);
}
.cover-title { font-family: 'Fraunces', serif; font-size: 1.22rem; font-weight: 600; line-height: 1.2; }
.cover-author { font-size: .82rem; font-weight: 500; opacity: .9; letter-spacing: .02em; }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-cat {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--c); margin-bottom: 8px;
}
.card-title { font-family: 'Fraunces', serif; font-size: 1.18rem; font-weight: 600; line-height: 1.22; }
.card-author { font-size: .85rem; color: var(--muted); margin: 2px 0 10px; }
.card-desc { font-size: .9rem; color: var(--muted); flex: 1; margin-bottom: 16px; }

.btn-amazon {
  align-self: flex-start; display: inline-block; margin-top: auto;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .88rem;
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--accent);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-amazon:hover { background: var(--accent-dk); transform: translateY(-1px); box-shadow: var(--shadow); }

/* ── Sobre la web ────────────────────────────────────── */
.about { padding: 72px 0; margin-top: 24px; background: var(--surface); border-top: 1px solid var(--line); }
.about-inner { max-width: 680px; }
.about h2 { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 600; margin-bottom: 18px; }
.about p { color: var(--muted); margin-bottom: 16px; }
.about-note {
  font-size: .92rem; padding: 16px 18px; background: var(--bg);
  border-left: 3px solid var(--accent); border-radius: 6px;
}

/* ── Sección Instagram ───────────────────────────────── */
.instagram { padding: 64px 0; background: var(--surface); border-top: 1px solid var(--line); }
.ig-inner { text-align: center; }
.ig-title { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 600; margin-bottom: 8px; }
.ig-sub { color: var(--muted); margin-bottom: 22px; }
.btn-ig {
  display: inline-block; margin-bottom: 32px; padding: 12px 28px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; color: #fff;
  background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 60%, #cc2366 80%, #bc1888);
  transition: transform .15s, box-shadow .2s;
}
.btn-ig:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.ig-embed { max-width: 960px; margin: 0 auto; }
.ig-embed--placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 48px 24px; color: var(--muted); font-size: .95rem;
}

/* ── Noticias ────────────────────────────────────────── */
.news { padding: 56px 0; background: var(--surface); border-top: 1px solid var(--line); }
.news-title { font-family: 'Fraunces', serif; font-size: 1.9rem; font-weight: 600; margin-bottom: 22px; }
.news-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.news-item { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; transition: transform .18s, box-shadow .2s, border-color .2s; }
.news-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.news-headline { font-weight: 600; color: var(--ink); font-size: .98rem; line-height: 1.3; }
.news-meta { font-size: .8rem; color: var(--muted); }
.news-loading { color: var(--muted); }
@media (max-width: 700px) { .news-list { grid-template-columns: 1fr; } }

/* Bloque de noticias en la barra lateral */
.side-news-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.side-news-item { display: block; }
.side-news-title { display: block; font-size: .85rem; line-height: 1.3; color: var(--ink); font-weight: 500; }
.side-news-item:hover .side-news-title { color: var(--accent-dk); }
.side-news-src { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ── Footer ──────────────────────────────────────────── */
.footer { background: var(--ink); color: #d8d0c6; padding: 56px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer .brand-name { color: #fff; }
.footer-tag { font-size: .9rem; color: #a99f93; margin-top: 8px; }
.footer-ig { display: inline-block; margin-top: 12px; color: var(--accent); font-size: .88rem; font-weight: 500; }
.footer-ig:hover { text-decoration: underline; }
.footer-legal { max-width: 520px; }
.footer-legal a { color: var(--accent); font-weight: 500; font-size: .9rem; }
.footer-legal a:hover { text-decoration: underline; }
.footer-disclosure { font-size: .78rem; color: #a99f93; margin: 12px 0; line-height: 1.5; }
.footer-copy { font-size: .8rem; color: #5a9b92; }

/* ── Páginas de texto (aviso legal) ──────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 80px 24px; }
.legal h1 { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 600; margin-bottom: 24px; }
.legal h2 { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 600; margin: 32px 0 12px; }
.legal p { color: var(--muted); margin-bottom: 14px; }
.legal a { color: var(--accent-dk); text-decoration: underline; }
.legal .back { display: inline-block; margin-bottom: 32px; font-weight: 500; color: var(--accent-dk); }

/* ── Histórico / biblioteca completa ─────────────────── */
.archive-hero {
  padding: 64px 0 28px;
  background:
    radial-gradient(900px 320px at 75% -20%, rgba(181, 137, 90, .12), transparent 60%),
    var(--bg);
}
.archive-hero h1 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.02em; margin-bottom: 10px;
}
.archive-hero > .wrap > p { color: var(--muted); max-width: 56ch; margin-bottom: 28px; }

.archive-controls {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin-bottom: 22px;
}
.search-box { flex: 1; min-width: 240px; }
.search-box input {
  width: 100%; font: inherit; font-size: 1rem; padding: 13px 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 137, 90, .18); }

.mode-toggle {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
}
.mode-btn {
  font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer;
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; transition: all .18s;
}
.mode-btn.active { background: var(--accent-dk); color: #fff; }

.az-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.az-btn {
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 8px; transition: all .15s;
}
.az-btn:hover { border-color: var(--accent); color: var(--accent-dk); }
.az-btn.active { background: var(--accent-dk); border-color: var(--accent-dk); color: #fff; }

.archive-count { font-size: .85rem; color: var(--muted); }
.archive-main { padding: 28px 24px 72px; }
.archive-empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 1rem; }
.section-heading { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 600; margin: 0 0 20px; color: var(--ink); }

/* ── Enlaces internos (autor / temática) ─────────────── */
.cat-heading a { color: inherit; text-decoration: none; }
.cat-heading a:hover { text-decoration: underline; }
.card-author a { color: inherit; text-decoration: none; }
.card-author a:hover { color: var(--accent-dk); text-decoration: underline; }

/* ── Índice de temáticas ─────────────────────────────── */
.temas-hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.temas-sub  { font-size: 1.05rem; color: var(--muted); max-width: 60ch; margin-bottom: 14px !important; }
.temas-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.temas-main { padding: 32px 28px 72px; }
.topic-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); max-width: 1600px; margin: 0 auto; }
.topic-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: transform .18s, box-shadow .22s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.tc-covers {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 180px;
  gap: 2px; background: var(--bg); overflow: hidden; border-radius: 12px 12px 0 0;
}
.tc-covers .tc-cover-img:first-child { grid-row: span 1; }
.tc-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg); transition: transform .35s; }
.topic-card:hover .tc-cover-img { transform: scale(1.04); }
.tc-cover-placeholder { background: var(--bg); width: 100%; height: 100%; grid-column: span 3; }
.tc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.tc-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; width: fit-content; }
.tc-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.18rem; color: var(--ink); margin: 0; line-height: 1.2; }
.tc-desc { font-size: .84rem; color: var(--muted); line-height: 1.5; margin: 0; flex: 1; }
.tc-authors { font-size: .76rem; color: var(--muted); font-style: italic; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-count { font-size: .82rem; font-weight: 600; color: var(--c); margin-top: 4px; }
.tc-arrow { font-size: .85rem; }
@media (max-width: 600px) { .temas-main { padding: 20px 16px 48px; } .topic-grid { grid-template-columns: 1fr; gap: 14px; } .tc-covers { grid-template-rows: 150px; } }

/* ── Índice de autores (tarjetas) ────────────────────── */
.authors-hero p { max-width: none; margin-bottom: 0; }
.authors-sub { font-size: 1.08rem; color: var(--muted); max-width: 64ch; margin-bottom: 18px !important; }
.authors-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.astat { font-size: .9rem; color: var(--muted); }
.astat strong { color: var(--accent-dk); font-weight: 700; }
.astat-sep { color: var(--line); font-size: 1.1rem; }
.authors-main { padding: 28px 28px 72px; }
.author-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1600px; margin: 0 auto; }
@media (max-width: 1200px) { .author-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .author-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .author-cards { grid-template-columns: 1fr; } }
.author-card {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .18s, box-shadow .2s, border-color .2s;
  text-decoration: none; color: var(--ink);
}
.author-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--accent); }
.ac-cover { flex: 0 0 110px; overflow: hidden; background: #efe9e0; display: flex; align-items: stretch; }
.ac-cover img { width: 110px; height: 100%; object-fit: cover; object-position: top center; display: block; }
.ac-avatar-gen {
  width: 110px; min-height: 110px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dk), var(--accent));
  color: #fff; font-family: 'Fraunces', serif; font-size: 1.6rem; font-weight: 600;
  letter-spacing: .04em;
}
.ac-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ac-name { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.ac-origen { font-size: .74rem; color: var(--accent-dk); font-weight: 600; }
.ac-destacado { font-size: .8rem; color: var(--muted); line-height: 1.35; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-count { font-size: .74rem; font-weight: 700; color: var(--accent-dk);
  margin-top: 6px; padding: 3px 9px; background: var(--bg); border-radius: 999px;
  border: 1px solid var(--line); align-self: flex-start; }
@media (max-width: 520px) { .author-cards { grid-template-columns: 1fr; } }

/* ── Índice de autores (legacy list, mantenido por si acaso) ── */
.author-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; }
.author-list a { font-weight: 500; color: var(--ink); }
.author-list a:hover { color: var(--accent-dk); text-decoration: underline; }
.author-list .muted { color: var(--muted); font-size: .82rem; }

/* ── Biografía de autor ─────────────────────────────── */
.author-bio { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 32px; }
.author-bio-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.55rem; margin-bottom: 4px; }
.author-origen { color: var(--accent-dk); font-weight: 600; font-size: .95rem; }
.author-bio-text { color: var(--ink); max-width: 72ch; }
.author-facts { list-style: none; display: flex; flex-direction: column; gap: 0; }
.author-facts li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.author-facts li.af-header { border-top: none; padding-top: 0; padding-bottom: 8px; gap: 20px; align-items: flex-start !important; flex-direction: row !important; }
.author-facts li.af-bio { padding-bottom: 6px; }
.af-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ab-portrait {
  flex: 0 0 130px; width: 130px; height: 160px;
  object-fit: cover; object-position: top center;
  border-radius: 8px; box-shadow: var(--shadow);
}
.ab-portrait--gen {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dk), var(--accent));
  color: #fff; font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 600;
}
@media (min-width: 640px) {
  .author-facts li { flex-direction: row; gap: 16px; align-items: baseline; }
  .af-label { flex: 0 0 130px; }
}
@media (max-width: 480px) {
  .ab-portrait { width: 90px; height: 110px; flex: 0 0 90px; }
}

/* ── Columna de navegación del footer ────────────────── */
.footer-nav h4 { color: #fff; font-family: 'Fraunces', serif; font-size: 1rem; margin-bottom: 10px; }
.footer-nav ul { list-style: none; margin-bottom: 12px; }
.footer-nav li a { color: #d8d0c6; font-size: .85rem; line-height: 1.95; }
.footer-nav li a:hover { color: var(--accent); }
.footer-more { color: var(--accent); font-size: .85rem; font-weight: 500; }
.footer-more:hover { text-decoration: underline; }

/* ── Cabecera con collage de portadas ────────────────── */
.hero--collage { position: relative; overflow: hidden; padding: 104px 0 88px; }
.hero-collage {
  position: absolute; inset: 0; z-index: 0;
  background-image: url('/assets/collage.jpg');
  background-size: cover; background-position: center;
  opacity: .72;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 45%, rgba(247,244,239,.30) 0%, rgba(247,244,239,.58) 48%, rgba(247,244,239,.82) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero-panel {
  max-width: 820px; margin: 0 auto; padding: 38px 46px 42px; text-align: center;
  background: rgba(248,245,240,.70);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 22px;
  box-shadow: 0 12px 44px rgba(42,38,34,.12);
}
.hero-name {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -.02em;
  margin-bottom: 18px; color: var(--ink);
}

/* ── Layout con barra lateral ────────────────────────── */
.layout {
  max-width: 1520px; margin: 0 auto; padding: 24px 24px 0;
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px;
  grid-template-areas: "left main right"; gap: 28px; align-items: start;
}
.sidebar-left  { grid-area: left; }
.layout-main   { grid-area: main; min-width: 0; }
.sidebar-right { grid-area: right; }
.layout-main .grid { grid-template-columns: repeat(4, 1fr); }
.layout-main .chips { justify-content: flex-start; }
.layout-main .band-heading { text-align: left; }
.section-head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.section-head-row .cat-heading { margin-bottom: 0; }
.see-all { font-size: .85rem; font-weight: 600; color: var(--accent-dk); white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.cat-section > .see-all { display: inline-block; margin-top: 16px; }

.sidebar { display: flex; flex-direction: column; gap: 20px; align-self: start; }
.side-instagram { padding: 16px; }
.side-instagram .ig-embed { max-width: none; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-featured { text-align: center; border-top: 4px solid var(--accent); }
.side-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dk); margin-bottom: 14px; }
.side-cover { display: block; max-width: 150px; margin: 0 auto 14px; }
.side-cover img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.side-title { font-family: 'Fraunces', serif; font-size: 1.12rem; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.side-author { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.side-heading { font-family: 'Fraunces', serif; font-size: 1.12rem; font-weight: 600; margin-bottom: 14px; }
.btn-author { display: inline-block; background: var(--accent-dk); color: #fff; font-weight: 600; font-size: .88rem; padding: 10px 20px; border-radius: 999px; transition: transform .15s, background .2s; }
.btn-author:hover { background: var(--ink); transform: translateY(-1px); }
.mini-list { display: flex; flex-direction: column; gap: 13px; }
.mini-book { display: flex; gap: 11px; align-items: center; }
.mini-book img { width: 42px; height: 62px; object-fit: cover; border-radius: 3px; flex: 0 0 auto; box-shadow: var(--shadow); }
.mini-title { font-size: .85rem; line-height: 1.25; color: var(--ink); }
.mini-book:hover .mini-title { color: var(--accent-dk); }

/* Card de promoción de reseñas */
.side-reviews-promo {
  background: linear-gradient(135deg, rgba(47, 179, 165, 0.08) 0%, rgba(27, 133, 119, 0.08) 100%);
  border: 2px solid var(--accent);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reviews-promo-icon {
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 2px;
}
.reviews-promo-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.reviews-promo-text {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
.btn-reviews-promo {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  padding: 11px 22px;
  border-radius: 999px;
  transition: transform .15s, background .2s;
  align-self: center;
}
.btn-reviews-promo:hover {
  background: var(--accent-dk);
  transform: translateY(-2px);
}

.ad-slot {
  display: flex; align-items: center; justify-content: center; min-height: 250px;
  border: 2px dashed var(--line); background: transparent;
  color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em;
}
.ad-banner {
  display: block; padding: 0; overflow: hidden; line-height: 0;
  transition: transform .18s, box-shadow .2s;
}
.ad-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.ad-banner img { width: 100%; height: auto; display: block; }
.re-ad { display: block; padding: 0; overflow: hidden; text-align: center; transition: transform .18s, box-shadow .2s; }
.re-ad:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.re-ad:hover .re-cta { text-decoration: underline; }
.re-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.re-body { padding: 16px 18px 20px; }
.re-tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.re-name { display: block; font-family: 'Fraunces', serif; font-size: 1.12rem; font-weight: 600; line-height: 1.15; color: var(--ink); }
.re-role { display: block; font-size: .85rem; color: var(--muted); margin: 4px 0 12px; }
.re-cta { display: inline-block; font-weight: 600; font-size: .85rem; color: var(--accent-dk); }

/* Tarjeta "anúnciate aquí" */
.ad-contact { text-align: center; border: 2px dashed var(--line); background: var(--bg); }
.ad-contact-tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ad-contact-text { font-size: .95rem; color: var(--ink); font-weight: 600; margin-bottom: 14px; }
.ad-contact-btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px; color: #fff;
  font-weight: 600; font-size: .85rem;
  background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 60%, #cc2366 80%, #bc1888);
  transition: transform .15s, box-shadow .2s;
}
.ad-contact-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-h); }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr; grid-template-areas: "main" "right" "left"; }
  .sidebar { position: static; }
  .ad-slot { min-height: 140px; }
}
@media (max-width: 1080px) { .layout-main .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .layout-main .grid { grid-template-columns: 1fr; } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { gap: 14px; font-size: .82rem; }
  .nav-links a { font-size: .82rem; }
  .archive-controls { flex-direction: column; align-items: stretch; }
  .mode-toggle { align-self: flex-start; }
}

@media (max-width: 600px) {
  .nav-inner { height: 60px; }
  .brand-name { font-size: 1rem; }
  .hero { padding: 64px 0 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
}

/* ── Sección Audiolibros ─────────────────────────────── */
.audiobooks-section {
  background: #1b2d3e;
  padding: 64px 24px;
  color: #fff;
}
.ab-head {
  max-width: 1120px;
  margin: 0 auto 36px;
  text-align: center;
}
.ab-heading {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.ab-sub {
  color: rgba(255,255,255,.62);
  font-size: .97rem;
  max-width: 56ch;
  margin: 0 auto;
}
.ab-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.ab-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, background .2s;
}
.ab-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.12);
}
.ab-cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: rgba(0,0,0,.25);
}
.ab-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ab-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  letter-spacing: .02em;
}
.ab-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ab-title {
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}
.ab-author {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  flex: 1;
  margin-bottom: 12px;
}
.btn-audible {
  display: block;
  text-align: center;
  background: #f29e38;
  color: #1a1a1a;
  font-size: .78rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.btn-audible:hover { background: #e08a20; transform: translateY(-1px); }
@media (max-width: 1080px) { .ab-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .ab-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ── Página de libro (/libro/[asin]) ──────────────────────────────────────── */
.libro-breadcrumb {
  max-width: 860px; margin: 0 auto; padding: 14px 24px 0;
  font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.libro-breadcrumb a { color: var(--accent-dk); }
.libro-breadcrumb a:hover { text-decoration: underline; }
.libro-breadcrumb span[aria-hidden] { color: var(--line); }
.libro-back-link { margin-left: auto; color: var(--accent); font-weight: 600; }
.libro-back-link:hover { color: var(--accent-dk); }

.libro-social-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.social-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.btn-social-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: all .2s;
  text-decoration: none;
  cursor: pointer;
}
.btn-social-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 38, 34, .15);
}
.btn-review {
  background: var(--accent);
  border-color: var(--accent);
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
}
.btn-review:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  transform: translateY(-2px);
}
.btn-whatsapp { border-color: #25d366; }
.btn-whatsapp:hover { background: #e8f5e9; border-color: #25d366; color: #25d366; }
.btn-twitter { border-color: #000; }
.btn-twitter:hover { background: #f5f5f5; border-color: #000; color: #000; }
.btn-facebook { border-color: #1877f2; }
.btn-facebook:hover { background: #e3f2fd; border-color: #1877f2; color: #1877f2; }
.btn-instagram { border-color: #e4405f; }
.btn-instagram:hover { background: #fce4ec; border-color: #e4405f; color: #e4405f; }

.libro-main {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 60px;
}

.libro-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  margin: 28px 0 44px;
  align-items: start;
}

.libro-cover-wrap {
  position: relative;
}
.libro-cover-link { display: block; }
.libro-cover {
  width: 100%; max-width: 300px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-h);
  display: block;
}

.libro-info {
  display: flex; flex-direction: column; gap: 14px;
}

.libro-cat {
  display: inline-block;
  background: color-mix(in srgb, var(--c, #555) 15%, transparent);
  color: var(--c, #555);
  border: 1px solid color-mix(in srgb, var(--c, #555) 30%, transparent);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 999px;
}

.libro-title {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15;
  letter-spacing: -.01em; color: var(--ink);
}

.libro-author-block { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.libro-author-link { font-weight: 600; color: var(--accent-dk); font-size: 1rem; }
.libro-author-link:hover { text-decoration: underline; }
.libro-origin { color: var(--muted); font-size: .9rem; }

.libro-desc { color: var(--muted); line-height: 1.65; font-size: .96rem; }

.libro-buy-btn {
  display: inline-block;
  background: var(--accent-dk); color: #fff;
  font-size: 1.05rem; font-weight: 700;
  padding: 14px 28px; border-radius: var(--radius);
  text-align: center; width: 100%;
  box-shadow: 0 4px 18px rgba(138, 100, 56, .35);
  transition: background .2s, transform .15s, box-shadow .2s;
  cursor: pointer; border: none;
}
.libro-buy-btn:hover {
  background: #1b8577; transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(138, 100, 56, .45);
}

.libro-affiliate-note {
  font-size: .75rem; color: var(--muted); line-height: 1.5;
}

/* Related & Reviews sections */
.libro-related { margin-bottom: 48px; }
.libro-related h2,
.libro-reviews h2 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.35rem; margin-bottom: 20px; color: var(--ink);
}

.libro-reviews { margin-top: 20px; }

/* Review cards */
.review-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
}
.review-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.review-stars { color: #e6a817; font-size: 1rem; letter-spacing: .05em; }

.rating-avg {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.rating-avg .review-stars { font-size: 1.2rem; }

/* Review form */
.review-form-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; margin-top: 32px;
}
.review-form-wrap h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.15rem; margin-bottom: 20px; color: var(--ink);
}

.review-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: .88rem; font-weight: 500; color: var(--ink);
  margin-bottom: 14px;
}
.review-form input[type=text],
.review-form input[type=email],
.review-form textarea {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: .92rem; font-family: inherit;
  background: var(--bg); color: var(--ink);
  transition: border-color .2s;
  width: 100%;
}
.review-form input:focus, .review-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.review-form .form-row {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.review-form .form-row label { flex: 1; min-width: 200px; }

.star-input {
  display: flex; gap: 4px; margin-top: 4px;
}
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.8rem; color: var(--line); line-height: 1;
  padding: 0 2px; transition: color .15s, transform .1s;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.active { color: #e6a817; }

.review-result {
  margin-top: 12px; padding: 10px 16px;
  border-radius: 8px; font-size: .9rem; font-weight: 500;
}
.review-result.ok  { background: #eafaf1; color: #1a6a38; border: 1px solid #b7dfc8; }
.review-result.err { background: #fdf0f0; color: #8a1a1a; border: 1px solid #f0c0c0; }

/* Responsive */
@media (max-width: 680px) {
  .libro-hero {
    grid-template-columns: 1fr;
  }
  .libro-cover-wrap {
    display: flex; justify-content: center;
  }
  .libro-cover { max-width: 220px; }
  .libro-buy-btn { width: 100%; text-align: center; }
  .review-form-wrap { padding: 20px 16px; }
}
