:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  color: #1d2529;
  --ink: #1d2529;
  --muted: #617078;
  --line: #d8d0c4;
  --paper: #fffdf8;
  --panel: #ffffff;
  --green: #176c5f;
  --blue: #2f5c8f;
  --rust: #b85336;
  --gold: #b58b2a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f1ea;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  min-height: 42px;
  padding: 0 16px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button.secondary {
  background: #2d3840;
}

.text-button {
  background: transparent;
  color: var(--blue);
  min-height: 30px;
  padding: 0;
}

input,
select,
textarea {
  border: 1px solid #cfc6ba;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--green);
  outline: 3px solid rgba(23, 108, 95, 0.16);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1.02;
  max-width: 880px;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.15;
}

h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.app-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 58px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 850;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand small,
.book-card small,
.terms-grid small {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 2px;
}

.top-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: #334249;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 8px 10px;
  text-decoration: none;
}

.top-nav a:hover {
  background: #fffdf8;
  border-color: var(--line);
}

.account-bar,
.account-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.status,
.user-chip,
.money-pill,
.recognition-pill,
.access-badge,
.chapter-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.status[data-state="ok"] {
  background: #e7f3ed;
  border-color: #a8d8b5;
  color: #146c2e;
}

.status[data-state="bad"] {
  background: #fff0ee;
  border-color: #f0b3aa;
  color: #9f2d20;
}

.muted {
  color: var(--muted);
}

.hero-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  margin-top: 24px;
}

.hero-copy {
  align-content: end;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 310px;
  padding: 28px;
}

.hero-copy p:not(.eyebrow) {
  color: #45545c;
  line-height: 1.5;
  margin-top: 14px;
  max-width: 700px;
}

