:root {
  --ink: #272b25;
  --muted: #6f746b;
  --green: #334934;
  --green-soft: #71806b;
  --paper: #f4eedf;
  --paper-deep: #eee6d4;
  --canvas: #e8e2d5;
  --line: #bdb6a7;
  --white: #fffdf7;
  --danger: #8b3b34;
  --success: #315e43;
  --shadow: 0 18px 50px rgba(42, 45, 39, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f0ece4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  max-width: 1500px;
  margin: 0 auto;
  padding: 42px 36px 24px;
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
}
.site-header h1,
.panel-heading h2,
.preview-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0;
}
.site-header h1 { font-size: clamp(2.1rem, 4vw, 4.2rem); line-height: .98; max-width: 840px; }
.header-copy { max-width: 720px; color: var(--muted); font-size: 1rem; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: .72rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.collection-badge { border: 1px solid #aeb5aa; color: var(--green); padding: 10px 14px; border-radius: 999px; white-space: nowrap; font-size: .8rem; }

.workspace {
  max-width: 1500px;
  margin: 0 auto 50px;
  padding: 0 36px 30px;
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.card { background: rgba(255,253,247,.88); border: 1px solid rgba(111,116,107,.16); border-radius: var(--radius); box-shadow: var(--shadow); }
.creator-panel { padding: 28px; position: sticky; top: 18px; }
.panel-heading h2, .preview-header h2 { font-size: 2rem; line-height: 1.08; }
.panel-heading > p:last-child { color: var(--muted); font-size: .88rem; }

.field { display: block; margin-top: 18px; }
.field > span { display: block; margin-bottom: 7px; font-size: .78rem; letter-spacing: .05em; font-weight: 700; text-transform: uppercase; }
.field em { font-weight: 400; text-transform: none; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #c7c2b6; background: #fffdf8; color: var(--ink); border-radius: 10px; padding: 12px 13px; outline: none;
}
.field textarea { resize: vertical; min-height: 132px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-soft); box-shadow: 0 0 0 3px rgba(70, 91, 67, .1); }
.field small { display: block; text-align: right; color: var(--muted); margin-top: 5px; }


.duration-picker {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
}
.duration-picker legend {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-size: .78rem;
  letter-spacing: .05em;
  font-weight: 700;
  text-transform: uppercase;
}
.duration-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.duration-option {
  position: relative;
  display: block;
  cursor: pointer;
}
.duration-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.duration-card {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px;
  border: 1px solid #c7c2b6;
  border-radius: 12px;
  background: #fffdf8;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.duration-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 400;
}
.duration-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.25;
}
.duration-option input:checked + .duration-card {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(70, 91, 67, .10);
  transform: translateY(-1px);
}
.ui-collection-linho .duration-option input:checked + .duration-card {
  box-shadow: 0 0 0 3px rgba(114,95,80,.10);
}

.collection-picker {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
}
.collection-picker legend {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-size: .78rem;
  letter-spacing: .05em;
  font-weight: 700;
  text-transform: uppercase;
}
.collection-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.collection-option {
  display: block;
  position: relative;
  cursor: pointer;
}
.collection-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.collection-card {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid #c7c2b6;
  border-radius: 12px;
  background: #fffdf8;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.collection-option input:checked + .collection-card {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(70, 91, 67, .10);
  transform: translateY(-1px);
}
.collection-swatch {
  width: 43px;
  height: 58px;
  flex: 0 0 43px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(63,56,48,.12);
}
.collection-card-herbario .collection-swatch {
  background:
    linear-gradient(145deg, transparent 45%, rgba(72,91,68,.28) 46% 48%, transparent 49%),
    radial-gradient(ellipse at 68% 35%, rgba(75,99,73,.45) 0 12%, transparent 13%),
    radial-gradient(ellipse at 42% 67%, rgba(75,99,73,.38) 0 11%, transparent 12%),
    #f3efe5;
}
.collection-card-linho .collection-swatch {
  background:
    repeating-linear-gradient(0deg, rgba(114,95,80,.10) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(114,95,80,.08) 0 1px, transparent 1px 8px),
    #f6f1e8;
}
.collection-card-aurora .collection-swatch {
  background:
    radial-gradient(circle at 50% 34%, rgba(183,154,104,.55) 0 10%, transparent 11%),
    radial-gradient(circle at 50% 78%, rgba(201,147,137,.36) 0 33%, transparent 34%),
    linear-gradient(to top, rgba(234,198,174,.42), transparent 34%),
    #faf6f0;
}
.collection-card-jardim_classico .collection-swatch {
  background:
    linear-gradient(180deg, rgba(200,163,156,.18), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(134,92,97,.26) 0 11%, transparent 12%),
    radial-gradient(circle at 38% 50%, rgba(200,163,156,.35) 0 14%, transparent 15%),
    radial-gradient(circle at 62% 50%, rgba(200,163,156,.35) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 38%, rgba(200,163,156,.35) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 62%, rgba(200,163,156,.35) 0 14%, transparent 15%),
    #fbf7ef;
}
.collection-card-noite_serena .collection-swatch {
  background:
    radial-gradient(circle at 72% 45%, rgba(64,87,102,.8) 0 5%, transparent 6%),
    radial-gradient(circle at 34% 30%, rgba(117,99,110,.42) 0 4%, transparent 5%),
    radial-gradient(circle at 55% 70%, rgba(103,113,125,.42) 0 4%, transparent 5%),
    linear-gradient(180deg, rgba(64,87,102,.06), transparent 35%),
    #f7f6f3;
}
.collection-card-copy {
  min-width: 0;
}
.collection-card-copy strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
}
.collection-card-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.25;
}

