:root {
  --ink: #153629;
  --muted: #61746a;
  --blue: #087842;
  --blue-hover: #087a43;
  --line: #dbe9e0;
  --pale: #f1f9f4;
  --orange: #69ad3a;
  --green: #087842;
  background: #fbfefc;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline-color: #65c98d; }
::selection { background: #ccefd9; }

.brand { letter-spacing: 0; display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-wordmark { font-family: var(--sans); font-size: 25px; font-weight: 750; letter-spacing: -.045em; color: #123e2a; }
.brand-logo { display: block; width: 48px; height: auto; max-height: 44px; object-fit: contain; }
.footer-top .brand-logo { width: 42px; }
.admin-nav > .brand { margin: 0 13px 24px; }
.admin-nav .brand-logo { width: 38px; }
.admin-nav .brand-wordmark { font-size: 20px; }
.reader-header .brand-logo { width: 68px; max-height: 54px; }

.utility { background: linear-gradient(115deg, #103a29, #176943); }
.site-header { box-shadow: 0 6px 24px #0b5f2d0a; }
.btn.primary {
  background: linear-gradient(135deg, #59bd3c 0%, #00a867 100%);
  box-shadow: 0 5px 14px #0a8c4a22;
}
.btn.primary:hover { background: linear-gradient(135deg, #45aa30 0%, #087f4b 100%); }
.hero { background: linear-gradient(135deg, #f0faef 0%, #d8f3e4 58%, #c9edda 100%); }
.hero-image { background: linear-gradient(145deg, #cceedd, #a8dfc3); }
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #0c9f5816, transparent 52%, #60bb3612);
  pointer-events: none;
}
.hero-sticker svg { color: #34a853; }
.reading-banner,
.admin-cta { background: linear-gradient(135deg, #edf9ef, #ddf4e7); border-color: #d2ebdc; }
.banner-symbol { background: #cfeeda; }
.auth-intro { background: linear-gradient(145deg, #e8f7ec, #d8f0e2); }
.auth-intro > svg { color: #8dc9a4; }
.category-icon,
.filter-item.selected,
.library-tabs a span,
.admin-nav nav .active { background: #e3f5e9; }
.category-card:hover { border-color: #8dccaa; box-shadow: 0 5px 18px #08784212; }
.empty-state > svg,
.filter-tip { background: #edf8f0; }
.dropzone { border-color: #99cdb0; background: #f5fbf7; }
.dropzone.dragging { background: #e1f5e8; border-color: var(--blue); }
.stat-card > span svg { color: #39a66b; }
.site-footer { background: #f4faf6; }
.reader-tools { background: #f3faf5; }
.reader-paper-area { background: #e9f2ec; }
.reader-book-link { color: var(--blue); font-size: 11px; }
.reader-search-panel { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.reader-search-panel[hidden], #reader-error-group[hidden] { display: none !important; }
.reader-search-panel label { font-size: 12px; font-weight: 650; }
.reader-search-panel input { flex: 1 1 160px; min-width: 0; padding: 8px 10px; }
.reader-search-panel .btn { min-height: 36px; }
#reader-search-results { flex-basis: 100%; max-height: 190px; overflow-y: auto; font-size: 12px; }
#reader-search-results p { margin: 8px 0 0; }
.reader-search-matches { display: grid; gap: 5px; margin-top: 7px; }
.reader-search-matches button { text-align: left; display: flex; gap: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #f6fbf8; }
.reader-search-matches button:hover { border-color: var(--blue); }
.reader-search-matches button strong { flex: 0 0 56px; }
.reader-search-matches button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-shell.dark .reader-search-panel { background: #202d42; color: #d9e3f3; border-color: #33415a; }
.reader-shell.dark .reader-search-matches button { background: #26364d; color: #d9e3f3; border-color: #40526c; }
#reader-error-group { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 3; width: min(280px,90%); padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 8px 30px #18322220; }
#reader-error-group #page-error { position: static; inset: auto; transform: none; margin: 0 0 12px; }
.reader-privacy { background: #eff8f2; }
.status.paid { background: #e4f5e9; color: #197040; }
.checkbox-label input { accent-color: var(--blue); }
.book-cover-editor { border: 1px solid var(--line); border-radius: 12px; background: #f6fbf8; padding: 18px; }
.book-cover-editor h3 { margin: 0 0 5px; font-size: 17px; }
.book-cover-editor p { margin: 0 0 16px; }
.book-cover-editor-inner { display: grid; grid-template-columns: minmax(100px, 145px) minmax(0, 1fr); gap: 20px; align-items: start; }
.book-cover-preview { aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; place-items: center; text-align: center; background: #e8f4ed; color: var(--muted); }
.book-cover-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.book-cover-preview span { display: grid; justify-items: center; gap: 8px; padding: 10px; font-size: 12px; }
.book-cover-fields { display: grid; gap: 14px; min-width: 0; }
.book-cover-fields input[type=file] { max-width: 100%; }
.book-cover-fields small { display: block; margin-top: 5px; }
@media (max-width: 520px) { .book-cover-editor-inner { grid-template-columns: 1fr; } .book-cover-preview { max-width: 145px; } }

.categories { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.class-navigation { gap: 0; overflow-x: auto; scrollbar-width: thin; }
.class-navigation a { white-space: nowrap; flex: 0 0 auto; padding: 0 11px; font-size: .78rem; min-height: 48px; }
.class-navigation .nav-browse { padding-left: 0; padding-right: 18px; }
/* Keep book metadata and contents readable on the pale storefront background. */
.product .byline, .product .byline span, .product-tags span, .contents-list > div > span { color: #455b4b; }
.traffic-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.traffic-controls label { display: grid; gap: 5px; }
.live-traffic, .country-traffic { margin-bottom: 24px; }
.live-traffic h2 { display: flex; align-items: center; gap: 8px; }
.live-traffic h2 svg { width: 20px; color: #127a45; }
.live-row { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.live-activity { max-height: 280px; overflow: auto; }
.live-activity p { padding: 8px 0; border-bottom: 1px solid var(--line); }
.live-activity small, .webmaster-evidence small { display: block; color: var(--muted); margin: 5px 0; }
.webmaster-steps li { margin: 0 0 16px 20px; line-height: 1.7; }
.webmaster-steps code, .webmaster-evidence a { overflow-wrap: anywhere; }
.webmaster-evidence { border-bottom: 1px solid var(--line); padding: 18px 0; }
.webmaster-evidence p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:680px) { .traffic-controls { width: 100%; } .traffic-controls select { max-width: 180px; } }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 24px; align-items: start; }
.settings-layout > .panel { min-width: 0; }
.secure-confirm { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #f6fbf8; }
.secure-confirm h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 15px; }
.secure-confirm h3 svg { width: 18px; color: var(--blue); }
.secure-confirm .form-grid { margin-bottom: -16px; }
.credential-meta { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.credential-meta span { display: flex; align-items: flex-start; gap: 8px; }
.credential-meta svg { width: 15px; margin-top: 2px; color: var(--blue); }
.credential-meta code { overflow-wrap: anywhere; color: var(--ink); }
.section-admin-layout { display: grid; grid-template-columns: minmax(270px, .38fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.section-table-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #e7f6ec; color: var(--blue); flex: 0 0 auto; }
.section-table-icon svg { width: 19px; }

@media (max-width: 960px) {
  .settings-layout,
  .section-admin-layout { grid-template-columns: 1fr; }
  .admin-nav .brand-logo { width: 34px; }
}

@media (max-width: 680px) {
  .brand-logo { width: 38px; max-height: 36px; }
  .brand-wordmark { font-size: 22px; }
  .header-main { height: 82px; }
  .nav-bar { overflow-x: auto; scrollbar-width: none; }
  .nav-bar::-webkit-scrollbar { display: none; }
  .footer-top .brand-logo { width: 38px; }
  .settings-layout { gap: 18px; }
}

/* Purchase, publishing and reader refinements. */
.purchase-actions { align-items: stretch; }
.purchase-actions .buy-actions { display: flex; flex: 1; gap: 10px; min-width: 0; }
.purchase-actions .buy-actions .btn { flex: 1; min-width: 0; white-space: nowrap; }
.purchase-actions .btn:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.checkout-unavailable { margin: -12px 0 18px; color: #8a6532; font-size: .75rem; line-height: 1.5; }
.sample-unavailable { display: inline-flex; justify-content: center; color: var(--muted); font-size: .75rem; }
.book-section-field select { border-color: #74bd91; background: #f8fcf9; }
.book-section-field small,
.form-grid label > small { display: block; margin-top: 7px; color: var(--muted); font-size: .75rem; font-weight: 400; line-height: 1.45; }
.section-manage-link { display: flex; align-items: center; gap: 8px; margin: -4px 0 20px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: #f4faf6; color: var(--muted); font-size: .75rem; }
.section-manage-link svg { width: 16px; color: var(--blue); }
.section-manage-link button { margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--blue-hover); font-weight: 700; cursor: pointer; }

@media (max-width: 680px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .header-main { height: auto; min-height: 82px; }
  .nav-bar a { min-height: 43px; display: inline-flex; align-items: center; flex: 0 0 auto; }
  .purchase-actions { display: grid; grid-template-columns: minmax(0, 1fr) 45px; gap: 10px; }
  .purchase-actions .buy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .purchase-actions .buy-actions .btn { width: 100%; padding-inline: 10px; font-size: .8rem; }
  .purchase-actions .icon-btn { width: 45px; }
  .checkout-unavailable { margin-top: -8px; }
  .section-manage-link { align-items: flex-start; flex-wrap: wrap; }
  .section-manage-link button { width: 100%; margin: 2px 0 0 24px; justify-content: flex-start; }
  .admin-main { overflow-x: hidden; }
  .admin-top > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table-wrap { -webkit-overflow-scrolling: touch; border-radius: 7px; }
  .table-wrap table { min-width: 680px; }
  .reader-title { min-width: 0; flex: 1; }
  .reader-title strong,
  .reader-title span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reader-tools { flex-wrap: wrap; gap: 8px; }
  .reader-tools > div { max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .reader-paper-area canvas { max-width: 100%; }
  .reader-controls { gap: 8px; }
  .reader-controls label { white-space: nowrap; }
  .reader-sidebar { max-width: calc(100vw - 20px); }
}

@media (max-width: 420px) {
  .purchase-actions .buy-actions { grid-template-columns: 1fr; }
  .reader-header { padding-inline: 10px; }
  .reader-header .btn { flex: 0 0 34px; width: 34px; min-height: 34px; }
  .reader-tools > span { max-width: none; width: 100%; }
}

.otp-input {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .35em;
  text-align: center;
}

.otp-resend {
  display: flex;
  margin: 18px auto 0;
}

.save-status { min-height: 22px; margin: 0 4px; color: var(--muted); font-size: .8rem; text-align: right; }
.save-confirmation { display: flex; align-items: center; gap: 13px; margin: 26px 0 0; padding: 15px 18px; border: 1px solid #a9daba; border-radius: 9px; background: #edf9f1; color: #155f39; }
.save-confirmation svg { width: 22px; }
.save-confirmation div { display: flex; flex-direction: column; gap: 2px; }
.save-confirmation strong { font-size: .9rem; }
.save-confirmation span { color: var(--muted); font-size: .72rem; }

.seo-preview { margin: 2px 0 20px; border: 1px solid #cfe5d7; border-radius: 10px; background: #fbfefc; overflow: hidden; }
.seo-preview > summary { display: flex; align-items: center; gap: 9px; padding: 14px 16px; color: #17633f; font-size: .82rem; font-weight: 700; cursor: pointer; list-style: none; }
.seo-preview > summary::-webkit-details-marker { display: none; }
.seo-preview > summary svg { width: 18px; }
.seo-preview[open] > summary { border-bottom: 1px solid #dcece2; }
.search-result-preview { padding: 18px; border-bottom: 1px solid #e3eee7; background: white; }
.search-result-preview small { display: block; color: #47705a; font-size: .72rem; }
.search-result-preview strong { display: block; margin: 5px 0 2px; color: #174ea6; font-family: Georgia, serif; font-size: 1.15rem; font-weight: 400; line-height: 1.3; }
.search-result-preview > span { display: block; color: #137333; font-size: .7rem; overflow-wrap: anywhere; }
.search-result-preview p { margin: 6px 0 0; color: #4d5156; font-size: .78rem; line-height: 1.5; }
.seo-preview-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 18px; }
.seo-preview-meta > div > strong { display: block; font-size: .78rem; }
.seo-preview-meta > div > span { display: block; margin: 2px 0 10px; color: var(--muted); font-size: .68rem; }
.seo-topic-list { display: flex; flex-wrap: wrap; gap: 6px; }
.seo-topic-list span,
.discovery-topics a { padding: 5px 9px; border: 1px solid #cfe5d7; border-radius: 999px; background: #f2faf5; color: #22613e; font-size: .68rem; }
.seo-topic-list em { color: var(--muted); font-size: .72rem; }
.seo-preview-meta dl { margin: 0; }
.seo-preview-meta dl > div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf3ef; font-size: .7rem; }
.seo-preview-meta dt { font-weight: 700; }
.seo-preview-meta dd { margin: 0; color: var(--muted); }
.discovery-topics { margin: -2px 0 22px; }
.discovery-topics > strong { display: block; margin-bottom: 8px; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.discovery-topics > div { display: flex; flex-wrap: wrap; gap: 7px; }
.discovery-topics a:hover { border-color: #79be94; background: #e7f6ec; }
.server-discovery-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 14px 0; }
.server-discovery-tags > strong { width: 100%; font-size: .75rem; }
.server-discovery-tags a { padding: 5px 9px; border: 1px solid #cfe5d7; border-radius: 999px; background: #f2faf5; color: #22613e; font-size: .7rem; }

@media (max-width: 680px) {
  .save-status { text-align: left; }
  .save-confirmation { margin-top: 18px; }
  .seo-preview-meta { grid-template-columns: 1fr; }
  .seo-preview-meta dl > div { grid-template-columns: 90px 1fr; }
}

/* Verified reader ratings and reviews. */
.rating-compact { display: flex; align-items: center; gap: 5px; min-height: 22px; margin: -4px 0 8px; line-height: 1; }
.rating-compact > span,
.product-rating > span,
.review-stars { color: #d89109; font-size: .83rem; letter-spacing: .04em; }
.rating-compact strong { color: #70500b; font-size: .72rem; }
.rating-compact small { color: var(--muted); font-size: .66rem; }
.product-rating { width: fit-content; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 15px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.product-rating strong { font-size: .82rem; }
.product-rating small { color: var(--blue-hover); font-size: .72rem; text-decoration: underline; text-underline-offset: 3px; }
.reviews-section { scroll-margin-top: 18px; }
.review-count { padding: 7px 11px; border-radius: 999px; background: #edf8f1; color: #216642; font-size: .72rem; font-weight: 700; }
.reviews-layout { display: grid; grid-template-columns: minmax(220px,.34fr) minmax(0,1fr); gap: 28px; align-items: start; }
.rating-summary { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,#f5fbf7,#fff); }
.rating-summary > strong { display: block; font-family: Georgia,serif; font-size: 3rem; line-height: 1; }
.rating-summary > .review-stars { display: block; margin: 9px 0 5px; font-size: 1rem; }
.rating-summary > p { margin: 0 0 19px; color: var(--muted); font-size: .73rem; }
.rating-row { display: grid; grid-template-columns: 38px 1fr 24px; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); font-size: .68rem; }
.rating-row > div { height: 6px; border-radius: 99px; background: #e5eee8; overflow: hidden; }
.rating-row i { display: block; height: 100%; border-radius: inherit; background: #d89109; }
.rating-row strong { color: var(--ink); font-size: .68rem; text-align: right; }
.reviews-feed { display: flex; flex-direction: column; gap: 14px; }
.review-form { margin-bottom: 6px; padding: 22px; border: 1px solid #b9dfc6; border-radius: 12px; background: #f3faf5; }
.review-form h3 { margin: 0 0 5px; }
.review-form > p { margin: 0 0 18px; color: var(--muted); font-size: .75rem; }
.review-form label { display: block; margin-bottom: 14px; font-size: .76rem; font-weight: 700; }
.review-form select,
.review-form textarea { width: 100%; margin-top: 7px; }
.reader-review { display: grid; gap: 10px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.reader-review > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.reader-review > div strong { font-size: .8rem; }
.reader-review > div small { grid-column: 2; color: var(--muted); font-size: .65rem; }
.reader-review p { margin: 0; color: #405449; font-size: .82rem; line-height: 1.65; white-space: pre-wrap; }
.reviews-empty,
.review-gate { padding: 20px; border: 1px dashed #bfd8c7; border-radius: 10px; color: var(--muted); }
.reviews-empty p { margin: 5px 0 0; font-size: .76rem; }
.review-gate { display: flex; gap: 9px; align-items: center; font-size: .76rem; }
.review-gate svg { width: 18px; color: var(--blue); }
.server-reviews { display: block; }

/* First-party traffic dashboard. */
.traffic-heading > label { min-width: 170px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.traffic-heading select { width: 100%; margin-top: 7px; background: #fff; }
.traffic-over-time .section-heading p,
.traffic-grid .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .73rem; }
.traffic-chart { width: 100%; overflow-x: auto; padding: 15px 0 4px; }
.traffic-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(22px,1fr); align-items: end; min-width: 560px; height: 245px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom,#fff 0,#fff 54px,#edf3ef 55px); }
.traffic-day { height: 100%; display: grid; grid-template-rows: 1fr 18px 25px; gap: 3px; align-items: end; text-align: center; }
.traffic-bar-wrap { height: 100%; display: flex; align-items: end; justify-content: center; }
.traffic-bar-wrap i { width: min(72%,22px); min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg,#55b878,#16834d); transition: height .2s ease; }
.traffic-bar-wrap i.zero { min-height: 0; }
.traffic-day strong { font-size: .58rem; font-variant-numeric: tabular-nums; }
.traffic-day span { min-height: 22px; color: var(--muted); font-size: .56rem; white-space: nowrap; }
.traffic-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 24px; margin-top: 24px; align-items: start; }
.traffic-rank { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 9px; border-radius: 50%; background: #edf8f1; color: #237047; font-size: .68rem; font-weight: 800; }
.table-meter { width: 100%; height: 4px; margin-top: 6px; border-radius: 99px; background: #e6efe9; overflow: hidden; }
.table-meter i { display: block; height: 100%; background: #28a863; }
.traffic-empty { padding: 30px 12px !important; color: var(--muted); text-align: center; }
.analytics-note { display: flex; gap: 13px; margin: 24px 0; padding: 17px 19px; border: 1px solid #cce3d4; border-radius: 10px; background: #f4faf6; }
.analytics-note > svg { width: 21px; flex: 0 0 auto; color: var(--blue); }
.analytics-note strong { font-size: .8rem; }
.analytics-note p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }

@media (max-width: 960px) {
  .reviews-layout,
  .traffic-grid { grid-template-columns: 1fr; }
  .rating-summary { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; }
  .rating-summary > p,
  .rating-summary .rating-row { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .rating-compact { flex-wrap: wrap; }
  .reviews-section .section-heading { align-items: flex-start; }
  .review-form,
  .reader-review,
  .rating-summary { padding: 17px; }
  .reader-review > div { grid-template-columns: 1fr; }
  .reader-review > div small { grid-column: 1; }
  .traffic-heading { align-items: stretch; }
  .traffic-heading > label { width: 100%; }
  .traffic-over-time .section-heading { align-items: flex-start; gap: 10px; }
  .traffic-over-time .status { white-space: normal; text-align: right; }
  .traffic-grid .table-wrap table { min-width: 560px; }
}

/* Server-verified checkout coupons and promotion management. */
.coupon-checkout { margin: 13px 0 3px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.coupon-checkout > label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .72rem; font-weight: 700; }
.coupon-checkout > label span { color: var(--muted); font-weight: 500; }
.coupon-checkout > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.coupon-checkout input { min-width: 0; text-transform: uppercase; letter-spacing: .05em; }
.coupon-checkout .btn { min-height: 40px; padding: 8px 13px; }
.coupon-checkout .form-error { margin: 8px 0 0; }
.coupon-success { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; color: #197043; font-size: .72rem; font-weight: 700; }
.coupon-success svg { width: 17px; }
.coupon-discount { color: #197043; }
.coupon-discount strong { color: inherit !important; }
.order-coupon { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: #edf8f1; color: #197043; font-size: .72rem; font-weight: 700; }
.order-coupon svg { width: 16px; }
.coupon-admin-layout { display: grid; grid-template-columns: minmax(270px,.36fr) minmax(0,1fr); gap: 24px; align-items: start; }
.coupon-admin-layout > .panel:first-child { position: sticky; top: 84px; }
.coupon-admin-layout table { min-width: 740px; }
.coupon-code { display: inline-block; padding: 5px 8px; border: 1px solid #cce3d4; border-radius: 6px; background: #f4faf6; color: #17633f; font-size: .75rem; font-weight: 800; letter-spacing: .05em; }

@media (max-width: 1080px) {
  .coupon-admin-layout { grid-template-columns: 1fr; }
  .coupon-admin-layout > .panel:first-child { position: static; }
}

@media (max-width: 680px) {
  .coupon-checkout > div { grid-template-columns: 1fr; }
  .coupon-checkout .btn { width: 100%; }
}

/* Consent-led discovery, editorial guidance and campaign tools. */
.footer-button { padding: 0; color: inherit; font: inherit; text-align: left; }
.footer-button:hover { color: var(--blue); }
.consent-banner { position: fixed; z-index: 90; right: 22px; bottom: 22px; left: 22px; display: flex; align-items: center; justify-content: space-between; gap: 25px; max-width: 980px; margin: 0 auto; padding: 19px 21px; border: 1px solid #a9d5b9; border-radius: 14px; background: #fffffff2; box-shadow: 0 18px 60px #163a2730; backdrop-filter: blur(14px); }
.consent-banner > div:first-child { display: flex; align-items: flex-start; gap: 13px; }
.consent-banner > div:first-child > svg { width: 24px; flex: 0 0 auto; color: #18814c; }
.consent-banner strong { font-size: .88rem; }
.consent-banner p { max-width: 650px; margin: 4px 0 5px; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.consent-banner a { color: #17683f; font-size: .7rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.consent-actions .btn { min-height: 39px; padding: 8px 13px; font-size: .72rem; white-space: nowrap; }
.card-tags, .discovery-topics > div, .catalog-tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags { min-height: 23px; margin: 2px 0 7px; }
.card-tags a, .discovery-topics a, .catalog-tag-filter a { padding: 4px 7px; border: 1px solid #cfe6d7; border-radius: 999px; background: #f3faf5; color: #276446; font-size: .61rem; font-weight: 750; line-height: 1.2; }
.catalog-tag-filter { display: grid; margin: 6px 0 20px; }
.catalog-tag-filter a { display: flex; justify-content: space-between; border-radius: 6px; padding: 7px 8px; }
.catalog-tag-filter a.selected { border-color: #3da36b; background: #e8f7ee; color: #12633a; }
.discovery-topics { margin: 17px 0; }
.discovery-topics > strong { display: block; margin-bottom: 8px; font-size: .7rem; }
.discovery-topics a { font-size: .67rem; }
.sample-showcase { position: relative; overflow: hidden; background: radial-gradient(circle at 75% 12%,#d9f9e4 0,transparent 34%),linear-gradient(145deg,#effaf3,#cbeed8); }
.sample-showcase .sample-pages { position: absolute; inset: 9% 10% 24%; transform: rotate(-4deg); }
.sample-showcase .sample-pages span { position: absolute; inset: 0; border-radius: 5px; background: #fff; box-shadow: 0 12px 25px #1856311f; }
.sample-showcase .sample-pages span:first-child { transform: translate(14px,-7px) rotate(7deg); background: #dbf0e3; }
.sample-showcase img { position: relative; z-index: 1; filter: drop-shadow(0 14px 16px #173f2930); }
.sample-showcase-copy { position: relative; z-index: 2; width: 100%; padding: 12px; border: 1px solid #ffffff80; border-radius: 9px; background: #ffffffd9; backdrop-filter: blur(7px); }
.sample-showcase-copy strong, .sample-showcase-copy span { display: block; }
.sample-showcase-copy strong { color: #175d3a; font-size: .73rem; }
.sample-showcase-copy span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: .61rem; }
.sample-showcase-copy svg { width: 13px; }
.editorial-section { padding: 31px; border: 1px solid #c9e4d3; border-radius: 16px; background: linear-gradient(145deg,#f7fcf8,#edf8f1); }
.editorial-disclosure { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #acd5bc; border-radius: 999px; color: #17653e; font-size: .66rem; font-weight: 800; }
.editorial-disclosure svg { width: 14px; }
.editorial-intro { max-width: 720px; margin: -4px 0 20px; color: var(--muted); font-size: .77rem; line-height: 1.6; }
.editorial-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.editorial-grid article, .editorial-preview article { padding: 17px; border: 1px solid #d6e9dc; border-radius: 11px; background: #fff; }
.editorial-grid article > span, .editorial-preview article > span { color: #268357; font-size: .59rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.editorial-grid h3 { margin: 6px 0 7px; font-size: 1rem; }
.editorial-grid p, .editorial-preview p { margin: 0; color: #4c6255; font-size: .74rem; line-height: 1.6; }
.editorial-admin { padding: 18px; border: 1px solid #cde4d5; border-radius: 11px; background: #f6fbf7; }
.editorial-admin > .checkbox-label { margin-bottom: 14px; }
.editorial-admin .ai-seo-helper { margin: 0; border: 0; border-top: 1px solid #dcebe1; border-radius: 0; background: transparent; }
.editorial-admin .ai-seo-helper > label { display: flex; align-items: center; gap: 7px; }
.editorial-admin .ai-seo-helper select { width: 68px; }
.editorial-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.editorial-preview article { padding: 12px; }
.editorial-preview article strong { display: block; margin: 5px 0; font-size: .74rem; }
.marketing-choice, .privacy-choice { background: linear-gradient(145deg,#fff,#f2faf5); }
.marketing-choice .checkbox-label { margin: 18px 0; }
.admin-book-filters { display: grid; grid-template-columns: minmax(260px,1fr) minmax(190px,.35fr) auto auto; gap: 10px; align-items: end; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-book-filters label { position: relative; color: var(--muted); font-size: .68rem; font-weight: 750; }
.admin-book-filters label:first-child > svg { position: absolute; z-index: 1; left: 11px; bottom: 12px; width: 15px; color: #799083; }
.admin-book-filters label:first-child input { padding-left: 35px; }
.admin-book-filters input, .admin-book-filters select { width: 100%; margin-top: 6px; }
.admin-book-filters .btn { min-height: 42px; }
.admin-book-filters .text-link { align-self: center; margin-bottom: 10px; }
.analytics-breakdowns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.analytics-breakdowns table { min-width: 360px; }
.promotion-layout { display: grid; grid-template-columns: minmax(310px,.7fr) minmax(0,1.3fr); gap: 24px; align-items: start; }
.promotion-layout > .panel:first-child { position: sticky; top: 84px; }
.promotion-layout table { min-width: 720px; }
.unsubscribe-page { display: grid; justify-items: center; max-width: 580px; min-height: 100vh; margin: 0 auto; padding: 12vh 24px; text-align: center; }
.unsubscribe-page img { width: 150px; height: auto; }
.unsubscribe-page h1 { margin: 24px 0 9px; font-family: Georgia,serif; font-size: 2rem; }
.unsubscribe-page p { margin: 0 0 23px; color: var(--muted); line-height: 1.7; }

/* Protected reader: whole-page fit, thumb rail and touch-friendly controls. */
.reader-title { position: relative; padding-bottom: 7px; }
.reader-progress-line { position: absolute; right: 0; bottom: 0; left: 23px; height: 3px; border-radius: 99px; background: #dfeae3; overflow: hidden; }
.reader-progress-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2bb567,#0c7845); }
.reader-tools button.active { border-radius: 6px; background: #dff2e6; color: #126b40; }
.reader-rail { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 102px; padding: 9px 16px; overflow-x: auto; border-top: 1px solid #d7e5dc; background: #f8fbf9; scrollbar-width: thin; }
.reader-thumb { position: relative; flex: 0 0 58px; padding: 4px; border: 2px solid transparent; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px #172d2115; }
.reader-thumb img { display: block; width: 100%; height: 70px; object-fit: cover; object-position: top; border-radius: 3px; }
.reader-thumb span { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ffffffed; color: #244b35; font-size: .58rem; font-weight: 800; }
.reader-thumb.active { border-color: #27a15e; background: #e7f6ec; }
.rail-gap { color: #8a9b91; letter-spacing: 2px; }
.reader-controls { gap: 15px; }
.reader-scrubber { flex: 1; justify-content: center; }
.reader-scrubber input[type="range"] { width: min(360px,38vw); padding: 0; accent-color: #19864f; }
.reader-page-box input { width: 58px; }
.reader-shell.dark .reader-rail { border-color: #33415a; background: #1d293b; }
.reader-shell.dark .reader-thumb { background: #27364c; color: #dbe8df; }
.reader-shell.dark .reader-thumb.active { border-color: #70d39d; }
.reader-shell.dark .reader-progress-line { background: #40526c; }

@media (max-width: 1080px) {
  .analytics-breakdowns, .promotion-layout { grid-template-columns: 1fr; }
  .promotion-layout > .panel:first-child { position: static; }
}

@media (max-width: 680px) {
  .consent-banner { right: 10px; bottom: 10px; left: 10px; display: block; padding: 16px; }
  .consent-banner p { font-size: .69rem; }
  .consent-actions { margin-top: 13px; }
  .consent-actions .btn { flex: 1; }
  .catalog-tag-filter { display: flex; flex-wrap: nowrap; margin: 0; }
  .catalog-tag-filter a { flex: 0 0 auto; }
  .editorial-section { padding: 20px; }
  .editorial-section .section-heading { display: block; }
  .editorial-disclosure { margin-top: 10px; }
  .editorial-grid, .editorial-preview { grid-template-columns: 1fr; }
  .admin-book-filters { grid-template-columns: 1fr 1fr; }
  .admin-book-filters label:first-child { grid-column: 1 / -1; }
  .admin-book-filters .text-link { margin: 0; }
  .reader-progress-line { left: 0; }
  .reader-tools { align-items: flex-start; }
  .reader-tools > div { width: 100%; justify-content: center; }
  .reader-tools button span { display: none; }
  .reader-paper-area { min-height: 0; padding: 8px !important; }
  .reader-rail { justify-content: flex-start; min-height: 79px; padding: 6px 9px; }
  .reader-thumb { flex-basis: 45px; }
  .reader-thumb img { height: 53px; }
  .reader-controls { position: relative; z-index: 4; gap: 7px; padding: 9px 10px; }
  .reader-controls .btn { min-width: 40px; }
  .reader-controls .btn span { display: none; }
  .reader-scrubber { display: grid !important; flex: 1; gap: 3px !important; }
  .reader-scrubber input[type="range"] { width: 100%; }
  .reader-page-box { display: none !important; }
  .sample-bar { line-height: 1.45; }
}

/* Keep small catalogue text readable on the pale green backgrounds. */
.benefits span, .book-subject, .format, .price del, .product-price del,
.footer-bottom, .footer-bottom a { color: #52665b; }

@media(max-width:680px) { .settings-layout .form-grid { grid-template-columns: 1fr; } .settings-layout .form-grid .span-2 { grid-column: auto; } }

/* Shared-account screens use one centered card on mobile and desktop. */
.auth-wrap.bodhi-auth { max-width: 560px; grid-template-columns: minmax(0, 1fr); }
/* Uploader studio shares the established admin layout. */
.uploader-application-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:24px;align-items:start}.uploader-application-grid aside{display:grid;gap:24px}.uploader-shell .panel,.admin-main>.panel:has([id^="uploader-"]){margin-bottom:24px}.uploader-toolbar,.uploader-status-line{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:0 0 24px}.uploader-details{display:grid;gap:14px}.uploader-details>div{display:grid;grid-template-columns:145px minmax(0,1fr);gap:16px;padding-bottom:12px;border-bottom:1px solid var(--line,#e2e9e5)}.uploader-details dt{font-weight:600}.uploader-details dd{margin:0;overflow-wrap:anywhere}.uploader-review-note{margin:12px 0;max-width:600px;white-space:pre-wrap}.uploader-review-note p{margin:8px 0 0}.uploader-terms{padding:16px;border:1px solid var(--line,#e2e9e5);border-radius:12px;margin-bottom:20px}.uploader-terms summary{cursor:pointer;font-weight:600}.uploader-terms p{font-size:14px;line-height:1.65}.uploader-subscription{max-width:800px}.uploader-subscription form{margin:24px 0}.uploader-shell td small{display:block}.uploader-stats .stat-card strong{font-size:clamp(22px,2.4vw,36px)}
@media(max-width:1050px){.uploader-application-grid{grid-template-columns:1fr}}@media(max-width:600px){.uploader-details>div{grid-template-columns:1fr;gap:4px}.uploader-status-line,.uploader-toolbar{gap:10px}.uploader-application-grid{gap:16px}}

.admin-nav{overflow-y:auto}