.hero-copy .legal-inline {
  color: #56646d;
  font-size: 0.92rem;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button-link {
  align-items: center;
  background: var(--green);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.secondary-link {
  background: #2d3840;
}

.eyebrow {
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.auth-panel,
.author-workflow,
.detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-panel {
  display: grid;
  gap: 9px;
  padding: 20px;
}

.form-hint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin: 2px 0 0;
}

.auth-panel label,
.controls label span,
.upload-grid label {
  color: #35434a;
  font-size: 0.82rem;
  font-weight: 800;
}

.button-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
}

.form-message {
  color: var(--blue);
  font-size: 0.88rem;
  line-height: 1.4;
  min-height: 22px;
}

.front-reader {
  background:
    radial-gradient(circle at 8% 0%, rgba(181, 139, 42, 0.18), transparent 28%),
    linear-gradient(135deg, #272f31, #5b3c2d 54%, #173f3a);
  border: 1px solid rgba(29, 37, 41, 0.22);
  border-radius: 10px;
  color: #fffdf8;
  margin-top: 18px;
  padding: 16px;
}

.writer-splash {
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 253, 248, 0.22), transparent 30%),
    linear-gradient(135deg, #142927, #324b43 48%, #9c4d34);
  border: 1px solid rgba(29, 37, 41, 0.2);
  border-radius: 10px;
  color: #fffdf8;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  margin-top: 18px;
  overflow: hidden;
  padding: clamp(22px, 4vw, 42px);
}

.writer-splash h2 {
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  max-width: 860px;
}

.writer-splash-copy p:not(.eyebrow),
.writer-review-card p,
.writer-review-card li {
  color: #f4eadc;
  line-height: 1.5;
}

.writer-splash-copy p:not(.eyebrow) {
  font-size: 1.05rem;
  margin: 16px 0 22px;
  max-width: 780px;
}

.writer-review-card {
  align-self: stretch;
  background: rgba(255, 253, 248, 0.12);
  border: 1px solid rgba(255, 253, 248, 0.26);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.writer-review-card strong {
  font-size: 1.12rem;
}

.writer-review-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.front-reader-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.front-reader-title h2 {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.04em;
}

.front-reader-title p:not(.eyebrow) {
  color: #f1e7d8;
  margin-top: 5px;
}

.front-reader-controls,
.front-book-actions,
.member-book-tools,
.saved-search-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.front-reader-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
}

.front-book-card {
  align-content: start;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.front-book-card .book-cover.large {
  height: 176px;
  width: 120px;
}

.front-book-card p {
  color: #46545b;
  font-size: 0.93rem;
  line-height: 1.45;
}

.front-book-actions {
  align-items: stretch;
}

.front-follow-card {
  background: rgba(255, 247, 223, 0.74);
  border: 1px solid rgba(228, 207, 131, 0.9);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.front-follow-card strong {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.front-follow-card p {
  color: #5c5046;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  margin: 0;
}

.front-follow-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.front-page {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.05), transparent 42px),
    #fffdf8;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 10px;
  box-shadow: inset 10px 0 24px rgba(71, 52, 32, 0.08), 0 18px 44px rgba(0, 0, 0, 0.2);
  color: #211d18;
  max-height: min(720px, 78vh);
  overflow: auto;
  padding: clamp(24px, 4vw, 52px);
}

.front-page header {
  border-bottom: 1px solid #e1d7c9;
  margin-bottom: 22px;
  padding-bottom: 16px;
  text-align: center;
}

.reader-mode-toggle {
  align-items: center;
  background: #f4efe7;
  border: 1px solid #e1d7c9;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
}

.reader-mode-toggle span,
.reader-mode-toggle button {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 30px;
  padding: 6px 11px;
}

.reader-mode-toggle span {
  background: var(--green);
  color: #fff;
}

.reader-mode-toggle button {
  background: transparent;
  border: 0;
  color: var(--rust);
}

.front-page header span {
  color: #6f6155;
  font-size: 0.86rem;
  font-weight: 800;
}

.front-page h3 {
  color: #201b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-top: 8px;
}

.controls {
  background: #e8e0d3;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 230px) minmax(150px, 190px);
  margin-top: 18px;
  padding: 14px;
}

.controls label {
  display: grid;
  gap: 6px;
}

.reader-saves {
  align-items: center;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px;
}

.reader-saves p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 4px;
}

.saved-search-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-search-chip,
.preference-button {
  background: #f4f1ea;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 34px;
  padding: 0 12px;
}

.preference-button.is-active {
  background: #e7f3ed;
  border-color: #a8d8b5;
  color: #146c2e;
}

.member-book-tools {
  margin-top: 12px;
}

.member-hint {
  background: #fff7df;
  border: 1px solid #e4cf83;
  border-radius: 999px;
  color: #765a09;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 10px;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  margin-top: 18px;
}

.catalog-column {
  min-width: 0;
}

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

.section-heading p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.book-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.book-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 202px;
  overflow: hidden;
}

.book-card.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 108, 95, 0.13);
}

.book-open {
  align-items: stretch;
  background: transparent;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 94px 1fr;
  height: 100%;
  min-height: 202px;
  padding: 14px;
  text-align: left;
  width: 100%;
}

.book-cover {
  align-items: center;
  background: var(--cover, var(--blue));
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 900;
  justify-content: center;
  min-height: 142px;
  overflow: hidden;
  position: relative;
}

.book-cover::after {
  background: rgba(255, 255, 255, 0.28);
  content: "";
  inset: 12px auto 12px 14px;
  position: absolute;
  width: 4px;
}

.book-cover.has-thumbnail {
  background: #151515;
}

.book-cover.has-thumbnail::after {
  display: none;
}

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

.book-cover.large {
  flex: 0 0 86px;
  height: 124px;
  min-height: 124px;
  width: 86px;
}

.book-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.book-meta,
.chapter-line,
.chapter-number {
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 850;
}

.book-card strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.book-summary {
  color: #46545b;
  font-size: 0.9rem;
  line-height: 1.36;
}

.chapter-line {
  align-self: end;
  color: var(--green);
}

.detail-panel {
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 18px;
  position: sticky;
  top: 12px;
}

.detail-head {
  align-items: center;
  display: flex;
  gap: 14px;
}

.detail-head p:not(.eyebrow),
.detail-summary,
.purchase-row p,
.chapter-excerpt,
.chapter p,
.chapter time {
  color: #4b5a62;
  line-height: 1.48;
}

