/* =============================================================
   ESTILOS — Detectives de Papel
   Compartidos por index.html (portada) y mapa.html (mapa).
   ============================================================= */


/* ============== VARIABLES DE COLOR ============== */
:root {
  --paper:        #f4ede0;   /* fondo papel envejecido */
  --paper-dark:   #e8dcc4;
  --ink:          #1a1612;   /* tinta oscura */
  --ink-soft:     #3d342a;
  --ink-faded:    #6b5f50;
  --rule:         #c9b896;   /* líneas decorativas */
  --accent:       #8b1a1a;   /* rojo sangre apagado */
  --accent-soft:  #a83d3d;
  --shadow:       rgba(26, 22, 18, 0.15);
  --shadow-deep:  rgba(26, 22, 18, 0.30);
}

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

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}


/* =============================================================
   PORTADA — index.html
   ============================================================= */

body.portada { line-height: 1.55; }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 32px 40px;
}

.hero {
  text-align: center;
  padding: 30px 0 50px;
  position: relative;
}
.hero::after {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  background: var(--rule);
  margin: 30px auto 0;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 56px;
  letter-spacing: -0.005em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 12px;
}
.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-faded);
  letter-spacing: 0.01em;
}

.intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: justify;
}
.intro p { margin-bottom: 14px; }
.intro p:last-child { margin-bottom: 0; }
.intro a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.intro a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.intro-rule {
  border: none;
  border-top: 1px solid var(--rule);
  width: 80px;
  margin: 24px auto;                            /*antes 40 */
}

.stats-section { padding: 18px 0 20px; }
.stats-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  text-align: center;
  color: var(--ink-faded);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.stat-item {
  text-align: center;
  padding: 14px 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}
.stat-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 0.05em;
}

.ranking-section {
  max-width: 480px;
  margin: 50px auto 0;
}
.ranking-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  text-align: center;
  color: var(--ink-faded);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ranking-list { list-style: none; }
.ranking-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-family: 'Cormorant Garamond', serif;
}
.ranking-item:first-child { border-top: 1px solid var(--rule); }
.ranking-position {
  font-style: italic;
  font-size: 16px;
  color: var(--ink-faded);
  text-align: right;
}
.ranking-city { font-size: 19px; font-weight: 500; color: var(--ink); }
.ranking-count { font-style: italic; font-size: 14px; color: var(--ink-faded); }
.ranking-count strong { font-style: normal; font-weight: 600; color: var(--accent); font-size: 16px; }

.cta-section {
  text-align: center;
  padding: 70px 0 30px;
}
.btn-primary {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--ink);
  padding: 16px 42px;
  text-decoration: none;
  border: 1px solid var(--ink);
  position: relative;
  transition: all 0.2s;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--paper);
  pointer-events: none;
  opacity: 0.3;
  transition: opacity 0.2s;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover::before { opacity: 0.5; }
.btn-primary .arrow { font-family: serif; margin-left: 8px; display: inline-block; transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.news-section {
  max-width: 620px;
  margin: 30px auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.news-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  text-align: center;
  color: var(--ink-faded);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.news-list { list-style: none; }
.news-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 9px 0;
  font-family: 'Cormorant Garamond', serif;
  align-items: baseline;
}
.news-item + .news-item { border-top: 1px dashed var(--rule); }
.news-detective { font-size: 18px; color: var(--ink); }
.news-detective .author { font-style: italic; color: var(--ink-faded); font-size: 15px; margin-left: 6px; }
.news-date { font-style: italic; font-size: 13px; color: var(--ink-faded); white-space: nowrap; }
.news-empty {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-faded);
  padding: 14px 0;
}

.suggest-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 8px;
}
.suggest-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-faded);
  margin: 0 auto 24px;
  max-width: 480px;
  line-height: 1.5;
}
.btn-secondary {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  padding: 12px 32px;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-secondary .arrow { font-family: serif; margin-left: 6px; display: inline-block; transition: transform 0.2s; }
.btn-secondary:hover .arrow { transform: translateX(3px); }

/* Pie de página de la portada */
body.portada .footer {
  margin-top: 60px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faded);
  letter-spacing: 0.05em;
}
body.portada .footer span { color: var(--ink-soft); }
.footer-line { margin: 3px 0; }
body.portada .footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
body.portada .footer a:hover { border-bottom-color: var(--accent); }


