:root {
  --page-w: 15.5cm;
  --page-h: 23cm;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 24px 0 90px;
}

.reader-root {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  background: #fff;
}

.reader-page {
  width: var(--page-w);
  height: var(--page-h);
  border: none;
  display: none;
}
.reader-page.active { display: block; }

.loading {
  width: var(--page-w);
  height: var(--page-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
}

.reader-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0f172a;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.reader-nav button {
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.reader-nav button:disabled {
  background: #475569;
  cursor: not-allowed;
}
.reader-nav span {
  color: #e2e8f0;
  font-size: 14px;
  min-width: 60px;
  text-align: center;
}

/* Skala otomatis di layar kecil, tanpa mengubah rasio 15,5:23 */
@media (max-width: 600px) {
  .reader-root { transform: scale(0.85); transform-origin: top center; }
}
