/* library-reader.css */
.library-reader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.library-reader[hidden] { display: none; }

.library-reader__panel {
  background: #1a1a1a;
  color: #f4e8e1;
  width: min(900px, 95vw);
  height: min(80vh, 700px);
  display: flex;
  flex-direction: column;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  font-family: 'Merriweather', 'Georgia', serif;
}
.library-reader__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #333;
}
.library-reader__title { margin: 0; font-weight: 400; font-size: 1.2em; }
.library-reader__close {
  background: transparent; border: none; color: #f4e8e1;
  font-size: 1.5em; cursor: pointer; line-height: 1;
}

.library-reader__list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.library-reader__list ul { list-style: none; margin: 0; padding: 0; }
.library-reader__list li {
  padding: 14px;
  border-bottom: 1px solid #2c2c2c;
  cursor: pointer;
}
.library-reader__list li:hover { background: #232323; }
.library-reader__list .title { font-size: 1.1em; }
.library-reader__list .meta { font-size: 0.85em; opacity: 0.7; margin-top: 4px; }
.library-reader__list .blurb { font-size: 0.9em; opacity: 0.8; margin-top: 6px; }

.library-reader__viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.library-reader__back {
  align-self: flex-start;
  background: transparent;
  color: #f4e8e1;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9em;
}
.library-reader__back:hover { text-decoration: underline; }
.library-reader__pdf { flex: 1; border: 0; width: 100%; background: #fff; }
.library-reader__error { padding: 16px; text-align: center; color: #ffb4b4; }
.library-reader__error a { color: #f4e8e1; }