/* ============== DOS CAJAS PARALELAS ============== */
.two-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 50px 0 30px;
  align-items: start;
}
.box-suggest { text-align: center; }
.box-links { text-align: center; }
.link-list {
  list-style: none;
  margin-top: 18px;
  font-family: 'Cormorant Garamond', serif;
}
.link-list li {
  padding: 6px 0;
  font-size: 18px;
}
.link-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.link-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* =============================================================
   MAPA — mapa.html
   ============================================================= */

body.mapa { overflow: hidden; height: 100%; }
html.mapa { height: 100%; }

.map-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
}
.btn-volver {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.btn-volver:hover {
  border-bottom-color: var(--accent);
}
.header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 14px 24px 12px;
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.header::before {
  content: "";
  position: absolute;
  bottom: 4px; left: 24px; right: 24px;
  height: 1px;
  background: var(--rule);
  opacity: 0.5;
}
.title-block { display: flex; align-items: baseline; gap: 14px; }
.title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
}
.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-faded);
  font-weight: 400;
}
.counter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.counter strong {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
  margin-right: 4px;
}

.filters {
  background: var(--paper-dark);
  border-bottom: 1px solid var(--rule);
  padding: 10px 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 999;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  flex: 1 1 140px;
  max-width: 220px;
}
.filter-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  letter-spacing: 0.04em;
  padding-left: 2px;
}
.filter-select {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 7px 28px 7px 10px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%236b5f50' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.15s;
}
.filter-select:hover { border-color: var(--ink-faded); }
.filter-select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn-reset {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
  align-self: flex-end;
  margin-bottom: 1px;
}
.btn-reset:hover { text-decoration-color: var(--accent); }

.search-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 180px;
  flex: 1.4 1 180px;
  max-width: 260px;
}
.search-input {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 7px 28px 7px 10px;
  transition: all 0.15s;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><circle cx='6' cy='6' r='4.5' stroke='%236b5f50' stroke-width='1.3' fill='none'/><path d='M9.5 9.5l3 3' stroke='%236b5f50' stroke-width='1.3' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.search-input:hover { border-color: var(--ink-faded); }
.search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search-input::placeholder { color: var(--ink-faded); font-style: italic; }

#map {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  background: #d6c9ad;
}
.map-wrapper { flex: 1; position: relative; }
.leaflet-tile-pane { filter: saturate(0.92) contrast(0.96); }

.detective-pin { background: transparent; border: none; }
.pin-shape {
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px var(--shadow-deep));
  transition: transform 0.15s;
}
.pin-shape:hover { transform: scale(1.15); }
.pin-shape svg { width: 36px; height: 36px; display: block; }

.marker-cluster-custom {
  background: var(--accent);
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--paper);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 15px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px var(--shadow-deep);
}
.marker-cluster-custom div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaflet-popup-content-wrapper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  border: 1px solid var(--ink);
  box-shadow: 0 8px 24px var(--shadow-deep);
  padding: 0;
}
.leaflet-popup-content { margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
.leaflet-popup-tip { background: var(--paper); border: 1px solid var(--ink); }
.leaflet-popup-close-button { color: var(--ink-faded) !important; font-size: 20px !important; padding: 6px 8px 0 0 !important; }

.popup-card {
  width: 280px;
  padding: 18px 20px 16px;
  position: relative;
}
.popup-card::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  height: 1px;
  background: var(--ink);
  opacity: 0.2;
}
.popup-card::after {
  content: "";
  position: absolute;
  bottom: 8px; left: 8px; right: 8px;
  height: 1px;
  background: var(--ink);
  opacity: 0.2;
}
.popup-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 2px;
}
.popup-author {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  margin-bottom: 10px;
}
.popup-divider { border: none; border-top: 1px solid var(--rule); margin: 8px 0 10px; }
.popup-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
.popup-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--ink-faded);
  text-align: right;
}
.popup-value { color: var(--ink); }
.popup-value.bold { font-weight: 700; font-family: 'Inter', sans-serif; }
.popup-link {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.popup-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.popup-no-link {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faded);
}

