:root {
  --bg: #faf9f7;
  --surface: #e8e1d9;
  --surface-strong: #fffdfa;
  --surface-alt: #f3eee6;
  --text: #33363a;
  --muted: #5f6872;
  --line: #d9cfbf;
  --accent: #2c4a6b;
  --accent-dark: #213a53;
  --accent-soft: #6f95b5;
  --highlight: #c8a96a;
  --button-secondary-bg: #f1ebdf;
  --button-secondary-hover: #e5dbc8;
  --chip-bg: #f2ebdf;
  --chip-text: #2c4a6b;
  --message-patient-bg: #fefaf4;
  --message-patient-border: #e6d8c0;
  --message-therapist-bg: #f4f8fb;
  --message-therapist-border: #d6e2eb;
  --topbar-bg: rgba(255, 253, 248, 0.92);
  --shadow: 0 18px 60px rgba(32, 42, 42, 0.08);
}

body.theme-nature {
  --bg: #f7f4ef;
  --surface: #e6ece9;
  --surface-strong: #fdfcf9;
  --surface-alt: #eef2ee;
  --text: #3f4447;
  --muted: #66716f;
  --line: #d4dfd9;
  --accent: #7a918d;
  --accent-dark: #5f7570;
  --accent-soft: #94a79e;
  --highlight: #c67d5c;
  --button-secondary-bg: #e8efe9;
  --button-secondary-hover: #dce7df;
  --chip-bg: #e8efe9;
  --chip-text: #5f7570;
  --message-patient-bg: #fcfbf7;
  --message-patient-border: #d8e1db;
  --message-therapist-bg: #eef6f2;
  --message-therapist-border: #cbd8d2;
  --topbar-bg: rgba(247, 244, 239, 0.95);
}

body.theme-horizon {
  --bg: #f8f8f6;
  --surface: #eef4f8;
  --surface-strong: #fcfdfd;
  --surface-alt: #f2f7fb;
  --text: #2e3135;
  --muted: #60707b;
  --line: #d8e2eb;
  --accent: #355c66;
  --accent-dark: #2a4952;
  --accent-soft: #6fa9d8;
  --highlight: #b8895c;
  --button-secondary-bg: #edf4f8;
  --button-secondary-hover: #dce8ef;
  --chip-bg: #edf4f8;
  --chip-text: #2a4952;
  --message-patient-bg: #fcfcfb;
  --message-patient-border: #dfe7ee;
  --message-therapist-bg: #f4f9fc;
  --message-therapist-border: #d9e8f2;
  --topbar-bg: rgba(248, 248, 246, 0.95);
}

body.theme-warmth {
  --bg: #f7f3ee;
  --surface: #efe7dd;
  --surface-strong: #fcfaf7;
  --surface-alt: #f4ebdf;
  --text: #383838;
  --muted: #6f665f;
  --line: #e0d1c0;
  --accent: #b56b52;
  --accent-dark: #964f3c;
  --accent-soft: #d8c9b8;
  --highlight: #8c6a53;
  --button-secondary-bg: #f3e8dd;
  --button-secondary-hover: #e8dccf;
  --chip-bg: #f3e8dd;
  --chip-text: #964f3c;
  --message-patient-bg: #fcf8f3;
  --message-patient-border: #ebdccb;
  --message-therapist-bg: #f6efe8;
  --message-therapist-border: #e2d3c2;
  --topbar-bg: rgba(247, 243, 238, 0.95);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  transition: background-color 250ms ease, color 250ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--accent-dark);
  font-weight: 800;
}

.topbar nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.mobile-navigation { display: none; }

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 40px 5vw 72px;
}

.hero,
.auth-shell,
.conversation-shell {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: start;
}

.hero {
  min-height: 520px;
  align-items: center;
}

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

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

h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 22px;
  max-width: 820px;
}

h2 {
  font-size: 1.25rem;
}

.lead {
  color: var(--muted);
  font-size: 1.16rem;
  max-width: 640px;
}

.actions,
.form-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
input[type="submit"].button,
button.button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  text-align: center;
  touch-action: manipulation;
}

.button:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: var(--button-secondary-bg);
  color: var(--accent-dark);
}

.button-secondary:hover {
  background: var(--button-secondary-hover);
}

