@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg: #080b12;
  --surface: #101624;
  --surface-2: #171f30;
  --surface-3: #1e293b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f6fb;
  --muted: #8993a7;
  --muted-2: #5d687c;
  --primary: #7067f5;
  --primary-light: #9b94ff;
  --cyan: #22d3ee;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-reading: 'Lora', Georgia, serif;
}

body.oled-mode {
  --bg: #000000;
  --surface: #090d16;
  --surface-2: #111726;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

img {
  display: block;
}

/* ==========================================================================
   APP SHELL & STAGE (From audiobookaiappdesign)
   ========================================================================== */
.app-stage {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18), transparent 32%), #06090f;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: clip;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.6);
  transition: max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

body.reader-active .phone-shell,
.phone-shell:has(#tab-view-reader.active),
.phone-shell:has(#tab-view-reader.reader-mode-pdf) {
  max-width: 960px;
}

@media (max-width: 980px) {
  body.reader-active .phone-shell,
  .phone-shell:has(#tab-view-reader.active) {
    max-width: 100%;
    box-shadow: none;
  }
}

.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 165px;
}

.screen.active {
  display: block;
}

.glass {
  background: linear-gradient(135deg, rgba(31, 41, 59, 0.84), rgba(15, 23, 42, 0.76));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 16px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.purple {
  color: var(--primary-light);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   LIBRARY SCREEN
   ========================================================================== */
.library-screen {
  padding: 28px 20px 175px;
  background: radial-gradient(circle at 100% 7%, rgba(99, 102, 241, 0.13), transparent 30%), var(--bg);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 9px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #4338ca);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  transform: rotate(-3deg);
}

.logo-mark span {
  width: 4px;
  border-radius: 4px;
  background: white;
  animation: logo-wave 1.2s ease-in-out infinite;
}

.logo-mark span:nth-child(1) { height: 10px; }
.logo-mark span:nth-child(2) { height: 18px; animation-delay: 0.2s; }
.logo-mark span:nth-child(3) { height: 13px; animation-delay: 0.4s; }

@keyframes logo-wave {
  50% { transform: scaleY(0.65); opacity: 0.7; }
}

.brand-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.brand-row h1 {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-header > p {
  margin: 10px 0 0 50px;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 50%;
  background: linear-gradient(145deg, #312e81, #171f30);
  color: #c4b5fd;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.library-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 24px;
}

.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-box input::placeholder {
  color: #687287;
}

.upload-button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 9px 26px rgba(99, 102, 241, 0.26);
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.upload-button:active {
  transform: scale(0.97);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 28px 1px 14px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.section-heading button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.continue-card {
  position: relative;
  width: 100%;
  display: flex;
  gap: 15px;
  padding: 14px;
  border-radius: 21px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.continue-card:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.continue-card::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  left: -45px;
  top: -45px;
  background: rgba(99, 102, 241, 0.18);
  border-radius: 50%;
  filter: blur(25px);
  pointer-events: none;
}

.book-cover {
  position: relative;
  overflow: hidden;
  background: #171b2b;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.42);
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 20, 0.1), rgba(8, 10, 18, 0.25) 45%, rgba(6, 8, 14, 0.92));
}

.cover-type {
  position: absolute;
  inset: auto 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  text-align: center;
}

.cover-type small {
  margin-bottom: 5px;
  color: #c4b5fd;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cover-type strong {
  font-family: var(--font-reading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover-type span {
  margin-top: 4px;
  font-size: 6px;
  letter-spacing: 0.08em;
  opacity: 0.76;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.featured-cover {
  flex: 0 0 92px;
  width: 92px;
  height: 134px;
  border-radius: 10px;
}

.continue-copy {
  min-width: 0;
  flex: 1;
  padding-top: 3px;
}

.listening-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.continue-copy h3 {
  margin: 8px 0 3px;
  font-family: var(--font-reading);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-copy > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.progress-meta strong {
  color: #c4b5fd;
  font-weight: 600;
}

.progress-track {
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 9px var(--cyan);
  transition: width 0.3s ease;
}

.voice-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  padding-right: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b45309, #f59e0b);
  color: white;
  font-size: 8px;
  font-weight: 700;
}

.continue-play {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  color: #4338ca;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.shelf-heading {
  align-items: center;
  margin-bottom: 11px;
}

.shelf-heading h2 {
  margin: 0;
}

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-row button {
  flex: none;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.filter-row button.active {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 11px;
  margin-top: 15px;
  min-height: 160px;
}

@media (max-width: 600px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
}

.book-tile {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  position: relative;
}

.tile-cover {
  position: relative;
  aspect-ratio: 0.68;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.book-tile:hover .tile-cover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.45);
}

.tile-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}

.tile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 7, 13, 0.82));
}

.status-tag {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(8px);
  color: #ddd6fe;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.status-tag i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 7px #8b5cf6;
}

.status-tag.cyan { color: #a5f3fc; }
.status-tag.cyan i { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.status-tag.amber { color: #fde68a; }
.status-tag.amber i { background: #f59e0b; box-shadow: 0 0 7px #f59e0b; }

.tile-play {
  position: absolute;
  z-index: 2;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #312e81;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.book-tile > strong {
  display: block;
  margin: 9px 1px 3px;
  overflow: hidden;
  color: #e5e7eb;
  font-family: var(--font-reading);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-tile > small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 35px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   BOTTOM NAVIGATION (Floating Pill Bar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 12px;
  bottom: 10px;
  left: 12px;
  max-width: 456px;
  margin: 0 auto;
  height: 67px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(11, 15, 25, 0.9);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.bottom-nav button {
  position: relative;
  height: 53px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #697386;
  transition: color 0.18s ease;
}

.bottom-nav button span {
  font-size: 10px;
  font-weight: 600;
}

.bottom-nav button.active {
  color: #a5b4fc;
}

.bottom-nav button.active::before {
  content: '';
  position: absolute;
  top: -5px;
  width: 25px;
  height: 2px;
  border-radius: 3px;
  background: var(--primary-light);
  box-shadow: 0 0 12px var(--primary);
}

/* ==========================================================================
   READER SCREEN & THEMES (Dark / Sepia / Light)
   ========================================================================== */
.reader-screen {
  position: relative;
  padding-bottom: 185px;
  transition: background 0.25s, color 0.25s;
}

.reader-dark {
  background: radial-gradient(circle at 20% 26%, rgba(99, 102, 241, 0.08), transparent 30%), #0b0f19;
  color: #d9dee9;
}

body.oled-mode .reader-dark {
  background: #000000;
}

.reader-sepia {
  background: #f1e4c8;
  color: #443b2e;
}

.reader-light {
  background: #f8fafc;
  color: #273244;
}

.reader-header {
  position: sticky;
  z-index: 25;
  top: 0;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.reader-sepia .reader-header {
  background: rgba(241, 228, 200, 0.9);
  border-color: rgba(68, 59, 46, 0.12);
  color: #443b2e;
}

.reader-light .reader-header {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(20, 25, 35, 0.09);
  color: #273244;
}

.icon-button {
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.reader-sepia .icon-button,
.reader-light .icon-button {
  border-color: rgba(20, 25, 35, 0.12);
  background: rgba(20, 25, 35, 0.04);
}

.reader-title {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 2px 0;
}

.reader-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-title span {
  margin-top: 3px;
  color: var(--primary-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.reader-sepia .reader-title span,
.reader-light .reader-title span {
  color: #4f46e5;
}

.page-count {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 0;
  background: transparent;
}

.page-count i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.theme-popover {
  position: absolute;
  z-index: 35;
  top: 64px;
  right: 14px;
  width: 175px;
  padding: 8px;
  border-radius: 16px;
  color: var(--text);
}

.theme-popover button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.theme-popover button.active {
  background: rgba(99, 102, 241, 0.22);
  color: white;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  flex-shrink: 0;
}

.theme-dot.light { background: #f8fafc; }
.theme-dot.sepia { background: #e8d3a8; }
.theme-dot.dark { background: #0b0f19; }

.reading-area {
  max-width: 454px;
  margin: 0 auto;
  padding: 14px 12px 36px;
}

.chapter-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--primary-light);
  font: 600 8px var(--font-ui);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.reader-sepia .chapter-kicker,
.reader-light .chapter-kicker {
  color: #4f46e5;
}

.chapter-kicker span {
  width: 25px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

.reading-area h1 {
  margin: 10px 0 24px;
  font: 600 24px/1.25 var(--font-reading);
  text-align: center;
  letter-spacing: -0.02em;
}

.reading-area p {
  margin: 0 0 13px;
  padding: 4px 8px;
  border-left: 2.5px solid transparent;
  border-radius: 6px;
  font: 400 15.5px/1.86 var(--font-reading);
  letter-spacing: 0.003em;
  text-align: justify;
  text-indent: 1.35em;
  hyphens: auto;
  -webkit-hyphens: auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.reading-area p.ereader-subtitle {
  text-align: center;
  text-indent: 0;
  font-weight: 600;
  font-size: 16.5px;
  margin: 6px 0 18px;
  color: var(--text);
}

.reader-sepia .reading-area p.ereader-subtitle {
  color: #2c241b;
}

.reader-light .reading-area p.ereader-subtitle {
  color: #111827;
}

/* Zero-jump E-Reader Active Paragraph & Immersion Sentence/Word Highlight */
.reading-area p.active-sentence {
  position: relative;
  border-left-color: var(--primary);
  background: linear-gradient(90deg, rgba(112, 103, 245, 0.13), rgba(112, 103, 245, 0.03));
}

.reader-sepia .reading-area p.active-sentence,
.reader-light .reading-area p.active-sentence {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.03));
}

.reader-sentence {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.reader-sentence.active-speaking {
  color: #ffffff;
  background: rgba(112, 103, 245, 0.16);
  box-shadow: 0 0 0 2px rgba(112, 103, 245, 0.12);
}

.reader-sepia .reader-sentence.active-speaking {
  color: #1a140e;
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.reader-light .reader-sentence.active-speaking {
  color: #0f172a;
  background: rgba(99, 102, 241, 0.13);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.09);
}

.word-item.active-word,
.active-sentence mark {
  position: relative;
  padding: 1px 2px;
  border-radius: 3px;
  background: rgba(34, 211, 238, 0.22);
  color: #ffffff;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}

.reader-sepia .word-item.active-word,
.reader-light .word-item.active-word {
  background: rgba(14, 165, 233, 0.24);
  color: #0f172a;
  text-shadow: none;
}

.word-item.active-word::after,
.active-sentence mark::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 2px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
}

.page-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 10px;
  color: var(--muted);
  font: 600 9px var(--font-ui);
}

.page-end::before,
.page-end::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.18;
}

/* E-Reader / PDF Sheet Page Blocks */
.pdf-page-block {
  position: relative;
  padding: 20px 20px 18px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(19, 26, 43, 0.92), rgba(14, 19, 32, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.065);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.03);
}

body.oled-mode .reader-dark .pdf-page-block {
  background: #070a12;
  border-color: rgba(255, 255, 255, 0.06);
}

.reader-sepia .pdf-page-block {
  background: #f7ecd5;
  border: 1px solid rgba(104, 86, 62, 0.15);
  box-shadow: 0 8px 24px rgba(82, 65, 42, 0.09);
}

.reader-light .pdf-page-block {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.pdf-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reader-sepia .pdf-page-bar,
.reader-light .pdf-page-bar {
  border-bottom-color: rgba(20, 25, 35, 0.08);
}

.pdf-page-badge {
  font: 600 9px var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.82;
}

.pdf-page-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid rgba(112, 103, 245, 0.28);
  background: rgba(112, 103, 245, 0.1);
  color: var(--primary-light);
  font: 600 9.5px var(--font-ui);
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.15s ease;
}

.reader-sepia .pdf-page-play-btn,
.reader-light .pdf-page-play-btn {
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.09);
}

.pdf-page-play-btn:active {
  transform: scale(0.95);
}

.ereader-page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font: 500 10px var(--font-reading);
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.reader-sepia .ereader-page-footer,
.reader-light .ereader-page-footer {
  border-top-color: rgba(20, 25, 35, 0.06);
}

/* Themed Original PDF Page Canvas/Image View */
.pdf-original-sheet-wrap {
  position: relative;
  width: 100%;
  min-height: 380px;
  border-radius: 8px;
  overflow: hidden;
  background: #0e1320;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-page-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font-sans);
  text-align: center;
  padding: 24px;
}

.pdf-page-skeleton .spinner-mini {
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.reader-dark .pdf-original-img {
  width: 100%;
  height: auto;
  display: block;
  /* Transforms white PDF page into the app's dark navy theme while keeping crisp light text */
  filter: invert(0.925) hue-rotate(188deg) brightness(0.97) contrast(1.08);
}

.reader-sepia .pdf-original-sheet-wrap {
  background: #f4e7cd;
}

.reader-sepia .pdf-original-img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.36) brightness(0.97) contrast(1.03);
}

.reader-light .pdf-original-sheet-wrap {
  background: #ffffff;
}

.reader-light .pdf-original-img {
  width: 100%;
  height: auto;
  display: block;
}

.pdf-page-block.active-pdf-page {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 12px 35px rgba(34, 211, 238, 0.12), inset 0 0 0 1px rgba(34, 211, 238, 0.25);
}

.floating-play-here-btn {
  position: fixed;
  z-index: 39;
  right: 16px;
  bottom: 160px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 99px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(49, 46, 129, 0.94));
  color: #e0f2fe;
  font: 700 11px var(--font-ui);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 14px rgba(34, 211, 238, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Clickable Table of Contents (Sumário) rows inside Reader */
.reader-toc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: 500 14px/1.4 var(--font-reading);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.reader-toc-row:hover,
.reader-toc-row:active {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.12);
}

.reader-toc-row strong {
  font-weight: 500;
}

.reader-toc-row span {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(112, 103, 245, 0.16);
  color: var(--primary-light);
  font: 700 10px var(--font-ui);
}

/* Bottom gradient shield so book text never leaks between Mini-Player and Bottom Nav */
.reader-screen.active::after {
  content: '';
  position: fixed;
  z-index: 36;
  left: 0;
  right: 0;
  bottom: 0;
  height: 174px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0) 0%, rgba(11, 15, 25, 0.92) 34%, #080b12 62%, #080b12 100%);
}

.reader-sepia.reader-screen.active::after {
  background: linear-gradient(180deg, rgba(241, 228, 200, 0) 0%, rgba(241, 228, 200, 0.94) 34%, #f1e4c8 64%, #f1e4c8 100%);
}

.reader-light.reader-screen.active::after {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.94) 34%, #f8fafc 64%, #f8fafc 100%);
}

/* ==========================================================================
   FLOATING MINI-PLAYER (Docked Above Bottom Nav)
   ========================================================================== */
.reader-bottom,
#mini-player {
  display: none !important;
}

.mini-player {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 18px;
}

.mini-info {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.mini-cover {
  flex: 0 0 46px;
  width: 46px;
  height: 51px;
  border-radius: 8px;
}

.mini-cover .cover-type {
  inset: auto 3px 5px;
}

.mini-cover .cover-type small,
.mini-cover .cover-type span {
  display: none;
}

.mini-cover .cover-type strong {
  font-size: 7px;
}

.mini-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-copy strong {
  overflow: hidden;
  font-size: 13px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-copy small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-play {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), #4f46e5);
  color: white;
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.35);
}

.equalizer {
  height: 14px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  color: var(--cyan);
  flex-shrink: 0;
}

.equalizer i {
  width: 2.5px;
  height: 35%;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}

.equalizer.is-active i {
  animation: equalize 0.8s ease-in-out infinite alternate;
}

.equalizer.is-active i:nth-child(2) { animation-delay: -0.3s; }
.equalizer.is-active i:nth-child(3) { animation-delay: -0.6s; }
.equalizer.is-active i:nth-child(4) { animation-delay: -0.2s; }

@keyframes equalize {
  0% { height: 25%; }
  100% { height: 100%; }
}

/* ==========================================================================
   SECONDARY SCREENS: CHAPTERS & SETTINGS
   ========================================================================== */
.secondary-screen {
  padding: 32px 20px 175px;
  background: radial-gradient(circle at 90% 0%, rgba(99, 102, 241, 0.13), transparent 27%), var(--bg);
}

.simple-header h1 {
  margin: 7px 0 4px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.simple-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chapter-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  padding: 12px;
  border-radius: 18px;
}

.chapter-cover {
  flex: 0 0 55px;
  width: 55px;
  height: 70px;
  border-radius: 7px;
}

.chapter-cover .cover-type small,
.chapter-cover .cover-type span {
  display: none;
}

.chapter-cover .cover-type strong {
  font-size: 7px;
}

.chapter-progress > div:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chapter-progress small {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chapter-progress strong {
  font-family: var(--font-reading);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-progress span {
  color: var(--muted);
  font-size: 10px;
}

.chapter-progress > button {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: white;
}

.chapter-list {
  margin-top: 18px;
}

.chapter-list > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.chapter-list > button.active {
  margin: 0 -8px;
  padding: 14px 13px;
  border-radius: 13px;
  background: rgba(99, 102, 241, 0.12);
}

.chapter-number {
  width: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.chapter-list button > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chapter-list strong {
  font: 500 14px var(--font-reading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-list small {
  color: var(--muted);
  font-size: 10px;
}

.chapter-list button > svg {
  color: var(--muted-2);
  flex-shrink: 0;
}

.chapter-list button.active strong,
.chapter-list button.active > svg {
  color: #b9b4ff;
}

/* Settings */
.settings-group {
  margin-top: 26px;
}

.settings-group h2 {
  margin: 0 0 10px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.settings-card {
  padding: 4px 14px;
  border-radius: 18px;
}

.settings-card > button,
.settings-card > a.settings-row-link {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

.settings-card > button:last-child,
.settings-card > a.settings-row-link:last-child {
  border-bottom: 0;
}

.setting-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(99, 102, 241, 0.13);
  color: #a5b4fc;
}

.settings-card > button > span:nth-child(2),
.settings-card > a.settings-row-link > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-card strong {
  font-size: 13px;
  font-weight: 600;
}

.settings-card small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-card > button > svg,
.settings-card > a.settings-row-link > svg {
  color: var(--muted-2);
  flex-shrink: 0;
}

.toggle {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  border-radius: 20px;
  background: #2a3446;
  transition: 0.2s;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8993a7;
  transition: 0.2s;
}

.toggle.on {
  background: var(--primary);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.25);
}

.toggle.on::after {
  left: 19px;
  background: white;
}

.ai-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 32px;
  color: var(--muted-2);
}

.ai-note p {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 10px;
}

.ai-note strong {
  color: var(--muted);
  font-size: 11px;
}

/* ==========================================================================
   FULL PLAYER OVERLAY (PlayerSheet)
   ========================================================================== */
.player-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 17px 22px 24px;
  background: linear-gradient(180deg, #10162a, #080b12 58%);
  overflow-y: auto;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  animation: sheet-up 0.38s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.player-overlay.open {
  display: flex;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.player-ambient {
  position: absolute;
  z-index: -1;
  top: 70px;
  left: 50%;
  width: 370px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28), rgba(34, 211, 238, 0.07) 42%, transparent 70%);
  transform: translateX(-50%);
  filter: blur(18px);
  pointer-events: none;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.circle-button {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.player-header > div {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.player-header span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.player-header strong {
  font-size: 10px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-cover-wrap {
  position: relative;
  width: min(72vw, 310px);
  margin: 32px auto 25px;
  perspective: 800px;
}

.cover-glow {
  position: absolute;
  inset: 17% -7% -6%;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.65), rgba(6, 182, 212, 0.25));
  filter: blur(32px);
  opacity: 0.58;
}

.hero-cover {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: -13px 20px 38px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transform: rotateY(-3deg) rotateX(1deg);
}

.hero-cover .cover-shade {
  background: linear-gradient(180deg, rgba(5, 8, 18, 0.05), rgba(8, 9, 18, 0.2) 50%, rgba(5, 7, 14, 0.88));
}

.hero-cover .cover-type {
  inset: auto 25px 22px;
}

.hero-cover .cover-type small { font-size: 7px; }
.hero-cover .cover-type strong { font-size: 27px; }
.hero-cover .cover-type span { font-size: 7px; }

.now-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.now-meta > div {
  min-width: 0;
  flex: 1;
}

.now-meta span {
  color: var(--primary-light);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.now-meta h2 {
  margin: 5px 0 0;
  font: 500 20px var(--font-reading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-meta button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.active-caption {
  margin: 17px 0 18px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #cbd2df;
  font: italic 11px/1.6 var(--font-reading);
  text-align: center;
}

.scrubber-block {
  margin-top: 0;
}

.scrubber {
  position: relative;
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.scrubber span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.55);
  position: relative;
}

.scrubber span::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 11px;
  height: 11px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(50%, -50%);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.7);
}

.scrubber-input-overlay {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: 20px;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.player-controls {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  padding: 0 4px;
}

.player-controls > button {
  width: 36px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #a7afbf;
}

.player-controls .seek-button {
  position: relative;
  width: 45px;
  color: #e2e8f0;
}

.seek-button small {
  position: absolute;
  top: 18px;
  font-size: 6px;
  font-weight: 700;
}

.player-controls .main-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8b83ff, #5753e8);
  color: white;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.1), 0 0 35px rgba(99, 102, 241, 0.45);
}

.quick-scroll {
  display: flex;
  gap: 7px;
  margin: 4px -22px 0;
  padding: 0 22px 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-scroll::-webkit-scrollbar {
  display: none;
}

.quick-scroll button {
  flex: none;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

.quick-scroll button.active {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}

.quick-scroll .voice-chip {
  color: #cbd5e1;
}

.voice-chip .voice-chip-avatar {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b45309, #f59e0b);
  color: white;
  font-size: 7px;
  font-weight: 700;
}

.up-next {
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.up-next > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.up-next small {
  color: var(--muted);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.up-next strong {
  font: 500 10px var(--font-reading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-next svg {
  color: var(--muted);
  flex-shrink: 0;
}

/* ==========================================================================
   MODAL SHEETS (Auth, Voice Picker, Chapter Picker, Sleep Timer, Export)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  background: rgba(6, 9, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}



.modal-backdrop.center-modal {
  align-items: center;
  padding: 18px;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 84vh;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  padding: 20px 20px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.input-field-dark {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
}

.btn-primary-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.auth-tab-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 16px;
}

.auth-tab-pill {
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-tab-pill.active {
  background: var(--primary);
  color: white;
}

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

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}

.auth-alert-box {
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

@media (min-width: 600px) {
  .app-stage { padding: 24px 0; }
  .phone-shell {
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 32px;
  }
  .screen { min-height: calc(100vh - 48px); }
  .player-overlay {
    top: 24px;
    bottom: 24px;
    min-height: calc(100vh - 48px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ==========================================================================
   UX ENHANCEMENTS: Upload Progress, Zen Mode, Widths, Empty State & Previews
   ========================================================================== */

/* 1. Upload Progress Overlay */
.upload-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 8, 14, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-progress-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(26, 28, 44, 0.95), rgba(15, 17, 28, 0.98));
  border: 1px solid rgba(112, 103, 245, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(112, 103, 245, 0.2);
  border-radius: 24px;
  padding: 24px;
}

.upload-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.upload-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(112, 103, 245, 0.18);
  border: 1px solid rgba(155, 148, 255, 0.3);
  display: grid;
  place-items: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.upload-file-info {
  flex: 1;
  min-width: 0;
}

.upload-file-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-file-info span {
  display: block;
  font-size: 12px;
  color: var(--cyan);
  margin-top: 2px;
  font-weight: 500;
}

.upload-pct-badge {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  font-variant-numeric: tabular-nums;
}

.upload-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7067f5, #22d3ee, #a855f7);
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width 0.2s ease-out;
  animation: shimmerGradient 2s infinite linear;
}

@keyframes shimmerGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* 2. Drag & Drop Global Overlay */
.library-drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(112, 103, 245, 0.25);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.drag-overlay-box {
  background: rgba(17, 19, 31, 0.94);
  border: 2px dashed rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.3);
  border-radius: 28px;
  padding: 40px 32px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.drag-icon-halo {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  display: grid;
  place-items: center;
  animation: pulseHalo 1.8s infinite ease-in-out;
}

@keyframes pulseHalo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 24px 6px rgba(34, 211, 238, 0.2); }
}

.drag-overlay-box h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.drag-overlay-box p {
  font-size: 13px;
  color: var(--muted);
}

/* 3. Empty Library State */
.empty-library-card {
  text-align: center;
  padding: 42px 24px 36px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 12px 0 24px;
}

.empty-icon-halo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(112, 103, 245, 0.22), rgba(34, 211, 238, 0.14));
  border: 1px solid rgba(155, 148, 255, 0.35);
  display: grid;
  place-items: center;
  color: var(--primary-light);
}

.empty-library-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.empty-library-card p {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  margin: 0 auto 22px;
  line-height: 1.5;
}

.empty-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

/* 4. Column Width Controls */
.btn-width-choice {
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-width-choice.active {
  background: rgba(112, 103, 245, 0.3) !important;
  border-color: rgba(155, 148, 255, 0.5) !important;
  color: #fff !important;
  font-weight: 700;
}

.reader-width-narrow .reading-area {
  max-width: 520px !important;
}

.reader-width-normal .reading-area {
  max-width: 680px !important;
}

.reader-width-wide .reading-area {
  max-width: 880px !important;
}

/* 5. Zen Mode (Full-screen immersion) */
.reader-screen.zen-mode .reader-header,
.reader-screen.zen-mode .mini-player,
.reader-screen.zen-mode .phone-nav,
.reader-screen.zen-mode .app-dock {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-24px) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reader-screen.zen-mode .reading-area {
  padding-top: 48px;
}

.btn-exit-zen {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 17, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.btn-exit-zen:hover {
  background: rgba(112, 103, 245, 0.85);
  transform: translateY(-1px);
}

/* 6. Inline Voice Preview Button */
.btn-voice-preview {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-voice-preview:hover {
  background: rgba(112, 103, 245, 0.28);
  border-color: rgba(155, 148, 255, 0.45);
  color: #fff;
  transform: scale(1.06);
}

.btn-voice-preview.is-playing {
  background: var(--cyan);
  color: #0b0f19;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}

/* 7. Keyboard Feedback Toast */
.keyboard-hint-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(15, 17, 28, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 99px;
  z-index: 9990;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.keyboard-hint-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   CLEAN EDITORIAL E-READER & SYNCHRONIZED KARAOKE HIGHLIGHT
   ========================================================================== */

.pdf-page-block {
  padding: 0;
  margin: 0 0 28px;
  background: transparent;
}

.pdf-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin: 0 0 16px 0;
  background: rgba(14, 18, 28, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.reader-light .pdf-page-bar {
  background: rgba(240, 243, 248, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.reader-sepia .pdf-page-bar {
  background: rgba(238, 222, 192, 0.9);
  border-bottom-color: rgba(100, 80, 50, 0.1);
}

/* 2. Focused Reading & Karaoke-Style Highlight (Theme Accent) */
.reading-area.audio-reading-active .sentence-item {
  opacity: 0.42;
  transition: opacity 0.22s ease;
}

.reading-area.audio-reading-active .sentence-item.active-speaking,
.reading-area.audio-reading-active .sentence-item.karaoke-highlight {
  opacity: 1 !important;
}

/* Karaoke-style active sentence highlight matching current theme */
.karaoke-highlight,
.sentence-item.karaoke-highlight,
.sentence-item.active-speaking {
  background: rgba(112, 103, 245, 0.3) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 1px 4px !important;
  box-shadow: 0 0 16px rgba(112, 103, 245, 0.4) !important;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.reader-light .karaoke-highlight,
.reader-light .sentence-item.karaoke-highlight,
.reader-light .sentence-item.active-speaking {
  background: rgba(112, 103, 245, 0.2) !important;
  color: #1e1b4b !important;
  box-shadow: 0 0 10px rgba(112, 103, 245, 0.25) !important;
}

.reader-sepia .karaoke-highlight,
.reader-sepia .sentence-item.karaoke-highlight,
.reader-sepia .sentence-item.active-speaking {
  background: rgba(180, 83, 9, 0.26) !important;
  color: #443b2e !important;
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.22) !important;
}

/* Word highlight pill in dark mode */
.reader-dark .word-item.active-word {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
  border-radius: 5px !important;
  padding: 1px 5px !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2) !important;
  font-weight: 600 !important;
}

/* Word highlight marker in light/sepia mode */
.reader-light .word-item.active-word,
.reader-sepia .word-item.active-word {
  background: #fef08a !important;
  color: #1e1b4b !important;
  border-radius: 4px !important;
  padding: 1px 4px !important;
  box-shadow: 0 1px 4px rgba(234, 179, 8, 0.22) !important;
  font-weight: 600 !important;
}

/* 3. Audio Synchronization Toast Banner */
.audio-sync-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 99px;
  background: rgba(14, 19, 32, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(34, 211, 238, 0.4);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(34, 211, 238, 0.25);
  color: #f0f6fc;
  font: 600 12px var(--font-ui);
  letter-spacing: 0.01em;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-sync-toast .sync-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(34, 211, 238, 0.25);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}



/* 5. Immersive Audio Dock (Inspired by Photos 1 & 2) */
.immersive-audio-dock {
  position: fixed !important;
  bottom: 74px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 24px) !important;
  max-width: 480px !important;
  border-radius: 24px !important;
  padding: 10px 16px 12px !important;
  z-index: 97 !important;
  background: rgba(15, 20, 32, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: transform 0.25s ease, opacity 0.25s ease !important;
}

.reader-light .immersive-audio-dock {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12);
}

.reader-sepia .immersive-audio-dock {
  background: rgba(246, 235, 213, 0.94);
  border: 1px solid rgba(120, 95, 60, 0.16);
  box-shadow: 0 14px 38px rgba(80, 60, 35, 0.16);
}

/* Fine Scrubber Track */
.dock-scrubber-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 0 6px;
}

.reader-light .dock-scrubber-track,
.reader-sepia .dock-scrubber-track {
  background: rgba(0, 0, 0, 0.1);
}

.dock-scrubber-fill {
  height: 100%;
  border-radius: 99px;
  background: #ffffff;
  transition: width 0.1s linear;
}

.reader-light .dock-scrubber-fill,
.reader-sepia .dock-scrubber-fill {
  background: #1e1b4b;
}

.dock-scrubber-input {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* Centered remaining time row */
.dock-time-row {
  text-align: center;
  font: 500 11px var(--font-ui);
  color: var(--muted);
  margin-bottom: 6px;
}

/* Main Controls Row */
.dock-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  margin-bottom: 8px;
}

.dock-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dock-icon-btn:active {
  transform: scale(0.92);
}

.dock-seek-btn {
  position: relative;
}

.dock-seek-btn .dock-btn-label {
  position: absolute;
  font-size: 8.5px;
  font-weight: 800;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
}

.dock-mini-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  color: var(--cyan);
}

/* Central Circular Main Play/Pause Button */
.dock-main-play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 18px rgba(112, 103, 245, 0.45);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.dock-main-play-btn:active {
  transform: scale(0.93);
}

.dock-speed-btn {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 700 12px var(--font-ui);
  cursor: pointer;
  transition: background 0.15s ease;
}

.dock-speed-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Footer Row: Audio Effects + Central Voice Pill + Chapters */
.dock-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reader-light .dock-footer-row,
.reader-sepia .dock-footer-row {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.dock-footer-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
}

.dock-footer-icon-btn:hover {
  color: var(--text);
}

.dock-voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font: 600 12px var(--font-ui);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.reader-light .dock-voice-pill,
.reader-sepia .dock-voice-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.dock-voice-pill:active {
  transform: scale(0.96);
}

.dock-voice-avatar-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #818cf8, #38bdf8);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.5);
}

/* ==========================================================================
   MEDIUM BUTTONS (User Preference #1)
   ========================================================================== */
.btn-medium {
  padding: 8px 14px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

/* ==========================================================================
   FRIENDLY EMPTY STATE FOR LIBRARY (User Preference #4)
   ========================================================================== */
.empty-library-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-top: 10px;
}

.empty-icon-halo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(112, 103, 245, 0.14);
  color: var(--primary-light);
  margin-bottom: 20px;
  box-shadow: 0 0 25px rgba(112, 103, 245, 0.22);
}

.empty-icon-halo img,
.empty-icon-halo svg {
  width: 40px;
  height: 40px;
  color: var(--primary-light);
}

.empty-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   SMART ONBOARDING CONFIRMATION MODAL & KINDLE-GRADE READER EXPERIENCE
   ========================================================================== */
.smart-onboarding-card {
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.kindle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(112, 103, 245, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(112, 103, 245, 0.3);
  padding: 3px 10px;
  border-radius: 99px;
  font: 600 11px var(--font-ui);
  letter-spacing: 0.04em;
}

.onboarding-cover-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  background: #111624;
}

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

.onboarding-cover-thumb:hover {
  transform: translateY(-2px);
}

.onboarding-cover-thumb.active-cover {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(112, 103, 245, 0.6);
  transform: scale(1.05);
}

.onboarding-cover-thumb .active-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Kindle-grade E-Reader Layout */
.reading-area {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.pdf-page-block {
  padding: 0 !important;
  margin: 0 0 24px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.reading-area p,
.reading-area p.reader-paragraph {
  margin: 0 0 4px;
  padding: 2px 4px;
  border-left: 2.5px solid transparent;
  border-radius: 4px;
  font-family: var(--font-reading);
  font-size: 16px;
  line-height: 1.82;
  text-align: justify;
  text-justify: inter-word;
  text-indent: 1.6em;
  hyphens: auto;
  -webkit-hyphens: auto;
  transition: background 0.18s ease;
}

/* Kindle standard rule: No indent on the first paragraph after a chapter title or section */
.pdf-page-block h1 + p,
.pdf-page-block .ereader-subtitle + p,
.pdf-page-block p.first-paragraph,
.pdf-page-block p:first-of-type {
  text-indent: 0 !important;
}

