
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #102c3a;
  --navy: #17365d;
  --teal: #1f857e;
  --gold: #e8aa37;
  --coral: #e8654f;
  --cream: #fbf7ee;
  --paper: #fffdf8;
  --line: #dfd8c9;
  --muted: #687b82;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Poppins', Arial, sans-serif;
}
button,
a,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  text-decoration: none;
  color: inherit;
}
.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  border-bottom: 1px solid #102c3a1c;
  position: sticky;
  top: 0;
  background: #fffdf8f2;
  backdrop-filter: blur(14px);
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 800;
  letter-spacing: -2px;
}
.brand-logo {
  width: 200px;
  height: 76px;
  flex: 0 0 auto;
  object-fit: contain;
}
.site-header .brand > span,
.footer-brand > span {
  display: none;
}
.brand strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 17px;
}
.brand small {
  display: block;
  color: #6a7a80;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 3px;
}
.site-header nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}
.site-header nav button,
.footer button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}
.site-header nav a:hover,
.site-header nav button:hover {
  color: var(--coral);
}
.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.admin-link {
  border: 1px solid #c9d0d2;
  background: white;
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--navy);
  font-weight: 800;
}
.cart-button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 11px 15px;
  border-radius: 999px;
  font-weight: 800;
}
.cart-button span {
  display: inline-grid;
  place-items: center;
  background: var(--gold);
  color: var(--navy);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-left: 6px;
}
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  background: linear-gradient(115deg, #fffdf8, #fff7e8 55%, #eaf4ef);
  overflow: hidden;
}
.hero-copy {
  padding: 82px 5vw 55px 7vw;
  align-self: center;
}
.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 900;
  color: var(--coral);
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(50px, 5.3vw, 78px);
  line-height: 1.02;
  letter-spacing: -2.5px;
  margin: 0;
}
.hero h1 em {
  color: var(--teal);
  font-weight: 400;
}
.hero-lead {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.65;
  color: #52666d;
  max-width: 650px;
  margin: 27px 0 32px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.primary-action {
  display: inline-block;
  border: 0;
  background: var(--coral);
  color: #fff;
  border-radius: 8px;
  padding: 15px 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px #e8654f33;
}
.text-action {
  border: 0;
  background: none;
  font-weight: 900;
  color: var(--navy);
}
.text-action span {
  color: var(--coral);
  font-size: 19px;
}
.access-card {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.access-card strong {
  font-family: Georgia, serif;
  font-size: 23px;
  color: var(--navy);
}
.access-card span {
  font-size: 12px;
}
.access-card i {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 12px;
}
.hero-visual {
  position: relative;
  min-height: 620px;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-visual:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff7e880, transparent 25%);
}
.floating-note {
  position: absolute;
  left: 7%;
  bottom: 8%;
  z-index: 2;
  background: #fff;
  padding: 18px 22px;
  border-left: 5px solid var(--gold);
  box-shadow: 0 14px 36px #102c3a2e;
}
.floating-note b,
.floating-note span {
  display: block;
}
.floating-note b {
  font-family: Georgia, serif;
  font-size: 19px;
}
.floating-note span {
  font-size: 11px;
  color: #6b777b;
  margin-top: 5px;
}
.promise-strip {
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 23px;
  padding: 17px 4vw;
  font-weight: 800;
  font-size: 13px;
}
.promise-strip i {
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
}
.section {
  padding: 92px 7vw;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 50px;
  margin-bottom: 34px;
}
.section-heading h2,
.how h2,
.security h2,
.final-cta h2 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -1.4px;
}
.section-heading > p {
  max-width: 420px;
  color: #c4d0d5;
  line-height: 1.7;
}
.price-seal {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #e8aa3724;
  border: 1px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(4deg);
}
.price-seal strong {
  font-family: Georgia, serif;
  font-size: 37px;
  color: var(--navy);
}
.price-seal span {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 900;
  color: #6c7476;
}
.category-tabs {
  display: flex;
  gap: 9px;
  overflow: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
}
.category-tabs button {
  border: 1px solid #d7d0c1;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  white-space: nowrap;
  color: #53666d;
  font-weight: 800;
}
.category-tabs button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.book-card {
  background: #fff;
  border: 1px solid #e6dfd1;
  border-radius: 18px;
  overflow: hidden;
  transition: 0.22s transform, 0.22s box-shadow;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px #102c3a1c;
}
.book-cover {
  border: 0;
  width: 100%;
  height: 260px;
  text-align: left;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.book-cover:after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid #ffffff3d;
  border-radius: 50%;
  right: -62px;
  bottom: -62px;
}
.navy {
  background: #17365d !important;
}
.coral {
  background: #bf5647 !important;
}
.teal {
  background: #1b7772 !important;
}
.gold {
  background: #b77a18 !important;
}
.plum {
  background: #6f4d67 !important;
}
.sage {
  background: #667d61 !important;
}
.clay {
  background: #9b6654 !important;
}
.blue {
  background: #3e6686 !important;
}
.book-series {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.78;
}
.book-cover strong {
  font-family: Georgia, serif;
  font-size: 27px;
  line-height: 1.12;
  margin: auto 0 16px;
  max-width: 210px;
  z-index: 1;
}
.cover-line {
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 11px;
}
.book-cover small {
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.preview-corner {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #ffffffed;
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  padding: 7px 9px;
  border-radius: 99px;
}
.tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--coral);
  font-weight: 900;
}
.book-info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.book-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 6px 0 5px;
  line-height: 1.3;
  color: var(--ink);
}
.book-info > p {
  color: #6a787d;
  font-size: 12px;
  line-height: 1.55;
  min-height: 48px;
  flex: 1;
}
.access-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  border-top: 1px solid #eee7da;
  padding-top: 11px;
  margin-top: 8px;
}
.book-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 14px;
  gap: 8px;
}
.book-bottom small,
.book-bottom strong {
  display: block;
}
.book-bottom small {
  font-size: 9px;
  color: #8b979a;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.book-bottom strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 2px;
}
.book-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.book-actions button {
  border: 1px solid var(--navy);
  color: var(--navy);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}
.book-actions .buy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.how {
  background: var(--navy);
  color: #fff;
}
.eyebrow.light {
  color: #ffca62;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #ffffff21;
}
.steps article {
  background: var(--navy);
  padding: 33px 28px;
}
.steps span {
  color: #ffca62;
  font-family: Georgia, serif;
  font-size: 22px;
}
.steps h3 {
  font-family: Georgia, serif;
  font-size: 23px;
  margin: 25px 0 10px;
}
.steps p {
  color: #bdcbd1;
  font-size: 13px;
  line-height: 1.65;
}
.security {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: center;
  background: #f4eee3;
}
.security > div > p:not(.eyebrow) {
  color: #64767d;
  line-height: 1.8;
}
.security-demo {
  position: relative;
  background: #fff;
  min-height: 280px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px #17365d17;
  overflow: hidden;
}
.security-demo > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  font-weight: 900;
}
.security-demo > strong {
  font-family: Georgia, serif;
  font-size: 26px;
  margin: 12px 0;
  line-height: 1.3;
}
.security-demo > small {
  color: #7c898d;
  line-height: 1.5;
}
.final-cta {
  padding: 58px 7vw;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}
.final-cta .eyebrow {
  color: var(--navy);
}
.primary-action.dark {
  background: var(--navy);
  box-shadow: none;
  white-space: nowrap;
}
footer {
  padding: 42px 7vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
}
footer > p {
  color: #758287;
  font-size: 12px;
}
footer > div {
  display: flex;
  gap: 22px;
  font-weight: 800;
  font-size: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0a1b24a8;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}