.button-disabled {
  background: var(--button-secondary-bg);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.button-small {
  min-height: 36px;
  padding: 8px 12px;
}

.button:disabled,
button:disabled {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.button:disabled:hover,
button:disabled:hover {
  background: var(--surface);
}

.full {
  width: 100%;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.user-chip,
.status {
  background: var(--chip-bg);
  border-radius: 999px;
  color: var(--chip-text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.calm-panel,
.form-card,
.side-panel,
.therapist-card,
.empty-state,
.quiet-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calm-panel,
.side-panel,
.empty-state,
.quiet-box {
  padding: 24px;
}

.steps {
  color: var(--muted);
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.section {
  padding-top: 56px;
}

.compact {
  max-width: 880px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading.row {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.period-panel {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1.4fr) auto;
  margin-bottom: 18px;
  padding: 20px;
}

.period-panel h2 {
  margin: 4px 0 0;
}

.period-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.period-link {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 12px;
}

.period-link:hover,
.period-link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.year-filter {
  align-items: end;
  display: flex;
  gap: 8px;
}

.year-filter label {
  min-width: 120px;
}

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

.therapist-card {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  padding: 20px;
}

.avatar {
  align-items: center;
  background: #e6eff4;
  border-radius: 50%;
  color: var(--blue);
  display: flex;
  flex: 0 0 52px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.wide-form {
  max-width: 760px;
}

label {
  color: var(--text);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

input,
select,
textarea {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.cover-upload-preview {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  max-width: 150px;
  object-fit: cover;
  width: 100%;
}

.form-footer {
  color: var(--muted);
  justify-content: space-between;
}

.flash,
.error-box {
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 14px 16px;
}

.notice {
  background: var(--button-secondary-bg);
  color: var(--accent-dark);
}

.alert,
.error-box {
  background: rgba(184, 137, 92, 0.12);
  color: var(--accent-dark);
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.list-item:hover {
  border-color: var(--accent);
}

.list-item h2 {
  margin: 10px 0 4px;
}

.list-item p,
.muted,
.date {
  color: var(--muted);
}

.conversation-main {
  min-width: 0;
}

.message {
  border-radius: 8px;
  margin: 18px 0;
  padding: 18px;
}

.message span {
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.patient-message {
  background: var(--message-patient-bg);
  border: 1px solid var(--message-patient-border);
}

.therapist-message {
  background: var(--message-therapist-bg);
  border: 1px solid var(--message-therapist-border);
}

.inline-form {
  margin-top: 18px;
}

.rating-form {
  display: grid;
  gap: 16px;
}

.rating-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rating-options label {
  display: block;
}

.rating-options input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.rating-options span {
  align-items: center;
  background: #f3eee6;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
}

.rating-options input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.score-box {
  background: var(--surface-alt);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.score-box span,
.score-box strong {
  display: block;
}

.score-box strong {
  font-size: 2rem;
}

.topbar,
.button,
.button-secondary,
.calm-panel,
.form-card,
.side-panel,
.therapist-card,
.empty-state,
.quiet-box,
.message,
.score-box,
.theme-card,
.theme-swatches span,
.user-chip,
.status,
input,
select,
textarea,
.list-item,
.flash,
.error-box,
.avatar {
  transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}

.theme-settings {
  display: grid;
  gap: 24px;
}

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

.theme-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  padding: 16px;
  position: relative;
  box-shadow: var(--shadow);
}

.theme-card input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.theme-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 14px 40px rgba(44, 74, 107, 0.16);
}

.theme-card-body {
  display: grid;
  gap: 12px;
  width: 100%;
}

.theme-card-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.theme-check {
  background: var(--chip-bg);
  border-radius: 999px;
  color: var(--chip-text);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 8px;
}

.theme-description {
  color: var(--muted);
  font-size: 0.95rem;
}

.theme-swatches {
  display: flex;
  gap: 8px;
}

.theme-swatches span {
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  width: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.autosave-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.room-preview {
  background: linear-gradient(135deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

/* Rich Text Editor - Improved */
.rich-field {
  display: grid;
  gap: 8px;
}

.rich-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.rich-label-row span:first-child {
  font-weight: 800;
  color: var(--text);
}

.character-count {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.rich-field.is-over-limit .character-count {
  color: #d97706;
  font-weight: 800;
}

.rich-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
  align-items: center;
}

.rich-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 32px;
  height: 32px;
  padding: 0;
  transition: all 150ms ease;
}

.rich-toolbar button:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent);
}

.rich-toolbar button:active {
  background: var(--accent);
  color: white;
}

.rich-editor {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 140px;
  padding: 14px 14px;
  outline: none;
  transition: all 200ms ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  resize: none;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
  display: block;
  opacity: 0.7;
}

.rich-editor:focus {
  background: var(--surface-strong);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 74, 107, 0.08);
  min-height: 200px;
}

.rich-field.is-over-limit .rich-editor {
  border-color: #fca5a5;
}

.rich-source {
  display: none;
}

/* Editor Basecamp/Trix */
.rich-field trix-toolbar {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  margin: 0;
  padding: 10px;
}

.rich-field trix-toolbar .trix-button-row { flex-wrap: wrap; gap: 7px; }
.rich-field trix-toolbar .trix-button-group { border: 0; gap: 3px; margin: 0; }
.rich-field trix-toolbar .trix-button {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  height: 34px;
  margin: 0;
}
.rich-field trix-toolbar .trix-button:hover,
.rich-field trix-toolbar .trix-button.trix-active {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}
.rich-field trix-toolbar .trix-button-group--file-tools { display: none; }
.rich-field trix-editor.rich-editor { border-radius: 0 0 12px 12px; margin: 0; }
.rich-field trix-editor.rich-editor {
  cursor: text;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}
.rich-field trix-editor.rich-editor * { cursor: text; }
.rich-field trix-toolbar,
.rich-field trix-toolbar * { cursor: default; }
.rich-field trix-toolbar button { cursor: pointer; }
.rich-field trix-editor ul { list-style: disc; padding-left: 1.6rem; }
.rich-field trix-editor ol { list-style: decimal; padding-left: 1.6rem; }
.rich-field trix-editor blockquote { border-left: 3px solid var(--accent); color: var(--muted); margin-left: 0; padding-left: 1rem; }
.rich-field trix-editor a { color: var(--accent-dark); text-decoration: underline; }

.autosave-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 8px;
  display: block;
}

/* Tema selector compacto na home */
.home-theme-panel,
.theme-selector-home {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 0 0 28px;
  box-shadow: var(--shadow);
}

.home-theme-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  list-style: none;
  padding: 18px 20px;
}

.home-theme-summary::-webkit-details-marker {
  display: none;
}

.home-theme-summary > span:first-child {
  display: grid;
  gap: 4px;
}

.home-theme-summary strong {
  color: var(--text);
  font-size: 1.08rem;
}

.home-theme-toggle {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-theme-panel[open] .home-theme-toggle {
  font-size: 0;
}

.home-theme-panel[open] .home-theme-toggle::before {
  content: "Fechar";
  font-size: 0.9rem;
}

.home-theme-content {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  padding: 20px;
}

.theme-selector-home .eyebrow {
  margin-bottom: 4px;
}

.theme-selector-home h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.theme-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.theme-card-compact {
  padding: 12px;
  gap: 8px;
}

.theme-card-compact .theme-card-body {
  gap: 8px;
}

.theme-card-compact .theme-swatches {
  gap: 4px;
}

.theme-card-compact .theme-swatches span {
  height: 12px;
  width: 12px;
}

@media (max-width: 760px) {
  .period-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .year-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .theme-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-theme-panel,
  .theme-selector-home {
    width: 100%;
  }

  .home-theme-content {
    grid-template-columns: 1fr;
  }

  .home-theme-summary {
    align-items: flex-start;
  }

  .topbar { gap: 12px; }

  .hero,
  .auth-shell,
  .conversation-shell,
  .therapist-grid {
    grid-template-columns: 1fr;
  }

  .section-heading.row,
  .list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .rating-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Conversa Leve nas páginas internas */
body:not(.public-home) {
  --bg: var(--color-background);
  --surface: #fff;
  --surface-strong: #fff;
  --surface-alt: var(--color-primary-light);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --accent-soft: #a99be1;
  --highlight: var(--color-accent);
  --button-secondary-bg: var(--color-primary-light);
  --button-secondary-hover: #e1daf8;
  --chip-bg: var(--color-primary-light);
  --chip-text: var(--color-primary-dark);
  --message-patient-bg: #fbfaff;
  --message-patient-border: #dcd4f4;
  --message-therapist-bg: #f1f9fc;
  --message-therapist-border: #cce7f3;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --shadow: var(--shadow-sm);
  background:
    radial-gradient(circle at 0 12%, rgba(119, 101, 197, 0.09), transparent 28rem),
    radial-gradient(circle at 100% 88%, rgba(116, 184, 216, 0.1), transparent 30rem),
    var(--color-background);
  min-height: 100vh;
}

body:not(.public-home) .topbar {
  backdrop-filter: blur(18px);
  border: 1px solid rgba(229, 225, 242, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  margin: 16px auto 0;
  max-width: min(1280px, calc(100% - 40px));
  min-height: 82px;
  padding: 0 28px;
  position: sticky;
  top: 12px;
}

body:not(.public-home) .topbar nav > a:not(.button) {
  color: #46506a;
  font-size: 0.93rem;
  font-weight: 700;
}

body:not(.public-home) .topbar nav > a:not(.button):hover,
body:not(.public-home) .link-button:hover {
  color: var(--color-primary-dark);
}

body:not(.public-home) .page {
  max-width: 1180px;
  min-height: calc(100vh - 250px);
  padding-top: 58px;
}

body:not(.public-home) h1 {
  color: #17213a;
  font-size: clamp(2.1rem, 4vw, 3.65rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

body:not(.public-home) h2,
body:not(.public-home) h3 {
  color: #202b45;
  letter-spacing: -0.02em;
}

body:not(.public-home) .eyebrow {
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

body:not(.public-home) .lead {
  line-height: 1.65;
}

body:not(.public-home) .button,
body:not(.public-home) input[type="submit"].button,
body:not(.public-home) button.button {
  background: var(--color-primary);
  border-radius: 12px;
  box-shadow: 0 7px 16px rgba(94, 77, 176, 0.15);
  min-height: 46px;
  padding: 12px 20px;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

body:not(.public-home) .button:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 10px 22px rgba(94, 77, 176, 0.2);
  transform: translateY(-1px);
}

body:not(.public-home) .button-secondary {
  background: var(--color-primary-light);
  box-shadow: none;
  color: var(--color-primary-dark);
}

body:not(.public-home) .button-disabled {
  background: #f0edf8;
  box-shadow: none;
  color: var(--color-text-muted);
}

body:not(.public-home) .form-card,
body:not(.public-home) .side-panel,
body:not(.public-home) .empty-state,
body:not(.public-home) .quiet-box,
body:not(.public-home) .analysis-panel,
body:not(.public-home) .metric-card,
body:not(.public-home) .period-panel,
body:not(.public-home) .theme-card,
body:not(.public-home) .room-preview {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

body:not(.public-home) .form-card {
  gap: 20px;
  padding: clamp(24px, 4vw, 38px);
}

body:not(.public-home) input,
body:not(.public-home) select,
body:not(.public-home) textarea,
body:not(.public-home) .rich-editor {
  background: #fcfbff;
  border: 1px solid #dcd7ec;
  border-radius: 12px;
  min-height: 48px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

body:not(.public-home) input:focus,
body:not(.public-home) select:focus,
body:not(.public-home) textarea:focus,
body:not(.public-home) .rich-editor:focus {
  background: white;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(119, 101, 197, 0.13);
  outline: none;
}

body:not(.public-home) .rich-toolbar,
body:not(.public-home) .rich-field trix-toolbar {
  background: var(--color-primary-light);
  border-color: #dcd4f4;
  border-radius: 12px 12px 0 0;
}

body:not(.public-home) .rich-editor {
  border-radius: 0 0 12px 12px;
  line-height: 1.7;
  min-height: 240px;
}

body:not(.public-home) .flash,
body:not(.public-home) .error-box {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

body:not(.public-home) .notice {
  background: #edf8f4;
  border-color: #cce8dd;
  color: #31725e;
}

body:not(.public-home) .alert,
body:not(.public-home) .error-box {
  background: var(--color-accent-light);
  border-color: #f3ccd7;
  color: #963d57;
}

.auth-shell {
  align-items: center;
  gap: clamp(36px, 8vw, 100px);
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 0.65fr);
  margin: 30px auto 60px;
  max-width: 1000px;
  min-height: 540px;
  position: relative;
}

.auth-shell::before {
  background: var(--color-primary-light);
  border-radius: 48% 52% 60% 40%;
  content: "";
  filter: blur(1px);
  height: 330px;
  left: -120px;
  opacity: 0.72;
  position: absolute;
  top: 70px;
  width: 330px;
  z-index: -1;
}

.auth-shell > div:first-child h1 {
  max-width: 580px;
}

.auth-shell .form-card {
  width: 100%;
}

.section.compact {
  max-width: 960px;
}

.section-heading.row {
  align-items: center;
}

.list {
  gap: 14px;
}

.list-item {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  min-height: 118px;
  padding: 22px 24px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.list-item:hover {
  border-color: #c8bee9;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.list-item h2 {
  font-size: 1.2rem;
  margin: 12px 0 6px;
}

.list-item p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.status,
.user-chip {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 7px 11px;
}

.conversation-shell {
  align-items: start;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.conversation-main > h1 {
  margin-bottom: 12px;
}

.message {
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  line-height: 1.75;
  margin: 22px 0;
  padding: 26px 28px;
}

.message > span {
  display: inline-flex;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.patient-message {
  background: #fbfaff;
  border: 1px solid #dcd4f4;
}

.therapist-message {
  background: #f1f9fc;
  border: 1px solid #cce7f3;
}

.side-panel {
  padding: 26px;
  position: sticky;
  top: 116px;
}

.score-box {
  background: linear-gradient(135deg, var(--color-primary-light), white);
  border: 1px solid #dcd4f4;
  border-radius: 16px;
}

.rating-options input:checked + span {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.metrics-grid {
  gap: 16px;
}

.metric-card {
  padding: 22px;
}

.site-footer {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 760px) {
  body:not(.public-home) .topbar {
    align-items: center;
    flex-direction: row;
    margin-top: 10px;
    max-width: calc(100% - 20px);
    min-height: 68px;
    overflow: visible;
    padding: 10px 14px;
    position: relative;
    top: 0;
  }
  body:not(.public-home) .topbar .brand span { display: inline; }
  body:not(.public-home) .topbar .brand-mark { height: 38px; width: 42px; }
  body:not(.public-home) .topbar nav a, body:not(.public-home) .link-button { font-size: 0.9rem; }
  body:not(.public-home) .user-chip { display: none; }
  body:not(.public-home) .page { padding: 32px 16px 56px; }
  .auth-shell, .conversation-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-shell { gap: 20px; margin-top: 0; }
  .auth-shell::before { display: none; }
  .section-heading.row { align-items: flex-start; flex-direction: column; }
  .section-heading.row .button { width: 100%; }
  .list-item { align-items: flex-start; flex-direction: column; min-height: 0; }
  .side-panel { position: static; }
  .message { padding: 22px 20px; }
}

/* Direção visual Conversa Leve */
:root {
  --color-primary: #7765c5;
  --color-primary-dark: #5e4db0;
  --color-primary-light: #eeeafb;
  --color-secondary: #74b8d8;
  --color-secondary-light: #e8f5fb;
  --color-accent: #e89aae;
  --color-accent-light: #fcecf1;
  --color-background: #f7f5fc;
  --color-surface: #ffffff;
  --color-text: #293246;
  --color-text-muted: #667085;
  --color-border: #e5e1f2;
  --shadow-sm: 0 4px 14px rgba(63, 52, 105, 0.07);
  --shadow-md: 0 12px 32px rgba(63, 52, 105, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

body.public-home {
  --bg: var(--color-background);
  --surface: var(--color-surface);
  --surface-strong: #fff;
  --surface-alt: var(--color-primary-light);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --accent-soft: #a99be1;
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --shadow: var(--shadow-md);
  background: var(--color-background);
  overflow-x: hidden;
}

.public-home .topbar {
  backdrop-filter: blur(18px);
  border: 1px solid rgba(229, 225, 242, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  margin: 18px auto 0;
  max-width: min(1480px, calc(100% - 48px));
  min-height: 92px;
  padding: 0 36px;
  position: relative;
}

.brand {
  align-items: center;
  color: #18233f;
  display: inline-flex;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  font-weight: 800;
  gap: 12px;
  letter-spacing: -0.035em;
}

.brand-mark {
  color: var(--color-primary, var(--accent));
  flex: 0 0 auto;
  height: 48px;
  width: 54px;
}

.public-home .topbar nav {
  gap: 28px;
}

.palette-control {
  position: relative;
}

.palette-control > summary {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 7px;
  list-style: none;
}

.palette-control > summary::-webkit-details-marker { display: none; }
.palette-control > summary span { background: linear-gradient(135deg, #7765c5 0 50%, #74b8d8 50%); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); height: 20px; width: 20px; }
.palette-popover { background: white; border: 1px solid var(--color-border, var(--line)); border-radius: 18px; box-shadow: var(--shadow-md); min-width: 290px; padding: 20px; position: absolute; right: 0; top: calc(100% + 16px); z-index: 30; }
.palette-popover > p { color: var(--muted); font-size: 0.84rem; margin: 4px 0 14px; }
.palette-options { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.palette-option { align-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; display: flex; font-size: 0.78rem; gap: 7px; padding: 8px; }
.palette-option input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.palette-option > span { background: var(--palette-color); border-radius: 50%; height: 18px; width: 18px; }
.palette-option.is-selected { border-color: var(--accent); background: var(--surface-alt); }
.palette-popover small { color: var(--muted); display: block; margin-top: 10px; }

.public-home .topbar nav > a:not(.button) {
  font-weight: 700;
}

.public-home .button,
.public-home input[type="submit"].button,
.public-home button.button {
  background: var(--color-primary);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(94, 77, 176, 0.2);
  padding-inline: 26px;
}

.public-home .button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.public-home .page {
  max-width: none;
  padding: 0 5vw 96px;
  position: relative;
}

.landing-background {
  background: url("/assets/conversa-leve-background-5885f705.png") center top / cover no-repeat;
  height: 920px;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

.conversation-hero {
  min-height: 500px;
  padding: 56px 0 20px;
  position: relative;
}

.hero-copy {
  margin: 0 auto;
  max-width: 720px;
  position: relative;
  text-align: center;
  z-index: 2;
}

.hero-copy .eyebrow {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  display: inline-flex;
  padding: 7px 13px;
}

.hero-copy h1 {
  color: #14203b;
  font-size: clamp(2.7rem, 5vw, 4.65rem);
  letter-spacing: -0.055em;
  line-height: 1.03;
  margin: 12px auto 22px;
}

.hero-copy h1 span {
  color: var(--color-primary-dark);
}

.hero-lead {
  color: #46506a;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  margin: 0 auto 28px;
  max-width: 610px;
}

.hero-cta {
  align-items: center;
  font-size: 1.06rem;
  gap: 12px;
  justify-content: center;
  min-height: 60px;
  min-width: min(100%, 520px);
}

.hero-cta span {
  font-size: 1.6rem;
  font-weight: 400;
}

.thought-bubble {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(229, 225, 242, 0.85);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  color: #1f2942;
  display: flex;
  font-size: 0.96rem;
  font-weight: 700;
  gap: 14px;
  line-height: 1.45;
  padding: 16px 20px;
  position: absolute;
  width: 250px;
}

.thought-bubble::after {
  background: white;
  bottom: -8px;
  clip-path: polygon(0 0, 100% 0, 25% 100%);
  content: "";
  height: 13px;
  left: 38px;
  position: absolute;
  width: 22px;
}

.thought-one { left: 3%; top: 88px; }
.thought-two { right: 2%; top: 142px; }
.thought-three { left: 7%; top: 335px; }

.thought-icon {
  align-items: center;
  border-radius: 50%;
  display: flex;
  flex: 0 0 52px;
  font-size: 1.7rem;
  font-weight: 500;
  height: 52px;
  justify-content: center;
}

.thought-icon svg { fill: none; height: 34px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 34px; }

.thought-purple { background: var(--color-primary-light); color: var(--color-primary); }
.thought-blue { background: var(--color-secondary-light); color: #4d9ac2; }
.thought-pink { background: var(--color-accent-light); color: #cf5577; }

.how-section,
.landing-section,
.responsible-notice,
.final-cta {
  margin: 0 auto;
  max-width: 1180px;
}

.how-section {
  padding: 8px 0 64px;
  text-align: center;
}

.how-section > h2 {
  color: #17213a;
  font-size: 1.6rem;
  margin-bottom: 28px;
}

.journey-cards {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
}

.journey-cards::before {
  border-top: 3px dashed #c9bee9;
  content: "";
  left: 16%;
  position: absolute;
  right: 16%;
  top: 10px;
}

.journey-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 18px;
  grid-template-columns: 84px 1fr;
  min-height: 180px;
  padding: 30px 24px 24px;
  position: relative;
  text-align: left;
}

.step-number {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  left: 26px;
  position: absolute;
  top: -19px;
  width: 38px;
  z-index: 2;
}

.step-icon {
  align-items: center;
  border-radius: 50%;
  display: flex;
  font-size: 2.1rem;
  height: 78px;
  justify-content: center;
  width: 78px;
}

.step-icon svg { fill: none; height: 48px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; width: 48px; }

.journey-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.journey-card p { color: var(--color-text-muted); line-height: 1.5; margin: 0; }
.journey-purple .step-number { background: var(--color-primary); }
.journey-purple .step-icon { background: var(--color-primary-light); color: var(--color-primary); }
.journey-purple h3 { color: var(--color-primary-dark); }
.journey-blue .step-number { background: var(--color-secondary); }
.journey-blue .step-icon { background: var(--color-secondary-light); color: #438fb8; }
.journey-blue h3 { color: #438fb8; }
.journey-pink .step-number { background: #df6685; }
.journey-pink .step-icon { background: var(--color-accent-light); color: #ca4c6f; }
.journey-pink h3 { color: #ca4c6f; }

.human-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #ddd5f5;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: #394470;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 8px;
  margin-top: 28px;
  padding: 10px 18px;
}

.landing-section {
  padding: 80px 0;
}

.landing-heading {
  margin: 0 auto 36px;
  max-width: 720px;
  text-align: center;
}

.landing-heading h2,
.human-copy h2,
.privacy-section h2,
.responsible-notice h2,
.final-cta h2 {
  color: #17213a;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.landing-heading > p:last-child { color: var(--color-text-muted); }

.feature-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.feature-card h3 { color: #202b45; font-size: 1.15rem; }
.feature-card p { color: var(--color-text-muted); line-height: 1.65; margin: 0; }
.feature-icon { align-items: center; border-radius: 14px; display: flex; font-size: 1.65rem; height: 52px; justify-content: center; margin-bottom: 20px; width: 52px; }
.feature-icon.purple { background: var(--color-primary-light); color: var(--color-primary); }
.feature-icon.blue { background: var(--color-secondary-light); color: #438fb8; }
.feature-icon.pink { background: var(--color-accent-light); color: #ca4c6f; }

.human-section {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 60px;
  grid-template-columns: 1.25fr 0.75fr;
  padding: 56px;
}

.human-copy > p { color: var(--color-text-muted); line-height: 1.7; max-width: 65ch; }
.human-values { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.human-values span { background: var(--color-primary-light); border-radius: 999px; color: var(--color-primary-dark); font-size: 0.86rem; font-weight: 700; padding: 9px 13px; }
.human-quote { background: linear-gradient(145deg, var(--color-primary-light), #fff); border-radius: 24px; color: #46506a; line-height: 1.7; padding: 30px; }
.human-quote > span { color: var(--color-primary); font-family: Georgia, serif; font-size: 4rem; line-height: 0.6; }
.human-quote p { margin: 14px 0 0; }

.privacy-section {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: auto 1fr 1fr;
}

.privacy-icon { align-items: center; background: var(--color-secondary-light); border-radius: 50%; color: #438fb8; display: flex; font-size: 2rem; height: 84px; justify-content: center; width: 84px; }
.privacy-section ul { color: var(--color-text-muted); display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.privacy-section li::before { color: var(--color-success); content: "✓"; font-weight: 800; margin-right: 10px; }

.responsible-notice {
  background: #fff;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 18px 18px 0;
  box-shadow: var(--shadow-sm);
  padding: 30px 34px;
}

.responsible-notice h2 { font-size: 1.55rem; }
.responsible-notice p:last-child { color: var(--color-text-muted); line-height: 1.7; margin-bottom: 0; }

.final-cta {
  background: linear-gradient(135deg, #eeeafb, #f8f6ff);
  border: 1px solid #ddd5f5;
  border-radius: 30px;
  margin-top: 80px;
  padding: 64px 24px;
  text-align: center;
}

.final-cta > p { color: var(--color-text-muted); }
.final-cta .hero-cta { margin-top: 14px; }

.professionals-section { padding-bottom: 10px; }

.content-hero {
  margin: 72px auto 48px;
  max-width: 900px;
  text-align: center;
}

.content-hero h1 { font-size: clamp(2.35rem, 6vw, 4rem); line-height: 1.08; margin: 12px 0 20px; }
.content-hero .lead { color: var(--muted); font-size: 1.18rem; margin: 0 auto; max-width: 760px; }
.books-hero-cta { display: inline-block; margin-top: 28px; }
.books-trust {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 12px 28px;
  justify-content: center;
  margin: -18px auto 38px;
}
.books-trust span::before { color: var(--color-primary); content: "✓"; margin-right: 8px; }
.book-language-selector {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  justify-content: center;
  margin: -18px auto 34px;
}
.book-language-selector span { color: var(--muted); font-size: 0.9rem; margin-right: 10px; }
.book-language-selector a { border-left: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 2px 10px; text-decoration: none; }
.book-language-selector a:first-of-type { border-left: 0; }
.book-language-selector a:hover { color: var(--color-primary); }
.book-language-selector a.is-active { color: var(--color-primary); font-weight: 800; }
.books-social-impact {
  background: linear-gradient(135deg, rgba(238, 234, 251, 0.9), rgba(227, 242, 248, 0.9));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(51, 45, 89, 0.08);
  margin: 42px auto 0;
  max-width: 920px;
  padding: clamp(28px, 5vw, 46px);
  text-align: center;
}
.books-social-impact h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); margin: 8px 0 18px; }
.books-social-impact > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin: 12px auto 0; max-width: 780px; }
.books-social-impact .books-social-impact-closing { color: var(--ink); margin-top: 20px; }
.books-grid { scroll-margin-top: 32px; }

.content-grid, .books-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card, .book-card, .about-professional {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(51, 45, 89, 0.08);
}

.content-card { padding: 30px; }
.content-card h2 { font-size: 1.25rem; margin: 18px 0 10px; }
.content-card p, .book-card p, .about-professional p { color: var(--muted); }

.about-professional {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: auto 1fr;
  margin: 54px auto 30px;
  max-width: 850px;
  padding: 34px;
}

.professional-monogram {
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 1.55rem;
  font-weight: 800;
  height: 96px;
  justify-content: center;
  width: 96px;
}

.about-professional h2 { margin: 5px 0 8px; }
.content-notice { margin-top: 30px; }

.book-card { display: flex; flex-direction: column; overflow: visible; padding: 22px; }

.book-cover-link { color: inherit; display: block; text-decoration: none; }

.book-cover {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #eeeafb, #e3f2f8);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.book-cover img { height: 100%; object-fit: contain; width: 100%; }
.book-cover-fallback { color: var(--color-primary); font-size: 1rem; font-weight: 800; padding: 24px; text-align: center; }
.book-copy { display: flex; flex: 1; flex-direction: column; }
.book-type-tag {
  align-self: flex-start;
  background: #fff0b8;
  border: 1px solid #e2bd4e;
  border-radius: 999px;
  color: #6d5110;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 10px;
}
.book-language-tag { background: #e3f2f8; border-radius: 999px; color: #326f8e; display: inline-block; font-size: 0.76rem; font-weight: 800; padding: 5px 10px; }
.book-summary { -webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box; flex: 1; line-height: 1.55; margin-bottom: 0; min-height: 4.65em; overflow: hidden; }
.book-details-link { color: var(--color-primary); font-weight: 800; margin-top: 16px; text-decoration: none; }
.book-details-link:hover { text-decoration: underline; }
.book-actions { margin-top: 18px; }
.book-price { color: var(--color-primary); font-size: 1.35rem; font-weight: 800; margin: 18px 0 0; }
.book-price-offer { align-items: flex-start; display: flex; gap: 12px; line-height: 1; }
.book-offer-discount { color: #c9173f; font-size: 1.55rem; font-weight: 500; padding-top: 7px; white-space: nowrap; }
.book-offer-values { display: grid; gap: 8px; }
.book-offer-current { color: #111827; font-size: 2rem; font-weight: 800; letter-spacing: -0.035em; white-space: nowrap; }
.book-offer-current sup { font-size: 0.52em; line-height: 1; margin-left: 2px; position: relative; top: -0.55em; }
.book-offer-original { color: var(--muted); font-size: 0.88rem; font-weight: 600; line-height: 1.2; }
.book-offer-original del { text-decoration-thickness: 1.5px; }
.book-detail .book-price-offer { gap: 15px; }
.book-detail .book-offer-discount { font-size: 1.75rem; }
.book-detail .book-offer-current { font-size: 2.45rem; }
.book-offer-fields { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 16px; margin: 0; padding: 18px; }
.book-offer-fields legend { color: var(--text); font-weight: 800; padding: 0 6px; }
.book-buy { display: block; margin-top: 18px; text-align: center; }
.books-pagination { align-items: center; display: flex; gap: 18px; justify-content: center; margin: 34px 0 10px; }
.books-pagination span { color: var(--muted); font-weight: 700; }

.purchase-options { position: relative; }
.purchase-options > summary { cursor: pointer; list-style: none; text-align: center; }
.purchase-options > summary::-webkit-details-marker { display: none; }
.purchase-options > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(41, 50, 70, 0.16);
  display: grid;
  gap: 4px;
  left: 0;
  margin-top: 8px;
  padding: 8px;
  position: absolute;
  right: 0;
  z-index: 4;
}
.purchase-options > div a { border-radius: 9px; color: var(--ink); font-weight: 700; padding: 11px; }
.purchase-options > div a:hover { background: #f2effb; }

.book-spine {
  align-items: center;
  align-self: stretch;
  background: #eeeafb;
  color: var(--color-primary);
  display: flex;
  font-size: 1.1rem;
  font-weight: 800;
  justify-content: center;
  min-height: 330px;
}

.book-spine span { transform: rotate(-90deg); }
.book-card > div:last-child { padding-top: 28px; }
.book-card h2 { font-size: 1.45rem; margin: 8px 0 4px; }
.book-author { font-weight: 700; margin-top: 0; }
.book-blue .book-spine { background: #e3f2f8; color: #428eb5; }
.book-pink .book-spine { background: #fbe8ee; color: #c95173; }
.text-link { color: var(--color-primary); display: inline-block; font-weight: 800; margin-top: 10px; }
.books-cta { margin-top: 54px; }

.book-detail {
  align-items: start;
  display: grid;
  gap: clamp(32px, 6vw, 72px);
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  margin: 72px auto 30px;
  max-width: 1040px;
}
.book-language-selector + .book-detail { margin-top: 36px; }
.book-detail-cover {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #eeeafb, #e3f2f8);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(51, 45, 89, 0.12);
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.book-detail-cover img { height: 100%; object-fit: contain; width: 100%; }
.book-detail-cover .book-cover-fallback { font-size: 1.15rem; }
.book-detail-copy h1 { font-size: clamp(2.25rem, 5vw, 3.7rem); line-height: 1.08; margin: 10px 0 12px; }
.book-description { color: var(--muted); font-size: 1.08rem; line-height: 1.75; margin-top: 24px; white-space: pre-line; }
.book-detail-copy .book-buy { display: inline-block; margin-right: 18px; }
.book-purchase-cta { align-items: flex-start; display: flex; flex-direction: column; }
.book-primary-purchase { margin-top: 22px; }
.book-primary-purchase .book-buy { margin-top: 0; }
.book-checkout-note { color: var(--muted); font-size: 0.78rem; line-height: 1.4; margin: 8px 0 0; opacity: 0.88; }
.book-checkout-note span { font-size: 0.72rem; margin-right: 3px; }
.book-purchase-trust { border-left: 4px solid var(--line); display: grid; gap: 8px; list-style: none; margin: 16px 0 0; padding: 4px 0 4px 16px; }
.book-purchase-trust li { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.book-purchase-trust li::before { color: var(--color-primary); content: "✓"; font-weight: 800; margin-right: 6px; }
.book-final-purchase { margin-top: 8px; }
.free-book-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.free-book-actions .book-buy, .free-book-actions .book-read { margin-top: 0; }
.book-card-free-actions { margin-top: 18px; width: 100%; }
.book-card-free-actions .button { flex: 1 1 120px; padding-inline: 14px; text-align: center; }
.book-lead-dialog { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 70px rgba(51, 45, 89, 0.24); color: var(--ink); max-height: calc(100vh - 32px); max-width: 580px; padding: 28px; width: calc(100% - 32px); }
.book-lead-dialog::backdrop { background: rgba(25, 28, 45, 0.55); backdrop-filter: blur(3px); }
.book-lead-dialog-header { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; }
.book-lead-dialog-header h2 { font-size: 1.65rem; margin: 0; }
.dialog-close { background: var(--color-primary-light); border: 0; border-radius: 50%; color: var(--color-primary-dark); cursor: pointer; flex: 0 0 38px; font-size: 1.5rem; height: 38px; line-height: 1; }
.book-lead-intro { color: var(--muted); margin: 12px 0 20px; }
.book-lead-form { display: grid; gap: 16px; }
.book-lead-form > label:not(.lead-consent) { color: var(--ink); display: grid; font-weight: 700; gap: 7px; }
.book-lead-form input[type="text"], .book-lead-form input[type="email"] { border: 1px solid var(--line); border-radius: 10px; font: inherit; padding: 12px; width: 100%; }
.lead-consent { align-items: flex-start; color: var(--muted); display: flex; font-size: 0.86rem; gap: 10px; line-height: 1.5; }
.lead-consent input { flex: 0 0 auto; margin-top: 4px; width: auto; }
.lead-consent a { color: var(--color-primary-dark); font-weight: 700; }
.lead-honeypot { height: 0; left: -10000px; overflow: hidden; position: absolute; width: 0; }
.ebook-reader { margin: 48px auto 0; max-width: 1180px; }
.ebook-reader-heading { align-items: center; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 22px; }
.ebook-reader-heading h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.pdf-reader { background: var(--color-primary-light); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pdf-reader-toolbar { align-items: center; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: 1fr auto 1fr; padding: 12px 16px; position: sticky; top: 0; z-index: 2; }
.pdf-reader-toolbar .button { font-size: 0.88rem; justify-self: start; min-height: 40px; }
.pdf-reader-toolbar .button:last-child { justify-self: end; }
.pdf-reader-toolbar .button.button-secondary { background: var(--color-primary); color: #fff; opacity: 1; }
.pdf-reader-toolbar .button.button-secondary:hover { background: var(--color-primary-dark); color: #fff; }
.pdf-reader-toolbar .button.button-secondary:disabled { background: var(--color-primary-light); border: 1px solid var(--color-border); color: var(--color-primary-dark); opacity: 0.72; }
.pdf-reader-toolbar > span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.pdf-reader-status { color: var(--muted); margin: 0; padding: 48px 20px; text-align: center; }
.pdf-reader-status.is-error { color: #9f2f3b; }
.pdf-page { min-height: 70vh; overflow-x: auto; padding: 20px 16px 32px; text-align: center; }
.pdf-page canvas { background: #fff; box-shadow: 0 8px 28px rgba(39, 35, 65, 0.14); display: block; margin: 0 auto; max-width: 100%; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.privacy-policy { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-sm); margin: 48px auto 0; max-width: 820px; padding: clamp(28px, 5vw, 52px); }
.privacy-policy h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.privacy-policy h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.privacy-policy p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.privacy-policy .button { margin-top: 18px; }

.profiles-list { display: grid; gap: 28px; margin: 0 auto; max-width: 960px; }
.profile-post {
  align-items: start;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(51, 45, 89, 0.08);
  display: grid;
  gap: 34px;
  grid-template-columns: 210px 1fr;
  padding: 30px;
}
.profile-photo {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 22px;
  color: white;
  display: flex;
  font-size: 2rem;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
}
.profile-upload-preview { aspect-ratio: 1; border-radius: 14px; height: 140px; object-fit: contain; width: 140px; }
.profile-photo img { height: 100%; object-fit: contain; width: 100%; }
.profile-post h2 { font-size: 1.8rem; margin: 6px 0 16px; }
.profile-bio { color: var(--muted); line-height: 1.7; }
.profile-bio a { color: var(--color-primary); font-weight: 700; text-decoration: underline; }
.content-admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.content-admin-tabs a { border-radius: 999px; color: var(--muted); font-weight: 700; padding: 10px 16px; }
.content-admin-tabs a.is-active { background: #eeeafb; color: var(--color-primary); }
.admin-actions { align-items: center; display: flex; gap: 12px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 24px; }
.checkbox-row label { align-items: center; display: flex; flex-direction: row; gap: 8px; }
.checkbox-row input { width: auto; }

.site-footer {
  align-items: center;
  background: white;
  border-top: 1px solid var(--color-border, var(--line));
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  margin-top: 30px;
  padding: 36px 5vw;
}

.site-footer .brand { font-size: 1.1rem; }
.site-footer .brand-mark { height: 36px; width: 40px; }
.site-footer p { color: var(--muted); margin: 0 auto; max-width: 520px; text-align: center; }
.site-footer-actions { align-items: flex-end; display: grid; gap: 14px; justify-items: end; }
.site-footer-navigation { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: flex-end; }
.social-links { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  align-items: center;
  background: var(--surface-alt, #f7f5fd);
  border: 1px solid var(--line);
  color: var(--color-primary, var(--accent-dark));
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.social-link:hover { background: var(--color-primary, var(--accent)); border-color: var(--color-primary, var(--accent)); color: white; transform: translateY(-2px); }
.social-link svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; width: 21px; }
.social-link .social-icon-fill { fill: currentColor; stroke: none; }
.social-links--icons .social-link { border-radius: 50%; height: 42px; width: 42px; }
.social-links--labeled { justify-content: center; margin-top: 24px; }
.social-links--labeled .social-link { border-radius: 999px; gap: 9px; min-height: 46px; padding: 10px 18px; }
.about-social {
  background: linear-gradient(135deg, rgba(238, 234, 251, 0.9), rgba(227, 242, 248, 0.9));
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 44px auto 30px;
  max-width: 850px;
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}
.about-social h2 { font-size: clamp(1.65rem, 4vw, 2.2rem); margin: 8px 0 12px; }
.about-social > p:not(.eyebrow) { color: var(--muted); margin: 0 auto; max-width: 620px; }

:focus-visible {
  outline: 3px solid var(--color-secondary, #74b8d8);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .thought-one { left: 0; }
  .thought-two { right: -2%; }
  .thought-three { display: none; }
  .thought-bubble { transform: scale(0.88); }
  .journey-card { grid-template-columns: 1fr; text-align: center; }
  .step-icon { margin: 0 auto; }
  .period-panel { grid-template-columns: 1fr 1fr; }
  .content-grid, .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .public-home .topbar {
    align-items: center;
    border-radius: 18px;
    flex-direction: row;
    margin-top: 10px;
    max-width: calc(100% - 20px);
    min-height: 72px;
    padding: 10px 16px;
  }
  .public-home .brand span { font-size: 1.05rem; }
  .public-home .brand-mark { height: 38px; width: 42px; }
  .public-home .button-small { min-height: 38px; padding: 8px 12px; }
  .public-home .page { padding: 0 18px 64px; }
  .topbar > .primary-navigation { display: none; }
  .mobile-navigation { display: block; margin-left: auto; position: relative; }
  .mobile-navigation > summary {
    align-items: center;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-primary-dark);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    list-style: none;
    min-height: 44px;
    padding: 9px 12px;
  }
  .mobile-navigation > summary::-webkit-details-marker { display: none; }
  .mobile-navigation > summary::marker { content: ""; }
  .mobile-navigation > summary svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 20px; }
  .mobile-navigation[open] > summary { background: var(--color-primary); color: white; }
  .topbar .mobile-navigation > nav {
    align-items: stretch;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(51, 45, 89, 0.2);
    display: grid;
    gap: 4px;
    min-width: min(280px, calc(100vw - 32px));
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 40;
  }
  .mobile-navigation > nav > a,
  .mobile-navigation > nav .link-button {
    align-items: center;
    border-radius: 10px;
    display: flex;
    font-size: 0.92rem;
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
  }
  .mobile-navigation > nav > a:hover,
  .mobile-navigation > nav .link-button:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
  .mobile-navigation > nav > a.button { color: white; justify-content: center; margin-top: 4px; }
  .mobile-navigation > nav form { width: 100%; }
  .landing-background { height: 760px; }
  .conversation-hero { min-height: 650px; padding-top: 52px; }
  .hero-copy h1 { font-size: clamp(2.35rem, 12vw, 3.2rem); }
  .hero-copy h1 br:first-of-type { display: none; }
  .thought-bubble { bottom: 28px; font-size: 0.86rem; left: 50%; top: auto; transform: translateX(-50%); width: 235px; }
  .thought-two, .thought-three { display: none; }
  .journey-cards, .feature-grid, .human-section, .privacy-section { grid-template-columns: 1fr; }
  .journey-cards { gap: 38px; }
  .journey-cards::before { border-left: 3px dashed #c9bee9; border-top: 0; bottom: 12%; left: 45px; right: auto; top: 8%; }
  .journey-card { grid-template-columns: 74px 1fr; text-align: left; }
  .step-icon { height: 68px; margin: 0; width: 68px; }
  .landing-section { padding: 58px 0; }
  .human-section { gap: 28px; padding: 30px 22px; }
  .privacy-section { text-align: center; }
  .privacy-icon { margin: 0 auto; }
  .privacy-section ul { text-align: left; }
  .final-cta { margin-top: 56px; padding: 46px 18px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer .brand, .site-footer nav { justify-content: center; }
  .site-footer-actions { justify-items: center; }
  .content-hero { margin: 36px auto 36px; }
  .content-hero h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
  .content-hero .lead { font-size: 1.02rem; }
  .books-hero-cta { margin-top: 20px; width: 100%; }
  .book-language-selector { gap: 8px; margin: -8px auto 26px; }
  .book-language-selector span { flex: 0 0 100%; margin: 0; text-align: center; }
  .book-language-selector a { align-items: center; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: 999px; display: inline-flex; justify-content: center; min-height: 44px; padding: 8px 12px; }
  .book-language-selector a:first-of-type { border-left: 1px solid var(--line); }
  .books-trust { gap: 8px 16px; margin: -8px auto 28px; }
  .content-grid, .books-grid { grid-template-columns: 1fr; }
  .book-card { border-radius: 18px; padding: 16px; }
  .book-card > div:last-child { padding-top: 20px; }
  .book-card h2 { font-size: 1.35rem; }
  .book-summary { -webkit-line-clamp: 2; min-height: 0; }
  .book-price { margin-top: 14px; }
  .book-price-offer { gap: 10px; }
  .book-offer-discount { font-size: 1.35rem; padding-top: 6px; }
  .book-offer-current { font-size: 1.8rem; }
  .book-detail .book-price-offer { gap: 12px; }
  .book-detail .book-offer-discount { font-size: 1.5rem; }
  .book-detail .book-offer-current { font-size: 2.1rem; }
  .book-details-link { margin-top: 12px; min-height: 44px; padding-block: 10px; }
  .book-card-free-actions { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-card-free-actions .button { flex: none; min-height: 48px; padding: 11px 10px; width: auto; }
  .book-detail { gap: 28px; grid-template-columns: 1fr; margin-top: 30px; }
  .book-detail-cover { margin: 0 auto; max-width: 330px; width: 100%; }
  .book-detail-copy h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .book-description { font-size: 1rem; line-height: 1.65; }
  .book-primary-purchase .book-buy, .book-final-purchase .book-buy { margin-right: 0; text-align: center; width: 100%; }
  .book-primary-purchase, .book-final-purchase { align-items: stretch; flex-direction: column; }
  .book-primary-purchase .button, .book-final-purchase .button { flex: none; min-height: 48px; text-align: center; width: 100%; }
  .book-lead-dialog { border-radius: 18px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 20px 16px; width: calc(100% - 16px); }
  .book-lead-dialog-header h2 { font-size: 1.4rem; }
  .book-lead-form .button { min-height: 50px; }
  .ebook-reader-heading { align-items: stretch; flex-direction: column; }
  .ebook-reader { margin-top: 28px; }
  .ebook-reader-heading .button { width: 100%; }
  .pdf-reader-toolbar { gap: 6px; padding: 8px; }
  .pdf-reader-toolbar .button { font-size: 0.76rem; min-height: 44px; padding: 8px; }
  .pdf-reader-toolbar > span { font-size: 0.78rem; }
  .pdf-page { min-height: 65vh; padding: 14px 8px 24px; }
  .books-pagination { flex-wrap: wrap; gap: 10px; }
  .books-pagination .button { flex: 1 1 120px; max-width: 180px; min-height: 46px; padding-inline: 12px; }
  .books-pagination span { flex: 0 0 100%; order: -1; text-align: center; }
  .books-social-impact { border-radius: 18px; padding: 26px 18px; }
  .book-purchase-trust { width: 100%; }
  .about-professional { grid-template-columns: 1fr; text-align: center; }
  .professional-monogram { margin: 0 auto; }
  .profile-post { grid-template-columns: 1fr; }
  .profile-photo { margin: 0 auto; max-width: 220px; width: 100%; }
  .admin-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 340px) {
  .brand { gap: 7px; }
  .brand span { font-size: 0.98rem; }
  .mobile-navigation > summary span { display: none; }
  .book-card-free-actions { grid-template-columns: 1fr; }
  .book-offer-discount { font-size: 1.18rem; }
  .book-offer-current { font-size: 1.55rem; }
  .book-detail .book-offer-discount { font-size: 1.3rem; }
  .book-detail .book-offer-current { font-size: 1.8rem; }
}

@media print {
  .ebook-reader { display: none !important; }
}
.danger-zone {
  border-color: #b94a48;
}

.danger-zone h2 {
  color: #8f2927;
}

.button-danger {
  background: #9f302e;
  border-color: #9f302e;
  color: #fff;
}

.button-danger:hover {
  background: #7f2523;
}

/* The same typography and visual blocks are used in the editor and book description. */
.book-rich-content { --book-ink: #6c56a3; --book-soft: #f8f5f1; --book-teal: #197e73; white-space: normal; overflow-wrap: anywhere; line-height: 1.8; }
.book-rich-content h2, .book-rich-content h1 { font-family: Georgia, serif; color: var(--book-ink); font-size: clamp(1.8rem, 3.5vw, 2.7rem); line-height: 1.2; margin: 2em 0 .7em; }
.book-rich-content h3 { color: var(--book-ink); font-size: 1.35rem; line-height: 1.4; }
.book-rich-content p, .book-rich-content > div { margin-bottom: 1em; }
.book-rich-content strong, .book-rich-content b { font-weight: 800; }
.book-rich-content em, .book-rich-content i { font-style: italic; }
.book-rich-content .book-content-tag, .book-rich-content h6 { display: table; width: fit-content; max-width: 100%; border-radius: 24px; padding: 7px 16px; background: #eee9f3; color: #655092; line-height: 1.5; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 2em 0 1em; }
.book-rich-content blockquote, .rich-field .book-rich-content blockquote { position: relative; border: 0; border-radius: 24px; padding: 30px; margin: 28px 0; background: linear-gradient(120deg, #209c8d, #18786e); color: #fff; font: italic 1.35rem/1.65 Georgia, serif; }
.book-rich-content blockquote::before { content: "“"; display: block; height: 38px; color: #ffd1b5; font-size: 4rem; line-height: 1; }
.book-rich-content .book-content-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: book-card; margin: 28px 0; }
.book-rich-content aside { min-width: 0; padding: 24px; border-radius: 20px; background: var(--book-soft); border: 1px solid #e9e1ed; color: #5b5662; line-height: 1.7; counter-increment: book-card; }
.book-rich-content aside::before { content: counter(book-card, decimal-leading-zero); display: block; font: 2.5rem/1.2 Georgia, serif; color: #9b6550; margin-bottom: 14px; }
.book-rich-content aside strong { color: var(--book-ink); font-family: Georgia, serif; font-size: 1.2rem; }
.book-rich-content figure { margin: 28px 0; max-width: 100%; }
.book-rich-content figure img { display: block; max-width: 100%; height: auto; margin: auto; border-radius: 12px; }
.book-rich-content figure a { display: block; cursor: zoom-in; }
.book-rich-content figcaption { text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.5; margin-top: 12px; }
.book-rich-content ul, .book-rich-content ol { padding-left: 1.5em; }
.book-rich-content a { color: var(--book-ink); text-decoration: underline; }
.book-rich-content pre { white-space: pre-wrap; }
.book-description-field { min-width: 0; }
.book-description-field .rich-field { min-width: 0; }
.book-description-field trix-toolbar .trix-button-group { flex-wrap: wrap; }
.book-description-field trix-toolbar .trix-button { min-height: 44px; width: auto; padding: 8px 12px; white-space: normal; }
.book-description-field trix-editor { min-height: 360px; counter-reset: book-card; }
.book-description-field trix-editor aside { margin: 16px 0; }
.book-description-field [data-book-upload-status] { color: var(--book-teal, #197e73); font-weight: 700; }
@media (max-width: 600px) {
  .book-rich-content .book-content-cards { grid-template-columns: minmax(0, 1fr); }
  .book-rich-content blockquote, .rich-field .book-rich-content blockquote { padding: 24px; font-size: 1.2rem; }
  .book-rich-content aside { padding: 22px; }
}
.book-detail .book-rich-content h2, .book-description-field .book-rich-content h2 { color: var(--book-ink); }
.book-rich-content blockquote figcaption { color: #fff; }

.book-about { border-top: 1px solid var(--color-border, var(--line)); margin: 48px auto 32px; max-width: 1040px; padding-top: clamp(32px, 5vw, 56px); overflow-wrap: anywhere; }
.book-about-heading { margin: 0 auto 28px; max-width: 720px; text-align: center; }
.book-about-heading h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.25; margin: 10px 0 0; }
.book-about .profiles-list { max-width: none; }
.book-about .profile-post { align-items: start; }
.book-about .profile-name { font-size: 1.8rem; margin: 6px 0 16px; }
.book-about .profile-bio { min-width: 0; }
.book-about .profile-bio pre { white-space: pre-wrap; }
.book-about-link { display: table; margin: 20px auto 0; padding: 12px 8px; }
@media (max-width: 700px) {
  .book-about { margin-top: 32px; }
  .book-about .profile-post { padding: 22px; }
  .book-about .profile-post > div { min-width: 0; }
  .book-about .profile-name { font-size: 1.5rem; }
}
