
/* READER PANEL — адаптировано под тему Romanika */
.reader {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 28px;
  margin: 20px 0;
}
.reader .text {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--tt);
}
.reader .text p { line-height: 1.9; margin: .6rem 0; }
.reader .panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--bdc);
  flex-wrap: wrap;
  gap: 10px;
}
.reader .functions { display: flex; gap: 8px; }
.reader .item.fullscreen,
.reader .item.lamp,
.reader .item.font {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1.5px solid var(--bdc);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--tt);
  transition: all .18s;
}
.reader .item.fullscreen:hover,
.reader .item.lamp:hover,
.reader .item.font:hover,
.reader .item.fullscreen.is-active,
.reader .item.lamp.is-active,
.reader .item.font.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.reader .win {
  background: var(--bg-2);
  border: 1.5px solid var(--bdc);
  border-radius: 10px;
  padding: 14px 18px;
  display: none;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.reader .win .item { font-size: 13px; color: var(--tt-2); margin-right: 4px; }
.reader .win .func { display: flex; gap: 6px; align-items: center; }
.reader .win select {
  width: auto; height: auto; padding: 6px 10px; font-size: 13px;
  background: var(--bg); color: var(--tt); box-shadow: inset 0 0 0 1px var(--bdc);
  border-radius: 6px;
}
.reader .win .button {
  padding: 5px 12px; height: auto; font-size: 13px; min-width: 30px;
  text-transform: none; letter-spacing: normal; border-radius: 6px;
  background: var(--bg); color: var(--tt); box-shadow: inset 0 0 0 1px var(--bdc);
}
.reader .win .button:hover { background: var(--accent); color: #fff; box-shadow: none; }
.reader .win .reset { margin-left: auto; }
.reader-progress {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-2); border-radius: 8px; padding: 10px 16px; margin-bottom: 16px;
}
.reader-progress__resume {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; height: auto;
}
.reader-progress__value { color: var(--tt-2); font-size: 13px; }
.reader-toc {
  background: var(--bg-2); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px;
}
.reader-toc h3 { font-size: 15px; margin: 0 0 8px; color: var(--tt); }
.reader-toc__links a { display: block; padding: 4px 0; color: var(--tt-2); text-decoration: none; }
.reader-toc__links a:hover { color: var(--accent); }
.reader .pagination .nextpage a { background: var(--accent); }

/* Полноэкранный режим ридера */
body.openfullsc { overflow: hidden; }
#reader.fullsc {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: var(--bg); margin: 0; border-radius: 0;
  overflow-y: auto; padding: 30px 15%;
}
#reader.fullsc .panel { position: sticky; top: 0; background: var(--bg); padding-top: 10px; z-index: 2; }

/* Пагинация книги */
.book-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 24px 0;
}
.book-pagination a, .book-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 8px; font-size: 15px; font-weight: 700;
  text-decoration: none; color: var(--tt);
  background: var(--bg-2); border: 1.5px solid var(--bdc);
  transition: all .18s;
}
.book-pagination a:hover {background: var(--accent); border-color: var(--accent); color: #fff;}
.book-pagination .pagination-current {
  background: var(--accent); border-color: var(--accent); color: #fff;
  cursor: default; font-size: 16px; transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(255,102,0,0.35);
}
.book-pagination .pagination-dots {
  background: none; border: none; color: var(--tt-2); min-width: auto; padding: 0 2px; font-weight: 400;
}
.book-pagination .pagination-prev, .book-pagination .pagination-next {
  font-size: 13px; font-weight: 600; padding: 0 16px; text-transform: none;
}
.book-pagination .disabled {opacity: 0.35; cursor: not-allowed; background: var(--bg-2); border-color: var(--bdc); color: var(--tt);}
