/*
  styles.css: how the app looks.
  Mobile first: the basic rules are for phones; wider screens get small tweaks.

  APPEARANCE
  Every colour used anywhere below comes from the named "variables" in this
  section, so a whole look can be swapped at once. js/appearance.js sets
  these marks on the <html> element from the choices in Settings:
    data-palette = sage | sea | earth      (colour set)
    data-scheme  = light | dark            (Automatic follows the phone)
    data-text    = standard | large | larger
    data-font    = classic | modern        (font for lessons)
  Every colour pair was checked for readable contrast (WCAG AA).
*/

/* ---------- Colour sets ---------- */

/* Sage, light (also the default before any choice is made) */
:root {
  color-scheme: light;    /* tells the phone to draw date pickers etc. in light style */
  --bg: #f6f3ec;          /* page background: warm paper */
  --surface: #fffdf8;     /* cards, panels */
  --sunken: #ece6d8;      /* photo placeholders, theme labels */
  --field: #ffffff;       /* text boxes */
  --border: #ddd6c6;      /* soft lines */
  --border-strong: #8f8775; /* text box and chip outlines */
  --text: #24332b;        /* main text: deep forest green */
  --muted: #4f5f55;       /* softer text, still readable */
  --accent: #567358;      /* buttons, links, highlights: sage green */
  --on-accent: #ffffff;   /* text on accent-coloured buttons */
  --focus: #7c9076;       /* keyboard focus outline */
  --danger: #9b2c1f;      /* errors, Delete */
  --banner-bg: #fff4d6;   /* "new version" banner */
  --banner-border: #e3c873;

  --font: Georgia, "Times New Roman", serif;
  --font-lesson: var(--font);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Sage, dark */
:root[data-palette='sage'][data-scheme='dark'] {
  color-scheme: dark;
  --bg: #151a17;
  --surface: #1e2521;
  --sunken: #29312c;
  --field: #111513;
  --border: #333c36;
  --border-strong: #6d7a71;
  --text: #e6ebe4;
  --muted: #a7b3ab;
  --accent: #8fb592;
  --on-accent: #0f1411;
  --focus: #5f8a63;
  --danger: #f2a69b;
  --banner-bg: #3a3221;
  --banner-border: #7a6a3a;
}

/* Sea, light */
:root[data-palette='sea'] {
  --bg: #f1f5f7;
  --surface: #fbfdfe;
  --sunken: #dfe8ee;
  --field: #ffffff;
  --border: #d2dde4;
  --border-strong: #7f94a3;
  --text: #1c2e3b;
  --muted: #475c6b;
  --accent: #2d6a89;
  --on-accent: #ffffff;
  --focus: #708c9b;
  --danger: #a12f29;
  --banner-bg: #fff4d6;
  --banner-border: #e3c873;
}

/* Sea, dark */
:root[data-palette='sea'][data-scheme='dark'] {
  color-scheme: dark;
  --bg: #11181d;
  --surface: #19232a;
  --sunken: #233039;
  --field: #0d1317;
  --border: #2e3d47;
  --border-strong: #637b8a;
  --text: #e3ecf1;
  --muted: #a1b4c0;
  --accent: #7fb8d6;
  --on-accent: #0b1418;
  --focus: #4d8cad;
  --danger: #f2a69b;
  --banner-bg: #3a3221;
  --banner-border: #7a6a3a;
}

/* Earth, light */
:root[data-palette='earth'] {
  --bg: #f7f1e9;
  --surface: #fffaf3;
  --sunken: #ede0d1;
  --field: #ffffff;
  --border: #e1d2c0;
  --border-strong: #9a826a;
  --text: #392a1e;
  --muted: #6a5343;
  --accent: #87562f;
  --on-accent: #ffffff;
  --focus: #a1866a;
  --danger: #9b2c1f;
  --banner-bg: #fff4d6;
  --banner-border: #e3c873;
}

/* Earth, dark */
:root[data-palette='earth'][data-scheme='dark'] {
  color-scheme: dark;
  --bg: #1b1612;
  --surface: #251f19;
  --sunken: #302821;
  --field: #16110e;
  --border: #3c3229;
  --border-strong: #7a6754;
  --text: #f0e7dc;
  --muted: #bfae9b;
  --accent: #d69e6d;
  --on-accent: #1a120b;
  --focus: #a87850;
  --danger: #f2a69b;
  --banner-bg: #3a3221;
  --banner-border: #7a6a3a;
}

/* ---------- Text size and lesson font ---------- */
/* Almost all sizes are in "rem", which scales with the page's base size,
   so changing it here scales the whole app evenly. */
:root[data-text='large'] { font-size: 112.5%; }
:root[data-text='larger'] { font-size: 125%; }

:root[data-font='modern'] { --font-lesson: var(--font-ui); }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.125rem;  /* 18px: comfortable on a phone */
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Extra padding keeps content clear of the iPhone notch / home bar */
  padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom));
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.title {
  font-family: var(--font);
  font-weight: normal;
  font-size: 3rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.verse {
  font-family: var(--font);
  font-style: italic;
  font-size: 1.25rem;
  margin: 0 0 2rem;
}

.ref {
  display: block;
  font-style: normal;
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.status {
  color: var(--muted);
  font-size: 1rem;
  margin: 0.25rem 0;
}

/* ---------- Milestone 2: sign-in forms ---------- */

/* Make sure anything marked "hidden" really stays hidden */
[hidden] {
  display: none !important;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

label {
  font-weight: 600;
}

input {
  font: inherit;
  /* 16px or more stops iPhones zooming in when you tap the box */
  font-size: 1.125rem;
  padding: 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
}

#code {
  letter-spacing: 0.3em;
  font-size: 1.5rem;
  text-align: center;
}

button {
  font: inherit;
  font-weight: 600;
  /* At least 44px tall, so it's easy to tap */
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}

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

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
}

.link-button {
  background: none;
  color: var(--accent);
  text-decoration: underline;
  font-weight: normal;
}

/* Visible keyboard focus, for people not using a touch screen */
input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hint {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.message {
  margin: 0 0 1rem;
  min-height: 1.6em;
  font-size: 1rem;
}

.message.error {
  color: var(--danger); /* dark red, still readable on the paper background */
}

/* ---------- Milestone 3: feed and add form ---------- */

/* Once signed in, line things up from the top-left like a normal app,
   instead of centring them like the sign-in screen. */
.page:has(#app-view:not([hidden])) {
  justify-content: flex-start;
  text-align: left;
}

.page:has(#app-view:not([hidden])) .title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.screen-title {
  font-family: var(--font);
  font-weight: normal;
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

button.wide {
  width: 100%;
  margin-bottom: 1.25rem;
}

textarea {
  font: inherit;
  font-size: 1.125rem;
  padding: 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  resize: vertical;
}

textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.optional {
  font-weight: normal;
  color: var(--muted);
  font-size: 0.95rem;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.sight-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.125rem;
}

/* The lesson is the main line of each card */
.sight-lesson {
  font-family: var(--font-lesson);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.sight-saw {
  margin: 0 0 0.375rem;
  color: var(--text);
  font-size: 1rem;
}

.sight-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Milestone 4: photos ---------- */

/* Looks like a <label>, for the photo section (which has no single input) */
.field-label {
  font-weight: 600;
}

.photo-preview {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--sunken);
}

/* Feed photos: same shape on every card, cropped to fill neatly */
.sight-photo {
  display: block;
  width: calc(100% + 2.25rem);  /* stretch to the card's edges */
  margin: -1rem -1.125rem 0.875rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  background: var(--sunken);          /* soft placeholder while loading */
}

/* Nothing to say? Then take up no space. */
.message:empty {
  min-height: 0;
  margin: 0;
}

/* ---------- Milestone 5: view, edit, delete ---------- */

/* The whole feed card is a link to the sight */
.sight-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.sight-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 12px;
}

.back {
  padding-left: 0;
  margin-bottom: 0.5rem;
  text-decoration: none;
  font-weight: 600;
}

.sight-full {
  gap: 1rem;
}

.view-photo {
  width: calc(100% + 2.5rem);   /* stretch to the card's edges */
  margin: -1.25rem -1.25rem 0;
  border-radius: 12px 12px 0 0;
  background: var(--sunken);
}

.view-lesson {
  font-family: var(--font-lesson);
  font-weight: normal;
  font-size: 1.4rem;
  line-height: 1.4;
  margin: 0;
  white-space: pre-line;  /* keep line breaks you typed */
}

.view-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.view-text {
  margin: 0;
  white-space: pre-line;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.actions button {
  flex: 1;
}

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}


/* ---------- Milestone 6: themes, type, Bible, browse, search, settings ---------- */

/* Hidden on screen but still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Comfortable space below the last card or the Save button (when signed in) */
.page:has(#app-view:not([hidden])) {
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}

/* The tab bar sits under the title and stays pinned to the top while you
   scroll ("sticky"). The negative side margins stretch it to the screen edges. */
.tab-bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  margin: 0 -1.5rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.tab-bar a {
  flex: 1;
  max-width: 9rem;
  text-align: center;
  padding: 0.8rem 0.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}

.tab-bar a[aria-current='page'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-bar a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

/* Groups of choices (type, themes) */
fieldset.choice-group {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

fieldset.choice-group legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

/* A tick-box or radio shown as a rounded "chip" you tap */
.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip span {
  display: inline-block;
  min-height: 2.75rem; /* easy to tap */
  line-height: 1.6;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--field);
  font-size: 1rem;
  cursor: pointer;
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.chip input:checked + span::before {
  content: '✓ ';
}

.chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.inline-add {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.inline-add input {
  flex: 1;
  min-width: 0;
}

.hint.ok {
  color: var(--accent);
  font-weight: 600;
}

/* Labels on the View screen */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--text);
  font-size: 0.9rem;
}

.tag-type {
  background: var(--accent);
  color: var(--on-accent);
}

.bible-link {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Browse and Search */
select {
  font: inherit;
  font-size: 1.125rem;
  padding: 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
}

select:focus-visible,
#search-input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.filters {
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.filters .link-button {
  align-self: flex-start;
  padding-left: 0;
}

#search-input {
  width: 100%;
}

.count {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.75rem 0;
}

/* Settings */
.settings-section {
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font);
  font-weight: normal;
  font-size: 1.2rem;
  margin: 0;
}

.theme-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid var(--sunken);
}

.theme-name {
  flex: 1;
  overflow-wrap: anywhere;
}

.danger-link {
  color: var(--danger);
}

.account-email {
  margin: 0;
  overflow-wrap: anywhere; /* long email addresses wrap instead of overflowing */
}

/* ---------- Update banner ---------- */
.update-banner {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  background: var(--banner-bg);   /* soft, warm yellow so it's noticed */
  color: var(--text);
  border: 1px solid var(--banner-border);
  font-weight: 600;
  text-align: center;
}

/* ---------- Appearance settings ---------- */
.appearance {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Little colour dots on the Colour choices. These show each colour set
   itself, so they use fixed colours on purpose. */
.swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  margin-right: 0.45em;
  vertical-align: -0.1em;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.swatch-sage { background: #567358; }
.swatch-sea { background: #2d6a89; }
.swatch-earth { background: #87562f; }

/* Show each font choice in its own font */
.font-classic { font-family: var(--font); }
.font-modern { font-family: var(--font-ui); }

/* Example text inside empty boxes, in each colour set's soft text colour */
::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

/* ---------- About ---------- */
.about p {
  margin: 0;
}

.about-verse {
  margin: 0.25rem 0 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--sunken);
  border-radius: 0 8px 8px 0;
}

.about-verse p {
  font-family: var(--font);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
}

.about-verse footer {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.about .bible-link {
  align-self: flex-start;
}

.about-list {
  margin: 0;
  padding-left: 1.25rem;
}

.about-heading {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.about-version {
  font-size: 0.85rem;
}

/* The motto under "About Consider" */
.about-motto {
  font-family: var(--font);
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ---------- Share as a picture ---------- */
.share-hint {
  margin-bottom: 1rem;
}

.share-preview {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* ---------- "Did I live it?" ---------- */
.checkin {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
}

.checkin p {
  margin: 0;
}

.checkin .actions {
  margin-top: 0.25rem;
}

.checkin .link-button {
  align-self: flex-start;
  padding-left: 0;
}

.checkin-title {
  font-weight: 600;
}

/* Waiting for its week: just a quiet line */
.checkin-quiet {
  padding: 0;
}

/* Time to check in: gently highlighted */
.checkin-due {
  background: var(--sunken);
  border-left: 3px solid var(--accent);
}

/* Lived: a calm, settled look */
.checkin-lived {
  background: var(--sunken);
}

.checkin-lived .checkin-title {
  color: var(--accent);
}

/* "Ready to check in" at the top of the feed */
.due-panel {
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--accent);
}

.due-panel p {
  margin: 0;
}

.due-list {
  margin: 0;
  padding-left: 1.25rem;
}

.due-list a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ---------- On this day / Revisit ---------- */
.revisit {
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem 1rem;
}

.revisit p {
  margin: 0;
}

.revisit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.revisit-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* The ✕: still a comfortable 44px to tap, but visually small */
.revisit-close {
  background: none;
  color: var(--muted);
  min-width: 2.75rem;
  padding: 0.25rem;
  margin: -0.5rem -0.5rem -0.5rem 0;
  font-weight: normal;
}

.revisit-link {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.revisit-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 8px;
}

.revisit-photo {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sunken);
}

.revisit-lesson {
  font-family: var(--font-lesson);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.2rem !important;
}

/* ---------- Verse text on a sight ---------- */
/* Uses the same quote-box look as About (.about-verse) */
.view-verse {
  margin: 0;
}

.view-verse p {
  margin: 0;
  font-family: var(--font);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
}

.view-verse sup {
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.7em;
  color: var(--muted);
  margin: 0 0.15em 0 0.25em;
}

.view-verse sup:first-child {
  margin-left: 0;
}

.view-verse footer {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- "Things to consider" prompts ---------- */
.idea-toggle {
  display: block;
  margin: -0.5rem auto 1rem;
  padding: 0.5rem;
}

.idea-panel {
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--accent);
}

.idea-panel p {
  margin: 0;
}

.idea-text {
  font-family: var(--font-lesson);
  font-size: 1.25rem;
  line-height: 1.45;
}

/* The chosen prompt at the top of "Add a sight" */
.form-prompt {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--sunken);
  border-left: 3px solid var(--accent);
}

.form-prompt p {
  margin: 0.2rem 0 0;
}

/* ---------- Book of sights ---------- */
.book-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.book-toolbar .back {
  align-self: flex-start;
}

/* The pages: always the light version of your colour set (set by book.js) */
.book {
  color-scheme: light;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-page {
  background: var(--book-bg);
  color: var(--book-text);
  border: 1px solid var(--book-line);
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.book-page p,
.book-page h2,
.book-page h3 {
  margin: 0;
}

.book-title-page {
  text-align: center;
  justify-content: center;
  min-height: 24rem;
  gap: 1rem;
}

.book-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--book-muted);
}

.book-title {
  font-family: var(--font);
  font-weight: normal;
  font-size: 2.6rem;
  color: var(--book-accent);
}

.book-motto {
  font-family: var(--font);
  font-style: italic;
  font-size: 1.15rem;
}

.book-verse {
  font-family: var(--font);
  font-style: italic;
  color: var(--book-muted);
  margin-top: 1rem !important;
}

.book-verse-ref,
.book-count,
.book-date,
.book-tags {
  color: var(--book-muted);
  font-size: 0.9rem;
}

.book-photo {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
}

.book-lesson {
  font-family: var(--font-lesson);
  font-weight: normal;
  font-size: 1.45rem;
  line-height: 1.4;
  white-space: pre-line;
}

.book-part p {
  white-space: pre-line;
}

.book-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--book-muted);
  margin-bottom: 0.15rem !important;
}

.book-lived {
  margin-top: 0.35rem !important;
  color: var(--book-accent);
  font-weight: 600;
}

.book-scripture {
  border-left: 3px solid var(--book-accent);
  padding-left: 0.85rem;
}

.book-verse-text {
  font-family: var(--font);
  font-style: italic;
}

/* ---------- Printing: only the book's pages ---------- */
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
  }

  /* Hide everything except the book (tab bar, buttons, messages, badges…) */
  body > *:not(.page),
  .page > *:not(#app-view),
  #app-view > *:not(#book-view),
  .book-toolbar {
    display: none !important;
  }

  .page {
    display: block;
    padding: 0 !important;
    max-width: none;
    min-height: 0;
  }

  .book {
    gap: 0;
  }

  /* One sight per sheet of paper */
  .book-page {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #fff;
  }

  .book-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .book-title-page {
    min-height: 240mm;
  }

  .book-photo {
    max-height: 125mm;
  }
}

/* ---------- Circles ---------- */
.circles-intro {
  margin-bottom: 1rem;
}

.circle-card .circle-name {
  font-family: var(--font);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.circle-create {
  margin-top: 1.25rem;
}

.circle-coming {
  margin: -0.5rem 0 1rem;
}

/* The invite link: long, so let it wrap anywhere */
.invite-link {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--sunken);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  user-select: all;
}

.invite-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.invite-more .link-button {
  padding-left: 0;
}

.circle-end {
  margin-top: 1.5rem;
}

.circle-end button {
  width: 100%;
}

/* Five tabs now: a touch smaller so they fit narrow phones */
.tab-bar a {
  font-size: 0.88rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