.detail-summary {
  margin-top: 14px;
}

.source-link {
  color: var(--green);
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 850;
  margin-top: 8px;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 22px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.legal-page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 16px;
  margin: 32px auto;
  max-width: 880px;
  padding: 28px;
}

.legal-page h1,
.legal-page h2,
.legal-page p {
  margin: 0;
}

.legal-page p {
  color: #45545c;
  line-height: 1.6;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.terms-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.terms-grid span {
  background: #f5f0e8;
  border: 1px solid #ded4c5;
  border-radius: 6px;
  padding: 10px;
}

.terms-grid strong {
  display: block;
  line-height: 1.15;
}

.purchase-row {
  align-items: center;
  background: #f8faf9;
  border: 1px solid #d5e2dc;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-top: 16px;
  padding: 14px;
}

.purchase-row p {
  font-size: 0.9rem;
  margin-top: 4px;
}

.reader-launch {
  align-items: center;
  background: #242d30;
  border-radius: 8px;
  color: #fffdf8;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-top: 12px;
  padding: 14px;
}

.reader-launch p {
  color: #d8d0c4;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 4px;
}

.reader-primary,
.chapter-read-button {
  background: var(--rust);
}

.reader-unavailable {
  color: #d8d0c4;
  font-size: 0.9rem;
  font-weight: 800;
}

.access-badge {
  background: #e7f3ed;
  color: #146c2e;
}

.rating-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rating-row span {
  color: #35434a;
  font-weight: 800;
}

.rate-button {
  background: #f4f1ea;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 34px;
  min-width: 36px;
  padding: 0;
}

.chapter-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.chapter {
  border: 1px solid #ded4c5;
  border-radius: 8px;
  padding: 14px;
}

.chapter.is-locked {
  background: #faf7f1;
}

.chapter-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.chapter-status {
  background: #fff;
  color: var(--blue);
}

.chapter-excerpt {
  font-size: 0.93rem;
  margin-top: 8px;
}

.chapter p:not(.chapter-excerpt) {
  margin-top: 10px;
}

.chapter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
}

.chapter-actions span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.chapter-read-button {
  min-height: 36px;
}

.chapter time {
  display: block;
  font-size: 0.8rem;
  margin-top: 10px;
}

.locked-copy {
  color: #9f2d20;
  font-weight: 700;
}

.empty-state {
  background: #fffdf8;
  border: 1px dashed #cfc6ba;
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.error {
  color: #9f2d20;
}

body.reader-open {
  overflow: hidden;
}

.reader-modal[hidden] {
  display: none;
}

.reader-modal {
  inset: 0;
  position: fixed;
  z-index: 40;
}

.reader-backdrop {
  background: rgba(20, 25, 26, 0.72);
  inset: 0;
  position: absolute;
}

.reader-shell {
  background:
    linear-gradient(90deg, rgba(41, 32, 22, 0.08), transparent 16%, transparent 84%, rgba(41, 32, 22, 0.08)),
    #ede4d6;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  inset: 18px;
  overflow: hidden;
  padding: 14px;
  position: absolute;
}

.reader-toolbar {
  align-items: center;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid #d8d0c4;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.reader-toolbar h2 {
  font-size: 1rem;
  margin-top: 2px;
}

.reader-kicker {
  color: var(--rust);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.reader-close-button {
  color: var(--rust);
}

.reader-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 2px;
}

.reader-chapter-tab {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid #d8d0c4;
  color: var(--ink);
  min-height: 34px;
  min-width: 38px;
  padding: 0 10px;
}

.reader-chapter-tab.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.reader-page {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.05), transparent 42px),
    #fffdf8;
  border: 1px solid #d8d0c4;
  border-radius: 10px;
  box-shadow: inset 10px 0 24px rgba(71, 52, 32, 0.08);
  margin: 0 auto;
  max-width: 880px;
  overflow: auto;
  padding: clamp(28px, 5vw, 64px);
  width: min(100%, 880px);
}

.reader-page:focus {
  outline: 3px solid rgba(23, 108, 95, 0.2);
}

