/* Bible reader (/bible). Cream reading surface by default, forest "Dark" theme optional.
   Words of Jesus: #a8322d on cream, #ee8077 on dark green (same as the rest of the site). */

.reader-page {
  --rd-bg: #f6f1e7;
  --rd-ink: #221d17;
  --rd-soft: #6a6155;
  --rd-line: #e3dacb;
  --rd-card: #fffdf8;
  --rd-wj: #a8322d;
  --rd-accent: #8a6a2b;
  --rd-sel: rgba(40, 70, 58, 0.1);
  --rd-target: rgba(201, 164, 90, 0.2);
  margin: 0;
  background: var(--rd-bg);
  color: var(--rd-ink);
  font-family: "Source Serif 4", Georgia, serif;
}

:root { --rd-size: 1.18rem; }

.rd-dark .reader-page {
  --rd-bg: #17261f;
  --rd-ink: #ece5d8;
  --rd-soft: #a99f8e;
  --rd-line: #2c4237;
  --rd-card: #1f3229;
  --rd-wj: #ee8077;
  --rd-accent: #c9a45a;
  --rd-sel: rgba(243, 238, 228, 0.1);
  --rd-target: rgba(201, 164, 90, 0.16);
}

.reader-page .wj { color: var(--rd-wj); }

/* Site header */
.rd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem max(1rem, env(safe-area-inset-left));
  background: var(--forest);
}
.rd-top .brand { font-size: 1rem; }
.rd-links { display: flex; align-items: center; gap: 1.1rem; }
.rd-links a {
  color: #d9d0bf;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}
.rd-links a:hover, .rd-links a[aria-current="page"] { color: var(--cream); }
.rd-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold-lite); text-underline-offset: 0.35em; }
.rd-links .topbar-cta { color: var(--gold-lite); font-size: 0.75rem; }
@media (max-width: 30rem) {
  .rd-top .brand span { display: none; }
  .rd-links { gap: 0.9rem; }
}

/* Sticky reader toolbar */
.rd-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--rd-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rd-line);
}
.rd-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: min(100%, 44rem);
  margin: 0 auto;
  padding: 0.4rem 0.6rem;
}
.rd-spacer { flex: 1; }
.rd-icon {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--rd-ink);
  font: inherit;
  cursor: pointer;
}
.rd-icon:hover:not(:disabled) { background: var(--rd-line); }
.rd-icon:disabled { opacity: 0.3; cursor: default; }
.rd-aa { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.rd-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.5rem;
  padding: 0 0.95rem;
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  background: var(--rd-card);
  color: var(--rd-ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
}
.rd-pick:hover { border-color: var(--rd-accent); }
.rd-version {
  margin-left: 0.35rem;
  color: var(--rd-soft);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}
.rd-aa-menu {
  position: absolute;
  right: max(0.6rem, calc((100% - 44rem) / 2 + 0.6rem));
  top: calc(100% + 0.35rem);
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rd-line);
  border-radius: 0.85rem;
  background: var(--rd-card);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
}
.rd-aa-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--rd-soft); }
.rd-aa-row span { width: 5rem; }
.rd-aa-row button {
  min-width: 3.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  background: none;
  color: var(--rd-ink);
  font: inherit;
  cursor: pointer;
}
.rd-aa-row button[aria-pressed="true"] { border-color: var(--rd-accent); color: var(--rd-accent); }