.loader {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.4s;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-faded);
}
.loader-rule {
  width: 80px;
  height: 1px;
  background: var(--rule);
}

.legend {
  position: absolute;
  bottom: 18px;
  right: 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  z-index: 500;
  box-shadow: 0 4px 12px var(--shadow);
  max-width: 180px;
}
.legend-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faded);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}
.legend-swatch {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--paper);
}
.legend-swatch svg { display: block; }
.legend-label { color: var(--ink); font-size: 11.5px; }

/* Pie de página del mapa */
body.mapa .footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 6px 24px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  text-align: center;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 998;
}
body.mapa .footer span { color: var(--ink-soft); }

/* ============== SECCIÓN SORPRESA ============== */
.surprise-section {
  max-width: 480px;
  margin: 50px auto 0;
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.surprise-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.surprise-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-surprise {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  padding: 12px 28px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-surprise:hover {
  background: var(--ink);
  color: var(--paper);
}
/* =============================================================
   RESPONSIVE / MÓVIL
   ============================================================= */

@media (max-width: 720px) {
  /* Portada */
  .page { padding: 30px 20px; }
  .hero { padding: 20px 0 30px; }
  .hero-title { font-size: 38px; }
  .hero-subtitle { font-size: 17px; }
  .intro { font-size: 17px; padding: 20px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-number { font-size: 36px; }
  .ranking-city { font-size: 17px; }
  .news-detective { font-size: 16px; }
  .news-detective .author { font-size: 14px; }
  .btn-primary { font-size: 18px; padding: 14px 28px; }
  .suggest-title { font-size: 24px; }
  .suggest-text { font-size: 16px; }
  .btn-secondary { font-size: 16px; padding: 10px 24px; }

  /* Cajas en móvil: una columna */
  .two-boxes {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 0 20px;
  }

  /* Mapa */
  .header { padding: 10px 14px 8px; }
  .title { font-size: 22px; }
  .subtitle { display: none; }
  .counter { font-size: 12px; }
  .counter strong { font-size: 15px; }
  .filters { padding: 8px 10px; gap: 8px; }
  .filter-group { min-width: 0; flex: 1 1 calc(50% - 8px); max-width: none; }
  .search-group { min-width: 0; flex: 1 1 100%; max-width: none; order: -1; }
  .filter-label { font-size: 11px; }
  .filter-select, .search-input { font-size: 12px; padding: 6px 24px 6px 8px; }
  .btn-reset { width: 100%; text-align: center; padding: 6px; }
  .legend { display: none; }
  .popup-card { width: 240px; padding: 14px 16px 12px; }
  .popup-name { font-size: 19px; }
  body.mapa .footer { font-size: 11px; padding: 5px 14px; }
}

/* =============================================================
   POPUP — fila de enlaces (leer más + sus libros)
   ============================================================= */
.popup-links-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}

/* =============================================================
   PANEL SECUNDARIO DE LIBROS
   ============================================================= */
.panel-libros {
  position: absolute;
  top: 60px;
  right: 16px;
  width: 300px;
  max-height: calc(100% - 120px);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 8px 24px var(--shadow-deep);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s, transform 0.2s;
}
.panel-libros.oculto {
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
}
.panel-libros-inner {
  padding: 20px 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.panel-libros-cerrar {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--ink-faded);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s;
}
.panel-libros-cerrar:hover { color: var(--ink); }

.panel-libros-nombre {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 2px;
  padding-right: 20px;
}
.panel-libros-autor {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  margin-bottom: 4px;
}
.panel-libros-list {
  list-style: none;
  margin: 0 0 16px;
  flex: 1;
}
.panel-libro-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 6px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule);
  font-family: 'Cormorant Garamond', serif;
}
.panel-libro-item:first-child { border-top: 1px dashed var(--rule); }
.panel-libro-orden {
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faded);
  text-align: right;
}
.panel-libro-titulo {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.3;
}
.panel-libro-anyo {
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  white-space: nowrap;
}
.panel-libros-copiar {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 7px 16px;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.2s;
}
.panel-libros-copiar:hover {
  background: var(--accent);
  color: var(--paper);
}

/* Móvil: panel ocupa más ancho */
@media (max-width: 720px) {
  .panel-libros {
    top: auto;
    bottom: 40px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: 55vh;
  }
}