.side-panel {
  width: min(500px, 100%);
  height: 100%;
  background: var(--paper);
  padding: 32px;
  overflow: auto;
  box-shadow: -20px 0 60px #0003;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.panel-head h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  margin: 0;
}
.panel-head > button {
  border: 0;
  background: #eee5d6;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
}
.cart-list > div {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-list > div > button {
  grid-column: 2;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--coral);
  font-size: 10px;
}
.mini-cover {
  display: block;
  width: 40px;
  height: 54px;
  border-radius: 4px;
  background: var(--navy);
}
.cart-list strong,
.cart-list small {
  display: block;
}
.cart-list small {
  color: #758287;
  margin-top: 4px;
  font-size: 11px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  padding: 24px 0;
}
.checkout {
  width: 100%;
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 15px;
  border-radius: 8px;
  font-weight: 900;
}
.panel-note {
  font-size: 11px;
  text-align: center;
  line-height: 1.55;
  color: #7c898d;
  margin-top: 14px;
}
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state > span {
  display: grid;
  place-items: center;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
}
.empty-state h3 {
  font-family: Georgia, serif;
  font-size: 24px;
}
.empty-state button {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 12px 17px;
  border-radius: 7px;
  font-weight: 900;
}
.library-summary {
  padding: 20px;
  background: #e8aa3721;
  margin: 22px 0;
  border-left: 4px solid var(--gold);
}
.library-summary strong,
.library-summary span {
  display: block;
}
.library-summary span {
  font-size: 11px;
  color: #6e7a7e;
  margin-top: 5px;
}
.library-book {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 14px;
  background: #fff;
}
.book-row {
  display: flex;
  gap: 14px;
}
.book-row small {
  color: var(--teal);
  font-weight: 900;
  font-size: 9px;
  letter-spacing: 1px;
}
.book-row h3 {
  font-family: Georgia, serif;
  margin: 5px 0;
}
.book-row p {
  font-size: 11px;
  color: #7b898d;
}
.validity {
  margin: 20px 0;
}
.validity span,
.validity strong,
.validity small {
  display: block;
}
.validity span {
  font-size: 10px;
  color: #849195;
}
.validity strong {
  font-size: 13px;
  margin: 5px 0;
}
.validity progress {
  width: 100%;
  height: 7px;
  accent-color: var(--teal);
}
.validity small {
  text-align: right;
  color: #839095;
  font-size: 9px;
  margin-top: 4px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 35px #0003;
  font-size: 13px;
  font-weight: 800;
}
.admin-backdrop {
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.admin-console {
  background: var(--paper);
  width: min(1180px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 18px;
  padding: 28px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}
.admin-stats article {
  background: #f2ecdf;
  padding: 18px;
  border-radius: 10px;
}
.admin-stats span,
.admin-stats strong {
  display: block;
}
.admin-stats span {
  font-size: 10px;
  color: #748287;
  text-transform: uppercase;
}
.admin-stats strong {
  font-family: Georgia, serif;
  font-size: 29px;
  margin-top: 5px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}
.admin-form,
.admin-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  background: #fff;
}
.admin-form h3,
.admin-list h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  margin-top: 0;
}
.admin-form label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #617177;
  margin-bottom: 14px;
}
.admin-form input,
.admin-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px;
  border: 1px solid #d8d2c6;
  border-radius: 6px;
  background: #fff;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upload-box {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border: 1px dashed #91a0a4;
  background: #f8f6f0;
  color: var(--teal);
  border-radius: 7px;
  font-size: 11px;
}
.admin-list-head {
  display: flex;
  justify-content: space-between;
}
.admin-list-head button {
  border: 0;
  background: none;
  color: var(--teal);
  font-weight: 800;
}
.admin-list article {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee8dc;
}
.admin-list article > div strong,
.admin-list article > div small {
  display: block;
}
.admin-list article > div small {
  color: #78878b;
  font-size: 10px;
  margin-top: 4px;
}
.admin-list article > b {
  color: var(--teal);
  font-size: 9px;
  text-transform: uppercase;
}
.admin-list article > button {
  border: 0;
  background: none;
  font-size: 20px;
}
.reader-shell {
  position: fixed;
  inset: 0;
  background: #ebe6dc;
  z-index: 90;
  display: grid;
  grid-template-rows: 72px 1fr auto;
  user-select: none;
  -webkit-user-select: none;
  height: 100dvh;
}
.reader-shell > header {
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
}
.reader-shell > header > button {
  justify-self: start;
  border: 1px solid #ffffff4d;
  color: #fff;
  background: transparent;
  padding: 10px 13px;
  border-radius: 7px;
}
.reader-shell > header > div:nth-child(2) {
  text-align: center;
}
.reader-shell > header strong,
.reader-shell > header span {
  display: block;
}
.reader-shell > header span {
  font-size: 9px;
  opacity: 0.72;
  margin-top: 3px;
}
.reader-badges {
  justify-self: end;
  display: flex !important;
  gap: 6px;
}
.reader-badges span {
  border: 1px solid #ffffff42;
  padding: 6px 8px;
  border-radius: 99px;
}
.reader-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}
/* make the content side stretch full height in preview reader */
.reader-body > .preview-content-area {
  min-height: 0;
  height: 100%;
}
.reader-body > aside {
  background: #fff;
  padding: 20px 14px;
  overflow: auto;
  border-right: 1px solid var(--line);
}
.reader-body > aside > p {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #8a9699;
  margin: 0 12px 14px;
}
/* reader sidebar buttons — controlled by .toc-btn / .toc-full-btn classes */
.reader-body > aside button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 11px 12px;
  border-radius: 7px;
  color: #53666d;
  font-size: 12px;
  cursor: pointer;
}
.reader-body > aside button.active {
  background: #17365d14;
  color: var(--navy);
  font-weight: 700;
}
.reader-body > aside button:disabled {
  opacity: 0.45;
}
/* DO NOT override span/b here — .toc-btn span/.toc-btn b handle sizing */
.reader-page {
  position: relative;
  overflow: auto;
  width: min(720px, calc(100% - 40px));
  margin: 22px auto;
  background: #fff;
  padding: 44px 52px;
  box-shadow: 0 8px 28px #17365d1f;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 1.75;
}

