/* Журнальная читалка (pdf.js) — на токенах темы, автоадаптация dark/light/cream */
.jr-shell {
  margin: 8px 0 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.jr-shell:fullscreen { border-radius: 0; }
.jr-shell:fullscreen .jr-view { height: calc(100vh - 58px); }

.jr-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
  flex-wrap: wrap;
}
.jr-btn { width: auto; min-width: 34px; padding: 0 10px; font-size: 16px; }
.jr-page { color: var(--ink-dim); font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.jr-page input {
  width: 44px; text-align: center; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  padding: 4px 2px; font: inherit;
}
.jr-page input:focus { outline: none; border-color: var(--line-strong); }
.jr-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

.jr-view {
  height: min(78vh, 900px);
  overflow: auto;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(3, 90, 170, 0.10), transparent 60%),
    var(--bg);
  padding: 18px 12px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.jr-page-wrap {
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  background: #fff; /* бумажный лист — всегда белый, как настоящая страница журнала */
  line-height: 0;
}
.jr-canvas { display: block; border-radius: 4px; }
.jr-load { color: var(--ink-dim); padding: 60px 0; font-size: 15px; }
.jr-bar a.jr-dl {
  text-decoration: none; color: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 10px; min-width: 34px;
}

@media (max-width: 640px) {
  .jr-view { height: 70vh; padding: 10px 6px 28px; }
  .jr-bar { padding: 8px 10px; }
}