.ui-collection-linho {
  --green: #725f50;
  --green-soft: #b7a38e;
  --paper: #f6f1e8;
  --ink: #3e352e;
  --muted: #7b6e64;
}
.ui-collection-linho .preview-stage { background: #d9d0c4; }
.ui-collection-linho .collection-option input:checked + .collection-card {
  box-shadow: 0 0 0 3px rgba(114,95,80,.10);
}

.ui-collection-aurora {
  --green: #a96f63;
  --green-soft: #eac6ae;
  --paper: #faf6f0;
  --ink: #493e39;
  --muted: #806a61;
}
.ui-collection-aurora .preview-stage { background: #eadfd2; }
.ui-collection-aurora .collection-option input:checked + .collection-card {
  box-shadow: 0 0 0 3px rgba(169,111,99,.12);
}

.ui-collection-jardim_classico {
  --green: #586253;
  --green-soft: #c8a39c;
  --paper: #fbf7ef;
  --ink: #443c38;
  --muted: #7a6765;
}
.ui-collection-jardim_classico .preview-stage { background: #e8dfd6; }
.ui-collection-jardim_classico .collection-option input:checked + .collection-card {
  box-shadow: 0 0 0 3px rgba(134,92,97,.12);
  border-color: #865c61;
}

.ui-collection-noite_serena {
  --green: #405766;
  --green-soft: #a7adb4;
  --paper: #f7f6f3;
  --ink: #34383c;
  --muted: #69717a;
}
.ui-collection-noite_serena .preview-stage { background: #d7dbdf; }
.ui-collection-noite_serena .collection-option input:checked + .collection-card {
  box-shadow: 0 0 0 3px rgba(64,87,102,.12);
  border-color: #405766;
}

.primary-button, .secondary-button {
  width: 100%; border-radius: 10px; padding: 12px 16px; margin-top: 14px; font-weight: 700; border: 1px solid var(--green);
}
.primary-button { background: var(--green); color: white; }
.secondary-button { background: transparent; color: var(--green); }
.secondary-button.compact, .primary-button.compact { width: auto; margin: 0; padding: 9px 12px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.status { min-height: 28px; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.status.loading { color: #6a5b31; }
.status.success { color: var(--success); font-weight: 650; }
.status.error { color: var(--danger); font-weight: 650; }

.preview-panel { padding: 22px; overflow: hidden; }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.preview-stage { background: #d9d4c9; border-radius: 14px; min-height: 690px; padding: 28px; overflow: auto; display: grid; place-items: center; }
.book-preview { width: max-content; max-width: 100%; }
.spread { display: flex; gap: 10px; align-items: stretch; justify-content: center; }
.spread.single { justify-content: center; }
.a5-page {
  position: relative;
  width: 420px;
  height: 596px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(45, 43, 36, .14);
  font-family: Georgia, "Times New Roman", serif;
}
.a5-page.left { box-shadow: -5px 10px 28px rgba(45,43,36,.12), inset -1px 0 rgba(80,75,65,.08); }
.a5-page.right { box-shadow: 5px 10px 28px rgba(45,43,36,.12), inset 1px 0 rgba(80,75,65,.08); }
.page-inner { position: relative; width: 100%; height: 100%; padding: 31px 30px 28px; display: flex; flex-direction: column; }
.a5-page::after { content: attr(data-page); position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.a5-page h3 { font-weight: 400; font-size: 25px; line-height: 1.05; margin: 7px 0 12px; letter-spacing: -.025em; }
.a5-page p { font-size: 12.5px; line-height: 1.48; margin: 0; }
.scientific-code, .page-kicker, .page-section-title, .bible-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 7.8px;
  font-weight: 700;
  color: var(--green);
}
.page-kicker { font-size: 9px; }
.bible-ref { padding: 8px 0 10px; border-top: 1px solid #9c988d; border-bottom: 1px solid #9c988d; margin-bottom: 16px; }
.page-section-title { margin: 0 0 7px; }
.page-section { margin-top: 15px; }
.question-box { border-left: 3px solid var(--green-soft); background: rgba(113,128,107,.10); padding: 11px 12px; font-size: 12.8px; line-height: 1.4; }
.prayer { font-style: italic; }
.botanical-mark { color: #84907f; }
.botanical-mark svg { display: block; width: 100%; height: auto; }
.botanical-mark.small { width: 35px; margin-top: auto; align-self: center; opacity: .8; }
.botanical-mark.large { width: 62px; margin-left: auto; margin-top: auto; }

.cover .page-inner { padding: 28px 30px 28px; }
.cover-index { display: flex; justify-content: space-between; gap: 10px; font: 7px/1.2 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .09em; color: var(--green); padding-bottom: 10px; border-bottom: 1px solid #9c988d; }
.cover-title { margin-top: 45px; max-width: 335px; }
.cover-title h3 { font-size: 38px; margin: 5px 0 11px; }
.cover-title .subtitle { font: 9px/1.5 ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: #6b6d64; }
.cover-owner { margin-top: 16px; padding-top: 9px; border-top: 1px solid #9c988d; width: 64%; font: 8px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .09em; }

.owner-page .owner-line { font-size: 19px; min-height: 34px; margin-top: 45px; padding-bottom: 7px; border-bottom: 1px solid #79786f; }
.microcopy { margin-top: auto !important; color: #75736b; font-size: 11.5px !important; }
.intro-page h3, .closing-page h3, .notes-page h3 { font-size: 27px; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 18px; border-top: 1px solid #aaa598; }
.how-item { padding: 10px 0; border-bottom: 1px solid #aaa598; }
.how-item strong { display: block; font: 8px/1.2 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--green); margin-bottom: 5px; }
.how-item span { font-size: 10px; line-height: 1.35; }

.journey-phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 14px;
}
.journey-phase {
  padding: 8px 7px;
  border-top: 1px solid rgba(111,116,107,.42);
  border-bottom: 1px solid rgba(111,116,107,.24);
}
.journey-phase span {
  display: block;
  font: 6.8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--green);
}
.journey-phase strong {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 400;
}
.week-phase {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(111,116,107,.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  color: var(--green);
}
.week-phase span {
  font-size: 6.8px;
  letter-spacing: .09em;
}
.week-phase strong {
  font-size: 7.4px;
  letter-spacing: .12em;
}
.collection-linho .journey-phase,
.collection-linho .week-phase {
  border-color: rgba(114,95,80,.28);
}
.collection-linho .journey-phase span,
.collection-linho .week-phase {
  color: #725f50;
}

.reflection-prompts { margin-top: 16px; }
.reflection-prompt { padding: 8px 0; border-bottom: 1px solid #aaa598; font-size: 10.8px; }
.write-lines, .notes-lines { margin-top: 6px; min-height: 112px; background: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(122,119,109,.28) 21px 22px); }
.notes-lines { flex: 1; min-height: 260px; }
.back-cover { background: var(--green); color: #f2eee4; }
.back-cover::after { display: none; }
.back-cover .page-inner { align-items: center; justify-content: center; text-align: center; }
.back-cover blockquote { max-width: 300px; margin: 0; font-size: 24px; line-height: 1.25; font-weight: 400; }
.back-cover .scientific-code { color: #d3d5c9; margin-top: auto; }


.textile-mark {
  color: #9a8470;
}
.textile-mark svg {
  display: block;
  width: 100%;
  height: auto;
}
.textile-mark.small {
  width: 31px;
  margin-top: auto;
  align-self: center;
  opacity: .68;
}

.aurora-mark {
  color: #b28a68;
}
.aurora-mark svg,
.classic-mark svg,
.orbit-mark svg {
  display: block;
  width: 100%;
  height: auto;
}
.aurora-mark.small,
.classic-mark.small,
.orbit-mark.small {
  width: 34px;
  margin-top: auto;
  align-self: center;
  opacity: .82;
}
.aurora-mark.large,
.classic-mark.large,
.orbit-mark.large {
  width: 58px;
  margin-left: auto;
  margin-top: auto;
  opacity: .86;
}
.classic-mark {
  color: #865c61;
}
.orbit-mark {
  color: #5a6f7d;
}

/* COLEÇÃO 03 — AURORA */
.a5-page.collection-aurora {
  --green: #a96f63;
  --green-soft: #eac6ae;
  --paper: #faf6f0;
  --ink: #493e39;
  --muted: #806a61;
  background:
    radial-gradient(circle at 82% 18%, rgba(234,198,174,.34), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 28%),
    var(--paper);
}
.collection-aurora .scientific-code,
.collection-aurora .page-kicker,
.collection-aurora .page-section-title,
.collection-aurora .bible-ref {
  color: #a96f63;
}
.collection-aurora.cover .page-inner {
  position: relative;
}
.collection-aurora.cover .page-inner::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201,147,137,.28);
  pointer-events: none;
}
.collection-aurora .cover-title {
  margin-top: 62px;
}
.collection-aurora .cover-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 20px;
  margin-top: 14px;
  border-top: 1px solid rgba(183,154,104,.75);
  border-radius: 999px 999px 0 0;
}
.collection-aurora .cover-title .subtitle {
  color: #8e7569;
}
.collection-aurora .cover-owner {
  border-top-color: rgba(169,111,99,.42);
}
.collection-aurora .owner-line {
  border-bottom-color: rgba(169,111,99,.46);
}
.collection-aurora .bible-ref {
  border-top-color: rgba(169,111,99,.42);
  border-bottom-color: rgba(169,111,99,.42);
}
.collection-aurora .question-box {
  background: rgba(234,198,174,.16);
  border-left-color: #c99389;
}
.collection-aurora .how-grid,
.collection-aurora .how-item,
.collection-aurora .journey-phase,
.collection-aurora .week-phase,
.collection-aurora .reflection-prompt {
  border-color: rgba(169,111,99,.26);
}
.collection-aurora .journey-phase span,
.collection-aurora .week-phase,
.collection-aurora .how-item strong {
  color: #a96f63;
}
.collection-aurora .write-lines,
.collection-aurora .notes-lines {
  background: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(169,111,99,.18) 21px 22px);
}
.collection-aurora.back-cover {
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 24%), #a96f63;
  color: #fff5ef;
}
.collection-aurora.back-cover .scientific-code {
  color: #f3dfd2;
}

/* COLEÇÃO 04 — JARDIM CLÁSSICO */
.a5-page.collection-jardim_classico {
  --green: #586253;
  --green-soft: #c8a39c;
  --paper: #fbf7ef;
  --ink: #443c38;
  --muted: #7a6765;
  background:
    linear-gradient(180deg, rgba(200,163,156,.08), transparent 24%),
    var(--paper);
}
.collection-jardim_classico .scientific-code,
.collection-jardim_classico .page-kicker,
.collection-jardim_classico .page-section-title,
.collection-jardim_classico .bible-ref {
  color: #865c61;
}
.collection-jardim_classico.cover .page-inner {
  margin: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  padding: 22px 25px 20px;
  border: 1px solid rgba(134,92,97,.42);
}
.collection-jardim_classico.cover .page-inner::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(88,98,83,.18);
  pointer-events: none;
}
.collection-jardim_classico .cover-index,
.collection-jardim_classico .cover-owner,
.collection-jardim_classico .bible-ref,
.collection-jardim_classico .how-grid,
.collection-jardim_classico .how-item,
.collection-jardim_classico .journey-phase,
.collection-jardim_classico .week-phase,
.collection-jardim_classico .reflection-prompt {
  border-color: rgba(134,92,97,.26);
}
.collection-jardim_classico .cover-title {
  margin-top: 58px;
}
.collection-jardim_classico .cover-title::before {
  content: "";
  display: block;
  width: 54px;
  border-top: 1px solid rgba(88,98,83,.46);
  margin-bottom: 14px;
}
.collection-jardim_classico .cover-title .subtitle,
.collection-jardim_classico .microcopy {
  color: #7a6865;
}
.collection-jardim_classico .owner-line {
  border-bottom-color: rgba(134,92,97,.48);
}
.collection-jardim_classico .page-section-title {
  letter-spacing: .12em;
}
.collection-jardim_classico .question-box {
  border-left: 0;
  border-top: 1px solid rgba(134,92,97,.28);
  border-bottom: 1px solid rgba(134,92,97,.28);
  background: rgba(200,163,156,.10);
  padding: 10px 0;
}
.collection-jardim_classico .how-item strong,
.collection-jardim_classico .journey-phase span,
.collection-jardim_classico .week-phase {
  color: #865c61;
}
.collection-jardim_classico .write-lines,
.collection-jardim_classico .notes-lines {
  background: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(134,92,97,.16) 21px 22px);
}
.collection-jardim_classico.back-cover {
  background: #865c61;
  color: #fbf7ef;
}
.collection-jardim_classico.back-cover .scientific-code {
  color: #ead9d5;
}

/* COLEÇÃO 05 — NOITE SERENA */
.a5-page.collection-noite_serena {
  --green: #405766;
  --green-soft: #a7adb4;
  --paper: #f7f6f3;
  --ink: #34383c;
  --muted: #69717a;
  background:
    linear-gradient(180deg, rgba(64,87,102,.045), transparent 22%),
    var(--paper);
}
.collection-noite_serena .scientific-code,
.collection-noite_serena .page-kicker,
.collection-noite_serena .page-section-title,
.collection-noite_serena .bible-ref {
  color: #405766;
}
.collection-noite_serena .page-inner {
  padding: 33px 31px 29px;
}
.collection-noite_serena.cover .page-inner::before {
  content: "";
  position: absolute;
  inset: 22px 24px auto 24px;
  border-top: 1px solid rgba(64,87,102,.24);
}
.collection-noite_serena .cover-title {
  margin-top: 78px;
}
.collection-noite_serena .cover-title::before {
  content: "";
  display: block;
  width: 68px;
  border-top: 1px solid rgba(64,87,102,.42);
  margin-bottom: 16px;
}
.collection-noite_serena .cover-title .subtitle,
.collection-noite_serena .microcopy {
  color: #69717a;
}
.collection-noite_serena .cover-owner,
.collection-noite_serena .bible-ref,
.collection-noite_serena .how-grid,
.collection-noite_serena .how-item,
.collection-noite_serena .journey-phase,
.collection-noite_serena .week-phase,
.collection-noite_serena .reflection-prompt {
  border-color: rgba(64,87,102,.24);
}
.collection-noite_serena .owner-line {
  border-bottom-color: rgba(64,87,102,.38);
}
.collection-noite_serena .question-box {
  border-left: 0;
  border-top: 1px solid rgba(64,87,102,.24);
  border-bottom: 1px solid rgba(64,87,102,.24);
  background: transparent;
  padding: 10px 0;
}
.collection-noite_serena .how-item strong,
.collection-noite_serena .journey-phase span,
.collection-noite_serena .week-phase {
  color: #405766;
}
.collection-noite_serena .write-lines,
.collection-noite_serena .notes-lines {
  background: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(64,87,102,.16) 21px 22px);
}
.collection-noite_serena.back-cover {
  background: #405766;
  color: #f7f6f3;
}
.collection-noite_serena.back-cover .scientific-code {
  color: #d5dce2;
}

/* COLEÇÃO 02 — LINHO */
.a5-page.collection-linho {
  --green: #725f50;
  --green-soft: #b7a38e;
  --paper: #f6f1e8;
  --ink: #3e352e;
  background:
    repeating-linear-gradient(0deg, rgba(114,95,80,.018) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(114,95,80,.014) 0 1px, transparent 1px 9px),
    var(--paper);
}
.collection-linho .scientific-code,
.collection-linho .page-kicker,
.collection-linho .page-section-title,
.collection-linho .bible-ref {
  color: #725f50;
  letter-spacing: .15em;
}
.collection-linho.cover .page-inner {
  margin: 15px;
  width: calc(100% - 30px);
  height: calc(100% - 30px);
  padding: 20px 23px 19px;
  border: 1px solid rgba(114,95,80,.58);
}
.collection-linho.cover .page-inner::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(114,95,80,.15);
  pointer-events: none;
}
.collection-linho .cover-index {
  border-bottom: 0;
  padding-bottom: 0;
}
.collection-linho .cover-title {
  margin-top: 66px;
  max-width: 320px;
}
.collection-linho .cover-title::before {
  content: "";
  display: block;
  width: 62px;
  border-top: 1px solid rgba(114,95,80,.62);
  margin-bottom: 17px;
}
.collection-linho .cover-title h3 {
  font-size: 36px;
  line-height: 1.02;
}
.collection-linho .cover-title .subtitle {
  color: #806f62;
  letter-spacing: .12em;
  line-height: 1.6;
}
.collection-linho .cover-owner {
  width: 58%;
  border-top-color: rgba(114,95,80,.46);
}
.collection-linho.owner-page .owner-line {
  border-bottom-color: #8d7d70;
}
.collection-linho.owner-page .textile-mark {
  margin-top: 25px;
}
.collection-linho .bible-ref {
  background: rgba(183,163,142,.12);
  padding: 9px 10px;
  border: 0;
  margin: 0 0 16px;
}
.collection-linho .page-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.collection-linho .page-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(114,95,80,.28);
}
.collection-linho .question-box {
  border-left: 0;
  border-top: 1px solid rgba(114,95,80,.34);
  border-bottom: 1px solid rgba(114,95,80,.34);
  background: transparent;
  padding: 10px 0;
}
.collection-linho .how-grid {
  border-top-color: rgba(114,95,80,.34);
}
.collection-linho .how-item {
  border-bottom-color: rgba(114,95,80,.34);
}
.collection-linho .how-item strong {
  color: #725f50;
  letter-spacing: .13em;
}
.collection-linho .reflection-prompt {
  border-bottom: 1px solid rgba(114,95,80,.28);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: .02em;
}
.collection-linho .write-lines,
.collection-linho .notes-lines {
  background:
    repeating-linear-gradient(to bottom, transparent 0 21px, rgba(114,95,80,.20) 21px 22px);
}
.collection-linho.back-cover {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 8px),
    #725f50;
  color: #f6f1e8;
}
.collection-linho.back-cover .page-inner::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(246,241,232,.35);
}
.collection-linho.back-cover blockquote {
  max-width: 285px;
  font-size: 23px;
  line-height: 1.32;
}
.collection-linho.back-cover .scientific-code {
  color: #eadfd3;
}

.spread-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.spread-controls button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #b6b2a8; background: #fffdf8; color: var(--green); font-size: 18px; }
#spreadLabel { min-width: 155px; text-align: center; color: var(--muted); font-size: .85rem; }

.print-mode-picker {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 0;
  border: 0;
}
.print-mode-picker legend {
  width: 100%;
  margin-bottom: 8px;
  text-align: center;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.print-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.print-mode-option {
  position: relative;
  display: block;
  cursor: pointer;
}
.print-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.print-mode-card {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid #c7c2b6;
  border-radius: 11px;
  background: #fffdf8;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.print-mode-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  font-weight: 400;
}
.print-mode-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.3;
}
.print-mode-option input:checked + .print-mode-card {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(70, 91, 67, .10);
  transform: translateY(-1px);
}
.print-mode-option input:focus-visible + .print-mode-card {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.print-hint { text-align: center; color: var(--muted); font-size: .78rem; margin-bottom: 0; }
.print-area { display: none; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 1fr; }
  .creator-panel { position: static; }
  .preview-stage { min-height: 590px; }
  .a5-page { width: 350px; height: 497px; }
  .page-inner { padding: 25px 24px; }
  .a5-page h3 { font-size: 21px; }
  .a5-page p { font-size: 10.6px; }
  .cover-title h3 { font-size: 32px; }
}
@media (max-width: 780px) {
  .duration-options { grid-template-columns: 1fr; }
  .collection-options { grid-template-columns: 1fr 1fr; }
  .site-header { padding: 28px 18px 18px; align-items: flex-start; flex-direction: column; }
  .workspace { padding: 0 18px 30px; }
  .creator-panel, .preview-panel { padding: 18px; }
  .preview-stage { min-height: 520px; padding: 18px; justify-content: start; }
  .spread { gap: 8px; }
  .a5-page { width: 310px; height: 440px; flex: 0 0 auto; }
  .page-inner { padding: 21px 20px; }
  .preview-header { align-items: flex-start; flex-direction: column; }
  .print-mode-options { grid-template-columns: 1fr; }
}


/* V1.7 — acabamento de produto */
.book-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .76rem;
}
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.action-button {
  min-height: 40px;
  white-space: nowrap;
}
.regenerate-button {
  margin-top: 9px;
}
.action-hint {
  display: block;
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.35;
}
.text-button {
  width: 100%;
  margin-top: 12px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .78rem;
}
.text-button:hover { color: var(--green); }
.print-economy-note {
  max-width: 680px;
  margin: 6px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.help-dialog {
  width: min(920px, calc(100% - 30px));
  max-height: calc(100% - 36px);
  padding: 0;
  border: 1px solid rgba(111,116,107,.22);
  border-radius: 18px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(40,42,36,.25);
}
.help-dialog::backdrop {
  background: rgba(31,34,30,.48);
  backdrop-filter: blur(2px);
}
.dialog-shell { padding: 25px; }
.compact-dialog { max-width: 620px; margin: 0 auto; }
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(111,116,107,.18);
}
.dialog-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.06;
}
.dialog-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #c7c2b6;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}
.print-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.guide-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(111,116,107,.18);
  border-radius: 14px;
  background: rgba(244,238,223,.38);
}
.guide-card-pdf { background: rgba(113,128,107,.08); }
.guide-number {
  font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  color: var(--green);
}
.guide-card h3 {
  margin: 8px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 400;
}
.guide-card ol {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: .78rem;
  line-height: 1.55;
}
.guide-note, .dialog-note {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.paper-demo {
  display: grid;
  gap: 5px;
}
.paper-demo > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 54px;
  border: 1px solid #aaa598;
  background: #fff;
}
.paper-demo > div span {
  display: grid;
  place-items: center;
  font: 700 .78rem/1 ui-monospace, monospace;
  color: var(--green);
}
.paper-demo > div span + span { border-left: 1px dashed #bdb6a7; }
.paper-demo small {
  margin-top: -3px;
  color: var(--muted);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pdf-demo {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  min-height: 64px;
}
.pdf-demo span {
  width: 38px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #aaa598;
  background: #fff;
  font: 700 .74rem/1 ui-monospace, monospace;
  color: var(--green);
}
.pdf-demo span:nth-child(2) { transform: translateY(-4px); }
.pdf-demo span:nth-child(3) { transform: translateY(-8px); }
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(111,116,107,.18);
}
.split-footer { justify-content: space-between; }
.pdf-instructions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.pdf-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(111,116,107,.16);
}
.pdf-step strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--green-soft);
  border-radius: 50%;
  color: var(--green);
  font: 700 .7rem/1 ui-monospace, monospace;
}
.pdf-step span { font-size: .86rem; }