/* ── Preview content area (3-min reader — full iframe fill) ── */
.preview-content-area {
  position: relative;
  min-height: 0;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.preview-content-area #previewBookHolder {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}
.preview-expired-message {
  display: flex;
  height: 100%;
  padding: 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  background: #f8f3e9;
  color: #687a81;
}
.preview-expired-message strong {
  color: var(--navy);
  font-size: 18px;
}
.preview-expired-message span {
  font-size: 13px;
}
.preview-content-area #previewBookHolder iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 64px);
  border: none;
  display: block;
}
/* transition for blur paywall */
.preview-content-area {
  transition: filter .4s ease;
}
.reader-page h1 {
  font-family: Georgia, serif;
  font-size: 43px;
  line-height: 1.1;
  margin: 0 0 20px;
}
.reader-intro {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.6;
  color: #52666d;
}
.reader-page > p:not(.eyebrow):not(.reader-intro) {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  color: #3f555e;
}
.reader-page ol {
  list-style: none;
  padding: 15px 0;
}
.reader-page li {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: Georgia, serif;
  font-size: 17px;
}
.reader-page li span {
  color: var(--coral);
}
.reader-page li b {
  font-family: Arial;
  font-size: 11px;
  color: #8a979a;
}
.reader-page blockquote {
  margin: 28px 0;
  padding: 23px;
  border-left: 4px solid var(--gold);
  background: #fbf4e5;
  font-family: Georgia, serif;
  font-size: 21px;
  line-height: 1.55;
}
.reader-page h2 {
  font-family: Georgia, serif;
  font-size: 27px;
  margin-top: 30px;
}
.reader-paywall {
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px #17365d14;
}
.reader-paywall strong,
.reader-paywall span {
  display: block;
}
.reader-paywall span {
  font-size: 10px;
  color: #6f7d82;
  margin-top: 3px;
}
.reader-paywall button {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 13px 18px;
  border-radius: 7px;
  font-weight: 900;
}
@media (max-width: 1050px) {
  .site-header nav {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    min-height: 520px;
  }
  /* book-grid is now auto-fill — no override needed at 1050px */
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .security {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .reader-body {
    grid-template-columns: 200px 1fr;
  }
  .reader-page {
    padding: 36px 32px;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}
@media (max-width: 650px) {
  .site-header {
    height: 72px;
    padding: 0 16px;
  }
  .brand strong {
    font-size: 13px;
  }
  .brand small {
    font-size: 7px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .brand-logo {
    width: 150px;
    height: 58px;
  }
  .admin-link {
    display: none;
  }
  .cart-button {
    font-size: 11px;
  }
  .hero-copy {
    padding: 55px 23px 42px;
  }
  .hero h1 {
    font-size: 47px;
  }
  .hero-lead {
    font-size: 17px;
  }
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }
  .access-card {
    flex-wrap: wrap;
  }
  .hero-visual {
    min-height: 390px;
  }
  .promise-strip {
    justify-content: flex-start;
    overflow: auto;
    white-space: nowrap;
  }
  .section {
    padding: 68px 23px;
  }
  .section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .price-seal {
    margin-top: 25px;
    width: 110px;
    height: 110px;
  }
  .book-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .book-cover {
    height: 220px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .final-cta {
    display: block;
    padding: 45px 23px;
  }
  .final-cta .primary-action {
    margin-top: 23px;
  }
  footer {
    padding: 36px 23px;
    align-items: flex-start;
    flex-direction: column;
  }
  .side-panel {
    padding: 23px;
  }
  .admin-backdrop {
    padding: 0;
  }
  .admin-console {
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 22px;
  }
  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
  .admin-stats article:last-child {
    grid-column: 1/-1;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .reader-shell {
    grid-template-rows: 64px 1fr auto;
  }
  .reader-shell > header {
    grid-template-columns: auto 1fr;
    padding: 0 12px;
  }
  .reader-shell > header > div:nth-child(2) {
    text-align: right;
  }
  .reader-badges {
    display: flex !important;
    gap: 4px;
  }
  .reader-badges span:not(.reader-timer-count) {
    display: none !important;
  }
  .reader-timer-count {
    font-size: 14px !important;
    padding: 6px 10px !important;
  }
  .reader-body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    min-height: 0;
  }
  .reader-body > aside {
    display: flex;
    gap: 5px;
    overflow: auto;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    border: 0;
  }
  .preview-content-area,
  #previewBookHolder {
    min-height: 0;
    /* Use explicit dvh so height doesn't collapse inside grid 1fr row */
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
    overflow: hidden;
  }
  .reader-body > aside > p {
    display: none;
  }
  .reader-body > aside button {
    min-width: 140px;
  }
  .reader-page {
    width: calc(100% - 24px);
    margin: 12px;
    padding: 35px 24px;
  }
  .reader-page h1 {
    font-size: 35px;
  }
  .reader-paywall {
    gap: 10px;
    justify-content: space-between;
  }
  .reader-paywall div {
    display: none;
  }
  .reader-paywall button {
    width: 100%;
  }
}
.offer-strip {
  background: #e8aa37;
  color: var(--navy);
  padding: 13px 7vw;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
}
.offer-strip div b,
.offer-strip div span {
  display: block;
}
.offer-strip div b {
  font-size: 11px;
  letter-spacing: 1.5px;
}
.offer-strip div span {
  font-family: Georgia, serif;
  font-size: 15px;
  margin-top: 2px;
}
.offer-strip > strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1.2px;
  background: #17365d;
  color: #fff;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
}
.offer-strip > a {
  font-size: 12px;
  font-weight: 900;
}
.strike-price {
  text-decoration: line-through;
  color: #9a7e58 !important;
  font-size: 17px !important;
}
.price-seal del {
  font-size: 15px;
  color: #8a7770;
}
.card-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sale-tag {
  background: #e8aa372b;
  color: #98700e;
  padding: 5px 7px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.7px;
}
.mini-timer {
  margin-top: 11px;
  background: #fff6df;
  padding: 7px 8px;
  border-radius: 5px;
  color: #8c6812;
  font-size: 8px;
}
.mini-timer strong {
  font-variant-numeric: tabular-nums;
}
.price-stack small del {
  font-size: 11px;
}
.price-stack em {
  display: block;
  font-style: normal;
  color: var(--coral);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 2px;
}
.cart-offer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 4px;
  padding: 12px;
  background: #fff1cb;
  border-radius: 7px;
  color: #7e5a06;
  font-size: 10px;
}
.cart-offer strong {
  font-variant-numeric: tabular-nums;
}
.savings-row {
  display: flex;
  justify-content: space-between;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  padding-top: 18px;
}
.stat-time {
  font-size: 18px !important;
  font-variant-numeric: tabular-nums;
}
.form-help {
  font-size: 11px;
  line-height: 1.55;
  color: #7a888d;
  margin-top: -8px;
}
.import-success {
  background: #e8f4ef;
  border: 1px solid #a5cfc1;
  padding: 13px;
  border-radius: 7px;
  margin: -5px 0 14px;
}
.import-success b,
.import-success span {
  display: block;
}
.import-success b {
  color: var(--teal);
  font-size: 11px;
}
.import-success span {
  font-size: 10px;
  color: #65777d;
  margin: 4px 0 8px;
}
.import-success button {
  border: 0;
  background: none;
  color: var(--navy);
  padding: 0;
  font-size: 10px;
  font-weight: 900;
  text-decoration: underline;
}
.index-warning {
  background: #fff1e9;
  border: 1px solid #e9a68e;
  border-left: 5px solid var(--coral);
  padding: 13px;
  border-radius: 7px;
  margin: -5px 0 14px;
}
.index-warning b,
.index-warning span {
  display: block;
}
.index-warning b {
  color: #a63e2c;
  font-size: 11px;
}
.index-warning span {
  font-size: 10px;
  color: #765f59;
  line-height: 1.55;
  margin-top: 5px;
}
.pricing-box {
  background: #faf5e9;
  border: 1px solid #e4dac4;
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0;
}
.pricing-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: start;
}
.pricing-head h4 {
  font-family: Georgia, serif;
  font-size: 19px;
  margin: 0;
}
.pricing-head p {
  font-size: 9px;
  color: #7e8a8e;
  margin: 4px 0 14px;
}
.switch {
  display: flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.switch input {
  display: none;
}
.switch span {
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: var(--teal);
  position: relative;
}
.switch span:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  right: 3px;
  top: 3px;
}
.offer-preview {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5dcc9;
  padding: 12px;
  border-radius: 7px;
}
.offer-preview small {
  grid-column: 1/-1;
  font-size: 8px;
  letter-spacing: 1px;
  color: #899397;
}
.offer-preview del {
  color: #8a7770;
}
.offer-preview > strong {
  font-size: 24px;
  color: var(--navy);
}
.offer-preview > span {
  font-size: 9px;
  color: var(--coral);
  font-weight: 900;
}
.offer-preview > b {
  grid-column: 1/-1;
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 7px;
  border-radius: 5px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 650px) {
  .offer-strip {
    grid-template-columns: 1fr auto;
    padding: 11px 18px;
  }
  .offer-strip > a {
    display: none;
  }
  .offer-strip div span {
    font-size: 12px;
  }
  .offer-strip > strong {
    font-size: 10px;
  }
  .pricing-head {
    display: block;
  }
  .switch {
    margin-bottom: 12px !important;
  }
  .offer-preview {
    grid-template-columns: auto auto 1fr;
  }
}
.parent-bar {
  height: 34px;
  background: #0f2d3c;
  color: #d7e2e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  font-size: 11px;
  letter-spacing: 0.25px;
}
.parent-bar a {
  color: #ffca62;
  font-weight: 900;
}
.site-header {
  height: 90px;
}
.site-header .brand strong {
  font-size: 20px;
}
.site-header .brand small {
  font-size: 11px;
  letter-spacing: 1.15px;
}
.site-header nav {
  font-size: 15px;
}
.xschools-link {
  color: var(--teal);
  font-weight: 900;
}
.xschools-link:after {
  content: " ↗";
  font-size: 11px;
}
.site-header .admin-link,
.site-header .cart-button {
  font-size: 14px;
}
@media (max-width: 650px) {
  .parent-bar {
    height: 30px;
    padding: 0 16px;
    font-size: 9px;
  }
  .parent-bar span {
    display: none;
  }
  .parent-bar {
    justify-content: flex-end;
  }
  .site-header {
    height: 78px;
  }
  .site-header .brand strong {
    font-size: 15px;
  }
  .site-header .brand small {
    font-size: 8px;
    max-width: 190px;
  }
  .site-header .cart-button {
    font-size: 12px;
  }
}
.visitor-link {
  border: 1px solid var(--teal);
  background: #fff;
  color: var(--teal);
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 900;
}
.file-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.admin-form label:has(.file-input) {
  cursor: pointer;
}
.selected-file {
  font-size: 10px;
  color: var(--navy);
  background: #edf5f2;
  padding: 9px;
  border-radius: 6px;
  margin-top: -8px;
}
.switch input:not(:checked) + span {
  background: #aeb8bb;
}
.switch input:not(:checked) + span:after {
  right: 17px;
}
.switch span {
  transition: 0.2s background;
}
.switch span:after {
  transition: 0.2s right;
}
.admin-form input:disabled,
.admin-form select:disabled {
  opacity: 0.55;
  background: #eee;
}
.offer-paused {
  padding: 14px;
  background: #eee;
  color: #68777c;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}
.centered-backdrop {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.account-modal,
.support-modal {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--paper);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 80px #0005;
}
.account-intro {
  color: #687a81;
  line-height: 1.6;
  font-size: 13px;
}
.account-modal form > label,
.support-form label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: #617177;
  margin: 15px 0;
}
.account-modal input,
.support-form input,
.support-form select,
.support-form textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #d7d1c6;
  background: #fff;
  border-radius: 7px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 65px;
}
.password-field button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #e9f2ef;
  color: var(--teal);
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
}
.login-options {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 15px 0 20px;
  font-size: 10px;
}
.login-options label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
}
.login-options label input {
  width: auto;
  margin: 0;
}
.login-options button,
.login-help button,
.support-shortcut {
  border: 0;
  background: none;
  color: var(--teal);
  font-weight: 900;
  font-size: 10px;
}
.login-help {
  text-align: center;
  padding: 17px 0 10px;
  font-size: 11px;
}
.login-help button {
  text-decoration: underline;
}
.support-shortcut {
  display: block;
  margin: auto;
}
.support-modal {
  width: min(850px, 100%);
}
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.support-grid article {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 9px;
  background: #fff;
}
.support-grid article > span {
  color: var(--coral);
  font-family: Georgia, serif;
}
.support-grid h3 {
  font-family: Georgia, serif;
  font-size: 18px;
  margin: 14px 0 7px;
}
.support-grid p {
  font-size: 10px;
  line-height: 1.55;
  color: #718086;
}
.support-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--navy);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
}
.support-contact small,
.support-contact a,
.support-contact span {
  display: block;
}
.support-contact small {
  color: #ffca62;
  font-size: 8px;
  letter-spacing: 1.2px;
}
.support-contact div > a {
  font-family: Georgia, serif;
  font-size: 20px;
  margin: 5px 0;
}
.support-contact span {
  font-size: 9px;
  color: #c4d1d6;
}
.support-email {
  background: var(--gold);
  color: var(--navy);
  padding: 11px 14px;
  border-radius: 7px;
  font-weight: 900;
  font-size: 11px;
}
.support-form {
  margin-top: 22px;
}
.support-form h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  margin-bottom: 5px;
}
.support-form textarea {
  min-height: 90px;
  resize: vertical;
}
.logout-link {
  border: 1px solid var(--coral);
  background: #fff4f1;
  color: #b83d2b;
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 900;
}
.library-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 0;
  padding: 13px 14px;
  border: 1px solid #d7e6e2;
  background: #f2f8f6;
  border-radius: 9px;
}
.library-account small,
.library-account strong {
  display: block;
}
.library-account small {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--teal);
  font-weight: 900;
}
.library-account strong {
  font-size: 12px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.library-account button {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.footer-logout {
  color: #ff9f8e !important;
  font-weight: 900;
}
@media (max-width: 650px) {
  .visitor-link,
  .logout-link {
    padding: 9px 10px;
    font-size: 10px;
  }
  .site-header .admin-link {
    display: none;
  }
  .centered-backdrop {
    padding: 0;
  }
  .account-modal,
  .support-modal {
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 22px;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .support-contact {
    align-items: flex-start;
    flex-direction: column;
  }
  .header-actions {
    gap: 5px;
  }
  .site-header .visitor-link {
    display: none;
  }
}
.upload-receipt {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #eff8f4;
  border: 1px solid #acd4c7;
  padding: 12px;
  border-radius: 8px;
  margin: -5px 0 12px;
}
.receipt-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}
.upload-receipt b,
.upload-receipt strong,
.upload-receipt small {
  display: block;
}
.upload-receipt b {
  font-size: 10px;
  color: var(--teal);
}
.upload-receipt strong {
  font-size: 11px;
  margin: 3px 0;
}
.upload-receipt small {
  font-size: 9px;
  color: #6e7e83;
}
.upload-receipt em {
  font-style: normal;
  font-size: 8px;
  font-weight: 900;
  color: #9a6810;
  background: #fff1c9;
  padding: 6px 8px;
  border-radius: 99px;
}
.field-note {
  display: block;
  margin-top: 6px;
  color: #7c898d;
  font-weight: 400;
  line-height: 1.4;
}
.publish-confirmation {
  background: #e8f4ef;
  border: 1px solid #8ec4b2;
  border-left: 5px solid var(--teal);
  padding: 13px;
  margin: 0 0 12px;
  border-radius: 7px;
}
.publish-confirmation b,
.publish-confirmation span {
  display: block;
}
.publish-confirmation b {
  color: #176a62;
  font-size: 12px;
}
.publish-confirmation span {
  font-size: 10px;
  color: #61767a;
  margin-top: 4px;
  line-height: 1.5;
}
.admin-list article {
  grid-template-columns: 72px 1fr auto auto;
}
.admin-cover {
  width: 66px;
  height: 88px;
  border-radius: 5px;
  color: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 12px #17365d24;
  overflow: hidden;
}
.admin-cover small {
  font-size: 5px !important;
  letter-spacing: 0.5px;
  opacity: 0.8;
}
.admin-cover strong {
  font-family: Georgia, serif;
  font-size: 10px !important;
  line-height: 1.08;
  margin: auto 0 5px;
}
.admin-cover em {
  font-style: normal;
  font-size: 6px;
  text-transform: uppercase;
  opacity: 0.75;
}
.admin-footer-actions {
  position: sticky;
  bottom: -28px;
  margin: 24px -28px -28px;
  padding: 15px 28px;
  background: #fffdf8f5;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 -8px 24px #17365d10;
}
.admin-footer-actions span {
  font-size: 11px;
  color: #728187;
}
.admin-footer-actions button {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 900;
}
.sample-chapter-button {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 13px 18px;
  border-radius: 8px;
  font-weight: 900;
}
.book-cover:before {
  content: "DIGI BOOK";
  position: absolute;
  left: 24px;
  bottom: 22px;
  font-size: 8px;
  letter-spacing: 1.4px;
  font-weight: 900;
  opacity: 0.55;
}
.book-cover {
  box-shadow: inset 10px 0 0 #ffffff12;
}
.access-line {
  flex-wrap: wrap;
}
@media (max-width: 650px) {
  .upload-receipt {
    grid-template-columns: 34px 1fr;
  }
  .upload-receipt em {
    grid-column: 2;
  }
  .admin-list article {
    grid-template-columns: 58px 1fr auto;
  }
  .admin-cover {
    width: 52px;
    height: 72px;
  }
  .admin-list article > b {
    display: none;
  }
  .admin-footer-actions {
    margin-left: -22px;
    margin-right: -22px;
    bottom: -22px;
    padding: 13px 22px;
  }
  .admin-footer-actions span {
    display: none;
  }
}
.checkout:disabled,
.book-review-shell footer button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.approval-note {
  text-align: center;
  color: #a06d12;
  font-size: 10px;
  font-weight: 800;
  margin: 8px 0 0;
}
.book-review-shell {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: #e9e4da;
  display: grid;
  grid-template-rows: 76px 1fr 72px;
}
.book-review-shell > header {
  background: var(--navy);
  color: #fff;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.book-review-shell > header small,
.book-review-shell > header strong,
.book-review-shell > header span {
  display: block;
}
.book-review-shell > header small {
  color: #ffca62;
  font-size: 8px;
  letter-spacing: 1.4px;
}
.book-review-shell > header strong {
  font-family: Georgia, serif;
  font-size: 20px;
  margin: 4px 0;
}
.book-review-shell > header span {
  font-size: 9px;
  color: #c6d2d6;
}
.book-review-shell > header button {
  border: 1px solid #ffffff5c;
  background: transparent;
  color: #fff;
  padding: 10px 14px;
  border-radius: 7px;
  font-weight: 800;
}
.review-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 330px 1fr;
}
.review-workspace > aside {
  background: #fff;
  padding: 24px;
  overflow: auto;
  border-right: 1px solid var(--line);
}
.review-workspace > aside h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  margin: 0;
}
.review-workspace > aside > p {
  font-size: 10px;
  color: #728187;
  line-height: 1.55;
}
.review-workspace ol {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.review-workspace li {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid #ece6da;
  font-size: 11px;
  line-height: 1.35;
}
.review-workspace li > span {
  color: var(--coral);
  font-size: 9px;
}
.review-workspace li > b {
  font-size: 7px;
  text-transform: uppercase;
  color: var(--teal);
  background: #e6f4ef;
  padding: 4px 5px;
  border-radius: 99px;
}
.review-checks {
  background: #eff7f4;
  border: 1px solid #c1ddd4;
  padding: 14px;
  border-radius: 9px;
}
.review-checks h3 {
  font-family: Georgia, serif;
  margin: 0 0 9px;
}
.review-checks span,
.review-checks small {
  display: block;
}
.review-checks span {
  font-size: 9px;
  color: #276c65;
  margin: 7px 0;
  font-weight: 800;
}
.review-checks small {
  font-size: 9px;
  color: #677a7e;
  line-height: 1.5;
  margin-top: 10px;
}
.review-workspace > main {
  position: relative;
  min-width: 0;
  padding: 24px 24px 18px;
}
.review-workspace iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #cfc6b5;
  background: #fff;
  box-shadow: 0 12px 30px #17365d1a;
}
.review-ribbon {
  position: absolute;
  z-index: 2;
  top: 33px;
  right: 35px;
  background: var(--teal);
  color: #fff;
  border-radius: 99px;
  padding: 8px 11px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.review-empty {
  display: grid;
  place-items: center;
  height: 100%;
  background: #fff;
  color: #7b898d;
}
.book-review-shell > footer {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  padding: 0 26px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px #17365d0d;
}
.book-review-shell > footer label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}
.book-review-shell > footer button {
  border: 0;
  background: var(--teal);
  color: #fff;
  padding: 12px 17px;
  border-radius: 8px;
  font-weight: 900;
}
@media (max-width: 760px) {
  .book-review-shell {
    grid-template-rows: 72px 1fr 98px;
  }
  .review-workspace {
    display: block;
    overflow: auto;
  }
  .review-workspace > aside {
    border: 0;
  }
  .review-workspace > main {
    height: 620px;
  }
  .book-review-shell > footer {
    align-items: stretch;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 10px 18px;
  }
  .book-review-shell > footer label {
    font-size: 9px;
  }
  .book-review-shell > header span {
    display: none;
  }
}
.customer-shelf {
  display: grid;
  gap: 14px;
}
.customer-shelf .library-book {
  margin: 0;
}
.customer-shelf .book-row {
  align-items: center;
}
.full-book-reader {
  position: relative;
  min-height: 0;
  padding: 18px;
  background: #dcd6ca;
}
.full-book-reader iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #c8bfaf;
  background: #fff;
  box-shadow: 0 8px 26px #17365d20;
}
.admin-list-head > span {
  font-size: 10px;
  color: var(--teal);
  font-weight: 900;
}
.admin-list article > button {
  font-size: 9px;
  background: #edf5f2;
  color: var(--teal);
  padding: 7px 9px;
  border-radius: 6px;
  font-weight: 900;
}
.book-cover.has-real-cover {
  padding: 0;
  background: #f1ede4 !important;
  display: grid;
  place-items: center;
}
.book-cover.has-real-cover:before,
.book-cover.has-real-cover:after {
  display: none;
}
.real-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f1ede4;
}
.real-cover.compact {
  width: 58px;
  height: 78px;
  border-radius: 5px;
  object-fit: cover;
  background: #eee7da;
  box-shadow: 0 4px 12px #17365d24;
  flex: 0 0 auto;
}
.generated-cover {
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-align: left;
}
.generated-cover small {
  font-size: 9px;
  letter-spacing: 1.4px;
  opacity: 0.8;
}
.generated-cover strong {
  font-family: Georgia, serif;
  font-size: 27px;
  line-height: 1.12;
  margin: auto 0 14px;
}
.generated-cover em {
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.generated-cover.compact {
  width: 58px;
  height: 78px;
  padding: 7px;
  border-radius: 5px;
  box-shadow: 0 4px 12px #17365d24;
  flex: 0 0 auto;
}
.generated-cover.compact small {
  font-size: 5px;
}
.generated-cover.compact strong {
  font-size: 9px;
  margin: auto 0 4px;
}
.generated-cover.compact em {
  font-size: 5px;
}
.cart-list > div {
  grid-template-columns: 58px 1fr auto;
}
.cart-list .real-cover.compact,
.cart-list .generated-cover.compact {
  width: 50px;
  height: 68px;
}
.admin-list article {
  grid-template-columns: 72px 1fr auto auto;
}
.admin-list .real-cover.compact,
.admin-list .generated-cover.compact {
  width: 64px;
  height: 86px;
}
@media print {
  body {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.book-details-stage {
  min-height: 0;
  overflow: auto;
  background: #f0ebe1;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 760px);
  justify-content: center;
  gap: 46px;
  padding: 42px;
}
.details-cover {
  position: sticky;
  top: 20px;
  align-self: start;
}
.detail-wrapper {
  width: min(100%, 310px);
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 48px #17365d2e;
  margin: auto;
}
.detail-wrapper .generated-cover strong {
  font-size: 35px;
}
.details-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.details-price del {
  color: #8b8277;
}
.details-price strong {
  font-size: 30px;
  color: var(--navy);
}
.details-price span {
  font-size: 10px;
  color: var(--teal);
  font-weight: 900;
}
.details-copy {
  background: #fffdf8;
  padding: 42px;
  border-radius: 14px;
  box-shadow: 0 16px 40px #17365d14;
}
.details-copy h1 {
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1.08;
  margin: 0;
}
.details-copy h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  margin: 30px 0 10px;
}
.details-copy > p {
  color: #61747b;
  line-height: 1.7;
  font-size: 13px;
}
.details-subtitle {
  font-size: 16px !important;
  color: var(--ink) !important;
}
.book-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
}
.book-facts span {
  background: #eef6f3;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  color: #567078;
  font-size: 9px;
}
.book-facts b {
  display: block;
  color: var(--teal);
  font-size: 18px;
  margin-bottom: 3px;
}
.details-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.details-index li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.details-index li > span {
  color: var(--coral);
  font-size: 10px;
}
.details-index strong {
  font-size: 12px;
}
.details-index small {
  font-size: 9px;
  color: #869195;
}
.preview-invitation {
  margin-top: 28px;
  background: var(--navy);
  color: #fff;
  padding: 22px;
  border-radius: 10px;
  display: grid;
  gap: 16px;
}
.preview-invitation strong,
.preview-invitation span {
  display: block;
}
.preview-invitation strong {
  font-family: Georgia, serif;
  font-size: 19px;
}
.preview-invitation span {
  font-size: 10px;
  color: #cbd6da;
  line-height: 1.5;
  margin-top: 5px;
}
.preview-invitation button {
  border: 0;
  background: var(--gold);
  color: var(--navy);
  padding: 14px;
  border-radius: 7px;
  font-weight: 900;
}
.reader-badges b {
  background: var(--gold);
  color: var(--navy);
  padding: 8px 11px;
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.reader-badges b.urgent {
  background: var(--coral);
  color: #fff;
}
.preview-expired {
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: #f3eee4;
}
.expired-cover {
  width: 120px;
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 30px #17365d38;
  margin-bottom: 24px;
}
.expired-cover .generated-cover {
  padding: 12px;
}
.expired-cover .generated-cover strong {
  font-size: 15px;
}
.preview-expired h1 {
  font-family: Georgia, serif;
  font-size: 38px;
  max-width: 650px;
  margin: 0;
}
.preview-expired p:not(.eyebrow) {
  max-width: 620px;
  color: #66777d;
  line-height: 1.65;
}
.preview-expired > div:last-child {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.preview-expired .checkout {
  width: auto;
}
.return-library {
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  padding: 13px 18px;
  border-radius: 8px;
  font-weight: 900;
}
.cart-preview {
  display: block !important;
  border: 0 !important;
  background: none !important;
  color: var(--teal) !important;
  padding: 7px 0 0 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-decoration: underline;
}
.continue-shopping {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--teal);
  background: #eef7f4;
  color: var(--teal);
  padding: 13px 15px;
  border-radius: 8px;
  font-weight: 900;
}
.continue-shopping:hover,
.continue-shopping:focus-visible {
  background: var(--teal);
  color: #fff;
}
.customer-shelf .book-row > .real-cover.compact,
.customer-shelf .book-row > .generated-cover.compact {
  width: 92px;
  height: 124px;
}
.customer-shelf .book-row {
  gap: 16px;
}
.library-panel .library-book {
  padding: 18px;
}
.full-book-reader {
  overflow: hidden;
}
@media (max-width: 760px) {
  .book-details-stage {
    display: block;
    padding: 22px;
  }
  .details-cover {
    position: static;
    margin-bottom: 22px;
  }
  .detail-wrapper {
    width: 190px;
  }
  .details-copy {
    padding: 24px;
  }
  .details-copy h1 {
    font-size: 32px;
  }
  .book-facts {
    grid-template-columns: 1fr 1fr;
  }
  .preview-invitation {
    padding: 18px;
  }
  .reader-badges b {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    background: var(--coral);
    padding: 6px 10px;
    border-radius: 99px;
  }
  .preview-expired {
    justify-content: flex-start;
    padding: 44px 22px;
  }
  .preview-expired h1 {
    font-size: 31px;
  }
  .preview-expired > div:last-child {
    flex-direction: column;
    width: 100%;
  }
  .preview-expired .checkout,
  .return-library {
    width: 100%;
  }
  .customer-shelf .book-row > .real-cover.compact,
  .customer-shelf .book-row > .generated-cover.compact {
    width: 82px;
    height: 110px;
  }
}

/* Plain HTML/JavaScript interaction layer */
.plain-modal-shade {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 31, 43, 0.72);
  backdrop-filter: blur(8px);
}
.plain-modal {
  position: relative;
  width: min(520px, 100vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 16px;
  padding: 36px 28px 40px;   /* top padding allows cover to bleed via negative margin */
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
/* h2 inside detail modal — constrained size, never word-breaks */
.plain-modal h2 {
  margin: 8px 44px 10px 0;
  font-family: Georgia, serif;
  font-size: clamp(18px, 4vw, 26px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  word-break: normal;
  overflow-wrap: break-word;
}
.plain-modal h3 { margin-top: 22px; font-size: 15px; }
.plain-modal ol { padding: 0; list-style: none; }
/* Close button — always visible over cover image */
.plain-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 22px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.plain-close:hover { background: #fff; }
.plain-book-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.plain-book-facts span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf5f2;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}
.plain-preview-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
}
.plain-preview-time strong {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  color: #ffe08a;
}
.plain-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.plain-add, .plain-pay {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  background: var(--coral);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .15s;
}
.plain-add:hover, .plain-pay:hover { opacity: .88; }
.plain-add:disabled, .plain-pay:disabled { opacity: .45; cursor: not-allowed; }
.plain-secondary {
  width: 100%;
  border: 1px solid #d5cec3;
  border-radius: 10px;
  padding: 12px 18px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.plain-secondary:hover { background: #f5f0e8; }
.plain-actions .plain-close {
  position: static;
  width: 100%;
  height: auto;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #d5cec3;
  backdrop-filter: none;
  box-shadow: none;
  color: var(--ink);
}
.plain-cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.plain-cart-row small, .plain-owned span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.plain-cart-row button { border: 0; background: none; color: var(--coral); cursor: pointer; }
.plain-total { display: flex; justify-content: space-between; padding: 18px 0 4px; font-size: 20px; font-weight: 900; }
.plain-owned { padding: 14px 0; border-bottom: 1px solid var(--line); }
.plain-empty { padding: 22px; border-radius: 12px; background: #f5efe5; text-align: center; color: #849195; font-size: 13px; }
.plain-field { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; font-size: 11px; font-weight: 800; color: #617177; }
.plain-field input { width: 100%; border: 1px solid #d4cec6; border-radius: 8px; padding: 12px; background: #fff; font: inherit; font-size: 14px; }
.plain-toast { position: fixed; left: 50%; bottom: 22px; z-index: 300; transform: translate(-50%, 20px); max-width: calc(100% - 30px); border-radius: 999px; padding: 13px 20px; background: var(--ink); color: white; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s ease; }
.plain-toast.show { transform: translate(-50%, 0); opacity: 1; }
[hidden] { display: none !important; }
@media (max-width: 560px) {
  .plain-modal { padding: 26px 20px; border-radius: 19px; }
  .plain-cart-row { grid-template-columns: 1fr auto; }
  .plain-cart-row button { grid-column: 1 / -1; justify-self: start; }
}

/* ── New component styles for upgraded script.js ── */

/* Reader timer count (gold badge in header) */
.reader-timer-count {
  background: var(--gold);
  color: var(--navy);
  padding: 7px 12px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 900;
}

/* Paywall redesign */
.paywall-message strong { display:block; font-size:15px; font-family:Georgia,serif; }
.paywall-message span   { display:block; font-size:11px; color:#6f7d82; margin-top:3px; }
.paywall-price del   { display:block; font-size:11px; color:#999; }
.paywall-price strong{ display:block; font-size:24px; color:var(--navy); font-family:Georgia,serif; font-weight:900; }
.paywall-price small { display:block; font-size:9px; color:var(--coral); font-weight:900; text-transform:uppercase; margin-top:2px; }
.paywall-cta {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
}

/* Reader header elements */
.reader-back-btn {
  border: 1px solid rgba(255,255,255,.35) !important;
  color: #fff !important;
  background: transparent !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.reader-title-area { text-align:center; }
.reader-title-area strong, .reader-title-area span { display:block; }
.reader-title-area strong { font-size:15px; font-weight:700; }
.reader-title-area span   { font-size:10px; opacity:.7; margin-top:3px; }

/* TOC sidebar */
.reader-sidebar { background:#fff; padding:24px 14px; overflow:auto; border-right:1px solid var(--line); }
.sidebar-label  { font-size:9px; letter-spacing:2px; font-weight:900; color:#8a9699; margin:0 10px 12px; }

/* Reader TOC content box */
.reader-toc-box {
  background: #f9f5ec;
  border: 1px solid #e4dac4;
  border-radius: 10px;
  padding: 20px;
  margin: 22px 0;
}
.reader-toc-label {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #849195;
  margin: 0 0 12px;
  text-transform: uppercase;
}

/* Checkout form elements */
.checkout-summary {
  background: #fff6df;
  border: 1px solid #e8aa37;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0 8px;
  font-size: 12px;
  color: #7e5a06;
}
.checkout-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 0;
  border-top: 1px solid #e4c97e;
  font-weight: 700;
  font-size: 14px;
  margin-top: 6px;
}
.checkout-err {
  color: #bf5647;
  font-size: 12px;
  min-height: 18px;
  margin-bottom: 8px;
}
.req { color: var(--coral); }

/* Cart items list */
.cart-items-list { margin: 8px 0; }
.cart-item-info strong, .cart-item-info small { display:block; }
.cart-item-info small { font-size:11px; color:var(--muted); margin-top:3px; }

/* Library summary box */
.library-summary {
  padding: 14px 16px;
  background: rgba(232,170,55,0.12);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  margin: 14px 0 18px;
}

/* Mobile: full-width paywall */
@media (max-width: 600px) {
  .paywall-message { flex:1; }
  .reader-paywall {
    flex-wrap: wrap;
    gap: 12px;
  }
  .paywall-cta { width: 100%; text-align: center; }
  .detail-grid { grid-template-columns: 1fr !important; }
}


/* ════════════════════════════════════════════════════════════════
   SCRIPT.JS MODAL / PANEL SYSTEM
   All .plain-* classes used by the JS modal + panel components
   ════════════════════════════════════════════════════════════════ */

/* ── Toast notification ── */
.plain-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 35px #0004;
  opacity: 0;
  transition: opacity .22s, transform .22s;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.plain-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Modal backdrop + panel ── */
.plain-modal-shade {
  position: fixed;
  inset: 0;
  background: rgba(10,27,36,.65);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: auto;
}
.plain-modal {
  position: relative;
  width: min(520px, 100vw);
  min-height: 100vh;
  background: var(--paper);
  padding: 36px 28px 48px;
  overflow: auto;
  box-shadow: -20px 0 60px #0004;
  animation: tkp-slide-in .22s ease;
}
@keyframes tkp-slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.plain-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #e9e3d8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plain-close:hover {
  background: #ddd4c4;
}

/* ── Shared action row ── */
.plain-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.plain-add,
.plain-pay {
  width: 100%;
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 14px 20px;
  border-radius: 9px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .15s;
}
.plain-add:hover,
.plain-pay:hover { opacity: .88; }
.plain-add:disabled,
.plain-pay:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.plain-secondary {
  width: 100%;
  border: 1px solid #d5cec3;
  background: #fff;
  color: var(--ink);
  padding: 13px 20px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.plain-secondary:hover { background: #f5f0e8; }

/* ── Form fields inside modal ── */
.plain-field {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #617177;
  margin-bottom: 14px;
}
.plain-field input,
.plain-field select,
.plain-field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #d4cec6;
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.plain-field input:focus,
.plain-field select:focus,
.plain-field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
.req { color: var(--coral); }

/* ── Empty state inside modal ── */
.plain-empty {
  text-align: center;
  color: #849195;
  font-size: 13px;
  padding: 30px 0;
}

/* ── Book facts row (detail modal) ── */
.plain-book-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 4px;
}
.plain-book-facts span {
  background: #edf5f2;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 99px;
}

/* ── Detail index (TOC ordered list in modal) ── */
.details-index {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.details-index li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #ede6d8;
  font-size: 13px;
  align-items: baseline;
}
.details-index li span {
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
}
.details-index li strong {
  font-weight: 500;
  color: var(--ink);
}

/* ── Preview timer box ── */
.plain-preview-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7e6;
  border: 1px solid #e8c87a;
  border-radius: 7px;
  padding: 10px 14px;
  margin-top: 16px;
  font-size: 11px;
  color: #7b5a10;
}
.plain-preview-time strong {
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  color: #b07b00;
}

/* ── Cart row ── */
.plain-cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #ede6d8;
}
.cart-item-info strong,
.cart-item-info small { display: block; }
.cart-item-info small {
  color: #849195;
  font-size: 10px;
  margin-top: 3px;
}
.plain-cart-row b {
  font-size: 15px;
  color: var(--navy);
}
.cart-remove-btn {
  border: 0;
  background: none;
  color: #bbb;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}
.cart-remove-btn:hover { color: var(--coral); }

/* ── Cart totals row ── */
.plain-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 900;
  padding: 14px 0 4px;
  border-top: 1px solid #ede6d8;
  margin-top: 6px;
  color: var(--navy);
}

/* ── Checkout summary box ── */
.checkout-summary {
  background: #faf5e9;
  border: 1px solid #e4dac4;
  border-radius: 9px;
  padding: 14px 16px;
  margin: 16px 0 10px;
}
.checkout-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  color: #52666d;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  font-weight: 900;
  font-size: 15px;
  border-top: 1px solid #ddd5c4;
  padding-top: 9px;
  margin-top: 8px;
  color: var(--navy);
}
.checkout-err {
  min-height: 18px;
  font-size: 12px;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 8px;
}

/* ── Owned book row ── */
.plain-owned {
  background: #fff;
  border: 1px solid #e4dac4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

/* ── Library summary bar ── */
.library-summary {
  background: #e8aa3721;
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 7px 7px 0;
  margin-bottom: 18px;
}
.library-summary strong { display: block; font-size: 14px; color: var(--navy); }
.library-summary span   { display: block; font-size: 11px; color: #6e7a7e; margin-top: 4px; }

/* ══════════════════════════════════════════════════════
   READER SHELL — classes used by script.js reader
   ══════════════════════════════════════════════════════ */

/* Back button */
.reader-back-btn {
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: #fff;
  padding: 9px 14px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.reader-back-btn:hover { background: rgba(255,255,255,.1); }

/* Title area inside reader header */
.reader-title-area {
  text-align: center;
}
.reader-title-area strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}
.reader-title-area span {
  display: block;
  font-size: 9px;
  opacity: .72;
  margin-top: 3px;
  letter-spacing: .4px;
}

/* Countdown badge in reader header */
.reader-timer-count {
  border: 1px solid rgba(255,255,255,.42);
  padding: 6px 10px;
  border-radius: 99px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 900;
  color: #ffe08a;
}

/* Sidebar label */
.sidebar-label {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #8a9699;
  margin: 0 12px 14px;
}

/* TOC buttons in reader sidebar */
.toc-btn,
.toc-full-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  text-align: left;
  gap: 7px;
  border: 0;
  background: none;
  padding: 11px 12px;
  border-radius: 7px;
  color: #53666d;
  font-size: 12px;
  cursor: pointer;
  align-items: start;
}
.toc-btn b,
.toc-full-btn b {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 900;
}
.toc-btn span,
.toc-full-btn span {
  font-size: 11px;
  line-height: 1.4;
}
.toc-btn.active,
.toc-full-btn.active {
  background: rgba(23,54,93,.1);
  color: var(--navy);
  font-weight: 700;
}
.toc-btn:hover,
.toc-full-btn:hover { background: #f2ede5; }

/* Full reader content area */
.full-book-reader {
  position: relative;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

/* Paywall bar inside reader */
.paywall-message strong { display: block; font-size: 14px; font-weight: 900; color: var(--navy); }
.paywall-message span   { display: block; font-size: 11px; color: #687a81; margin-top: 3px; }
.paywall-price {
  text-align: center;
}
.paywall-price del { display: block; font-size: 11px; color: #999; }
.paywall-price strong { display: block; font-size: 22px; font-weight: 900; color: var(--navy); }
.paywall-price small  { display: block; font-size: 9px; color: #849195; text-transform: uppercase; letter-spacing: .7px; }
.paywall-cta {
  border: 0;
  background: var(--coral);
  color: #fff;
  padding: 14px 22px;
  border-radius: 9px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.paywall-cta:hover { opacity: .88; }

/* ── TOC box inside reader page ── */
.reader-toc-box {
  margin: 18px 0 24px;
  border: 1px solid #e4dac4;
  border-radius: 8px;
  padding: 18px 20px;
  background: #faf5ea;
}
.reader-toc-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 900;
  color: #8a9699;
  text-transform: uppercase;
  margin: 0 0 12px;
}

/* ── Generated cover span (no cover image) ── */
.book-cover.has-real-cover { padding: 0; }
.real-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.generated-cover {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 24px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.generated-cover small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .75;
}
.generated-cover strong {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.12;
  margin: auto 0 14px;
  max-width: 200px;
}
.generated-cover em {
  font-style: normal;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: .7;
}

/* ── Cart items list wrapper ── */
.cart-items-list { margin: 14px 0 4px; }

/* ── Panel note (small print below actions) ── */
.panel-note {
  font-size: 11px;
  text-align: center;
  line-height: 1.55;
  color: #7c898d;
  margin-top: 14px;
}

/* ── Responsive: center modals on small screens ── */
@media (max-width: 540px) {
  .plain-modal-shade {
    align-items: flex-end;
    justify-content: center;
  }
  .plain-modal {
    width: 100%;
    min-height: auto;
    max-height: 96vh;
    border-radius: 18px 18px 0 0;
    animation: tkp-slide-up .22s ease;
  }
  @keyframes tkp-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .plain-close {
    top: 12px;
    right: 12px;
  }
  .paywall-price { display: none; }
  .reader-title-area strong { font-size: 12px; }
  
  /* Force single column book grid on mobile */
  .book-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Ensure reader timer is visible on mobile */
  .reader-timer-count {
    display: inline-block;
    font-size: 11px;
    padding: 4px 8px;
  }
  
  /* Adjust reader header for mobile */
  .reader-shell > header {
    padding: 0 16px;
    grid-template-columns: auto 1fr auto;
  }
  .reader-title-area strong {
    font-size: 12px;
  }
  .reader-title-area span {
    font-size: 8px;
  }
  
  /* Mobile header adjustments */
  .site-header {
    height: 64px;
    padding: 0 4vw;
  }
  .site-header nav {
    display: none;
  }
  .brand strong {
    font-size: 14px;
  }
  .brand small {
    font-size: 8px;
  }
  
  /* Mobile hero section */
  .hero {
    padding: 40px 4vw;
  }
  .hero-copy h1 {
    font-size: 28px;
  }
  .hero-lead {
    font-size: 13px;
  }
  .hero-visual {
    min-height: 300px;
  }
  
  /* Mobile section spacing */
  .section {
    padding: 48px 4vw;
  }
  
  /* Mobile category tabs */
  .category-tabs {
    gap: 6px;
    padding-bottom: 8px;
  }
  .category-tabs button {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  /* Mobile book card adjustments */
  .book-cover {
    height: 200px;
    padding: 16px;
  }
  .book-cover strong {
    font-size: 20px;
    max-width: 160px;
  }
  .book-info {
    padding: 14px 16px 16px;
  }
  .book-info h3 {
    font-size: 14px;
  }
  .book-info > p {
    font-size: 11px;
    min-height: 40px;
  }
  
  /* Mobile steps section */
  .steps {
    grid-template-columns: 1fr;
  }
  
  /* Mobile security section */
  .security {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  /* Mobile offer strip */
  .offer-strip {
    flex-direction: column;
    gap: 8px;
    padding: 12px 4vw;
    text-align: center;
  }
  
  /* Mobile promise strip */
  .promise-strip {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 4vw;
    font-size: 11px;
  }
  
  /* Mobile cart button */
  .cart-button {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Mobile reader sidebar */
  .reader-sidebar {
    display: none;
  }
  
  /* Mobile preview content area */
  .preview-content-area {
    padding: 0;
  }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE READER / BOOK PREVIEW — single-column layout
   Fixes: desktop sidebar column squeezing the book, horizontal
   overflow, header/title overlap. Desktop (>768px) unchanged.
   ════════════════════════════════════════════════════════════════ */

/* Global overflow guard */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
* { box-sizing: border-box; }

@media (max-width: 768px) {
  /* ── Reader shell: no horizontal escape ── */
  .reader-shell {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  /* ── ONE column: no 240px sidebar grid ── */
  .reader-body {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    min-width: 0;
    overflow: hidden;
  }

  /* ── TOC sidebar becomes a compact horizontal chapter strip ── */
  .reader-body > aside {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line, #e6dfd1);
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .reader-body > aside::-webkit-scrollbar { display: none; }
  .reader-body > aside > p { display: none !important; }
  .reader-body > aside button {
    flex: 0 0 auto;
    min-width: 150px;
    padding: 9px 12px;
    white-space: nowrap;
    border: 1px solid #e6dfd1;
    border-radius: 8px;
    background: #faf7f0;
  }

  /* ── Header: Back | Title (truncated) | Timer — no overlap ── */
  .reader-shell > header {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
  }
  .reader-title-area {
    min-width: 0;
    text-align: left;
  }
  .reader-title-area strong {
    display: block;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reader-title-area span {
    display: block;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reader-badges span:not(.reader-timer-count) { display: none !important; }
  .reader-timer-count {
    font-size: 15px !important;
    padding: 7px 11px !important;
    border: 1px solid #ffffff42;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* ── Book preview fills the width, never clipped ── */
  .preview-content-area,
  #previewBookHolder,
  .full-book-reader,
  #fullReaderPage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    /* Explicit height — height:100% collapses inside grid 1fr on mobile */
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
    overflow: hidden;
  }
  .preview-content-area #previewBookHolder iframe,
  #fullReaderPage iframe {
    width: 100%;
    max-width: 100%;
    /* Explicit height — don't rely on 100% chain through grid rows */
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
    min-height: 320px;
    border: none;
    display: block;
  }

  /* ── Expired-preview paywall: stack cleanly on small screens ── */
  .reader-paywall {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 16px;
    justify-content: center;
    text-align: center;
  }
  .reader-paywall .paywall-message { min-width: 100%; }
  .reader-paywall .paywall-cta {
    width: 100%;
    padding: 13px 16px;
    font-size: 14px;
  }
}