/* Reading column */
.rd-main {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 2rem 1.35rem 7rem;
}
.rd-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem 0 1.6rem;
  font-family: var(--display);
  font-weight: 600;
  text-align: center;
  line-height: 1;
}
.rd-title-book {
  color: var(--rd-soft);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.02em;
}
.rd-title-ch {
  margin-top: 0.35rem;
  color: var(--rd-ink);
  font-size: 3.4rem;
}
.rd-sup {
  margin: -0.6rem 0 1.2rem;
  color: var(--rd-soft);
  font-style: italic;
  text-align: center;
}
.rd-text {
  font-size: var(--rd-size);
  line-height: 1.85;
  font-kerning: normal;
  hyphens: manual;
  overflow-wrap: break-word;
}
.rd-text p { margin: 0 0 1em; }
.rd-text .rd-q1, .rd-text .rd-q2 { margin: 0; padding-left: 1.4em; text-indent: -1em; }
.rd-text .rd-q2 { padding-left: 2.6em; }
.rd-text .rd-q1 + .rd-p, .rd-text .rd-q2 + .rd-p { margin-top: 1em; }
.rd-text .rd-gap { margin-top: 1em; }
.rd-v {
  border-radius: 0.2em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  scroll-margin-top: 5rem;
  transition: background-color 0.2s ease;
}
.rd-vn {
  margin-right: 0.18em;
  color: var(--rd-soft);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.58em;
  font-weight: 600;
  line-height: 0;
  vertical-align: 0.62em;
  user-select: none;
}
.rd-v.rd-target { background: var(--rd-target); box-shadow: 0 0 0 0.12em var(--rd-target); }
.rd-v.rd-sel {
  text-decoration: underline dotted var(--rd-accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.28em;
  background: var(--rd-sel);
}
.rd-loading { color: var(--rd-soft); text-align: center; }
.rd-loading a { color: var(--rd-accent); }

/* Chapter navigation + end of chapter */
.rd-chapnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 2.5rem 0 1.5rem;
}
.rd-chapnav-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rd-line);
  border-radius: 0.8rem;
  background: var(--rd-card);
  color: var(--rd-ink);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
}
.rd-chapnav-btn:hover { border-color: var(--rd-accent); }
.rd-chapnav-next { grid-column: 2; text-align: right; }
.rd-chapnav-dir {
  color: var(--rd-soft);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rd-chapnav-btn[hidden] { display: none; }
.rd-end { display: grid; gap: 1.4rem; }
.rd-ask {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  color: var(--rd-accent);
  font-size: 0.95rem;
  text-decoration: none;
}
.rd-ask:hover { border-color: var(--rd-accent); }
.rd-attrib { margin: 0; color: var(--rd-soft); font-size: 0.8rem; text-align: center; }

/* Sheets (book picker, search) */
.rd-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 18, 14, 0.45);
}
.rd-sheet[hidden] { display: none; }
.rd-sheet-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 40rem);
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 1.1rem 1.1rem 0 0;
  background: var(--rd-bg);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 48rem) {
  .rd-sheet { align-items: flex-start; padding-top: 8vh; }
  .rd-sheet-card { border-radius: 1.1rem; max-height: 80vh; }
}
.rd-sheet-open { overflow: hidden; }
.rd-sheet-head {
  display: grid;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  padding: 0.6rem 0.6rem 0.3rem;
}
.rd-sheet-head h2 {
  grid-column: 2;
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  text-align: center;
}
.rd-sheet-back { grid-column: 1; grid-row: 1; }
.rd-sheet-close { grid-column: 3; }
.rd-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin: 0.2rem 1rem 0.6rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--rd-line);
}
.rd-tabs button {
  padding: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--rd-soft);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.rd-tabs button[aria-selected="true"] { background: var(--rd-card); color: var(--rd-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.rd-books-view, .rd-chapters-view { display: flex; flex-direction: column; min-height: 0; }
.rd-books-view[hidden], .rd-chapters-view[hidden] { display: none; }
.rd-books {
  margin: 0;
  padding: 0 0.5rem 1rem;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}
.rd-books button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--rd-line);
  background: none;
  color: var(--rd-ink);
  font: inherit;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
}
.rd-books button:hover { background: var(--rd-card); }
.rd-books button.on { color: var(--rd-accent); font-weight: 600; }
.rd-books-n { color: var(--rd-soft); font-size: 0.8rem; }
.rd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 0.5rem;
  padding: 0.5rem 1rem 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rd-grid a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--rd-line);
  border-radius: 0.6rem;
  background: var(--rd-card);
  color: var(--rd-ink);
  font-size: 1.02rem;
  text-decoration: none;
}
.rd-grid a:hover { border-color: var(--rd-accent); }
.rd-grid a.on { background: var(--forest); border-color: var(--forest); color: var(--cream); }