.reader-page-head {
  border-bottom: 1px solid #e1d7c9;
  margin-bottom: 26px;
  padding-bottom: 18px;
  text-align: center;
}

.reader-page-head p,
.reader-page-head span {
  color: #6f6155;
  font-size: 0.88rem;
  font-weight: 800;
}

.reader-page-head h1 {
  color: #201b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 8px auto 12px;
  max-width: 760px;
}

.reader-copy {
  color: #211d18;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.78;
}

.reader-copy p {
  margin: 0;
  text-indent: 1.4em;
}

.reader-copy p:first-child {
  text-indent: 0;
}

.reader-copy p + p {
  margin-top: 0.35em;
}

.reader-copy p:first-child::first-letter {
  color: var(--rust);
  float: left;
  font-size: 4.3rem;
  line-height: 0.82;
  padding: 0.08em 0.08em 0 0;
}

.reader-turnbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.reader-cta {
  border-top: 1px solid #e1d7c9;
  display: grid;
  gap: 14px;
  margin-top: 26px;
  padding-top: 18px;
}

.reader-cta-copy strong {
  display: block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.reader-cta-copy p {
  color: #5c5046;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.reader-cta-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.author-workflow {
  margin-top: 22px;
  padding: 18px;
}

.money-pill {
  background: #fff7df;
  border-color: #e4cf83;
  color: #765a09;
}

.recognition-pill {
  background: #e7f3ed;
  border-color: #a8d8b5;
  color: #146c2e;
}

.upload-grid {
  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-grid label {
  align-self: end;
}

.span-2 {
  grid-column: 1 / -1;
}

.check-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
}

.check-row input {
  margin-top: 2px;
  min-height: auto;
  width: auto;
}

.review-process {
  background: #f8faf9;
  border: 1px solid #d5e2dc;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.review-process strong {
  color: var(--ink);
}

.review-process span {
  color: #4b5a62;
  font-size: 0.92rem;
  line-height: 1.35;
}

@media (max-width: 1080px) {
  .hero-grid,
  .front-reader-layout,
  .workspace,
  .writer-splash {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    max-height: none;
    position: static;
  }

  .front-book-card {
    grid-template-columns: auto 1fr;
  }

  .front-book-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 20px, 1480px);
    padding-top: 12px;
  }

  .topbar,
  .front-reader-head,
  .controls,
  .reader-saves,
  .section-heading,
  .purchase-row,
  .reader-launch,
  .upload-grid {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-copy {
    min-height: 260px;
    padding: 20px;
  }

  .book-open {
    grid-template-columns: 78px 1fr;
  }

  .book-cover {
    min-height: 128px;
  }

  .account-bar,
  .account-summary,
  .front-reader-controls,
  .front-book-actions,
  .member-book-tools,
  .saved-search-actions {
    justify-content: start;
  }

  .front-book-card {
    grid-template-columns: 1fr;
  }

  .front-page {
    max-height: 74vh;
    padding: 24px 18px;
  }

  .span-2 {
    grid-column: auto;
  }

  .reader-shell {
    border-radius: 0;
    inset: 0;
    padding: 10px;
  }

  .reader-toolbar,
  .reader-tools,
  .reader-mode-toggle,
  .reader-turnbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .reader-page {
    padding: 24px 18px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body.reader-open .app-shell > *:not(.reader-modal),
  body.reader-open .reader-backdrop,
  body.reader-open .reader-toolbar,
  body.reader-open .reader-nav,
  body.reader-open .reader-turnbar {
    display: none !important;
  }

  body.reader-open,
  body.reader-open .reader-modal,
  body.reader-open .reader-shell,
  body.reader-open .reader-page {
    inset: auto;
    margin: 0;
    max-height: none;
    min-height: 0;
    overflow: visible;
    position: static;
  }

  body.reader-open .reader-shell {
    background: #fff;
    border: 0;
    box-shadow: none;
    display: block;
    padding: 0;
  }

  body.reader-open .reader-page {
    background: #fff;
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0.5in;
    width: auto;
  }

  body.reader-open .reader-copy {
    font-size: 12pt;
    line-height: 1.55;
  }
}