@media (max-width: 780px) {
  .preview-actions { width: 100%; justify-content: stretch; }
  .preview-actions .action-button { flex: 1 1 calc(50% - 8px); }
  .print-guide-grid { grid-template-columns: 1fr; }
  .help-dialog { width: calc(100% - 18px); max-height: calc(100% - 18px); }
  .dialog-shell { padding: 18px; }
  .split-footer { flex-direction: column-reverse; }
  .split-footer button { width: 100%; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: white !important; margin: 0 !important; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .print-sheet {
    width: 297mm;
    height: 210mm;
    display: flex;
    flex-direction: row;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
    background: var(--paper);
  }
  .print-sheet:last-child { page-break-after: auto; break-after: auto; }
  /* V1.4.1 — impressão econômica:
     mantém a identidade por tipografia, linhas e símbolos,
     mas remove fundos, texturas e grandes áreas chapadas. */
  .print-sheet,
  .print-sheet .a5-page,
  .print-sheet .a5-page.collection-herbario,
  .print-sheet .a5-page.collection-linho,
  .print-sheet .a5-page.collection-aurora,
  .print-sheet .a5-page.collection-jardim_classico,
  .print-sheet .a5-page.collection-noite_serena {
    background: #ffffff !important;
    background-image: none !important;
  }

  .print-sheet .bible-ref,
  .print-sheet .question-box {
    background: transparent !important;
  }

  .print-sheet .back-cover,
  .print-sheet .collection-linho.back-cover {
    background: #ffffff !important;
    background-image: none !important;
    color: var(--ink) !important;
  }

  .print-sheet .back-cover .scientific-code {
    color: var(--green) !important;
  }

  .print-sheet .back-cover blockquote {
    color: var(--ink) !important;
  }

  .print-sheet .collection-linho.back-cover .page-inner::before {
    border-color: rgba(114,95,80,.45) !important;
  }

  .print-sheet .collection-jardim_classico.cover .page-inner,
  .print-sheet .collection-jardim_classico.cover .page-inner::before {
    border-color: rgba(134,92,97,.34) !important;
  }

  .print-sheet .cover .page-inner::before,
  .print-sheet .collection-linho.cover .page-inner::before {
    background: transparent !important;
  }

  .print-sheet .a5-page {
    width: 148.5mm !important;
    height: 210mm !important;
    box-shadow: none !important;
    flex: 0 0 148.5mm;
  }
  .print-sheet .page-inner { padding: 10mm 9mm 9mm; }
  .print-sheet .collection-linho.cover .page-inner,
  .print-sheet .collection-jardim_classico.cover .page-inner {
    margin: 4mm;
    width: calc(100% - 8mm);
    height: calc(100% - 8mm);
    padding: 6mm 7mm;
  }
  .print-sheet .collection-linho.back-cover .page-inner::before { inset: 6mm; }
  .print-sheet .a5-page h3 { font-size: 10.2mm; }
  .print-sheet .a5-page:not(.cover) h3 { font-size: 7mm; }
  .print-sheet .a5-page p { font-size: 3.25mm; line-height: 1.46; }
  .print-sheet .page-kicker { font-size: 2.2mm; }
  .print-sheet .week-phase span { font-size: 1.55mm; }
  .print-sheet .week-phase strong { font-size: 1.7mm; }
  .print-sheet .scientific-code,
  .print-sheet .page-section-title,
  .print-sheet .bible-ref { font-size: 1.8mm; }
  .print-sheet .cover-title h3 { font-size: 12mm; }
  .print-sheet .cover-title .subtitle { font-size: 2.2mm; }
  .print-sheet .back-cover blockquote { font-size: 7mm; max-width: 100mm; }
  .print-sheet .a5-page::after { bottom: 4mm; font-size: 2mm; }
}


/* V1.7 — PDF A5 sequencial */
@media print {
  .print-sheet.print-mode-pdf {
    width: 148.5mm !important;
    height: 210mm !important;
    display: block !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }
  .print-sheet.print-mode-pdf .a5-page {
    width: 148.5mm !important;
    height: 210mm !important;
    flex: none !important;
  }
  .print-sheet.print-mode-pdf .collection-linho.cover .page-inner,
  .print-sheet.print-mode-pdf .collection-jardim_classico.cover .page-inner {
    margin: 4mm;
    width: calc(100% - 8mm);
    height: calc(100% - 8mm);
    padding: 6mm 7mm;
  }
}

/* V2.0 — ACESSO DE COMPRADORES */
.auth-gate{min-height:100vh;padding:48px 20px;display:grid;place-items:center;background:radial-gradient(circle at 18% 10%,rgba(113,128,107,.12),transparent 28%),radial-gradient(circle at 82% 82%,rgba(183,163,142,.12),transparent 26%),#f0ece4}.auth-card{width:min(520px,100%);padding:34px;border:1px solid rgba(111,116,107,.18);border-radius:20px;background:rgba(255,253,247,.96);box-shadow:var(--shadow)}.auth-card h1{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2rem,5vw,3.2rem);font-weight:400;line-height:1.02}.auth-copy{color:var(--muted);margin:14px 0 4px}.auth-form .field{margin-top:20px}.auth-message{min-height:28px;margin-top:16px;color:var(--muted);font-size:.9rem}.auth-message.success{color:var(--success);font-weight:650}.auth-message.warning{color:#7b5f28;font-weight:650}.auth-message.error{color:var(--danger);font-weight:650}.auth-privacy{margin:20px 0 0;padding-top:16px;border-top:1px solid rgba(111,116,107,.15);color:var(--muted);font-size:.78rem}.user-access-bar{max-width:1500px;margin:0 auto;padding:12px 36px 0;display:flex;align-items:center;justify-content:flex-end;gap:12px;color:var(--muted);font-size:.78rem}.user-access-bar .text-button{width:auto;margin:0}.auth-locked .site-header,.auth-locked .workspace,.auth-locked .print-area,.auth-locked .user-access-bar{display:none!important}body:not(.auth-locked) .auth-gate{display:none!important}@media(max-width:640px){.auth-gate{padding:24px 14px}.auth-card{padding:24px 20px}.user-access-bar{padding:10px 18px 0;flex-wrap:wrap}}
/* V2.1 — saldo de créditos */
.user-access-bar .credit-balance {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  margin-left: 2px;
  border-radius: 999px;
  background: rgba(51, 73, 52, .09);
  color: var(--green);
  font-weight: 750;
}
.primary-button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

/* V2.1.1 — CORREÇÃO PDF: áreas de escrita nunca podem imprimir em preto.
   Alguns motores de impressão/PDF interpretam os trechos transparentes de
   repeating-linear-gradient como preto. Na impressão usamos branco opaco
   entre as linhas e cores sólidas suaves para preservar a identidade. */
@media print {
  .print-sheet .write-lines,
  .print-sheet .notes-lines {
    background-color: #ffffff !important;
    background-image: repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 21px,
      #d9d7d1 21px,
      #d9d7d1 22px
    ) !important;
  }

  .print-sheet .collection-aurora .write-lines,
  .print-sheet .collection-aurora .notes-lines {
    background-image: repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 21px,
      #ead8d4 21px,
      #ead8d4 22px
    ) !important;
  }

  .print-sheet .collection-jardim_classico .write-lines,
  .print-sheet .collection-jardim_classico .notes-lines {
    background-image: repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 21px,
      #eadcde 21px,
      #eadcde 22px
    ) !important;
  }

  .print-sheet .collection-noite_serena .write-lines,
  .print-sheet .collection-noite_serena .notes-lines {
    background-image: repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 21px,
      #dbe0e3 21px,
      #dbe0e3 22px
    ) !important;
  }

  .print-sheet .collection-linho .write-lines,
  .print-sheet .collection-linho .notes-lines {
    background-image: repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 21px,
      #dfd9d4 21px,
      #dfd9d4 22px
    ) !important;
  }
}


/* V2.3 — recompra de créditos */
.user-access-bar .buy-credits-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(51, 73, 52, .22);
  border-radius: 999px;
  background: rgba(51, 73, 52, .06);
  color: var(--green);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.user-access-bar .buy-credits-button:hover {
  background: rgba(51, 73, 52, .11);
}
.purchase-email-note {
  margin-top: 10px !important;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(51, 73, 52, .055);
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}
@media(max-width:640px){
  .user-access-bar {
    justify-content: flex-start;
  }
  .user-access-bar > span {
    width: 100%;
  }
}