/* Search */
.rd-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0.8rem 0.4rem;
  padding: 0 0.3rem 0 0.9rem;
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  background: var(--rd-card);
  color: var(--rd-soft);
}
.rd-search-form input {
  flex: 1;
  min-width: 0;
  height: 2.9rem;
  border: 0;
  background: none;
  color: var(--rd-ink);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}
.rd-results {
  padding: 0.2rem 0.8rem 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rd-hint, .rd-count { margin: 0.8rem 0.4rem; color: var(--rd-soft); font-size: 0.92rem; }
.rd-hit {
  display: block;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--rd-line);
  color: var(--rd-ink);
  line-height: 1.55;
  text-decoration: none;
}
.rd-hit:hover { background: var(--rd-card); }
.rd-hit-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--rd-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rd-hit mark { background: var(--rd-sel); color: inherit; border-radius: 0.15em; }
.rd-hit-ref {
  margin-top: 0.4rem;
  border: 1px solid var(--rd-accent);
  border-radius: 0.7rem;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
}
.rd-hit-ref-label { color: var(--rd-soft); font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 0.9rem; }
.rd-more {
  display: block;
  margin: 1rem auto 0;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  background: none;
  color: var(--rd-accent);
  font: inherit;
  cursor: pointer;
}

.rd-toast {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  z-index: 50;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rd-toast.on { opacity: 1; transform: translate(-50%, 0); }

.rd-aa-menu[hidden] { display: none; }
.rd-search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.rd-icon[hidden] { display: none; }

/* ---------- Highlights and notes ---------- */
/* One highlight: the site's gold as a soft marker. Selection stays a dotted underline + light tint. */
.reader-page { --rd-hl: rgba(214, 170, 72, 0.34); }
.rd-dark .reader-page { --rd-hl: rgba(201, 164, 90, 0.3); }
.rd-v.rd-hl {
  background: linear-gradient(to bottom, transparent 8%, var(--rd-hl) 8%, var(--rd-hl) 92%, transparent 92%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-radius: 0.15em;
}
.rd-v.rd-sel { background: var(--rd-sel); }
.rd-v.rd-hl.rd-sel { background: linear-gradient(to bottom, transparent 8%, var(--rd-hl) 8%, var(--rd-hl) 92%, transparent 92%); }
.rd-note-ico {
  display: inline-grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  margin: 0 0.15em;
  padding: 0;
  border: 0;
  border-radius: 0.35em;
  background: var(--rd-card);
  box-shadow: 0 0 0 1px var(--rd-line);
  color: var(--rd-accent);
  vertical-align: -0.2em;
  cursor: pointer;
}
.rd-note-ico svg { width: 0.85em; height: 0.85em; }
.rd-note-ico:hover { box-shadow: 0 0 0 1px var(--rd-accent); }

.rd-marks-btn {
  padding: 0.5rem 0.2rem 0;
  border: 0;
  border-top: 1px solid var(--rd-line);
  background: none;
  color: var(--rd-accent);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}
.rd-hit-hl .rd-hit-text { background: var(--rd-hl); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.rd-hit-note { display: block; margin-top: 0.35rem; padding-left: 0.6rem; border-left: 2px solid var(--gold-lite); color: var(--rd-soft); font-size: 0.92rem; white-space: pre-wrap; }

/* ---------- Ask Pastor J in the reader: ONE bottom component ---------- */
/* Idle: the composer pill. With a selection it grows upward into one card:
   context row (reference + x), Highlight / Note, then the input. Notes edit inside it too. */
:root { --rc-kb: 0px; --rc-panel-w: 27rem; --rc-dock-h: 64px; }
.rd-main { padding-bottom: calc(var(--rc-dock-h) + 5rem); }
.reader-page {
  --rc-bg: #16241e;
  --rc-line: rgba(201, 164, 90, 0.38);
  --rc-soft: #a99f8e;
}
.rd-dark .reader-page { --rc-bg: #22382e; --rc-line: rgba(201, 164, 90, 0.45); }
.rc-dock {
  position: fixed;
  left: 50%;
  bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + var(--rc-kb));
  z-index: 34;
  width: min(calc(100% - 1.5rem), 38rem);
  transform: translateX(-50%);
}
.rc-card {
  overflow: hidden;
  border: 1px solid var(--rc-line);
  border-radius: 1.6rem;
  background: var(--rc-bg);
  color: var(--cream);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  transition: border-radius 0.2s ease;
}
.rc-expanded .rc-card { border-radius: 1.25rem; }
.rc-ctx {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.55rem 0 1.1rem;
  animation: rc-grow 0.2s ease;
}
.rc-ctx[hidden], .rc-acts[hidden], .rc-note[hidden], .rc-pill[hidden] { display: none; }
.rc-ctx-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--gold-lite);
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rc-ctx-chapter .rc-ctx-label::after { content: " \00b7  whole chapter"; color: var(--rc-soft); font-family: "Source Serif 4", Georgia, serif; font-size: 0.82rem; font-weight: 400; }
.rc-ctx-x {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(243, 238, 228, 0.08);
  color: var(--cream);
  cursor: pointer;
}
.rc-ctx-x:hover { background: rgba(243, 238, 228, 0.16); }
.rc-acts { display: flex; gap: 0.45rem; padding: 0.55rem 1rem 0.15rem; animation: rc-grow 0.2s ease; }
.rc-act {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid rgba(243, 238, 228, 0.18);
  border-radius: 999px;
  background: none;
  color: var(--cream);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.rc-act:hover { border-color: var(--gold-lite); color: var(--gold-lite); }
.rc-act[aria-pressed="true"] { border-color: transparent; background: rgba(214, 170, 72, 0.3); color: #f6e7c4; }
@keyframes rc-grow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rc-ctx, .rc-acts, .rc-note { animation: none; } }
.rc-note { padding: 0.55rem 0.8rem 0.75rem 1rem; animation: rc-grow 0.2s ease; }
.rc-note-quote {
  margin: 0 0 0.55rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--gold-lite);
  color: var(--rc-soft);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.45;
}
.rc-note textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(243, 238, 228, 0.18);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.18);
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: none;
  outline: none;
}
.rc-note textarea:focus { border-color: var(--gold-lite); }
.rc-note textarea::placeholder { color: var(--rc-soft); }
.rc-note-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.55rem; }
.rc-note-help { flex: 1; color: var(--rc-soft); font-size: 0.78rem; }
.rc-note-btn {
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(243, 238, 228, 0.18);
  border-radius: 999px;
  background: none;
  color: var(--cream);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.rc-note-btn[hidden] { display: none; }
.rc-note-save { border-color: var(--gold-lite); background: var(--gold-lite); color: var(--forest-deep); font-weight: 600; }
.rc-note-del { color: #f0a49b; }
.rc-pill { display: flex; align-items: flex-end; gap: 0.35rem; padding: 0.35rem 0.4rem; }
.rc-pill textarea {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  padding: 0.6rem 0.3rem;
  border: 0;
  background: none;
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  resize: none;
  outline: none;
}
.rc-pill textarea::placeholder { color: var(--rc-soft); }
.rc-convo, .rc-send {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.rc-convo { background: rgba(243, 238, 228, 0.08); color: var(--gold-lite); }
.rc-convo:hover { background: rgba(243, 238, 228, 0.16); }
.rc-send { background: var(--gold-lite); color: var(--forest-deep); }
.rc-send:disabled { opacity: 0.5; cursor: default; }
.rd-toast { bottom: calc(var(--rc-dock-h) + 1.6rem + var(--rc-kb)); }
.rc-user-ref { margin-right: 0.15rem; }
.msg-user .ref.rc-user-ref { font-size: 0.9rem; }

.rc-panel {
  position: fixed;
  z-index: 33;
  display: flex;
  flex-direction: column;
  background: var(--forest-deep);
  color: var(--cream);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3);
}
.rc-panel[hidden] { display: none; }
.reader-page .rc-panel .wj { color: var(--wj-dark-bg); }
.rc-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem 0.4rem 1.1rem;
  border-bottom: 1px solid rgba(243, 238, 228, 0.08);
  touch-action: none;
}
.rc-title { flex: 1; margin: 0; color: var(--gold-lite); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; }
.rc-full { margin-right: 0.3rem; color: #d9d0bf; font-size: 0.85rem; }
.rc-full:hover { color: var(--cream); }
.rc-new { margin-right: 0.5rem; padding: 0.3rem 0.7rem; border: 1px solid rgba(243, 238, 228, 0.22); border-radius: 999px; background: none; color: #d9d0bf; font: inherit; font-size: 0.85rem; cursor: pointer; }
.rc-new:hover, .rc-new:focus-visible { border-color: var(--gold-lite); color: var(--cream); }
.rc-panel .rd-icon { color: var(--cream); min-width: 2.3rem; height: 2.3rem; }
.rc-panel .rd-icon:hover { background: rgba(243, 238, 228, 0.1); }
.rc-flip svg { transform: rotate(180deg); }
.rc-handle { display: grid; place-items: center; height: 1.1rem; touch-action: none; cursor: grab; }
.rc-handle span { width: 2.6rem; height: 0.3rem; border-radius: 999px; background: rgba(243, 238, 228, 0.3); }
.rc-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1rem 1.1rem calc(var(--rc-dock-h) + 1.75rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rc-thread .msg-assistant { font-size: 1rem; }
.rc-thread .msg-user { font-size: 0.98rem; }
.rc-empty, .rc-earlier { margin: 0; color: #a99f8e; font-size: 0.92rem; text-align: center; }
.rc-earlier a { color: var(--gold-lite); }

/* Phones and tablets: bottom sheet */
@media (max-width: 63.99rem) {
  .rc-panel {
    left: 0;
    right: 0;
    bottom: 0;
    height: 58vh;
    height: 58dvh;
    border-radius: 1.2rem 1.2rem 0 0;
    transition: height 0.22s ease;
  }
  .rc-panel[data-state="peek"] { height: 36vh; height: 36dvh; }
  .rc-panel[data-state="full"] { height: 92vh; height: 92dvh; }
  .rc-panel.rc-dragging { transition: none; }
  .rc-panel-open .rd-main { padding-bottom: 62vh; }
}
/* Desktop: right-hand panel; the reading column moves left */
@media (min-width: 64rem) {
  .rc-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--rc-panel-w);
    border-left: 1px solid rgba(201, 164, 90, 0.2);
  }
  .rc-handle, .rc-expand { display: none; }
  .rc-head { padding-top: 0.6rem; }
  .rc-panel-open .rd-top, .rc-panel-open .rd-bar, .rc-panel-open .rd-main { margin-right: var(--rc-panel-w); }
  .rc-panel-open .rd-main { width: auto; max-width: 40rem; margin-left: max(1rem, calc((100vw - var(--rc-panel-w) - 40rem) / 2)); }
  .rc-panel-open .rc-dock { left: auto; right: 1rem; width: calc(var(--rc-panel-w) - 2rem); transform: none; }
  .rc-panel-open .rd-toast { left: calc((100vw - var(--rc-panel-w)) / 2); }
}

/* Inside the open panel the component sits on a solid strip, so replies never show through around it. */
.rc-panel-open .rc-dock::before {
  content: "";
  position: absolute;
  inset: -1.1rem -0.75rem calc(-1 * max(0.75rem, env(safe-area-inset-bottom)) - var(--rc-kb)) -0.75rem;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(22, 36, 30, 0), #16241e 1.1rem);
}
.rc-panel-open .rc-card { background: #22382e; }
/* Display face: FrameAnyPhoto wordmark style (see styles.css --display) */
.rd-title { font-weight: 400; letter-spacing: -0.04em; }
.rd-top .brand .cot-mark { font-size: 1.4em; -webkit-text-stroke: 0.3px currentColor; }
