:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-soft: #f3ede2;
  --ink: #1f1d1a;
  --muted: #6b655d;
  --border: #e6dfd3;
  --accent: #f4b400;
  --accent-hover: #dc9e00;
  --accent-ink: #1f1a07;
  --danger: #c6362c;
  --danger-bg: #fdeceb;
  --success: #1d7a46;
  --shadow-sm: 0 2px 8px rgba(31, 29, 26, 0.05);
  --shadow-md: 0 10px 28px rgba(31, 29, 26, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.is-reading {
  overflow: hidden;
  background: #0b0b0d;
}

body.is-reading .topbar {
  display: none;
}

body.is-reading .app-main {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top);
}

body.is-edit-mode .topbar {
  border-bottom-color: var(--border);
}

body:not(.is-edit-mode) #openLoginBtn {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
}

body:not(.is-edit-mode) #openLoginBtn:hover {
  background: rgba(31, 29, 26, 0.05);
  color: var(--ink);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  color: var(--ink);
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mode-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-switch {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.mode-pill {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-pill.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-soft);
}

.btn-subtle {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--border);
}

.btn-subtle:hover:not(:disabled) {
  background: #eae2d4;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger-soft {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-sm {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 14px;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

/* Main layout */
.app-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 18px calc(36px + env(safe-area-inset-bottom));
}

.view {
  width: 100%;
}

/* Library */
body:not(.is-edit-mode) .library-header {
  display: none;
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-heading {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.status-banner {
  background: #fff6db;
  border: 1px solid #f2d479;
  color: #5a4300;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 22px;
}

body:not(.is-edit-mode) .books-grid {
  padding-top: 8px;
}

.book-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease;
}

body.is-edit-mode .book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.book-card:hover {
  transform: translateY(-3px);
}

body.is-edit-mode .book-card:hover {
  box-shadow: var(--shadow-md);
}

.book-card-tap {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

.book-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body:not(.is-edit-mode) .book-cover {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 29, 26, 0.08);
}

body.is-edit-mode .book-cover {
  border-bottom: 1px solid var(--border);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-placeholder {
  font-size: 40px;
  color: #b7ae9e;
}

.book-card-body {
  padding: 12px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

body.is-edit-mode .book-card-body {
  padding: 14px 16px 16px;
  gap: 6px;
}

.book-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.book-card-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body:not(.is-edit-mode) .book-card-desc {
  display: none;
}

.book-card-meta {
  margin-top: auto;
  padding-top: 2px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

body:not(.is-edit-mode) .book-card-meta:empty {
  display: none;
}

.book-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fcfaf6;
}

.book-card-actions .btn-edit-book {
  flex: 1;
}

.empty-state {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  max-width: 460px;
  margin: 32px auto;
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

/* Reader View (Minimalist Full-Screen Swipe) */
#readerView {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100vw;
  height: 100dvh;
  background: #0b0b0d;
  color: #ffffff;
  overflow: hidden;
  animation: readerFadeIn 0.2s ease;
}

@keyframes readerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reader-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
  touch-action: pan-x;
}

.reader-track::-webkit-scrollbar {
  display: none;
}

.reader-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.reader-slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.reader-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 56px 24px calc(44px + env(safe-area-inset-bottom));
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    transparent 100%
  );
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.reader-slide-caption p {
  margin: 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 19px;
  line-height: 1.55;
  text-align: center;
  white-space: pre-wrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.reader-slide.text-only {
  background: #141312;
  padding: 40px 28px;
}

.reader-slide.text-only .reader-slide-caption {
  position: static;
  padding: 0;
  background: none;
}

.reader-slide.text-only .reader-slide-caption p {
  font-size: 26px;
  line-height: 1.6;
  text-shadow: none;
}

.reader-slide-end {
  background: #0b0b0d;
  flex-direction: column;
  padding: 32px 24px;
  text-align: center;
}

.reader-end-inner {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.reader-end-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.reader-end-subtitle {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.62);
}

.reader-end-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-pill-btn {
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.15s ease, transform 0.1s ease;
}

.reader-pill-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.reader-pill-btn:active {
  transform: scale(0.97);
}

.reader-pill-btn.is-primary {
  background: #ffffff;
  color: #0b0b0d;
  border-color: transparent;
}

.reader-pill-btn.is-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Floating HUD */
.reader-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: calc(14px + env(safe-area-inset-top)) 16px 28px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.22) 60%,
    transparent 100%
  );
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#readerView.hud-hidden .reader-hud {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.reader-hud-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 20, 24, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.reader-hud-btn:hover {
  background: rgba(40, 40, 48, 0.8);
}

.reader-hud-meta {
  text-align: center;
  min-width: 0;
}

.reader-hud-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-hud-counter {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

.reader-hud-right {
  min-width: 44px;
  display: flex;
  justify-content: flex-end;
}

.reader-hud-pill {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 24, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Pagination Dots / Progress */
.reader-dots {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 15, 18, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.25s ease;
}

#readerView.hud-hidden .reader-dots {
  opacity: 0.45;
}

.reader-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.reader-dot.is-active {
  width: 18px;
  background: rgba(255, 255, 255, 0.95);
}

.reader-bar-track {
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.reader-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.2s ease;
}

/* Desktop-only edge chevrons (hidden on touch/iPad) */
.reader-edge-btn {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .reader-edge-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(20, 20, 24, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.2s ease, background 0.15s ease;
  }

  .reader-edge-btn:hover:not(:disabled) {
    opacity: 1;
    background: rgba(40, 40, 48, 0.75);
  }

  .reader-edge-btn:disabled {
    opacity: 0;
    pointer-events: none;
  }

  .reader-edge-prev {
    left: 16px;
  }

  .reader-edge-next {
    right: 16px;
  }

  #readerView.hud-hidden .reader-edge-btn {
    opacity: 0;
  }

  #readerView.hud-hidden .reader-edge-btn:hover:not(:disabled) {
    opacity: 0.95;
  }
}

.reader-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 10px;
}

.reader-empty-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.reader-empty-hint {
  margin: 0 0 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 340px;
}

/* Book Editor View */
.editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.editor-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-state {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.save-state.is-saving {
  color: #8a6400;
}

.save-state.is-saved {
  color: var(--success);
}

.editor-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.book-details-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.cover-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cover-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-placeholder {
  color: var(--muted);
  font-size: 14px;
}

.details-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.22);
}

.textarea {
  resize: vertical;
  line-height: 1.5;
}

.pages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pages-header .section-title {
  margin-bottom: 2px;
}

.upload-progress {
  margin: 0;
  font-size: 14px;
  color: #8a6400;
  font-weight: 600;
}

.pages-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pages-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fcfaf6;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}

.page-thumb-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-thumb-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-thumb-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 8px;
}

.page-body-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.page-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.page-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pages-empty {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31, 29, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-desc {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-error {
  margin: 0;
  font-size: 14px;
  color: var(--danger);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--ink);
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 32px);
  text-align: center;
}

@media (max-width: 720px) {
  .book-details-grid,
  .page-item {
    grid-template-columns: 1fr;
  }

  .reader-slide-caption p {
    font-size: 17px;
  }

  .reader-slide.text-only .reader-slide-caption p {
    font-size: 22px;
  }
}
