:root {
  --bg: #0e0d0c;
  --bg-raised: #161412;
  --bg-panel: #1c1916;
  --iron: #2a2622;
  --iron-edge: #3a342e;
  --bronze: #a67c52;
  --bronze-bright: #c9965a;
  --bronze-dim: #7a5a3a;
  --text: #e8e0d4;
  --text-muted: #9a9084;
  --text-soft: #b8aea0;
  --rule: #3d3530;
  --focus: #c9965a;
  --me: #2c2419;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { color-scheme: dark; }
body {
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at top, #1a1612 0%, var(--bg) 55%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.top {
  background: var(--iron);
  color: var(--text);
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
  border-bottom: 1px solid var(--rule);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  line-height: 1.35;
  min-width: 0;
  flex: 1;
}
.tag {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--iron-edge);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.iconbtn {
  background: none;
  border: 0;
  color: var(--bronze-bright);
  font-size: 26px;
  line-height: 1;
  padding: 0 6px;
  flex: none;
}
.reading {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--bronze-dim);
}
.reading:hover { color: var(--bronze-bright); }

.card {
  max-width: 420px;
  margin: 24px auto;
  padding: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--iron-edge);
  border-radius: 14px;
  width: calc(100% - 28px);
}
.card h1 {
  margin: 0 0 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze-bright);
}
.card p { color: var(--text-soft); }
label {
  display: block;
  margin: 12px 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
input, textarea {
  display: block;
  width: 100%;
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--iron-edge);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  margin-top: 4px;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}
input:focus, textarea:focus, button:focus-visible, .reading:focus-visible, .iconbtn:focus-visible, .photoBtn:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button {
  font: inherit;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--iron-edge);
  background: var(--iron);
  color: var(--text);
}
button.primary {
  background: var(--bronze-bright);
  color: var(--bg);
  border-color: var(--bronze-bright);
  font-weight: 600;
}
button:disabled { opacity: .5; }
.err { color: #e07060; min-height: 1.2em; }

#chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#chat[hidden] { display: none; }
#messages { flex: 1; overflow-y: auto; padding: 12px 10px 4px; -webkit-overflow-scrolling: touch; }
.msg {
  max-width: 82%;
  margin: 6px 0;
  padding: 8px 11px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--iron-edge);
  color: var(--text);
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg.me {
  margin-left: auto;
  background: var(--me);
  border-color: var(--bronze-dim);
}
.meta { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.msg img { display: block; max-width: 100%; max-height: 60vh; border-radius: 10px; margin: 4px 0; }
.expired { font-size: 13px; color: var(--text-muted); font-style: italic; }
.day {
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-dim);
  margin: 14px 0 6px;
}

#composer {
  flex: none;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--bg-raised);
  border-top: 1px solid var(--rule);
}
#composer textarea { margin: 0; resize: none; max-height: 120px; }
.photoBtn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  font-size: 26px;
  padding: 0;
  cursor: pointer;
  color: var(--bronze-bright);
  background: var(--iron);
  border: 1px solid var(--iron-edge);
  border-radius: 10px;
}
#composer textarea { flex: 1; min-width: 0; }
#composer #sendBtn { flex: none; }
[hidden], #photo { display: none !important; }

.banner {
  background: #2a2418;
  color: var(--bronze-bright);
  font-size: 14px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bronze-dim);
}

dialog {
  border: 1px solid var(--iron-edge);
  border-radius: 14px;
  padding: 18px;
  width: min(92vw, 420px);
  background: var(--bg-panel);
  color: var(--text);
}
dialog::backdrop { background: #0009; }
dialog h2 {
  margin-top: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
}
.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.row button { flex: 1; }
.help {
  background: var(--bg-raised);
  border: 1px solid var(--iron-edge);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text-soft);
  margin-top: 10px;
}
.help:first-of-type { margin-top: 0; }
.help strong {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  margin-bottom: 4px;
}
.help ol { padding-left: 20px; margin: 6px 0; }
.small { font-size: 13px; color: var(--text-muted); }

#pending {
  flex: none;
  position: relative;
  display: flex;
  padding: 8px 10px 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--rule);
}
#pending[hidden] { display: none !important; }
#pending img { max-height: 120px; max-width: 60%; border-radius: 10px; display: block; }
#pending .removePhoto {
  position: relative;
  margin-left: -30px;
  margin-top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  border: none;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

.top-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px 28px; }
.scroll > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.scroll[hidden] { display: none; }
.hub-card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--iron-edge);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}
.hub-card h2 {
  margin: 0 0 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze-bright);
}
.hub-card p { margin: 0 0 12px; color: var(--text-soft); }
.hub-card .go {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  border-bottom: 1px solid var(--bronze-dim);
  padding-bottom: 2px;
}
.hub-card:hover .go, .hub-card:focus-visible .go { color: var(--text); }

.dir-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.view-toggle { display: flex; gap: 0; border: 1px solid var(--iron-edge); border-radius: 10px; overflow: hidden; }
.view-toggle button {
  border: 0;
  border-radius: 0;
  background: var(--bg-raised);
  color: var(--text-muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 12px;
}
.view-toggle button.active { background: var(--iron); color: var(--bronze-bright); }
.trade-head {
  margin: 18px 0 8px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
}
.brother-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-panel);
  border: 1px solid var(--iron-edge);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 10px;
}
.brother-card.is-hidden { opacity: 0.7; }
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--iron);
  border: 1px solid var(--iron-edge);
}
.avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.4rem;
  color: var(--bronze-bright);
}
.brother-body { flex: 1; min-width: 0; }
.name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.brother-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.tag.new {
  color: var(--bg);
  background: var(--bronze-bright);
  border-color: var(--bronze-bright);
}
.brother-card .about { margin: 4px 0 0; color: var(--text-soft); }
.brother-card .trade-tag {
  display: inline-block;
  margin: 8px 0 0;
  padding: 2px 9px;
  border: 1px solid var(--iron-edge);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--bronze);
  background: var(--bg-raised);
}
.admin-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.admin-actions button { padding: 6px 10px; font-size: 13px; }
.empty { text-align: center; color: var(--text-muted); padding: 24px 8px; }
.card-photo-preview { display: flex; align-items: flex-start; gap: 0; margin: 8px 0 12px; }
.card-photo-preview[hidden] { display: none !important; }
.card-photo-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 1px solid var(--iron-edge); }
.card-photo-preview .removePhoto {
  margin-left: -28px;
  margin-top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  border: none;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}
.danger-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  color: #e07060;
  padding: 4px 0;
  font-size: 14px;
}
#cardPhoto { margin-top: 4px; }


/* ===================== v8: warmer hub, prayer, tabs ===================== */
:root { --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }

/* bottom tabs */
.tabs {
  flex: none;
  display: flex;
  justify-content: space-around;
  background: var(--bg-raised);
  border-top: 1px solid var(--rule);
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
}
.tabs a {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tabs a.active { color: var(--bronze-bright); }
.tabs a.active svg { fill: rgba(201, 150, 90, 0.14); }
.tabs .dot { position: absolute; top: 3px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--bronze-bright); box-shadow: 0 0 0 2px var(--bg-raised); }
body.typing .tabs { display: none; }
.page-chat #composer { padding-bottom: 8px; }
body.typing.page-chat #composer { padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }

/* greeting */
.hello { padding: 6px 4px 18px; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hello h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.95rem;
  line-height: 1.15;
  color: var(--text);
}
.pillars {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* panels */
.panel {
  background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%);
  border: 1px solid var(--iron-edge);
  border-radius: 16px;
  padding: 16px 16px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 6px 18px rgba(0, 0, 0, 0.25);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2, .page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-bright);
}
.panel-head.bare { padding: 0 4px; }
.kicker { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.04em; margin: 0; }
.more { font-size: 0.85rem; color: var(--bronze); text-decoration: none; }
.more:hover { color: var(--bronze-bright); }
.muted { color: var(--text-muted); margin: 0; }
.empty-soft { padding: 6px 0 2px; font-style: italic; font-family: var(--serif); font-size: 1.02rem; color: var(--text-soft); }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--iron-edge);
  background: var(--iron);
  color: var(--text);
  text-decoration: none;
  font: 600 0.95rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  flex: 1;
}
.btn.primary { background: var(--bronze-bright); border-color: var(--bronze-bright); color: var(--bg); }

/* today's reading */
.today {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(201, 150, 90, 0.16) 0%, rgba(201, 150, 90, 0) 60%),
    linear-gradient(180deg, #231e19 0%, var(--bg-panel) 100%);
  border-color: var(--bronze-dim);
}
.today .kicker { color: var(--bronze); font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.06em; }
.refs { margin: 0 0 4px; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.quote { margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--bronze-dim); }
.quote figcaption { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1rem; line-height: 1.5; color: var(--text-soft); }
#todayAudio { width: 100%; margin-top: 12px; height: 40px; }

/* prayer items (hub + page) */
.pitem { padding: 12px 0; border-top: 1px solid var(--rule); }
.pitem:first-child { border-top: 0; padding-top: 2px; }
.pmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); }
.pname { color: var(--text); font-weight: 600; font-family: var(--serif); font-size: 1rem; }
.ptext { display: block; margin: 5px 0 0; color: var(--text-soft); text-decoration: none; white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.pfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.pcount { font-size: 0.84rem; color: var(--text-muted); min-width: 0; }
.pray-btn {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--bronze-dim);
  background: transparent;
  color: var(--bronze-bright);
  font-size: 0.88rem;
  font-weight: 600;
}
.pray-btn.on { background: rgba(201, 150, 90, 0.16); border-color: var(--bronze-bright); }
.more-line { display: block; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 0.86rem; color: var(--bronze); text-decoration: none; }
.tag.needs-help { color: var(--bronze-bright); border-color: var(--bronze-dim); margin-left: 0; }
.tag.answered { color: var(--bg); background: var(--bronze); border-color: var(--bronze); margin-left: 0; }
.tag.new { margin-left: 0; }

/* answered strip */
.answered-strip { margin: 4px 0 18px; }
.answered-strip .panel-head { margin-bottom: 8px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.acard {
  flex: 0 0 78%;
  scroll-snap-align: start;
  background: var(--bg-raised);
  border: 1px solid var(--bronze-dim);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
.strip .acard:only-child { flex-basis: 100%; }
.atext { margin: 8px 0 6px; font-family: var(--serif); font-size: 1rem; line-height: 1.4; color: var(--text); }
.ameta { margin: 0; font-size: 0.8rem; color: var(--text-muted); }

/* chat preview */
.crow { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--rule); text-decoration: none; color: inherit; }
.crow:first-child { border-top: 0; padding-top: 0; }
.cbody { flex: 1; min-width: 0; }
.cmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.cname { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.csnip { color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; }
.pill { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--bg); background: var(--bronze-bright); border-radius: 999px; padding: 2px 8px; }

/* avatars */
.avatar.sm { width: 34px; height: 34px; font-size: 0.95rem; }
.avatar.md { width: 46px; height: 46px; font-size: 1.15rem; }
.faces { display: flex; padding-left: 8px; margin: 2px 0 4px; text-decoration: none; }
.faces[hidden] { display: none; }
.faces .avatar { margin-left: -8px; border: 2px solid var(--bg-panel); box-shadow: 0 0 0 1px var(--iron-edge); }
.faces .avatar.more { display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: var(--text-muted); background: var(--bg-raised); }
.newline { margin: 10px 0 0; color: var(--text-soft); font-size: 0.95rem; line-height: 1.6; }
.trade-line { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 0.86rem; color: var(--text-muted); text-decoration: none; }
.trade-line span { color: var(--bronze); }

.roles {
  text-align: center;
  margin: 22px auto 6px;
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-dim);
}

/* page heads (prayer, brothers) */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 2px 0 14px; padding: 0 2px; }
.page-head h1 { font-size: 1.35rem; }
.fair {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 2px solid var(--bronze-dim);
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-soft);
  background: var(--bg-raised);
  border-radius: 0 10px 10px 0;
}
.fair[hidden] { display: none; }

/* prayer page cards */
.pcard {
  background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%);
  border: 1px solid var(--iron-edge);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.pcard.is-answered { border-color: var(--bronze-dim); }
.pcard.is-hidden { opacity: 0.65; }
.pcard.flash { box-shadow: 0 0 0 2px var(--bronze-bright); }
.pcard .ptext { color: var(--text); font-size: 1.02rem; }
.updates { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--iron-edge); }
.updates li { margin: 0 0 8px; }
.utime { display: block; font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.04em; }
.utext { color: var(--text-soft); white-space: pre-wrap; }
.answer { margin-top: 12px; padding: 10px 12px; background: rgba(201, 150, 90, 0.08); border: 1px solid var(--bronze-dim); border-radius: 12px; }
.answer .utime { display: inline; }
.anote { margin: 6px 0 0; font-family: var(--serif); font-size: 1rem; color: var(--text); white-space: pre-wrap; }
.helpbox { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--iron-edge); }
.helpline { margin: 0; font-size: 0.9rem; color: var(--text-soft); }
.ptools { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.tool { background: none; border: 0; padding: 4px 0; font-size: 0.85rem; color: var(--bronze); }
.tool.danger { color: #e07060; margin-left: auto; }
label.check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: normal; font-size: 0.95rem; font-weight: 400; color: var(--text-soft); }
label.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--bronze-bright); }
label.check .hint { color: var(--text-muted); }
dialog textarea { resize: vertical; }

/* v8 polish */
.dir-bar { flex-wrap: nowrap; }
.dir-bar button.primary { padding: 9px 14px; font-size: 15px; white-space: nowrap; }
.brother-card { background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%); border-radius: 16px; padding: 14px; }
.avatar.placeholder { background: radial-gradient(circle at 30% 25%, #3a3028 0%, var(--iron) 70%); }
.quote blockquote { font-size: 0.96rem; }
.roles { text-wrap: balance; letter-spacing: 0.14em; line-height: 1.8; }
dialog .err { margin: 6px 0; min-height: 0; }
dialog .err:empty { display: none; }
.btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
#chatEmpty { margin-top: 30vh; }
.subline { margin: -6px 0 14px; padding: 0 2px; font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--text-soft); }
.panel .subline { margin: -2px 0 12px; padding: 0; }
.tag.urgent { color: var(--bg); background: var(--bronze-bright); border-color: var(--bronze-bright); margin-left: 0; }
.tag.fresh { color: var(--bronze-bright); border-color: var(--bronze-bright); margin-left: 0; }
label.check.urgent-check span { color: var(--bronze-bright); font-weight: 600; }

/* ===================== v11: Good News, comments, 5 tabs ===================== */
.tabs a { font-size: 10.5px; letter-spacing: 0.02em; }
.subline.flat { margin: 0; padding: 0; font-size: 0.95rem; flex: 1; min-width: 0; }
.subline.flat a { color: var(--bronze-bright); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--iron-edge);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.chip.active { color: var(--bg); background: var(--bronze-bright); border-color: var(--bronze-bright); }
.chip:disabled { opacity: 0.5; }
.chips.pick { flex-wrap: wrap; padding-bottom: 4px; }
.chip-tag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--bronze-dim);
  color: var(--bronze-bright);
}
.chip-tag.kind-answered { background: var(--bronze); border-color: var(--bronze); color: var(--bg); }
.gcard {
  background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%);
  border: 1px solid var(--iron-edge);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.gcard.kind-answered { border-color: var(--bronze-dim); }
.gcard.is-hidden { opacity: 0.65; }
.gcard.flash { box-shadow: 0 0 0 2px var(--bronze-bright); }
.pmeta.by { margin-top: 8px; }
.gtext { margin: 6px 0 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.gphoto { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-top: 10px; border: 1px solid var(--iron-edge); }
.asked { margin: 12px 0 0; padding: 8px 12px; border-left: 2px solid var(--bronze-dim); background: var(--bg-raised); border-radius: 0 10px 10px 0; }
.asked figcaption { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.asked blockquote { margin: 0; color: var(--text-soft); font-size: 0.95rem; white-space: pre-wrap; }
.gitem { display: block; text-decoration: none; color: inherit; }
.gmeta { display: block; margin-top: 6px; }
.post-photo-preview { display: flex; align-items: flex-start; margin: 4px 0 8px; }
.post-photo-preview img { max-width: 70%; max-height: 160px; border-radius: 10px; border: 1px solid var(--iron-edge); }
.post-photo-preview .removePhoto { margin-left: -30px; margin-top: 4px; width: 26px; height: 26px; border-radius: 13px; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; padding: 0; }

/* comments */
.comments { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.cmt { margin: 0 0 8px; }
.cmt-line { margin: 0; color: var(--text-soft); font-size: 0.93rem; line-height: 1.4; word-wrap: break-word; }
.cmt-name { color: var(--text); font-weight: 600; }
.cmt-meta { display: flex; gap: 12px; align-items: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.tool.danger-inline { color: #e07060; font-size: 0.75rem; padding: 0; }
.tool.show-all { display: block; margin: 0 0 6px; padding: 0; }
.cmt-form { display: flex; gap: 8px; margin-top: 6px; }
.cmt-form input { margin: 0; padding: 8px 12px; font-size: 15px; border-radius: 999px; }
.cmt-send { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--bronze-bright); background: var(--iron); border-color: var(--iron-edge); }

/* chat copy chip */
.msg .copied { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--bronze-bright); text-decoration: none; border: 1px solid var(--bronze-dim); border-radius: 999px; padding: 1px 9px; }

/* ===================== v11b: approval, admin, meeting/torch, photos ===================== */
.signups { display: block; text-decoration: none; color: inherit; border-color: var(--bronze-bright); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.duo .panel { margin-bottom: 0; }
.panel.mini { padding: 14px; }
.panel.mini h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze-bright); }
.mini-main { margin: 0; font-family: var(--serif); font-size: 1.02rem; line-height: 1.35; color: var(--text); }
.mini-sub { margin: 8px 0 0; font-size: 0.88rem; color: var(--text-soft); line-height: 1.35; }
.mini-label { display: block; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin-bottom: 1px; }
.photo-prompt { display: block; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--bronze-dim); border-radius: 12px; color: var(--text-soft); font-size: 0.9rem; text-decoration: none; }
.photo-prompt span { color: var(--bronze-bright); }
#waiting h1 { text-transform: none; letter-spacing: 0.02em; }

/* admin page */
.mrow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.mrow:first-child { border-top: 0; padding-top: 0; }
.mbody { flex: 1; min-width: 0; }
.macts { display: flex; gap: 6px; flex: none; }
.macts button { padding: 7px 12px; font-size: 0.85rem; }
#hubForm button { width: 100%; }

/* brothers photos */
.avatar { width: 76px; height: 76px; }
.brother-card { cursor: pointer; align-items: center; }
.brother-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.photo-pick { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 4px; }
.photo-pick .card-photo-preview { margin: 0 0 10px; }
.photo-pick .card-photo-preview img { width: 132px; height: 132px; }
.photo-empty { width: 132px; height: 132px; border-radius: 50%; border: 2px dashed var(--bronze-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; background: var(--bg-raised); }
.photo-empty svg { width: 64px; height: 64px; fill: none; stroke: var(--bronze-dim); stroke-width: 1.4; }
label.photo-btn { margin: 0; display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--bronze-bright); color: var(--bronze-bright); text-transform: none; letter-spacing: normal; font-size: 0.95rem; cursor: pointer; }
label.photo-btn input { display: none; }
.photo-hint { margin: 8px 12px 4px; }
dialog.detail { text-align: center; }
.detail-photo { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bronze-dim); display: block; margin: 6px auto 12px; }
.detail-photo.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 4rem; color: var(--bronze-bright); background: radial-gradient(circle at 30% 25%, #3a3028 0%, var(--iron) 70%); }
.detail-name { margin: 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--text); }
.detail-tags { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.detail-about { margin: 10px 0 0; color: var(--text-soft); font-size: 1.02rem; line-height: 1.45; }
.detail-trade { margin: 12px 0 0; color: var(--bronze-bright); }
.detail-trade .mini-label { margin-bottom: 3px; }
.detail-admin { display: block; margin: 14px auto 0; padding: 6px 14px; border: 1px solid var(--bronze-dim); border-radius: 999px; }
label.photo-btn.small-btn { margin: 12px 0 6px; font-size: 0.9rem; }

/* v12: chat tag buttons */
.tagrow { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 7px 10px 0; background: var(--bg-raised); border-top: 1px solid var(--rule); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tagrow::-webkit-scrollbar { display: none; }
#pending:not([hidden]) + .tagrow { border-top: 0; }
#composer { border-top: 0; }
.tagchip { flex: none; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--bronze-dim); background: transparent; color: var(--bronze-bright); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; }
.tagchip:active { background: rgba(201, 150, 90, 0.16); }
@media (max-height: 700px) { body.has-photo .tagrow { display: none; } body.has-photo #composer { border-top: 0; } }

/* ===================== v13: Help Needed, Events, approvals ===================== */
.cat-weekly { --cat: #a67c52; }
.cat-monthly { --cat: #c9965a; }
.cat-workday { --cat: #9aa36e; }
.cat-outreach { --cat: #8ea3b2; }
.cat-cookout { --cat: #d0805a; }
.chip-tag.ecat { border-color: var(--cat, var(--bronze-dim)); color: var(--cat, var(--bronze-bright)); }
.tag.sample { color: var(--text-soft); border-style: dashed; border-color: var(--text-muted); margin-left: 0; font-style: italic; }
.tabs-inline { margin: 0 0 14px; }
.tabs-inline button { flex: 1; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0 0; }
.fact { margin: 0; font-size: 0.92rem; color: var(--text); }
.help-link { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 9px 12px; border: 1px solid var(--iron-edge); border-radius: 12px; background: var(--bg-raised); color: var(--text-soft); font-size: 0.9rem; text-decoration: none; }
.help-link > span:last-child { margin-left: auto; color: var(--bronze); }
.help-link .tag { margin: 0; }
.dir-bar + .help-link { margin-top: -2px; }
.efacts { margin: 2px 0 0; font-size: 0.88rem; color: var(--text-soft); }
.pitem .efacts { margin: 0 0 4px; }

/* events */
.page-events .page-head { align-items: center; }
.page-events .view-toggle button { padding: 6px 14px; font-size: 0.86rem; }
.cat-note { margin: -4px 0 10px; }
.top-actions { margin: 0 0 14px; }
.month-label { margin: 18px 2px 8px; font-family: var(--serif); font-size: 1.08rem; color: var(--bronze-bright); font-weight: 600; letter-spacing: 0.01em; text-transform: none; }
#list > .month-label:first-child { margin-top: 2px; }
.ecard {
  background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%);
  border: 1px solid var(--iron-edge);
  border-left: 3px solid var(--cat, var(--bronze-dim));
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ecard.flash { box-shadow: 0 0 0 2px var(--bronze-bright); }
.ecard-top, .erow { display: flex; gap: 14px; align-items: flex-start; }
.edate { flex: none; width: 52px; text-align: center; padding: 6px 0 7px; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--iron-edge); line-height: 1.05; }
.edate span { display: block; }
.edow, .emon { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.eday { font-family: var(--serif); font-size: 1.5rem; color: var(--text); margin: 2px 0 1px; }
.edate.sm { width: 46px; padding: 5px 0 6px; }
.edate.sm .eday { font-size: 1.25rem; }
.ebody { flex: 1; min-width: 0; }
.ebody .pmeta { margin-bottom: 4px; flex-wrap: wrap; row-gap: 4px; }
.etitle { margin: 0; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.ehost { margin: 2px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.enotes { margin: 10px 0 0; color: var(--text-soft); white-space: pre-wrap; font-size: 0.95rem; }
.ecard .pfoot { margin-top: 12px; }
.elist .erow { padding: 11px 0; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.elist .erow:first-child { border-top: 0; padding-top: 2px; }
.elist .chip-tag { font-size: 0.6rem; padding: 1px 7px; }
.elist .etitle { font-size: 1.04rem; margin-top: 3px; }
.elist .tag.sample { display: inline-block; margin-top: 5px; }
.elist .pcount { margin-top: 3px; }

.month-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.month-head h2 { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.iconnav { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--iron-edge); background: var(--bg-raised); color: var(--bronze-bright); font-size: 1.3rem; line-height: 1; padding: 0; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.month-grid .dow { text-align: center; font-size: 0.68rem; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 700; padding: 2px 0 4px; }
.month-grid .mday { aspect-ratio: 1 / 1.05; border-radius: 10px; border: 1px solid var(--iron-edge); background: var(--bg-raised); color: var(--text-soft); padding: 4px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; font-size: 0.92rem; }
.month-grid .mday.empty { border: 0; background: none; }
.month-grid .mday.today { border-color: var(--bronze-bright); color: var(--bronze-bright); font-weight: 700; }
.month-grid .mday.picked { background: var(--iron); box-shadow: inset 0 0 0 2px var(--bronze-bright); color: var(--text); }
.month-grid .dots { display: flex; gap: 3px; }
.dot-cat { width: 6px; height: 6px; border-radius: 50%; background: var(--cat, var(--bronze)); display: block; }
#monthView .trade-head { margin: 16px 2px 8px; }

/* admin */
.note-hi { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bronze-bright); background: rgba(201, 150, 90, 0.14); color: var(--bronze-bright); font-weight: 600; font-family: var(--serif); font-size: 1.02rem; }
.switch-row { padding: 6px 0 2px; color: var(--text) !important; font-size: 1rem !important; }
#approvalHint { margin: 6px 0 0 30px; }
a.pitem { display: block; text-decoration: none; color: inherit; }
.month-grid { grid-auto-rows: auto; align-items: start; }
.month-grid .mday { aspect-ratio: auto; height: 50px; }
.month-grid .mday.past { opacity: 0.5; }
.top-actions { justify-content: flex-end; }
.top-actions .btn { width: auto; padding: 8px 16px; font-size: 0.92rem; }
.top-actions .btn { flex: none; }
.page-events .chips { flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
.page-events .chip { padding: 5px 11px; font-size: 0.8rem; }
.page-events .top-actions { margin-top: 0; }
.top-actions { justify-content: space-between; align-items: center; flex-wrap: nowrap; }
#meetNext { color: var(--bronze-bright); text-decoration: none; }

/* ===================== v15: pray for me ===================== */
.pray-line { margin: 8px 0 0; padding: 8px 10px; border-left: 2px solid var(--bronze-dim); background: rgba(201, 150, 90, 0.06); border-radius: 0 10px 10px 0; }
.pray-line .mini-label { color: var(--bronze); }
.pray-line .pray-when { text-transform: none; letter-spacing: 0.02em; color: var(--text-muted); }
.pray-line p { margin: 2px 0 0; font-family: var(--serif); font-style: italic; color: var(--text); font-size: 0.98rem; white-space: pre-wrap; }
.pray-line.clamp p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-pray { margin-top: 14px; text-align: left; }
.pray-note { margin: 0 0 12px !important; }
.pray-hint { margin: -4px 0 8px; }
.pray-prompt { border-color: var(--bronze-dim); background: linear-gradient(180deg, rgba(201,150,90,0.12) 0%, var(--bg-panel) 100%); }
.pray-prompt-text { margin: 0; font-family: var(--serif); font-size: 1.08rem; color: var(--text); }
.pray-prompt .actions { margin-top: 12px; }
#directory .page-head { align-items: center; }
#directory .head-title { display: flex; align-items: baseline; gap: 10px; }
#directory .page-head #editBtn { padding: 8px 14px; font-size: 15px; white-space: nowrap; }
#directory .dir-bar .view-toggle { flex: 1; }
#directory .dir-bar .view-toggle button { flex: 1; white-space: nowrap; padding-left: 8px; padding-right: 8px; }

/* ===================== v16: verses, check-ins, monthly update ===================== */
.verse-banner { margin: 0 0 16px; padding: 14px 16px 12px; border: 1px solid var(--bronze-dim); border-radius: 16px; background: linear-gradient(180deg, rgba(201,150,90,0.10) 0%, var(--bg-panel) 100%); }
.verse-banner blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.04rem; line-height: 1.45; color: var(--text); }
.verse-banner figcaption, .verse-line figcaption { margin-top: 6px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); }
.verse-line { margin: 4px 0 16px; padding-left: 12px; border-left: 2px solid var(--bronze-dim); }
.verse-line blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--text); }
.tip-verse { font-family: var(--serif); font-style: italic; color: var(--text); }
.tip-verse span { display: block; font-style: normal; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze); margin-top: 2px; }
label.q-label { text-transform: none; letter-spacing: normal; font-size: 0.95rem; color: var(--text-soft); font-weight: 600; }
.page-update .page-head { align-items: center; }
#monthPick { max-width: 58%; padding: 7px 10px; border-radius: 10px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--iron-edge); font: inherit; font-size: 0.9rem; }
.ucard { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(180deg, #1f1b17 0%, var(--bg-panel) 100%); border: 1px solid var(--iron-edge); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.uface { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--bronze-dim); }
.uface.placeholder { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 25%, #3a3028 0%, var(--iron) 70%); color: var(--bronze-bright); font-family: var(--serif); font-size: 1.5rem; }
.ubody { flex: 1; min-width: 0; }
.ubody .pname { font-family: var(--serif); font-size: 1.08rem; color: var(--text); }
.utext { margin: 6px 0 0; font-family: var(--serif); font-size: 1.02rem; color: var(--text); white-space: pre-wrap; line-height: 1.45; }
.month-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 14px; padding: 0 2px; }
.month-row #monthPick { max-width: 55%; }

/* ---------- v17 ---------- */
.avatar.xs { width: 22px; height: 22px; border-width: 1px; }
.avatar.placeholder.xs { font-size: 0.72rem; font-family: inherit; font-weight: 700; }
.meta { display: flex; align-items: center; gap: 6px; }
.msg.me .meta { justify-content: flex-end; }
.pmeta .avatar.xs, .gmeta .avatar.xs { margin-right: -2px; }
.gmeta { display: flex; align-items: center; gap: 6px; }
.cmt-line .avatar.xs { display: inline-flex; vertical-align: -6px; margin-right: 6px; width: 20px; height: 20px; }
.tagrow { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; padding-bottom: 1px; }
.tagchip { padding: 4px 10px; font-size: 0.8rem; }
.tagchip.urgent { border-color: #b4553f; color: #e48a72; }
.tagchip.urgent:active { background: rgba(180, 85, 63, 0.18); }
.msg.urgent { border-color: #b4553f; box-shadow: inset 3px 0 0 #b4553f; }
.urgent-note { margin-top: 6px; font-size: 12px; font-weight: 600; color: #e48a72; }
.sec-head { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-weight: 600; font-size: 1.15rem; color: var(--bronze-bright); margin: 18px 2px 8px; letter-spacing: 0.01em; }
.dir-bar + .sec-head { margin-top: 8px; }
#checkinsHead { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }
.pcard.checkin .pmeta { gap: 10px; }
.pcard.checkin .ptext { cursor: pointer; white-space: pre-wrap; }
.menu-links { display: flex; gap: 10px; margin: 0 0 12px; }
.menu-links a { flex: 1; text-align: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--bronze-dim); color: var(--bronze-bright); text-decoration: none; font-weight: 600; }
.tag-list { margin: 6px 0 0; padding-left: 18px; }
.tag-list li { margin: 4px 0; }
.panel-what { margin: -2px 0 10px; font-size: 0.88rem; color: var(--text-muted); }
.btn-link { display: inline-block; color: var(--bronze-bright); text-decoration: none; font-weight: 600; }
.field-label { display: block; font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.family-pick { margin: 4px 0 12px; }
.family-row { display: flex; align-items: center; gap: 12px; }
.family-row label.photo-btn.small-btn { margin: 4px 0; }
.family-preview { position: relative; display: flex; }
.family-preview[hidden] { display: none !important; }
.family-preview img { width: 92px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px solid var(--iron-edge); }
.family-preview .removePhoto { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 11px; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 0; }
.detail-family { margin: 14px 0 6px; }
.detail-family img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--iron-edge); margin-top: 6px; }
.ecard.request { border-style: dashed; }
.ecard.request .ehost { margin: 6px 0 0; }
#requests { margin-bottom: 8px; }
#meetingText .meet-when, #meetingText .meet-where { display: block; }
#meetingText .meet-where { font-size: 0.92em; color: var(--text-soft); margin-top: 2px; }

/* ---------- v18 ---------- */
/* Menu: sticky header with a close X, plain page links, help below */
#settings { padding-top: 0; }
.menu-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 -18px 4px; padding: 14px 12px 10px 18px; background: var(--bg-panel); border-bottom: 1px solid var(--rule); }
.menu-head h2 { margin: 0; }
.menu-x { width: 40px; height: 40px; padding: 0; border-radius: 20px; border: 1px solid var(--bronze-dim); background: transparent; color: var(--bronze-bright); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.menu-links { flex-direction: column; gap: 0; margin: 0 0 14px; border: 1px solid var(--iron-edge); border-radius: 12px; overflow: hidden; }
.menu-links a { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 13px 14px; border: 0; border-radius: 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.menu-links a:last-child { border-bottom: 0; }
.menu-links a[hidden] { display: none; }
.menu-sub { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin: 6px 0 8px; font-weight: 600; }

/* First-time intro */
dialog.intro { width: min(94vw, 420px); padding: 14px 16px 16px; text-align: center; }
.intro-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.intro-step { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.08em; }
.intro-img { display: block; width: 100%; max-width: 300px; aspect-ratio: 390 / 480; object-fit: cover; object-position: top; margin: 0 auto 12px; border-radius: 12px; border: 1px solid var(--iron-edge); background: var(--iron); }
dialog.intro h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size: 1.35rem; letter-spacing: 0.02em; text-transform: none; color: var(--bronze-bright); margin: 0 0 6px; }
dialog.intro p { margin: 0 4px 10px; font-size: 1rem; line-height: 1.45; color: var(--text-soft); }
.intro-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 6px; }
.intro-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--iron-edge); }
.intro-dots i.on { background: var(--bronze-bright); }
dialog.intro .row { justify-content: center; }
dialog.intro .row button { min-width: 120px; }
dialog.intro .row button[hidden] { display: none; }
@media (max-height: 700px) { .intro-img { max-width: 220px; } }

/* Chat tag label (hidden while typing so the keyboard keeps its room) */
.taglabel { flex: 0 0 100%; margin: 0 0 1px; font-size: 0.78rem; color: var(--text-muted); }
body.typing .taglabel { display: none; }

/* Extra Hands */
.hand-card .etitle { margin: 8px 0 2px; }
.hand-card.no-date .efacts { color: var(--bronze-bright); }
.hand-item .ptext { display: block; color: var(--text); text-decoration: none; margin: 6px 0; }
.btn.show-more { display: block; margin: 14px auto 4px; }
.center-note { text-align: center; color: var(--text-muted); margin: 0 0 12px; }
.ptools a.tool { text-decoration: none; }
.form-sub { margin: 14px 0 4px; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size: 1.05rem; color: var(--bronze-bright); font-weight: 600; }
/* Filter chips wrap instead of scrolling sideways (nothing cut off on narrow phones) */
.chips { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; }
.chip { flex: none; }
.view-toggle button { white-space: nowrap; }
#directory .view-toggle button { padding-left: 6px; padding-right: 6px; }
.pray-hint a, .small a { color: var(--bronze-bright); }
.panel-head .more { white-space: nowrap; flex: none; }
.panel-head h2 { min-width: 0; }
.page-hands .page-head h1 { font-size: 1.35rem; }
.page-head .kicker { white-space: nowrap; }
body.page-hands main .page-head h1 { font-size: 1.3rem; letter-spacing: 0.08em; }

/* ---------- v19: phone + PIN, alerts, Discussions ---------- */
.btn-link { background: none; border: 0; color: var(--bronze-bright); padding: 8px 0; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#loginForm .btn-link { display: block; margin: 4px auto 0; }
#firstTime { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 8px; }
.alert-steps { margin: 6px 0 10px; padding-left: 20px; color: var(--text-soft); font-size: 0.92rem; line-height: 1.45; }
.alert-steps li { margin: 2px 0; }
.intro-alerts { text-align: left; margin: 6px 0 4px; }
.intro-alerts > button { display: block; width: 100%; margin-top: 8px; }
.intro-alerts .small { margin: 8px 0 0; }
.msg .meta { display: flex; align-items: center; gap: 6px; }
.msg-more { margin-left: auto; background: none; border: 0; color: var(--text-muted); font-size: 18px; line-height: 1; padding: 0 2px 4px 10px; cursor: pointer; min-height: 0; }
.msg-more:hover, .msg-more:focus-visible { color: var(--bronze-bright); }
.msg { -webkit-touch-callout: none; }
.copied.moved { font-style: italic; }
dialog.sheet { display: none; }
dialog.sheet[open] { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
dialog.sheet .small { margin: 0 0 4px; color: var(--text-soft); white-space: pre-wrap; }
.seg { display: flex; gap: 16px; margin: 4px 0 10px; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; flex-direction: row; font-size: 0.95rem; }
.seg input { width: auto; margin: 0; }
.ftag { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bronze-bright); border: 1px solid var(--bronze-dim); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.thread-card { display: block; text-decoration: none; color: inherit; }
.thread-title { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--text); margin: 8px 0 0; line-height: 1.3; }
.thread-card .pfoot { justify-content: flex-start; flex-wrap: wrap; }
.pcount.joined { color: var(--bronze-bright); margin-left: auto; }
.disc-item { display: block; text-decoration: none; color: inherit; }
.disc-item .pfoot { justify-content: flex-start; margin-top: 8px; }
#discEmpty { display: block; color: var(--text-soft); text-decoration: none; font-size: 0.95rem; }
.back-link { display: inline-block; color: var(--bronze-bright); text-decoration: none; margin: 4px 0 10px; font-size: 0.95rem; }
.thread-head { margin-bottom: 12px; }
.thread-head h1 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; margin: 10px 0 4px; }
.thread-head .small { margin: 0; color: var(--text-muted); }
.thread-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.thread-tools select { width: auto; flex: 1; min-width: 0; max-width: 200px; }
#joinNote { margin-top: 6px; }
.dpost .ptext { white-space: pre-wrap; }
.reply-form { margin: 14px 0 24px; display: flex; flex-direction: column; gap: 6px; }
.admin-topics { margin-top: 20px; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); }
.topic-row span { flex: 1; min-width: 0; }
#topicForm { display: flex; gap: 8px; margin-top: 10px; }
#topicForm input { flex: 1; min-width: 0; }
.pray-stale { display: block; font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin: 2px 0 0; }
.pray-line.stale p { color: var(--text-muted); }
#alertPromptErr:empty, #loginErr:empty { display: none; }
select { display: block; width: 100%; font: 17px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 10px 12px; border: 1px solid var(--iron-edge); border-radius: 10px; background: var(--bg-raised); color: var(--text); margin-top: 4px; letter-spacing: normal; text-transform: none; font-weight: 400; }
.thread-tools select { display: inline-block; margin-top: 0; padding: 7px 10px; font-size: 15px; }
.seg label { text-transform: none; letter-spacing: normal; font-size: 1rem; font-weight: 400; color: var(--text-soft); margin: 4px 0; }
.seg input { display: inline-block; width: 18px; height: 18px; accent-color: var(--bronze-bright); }
.ecard.request.compact { padding: 10px 12px; margin-bottom: 8px; }
.ecard.request.compact .enotes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); text-decoration: none; margin: 6px 0 0; }
.ecard.request.compact .ehost { margin: 0; font-size: 0.82rem; color: var(--text-muted); }
.ecard.request.compact .ptools { margin-top: 8px; padding-top: 6px; }
#requestList .more-line { display: block; margin: 2px 0 10px; color: var(--bronze-bright); text-decoration: none; }
/* v19: Menu help tips open and close */
details.help { padding: 0; }
details.help > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); font-weight: 600; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::after { content: "›"; font-size: 1.1rem; letter-spacing: 0; transition: transform 0.15s; color: var(--text-muted); }
details.help[open] > summary::after { transform: rotate(90deg); }
details.help > :not(summary) { margin-left: 12px; margin-right: 12px; }
details.help[open] { padding-bottom: 10px; }
details.help > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
/* v19: intro pictures say Example */
.intro-pic { position: relative; }
.intro-pic[hidden] { display: none; }
.intro-example { position: absolute; top: 8px; left: 8px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bg); background: var(--bronze-bright); border-radius: 999px; padding: 3px 9px; }
.intro-pic { width: 100%; max-width: 300px; margin: 0 auto 12px; }
.intro-pic .intro-img { margin: 0; max-width: 100%; }
@media (max-height: 700px) { .intro-pic { max-width: 220px; } }
.photo-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.family-row .photo-btns { justify-content: flex-start; }
/* v19-3 */
.today-talk { display: inline-block; margin-top: 10px; color: var(--bronze-bright); text-decoration: none; font-size: 0.95rem; }
.su-done { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.su-done p { margin: 0 0 10px; color: var(--text-soft); }
.su-done .btn { display: block; text-align: center; }
.macts .btn.small { padding: 7px 12px; font-size: 0.9rem; text-decoration: none; }
#setupForm .hint { text-transform: none; letter-spacing: normal; font-weight: 400; }
.mrow.setup { flex-wrap: wrap; }
.mrow.setup .macts { width: 100%; flex-wrap: wrap; padding-left: 52px; }
.tell-him { margin-top: 14px; padding: 12px; border: 1px solid var(--iron-edge); border-radius: 10px; background: var(--bg-raised); }
.tell-him h3 { margin: 0 0 6px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); font-weight: 600; }
.tell-him ol { margin: 0 0 8px; padding-left: 20px; color: var(--text-soft); line-height: 1.5; }
.tell-him p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.chat-prayed { display: inline-block; margin: 6px 0 0 6px; padding: 3px 10px; font-size: 0.82rem; border-radius: 999px; border: 1px solid var(--bronze-dim); background: transparent; color: var(--bronze-bright); min-height: 0; }
.chat-prayed.on { color: var(--text-muted); border-color: var(--iron-edge); }
.pray-btn:disabled.on { opacity: 1; }

/* v19-5: back link to The Path reading */
.back-reading { display: block; margin: 6px 12px 0; font-size: .9rem; color: var(--bronze, #c9965a); text-decoration: none; }
.back-reading[hidden] { display: none; }

/* Card form: About you / What you do grow with the text */
textarea.grow { resize: none; overflow-y: auto; min-height: 44px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
label .count { display: block; text-align: right; font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 400; }
label .count[hidden] { display: none; }
.brother-card .about { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.brother-card .trade-tag { max-width: 100%; display: -webkit-inline-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; border-radius: 12px; }
.trade-head { overflow-wrap: anywhere; }

/* Be honest, share wisely note (card form + intro) */
.share-note { margin: 4px 0 14px; padding: 10px 12px; border-left: 3px solid var(--bronze); background: var(--bg-raised); border-radius: 8px; font-size: 0.9rem; line-height: 1.45; color: var(--text-soft); }
.share-note b { color: var(--bronze-bright); }
.intro-note { margin-top: 8px; font-size: 0.9rem; color: var(--text-soft); }
.intro-note[hidden] { display: none; }

/* v19-8 Brothers directory layout */
.brother-card { display: block; }
.brother-card .bc-main { display: flex; gap: 12px; align-items: flex-start; }
.brother-card .work-line { margin: 3px 0 0; font-size: 0.88rem; color: var(--bronze-bright); line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
.brother-card.v-trade .work-line { font-size: 0.98rem; }
.brother-card .about { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.4; color: var(--text-soft); }
.brother-card .bc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--iron-edge); flex-wrap: wrap; }
.contact-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: 6px 14px; border: 1px solid var(--bronze-dim); border-radius: 999px; color: var(--bronze-bright); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.brother-card .admin-actions { flex-direction: row; gap: 6px; margin-left: auto; }
.brother-card .admin-actions button { padding: 4px 10px; font-size: 12px; color: var(--text-muted); background: transparent; border: 1px solid var(--iron-edge); border-radius: 999px; }
.pray-line.feature p { font-size: 1rem; }
.search-row { position: relative; margin: 10px 0 6px; }
.search-row input { width: 100%; padding-right: 70px; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 10px; font-size: 13px; background: transparent; border: 1px solid var(--iron-edge); border-radius: 999px; color: var(--text-soft); }
.search-clear[hidden] { display: none; }

/* v20: Everyone tab puts the bio first; work smaller beneath */
.brother-card .about.lead { font-size: 0.98rem; color: var(--text); margin-top: 3px; }
.brother-card .work-line.sub { font-size: 0.84rem; margin-top: 4px; }
/* v20: Contact sheet (Call / Text / Cancel) */
.contact-sheet { border: 1px solid var(--iron-edge); border-radius: 16px 16px 0 0; background: var(--bg-panel); color: var(--text); padding: 14px 14px calc(env(safe-area-inset-bottom) + 14px); margin: auto auto 0; width: 100%; max-width: 520px; box-sizing: border-box; }
.contact-sheet::backdrop { background: rgba(0,0,0,.55); }
.contact-sheet .cs-title { margin: 0 0 10px; text-align: center; color: var(--text-soft); font-size: 0.9rem; }
.contact-sheet .cs-opt { display: block; text-align: center; padding: 14px; margin-bottom: 8px; border: 1px solid var(--bronze-dim); border-radius: 12px; color: var(--bronze-bright); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.contact-sheet .cs-cancel { display: block; width: 100%; padding: 13px; border-radius: 12px; background: transparent; border: 1px solid var(--iron-edge); color: var(--text-soft); font-size: 1rem; }
/* v20: bold gold "Back to the reading" bar pinned at the top of chat */
.back-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: linear-gradient(180deg, #d9a862, #b8864a); color: #1a120a; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.back-bar[hidden] { display: none; }
.back-bar .bb-ref { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.back-bar .bb-label { font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.back-bar #backRef { font-weight: 700; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-bar .bb-go { flex: none; padding: 11px 14px; border-radius: 10px; background: #1a120a; color: #f0c27a; font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.back-bar .bb-x { flex: none; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(26,18,10,.18); color: #1a120a; font-size: 1.4rem; line-height: 1; }
.back-bar #backRef { white-space: normal; overflow: visible; font-size: 0.92rem; overflow-wrap: anywhere; }
.back-bar .bb-go { padding: 11px 12px; font-size: 0.95rem; }

/* ---------- v21 ---------- */
/* Desktop: banner, page heading, and search line up with everything else. */
.scroll > .verse-banner, .scroll > .page-head, .scroll > .subline, .scroll > .search-row, .scroll > .dir-bar, .scroll > .pray-note { margin-left: auto; margin-right: auto; max-width: 560px; }
@media (min-width: 600px) { .scroll > .verse-banner, .scroll > .page-head, .scroll > .subline, .scroll > .search-row { width: 100%; box-sizing: border-box; } }

/* Tap targets at least 44px, look kept the same (the extra is invisible). */
.iconbtn { position: relative; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.tagchip { position: relative; min-height: 36px; }
.tagchip::after, .more::after, .today-talk::after, .msg-more::after { content: ""; position: absolute; inset: -6px -4px; }
.tagrow { row-gap: 10px; }
.more { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px 0 10px; }
.today-talk { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.msg-more { position: relative; min-width: 44px; min-height: 32px; padding: 0 4px 2px 14px; text-align: right; }
.tabs a { font-size: 12.5px; min-height: 48px; }

/* Message removed / delete. */
.msg.removed { opacity: 0.75; }
.removed-note { font-style: italic; color: var(--text-muted); font-size: 0.9rem; }
.danger-btn { color: #e48a72; border-color: #b4553f; }
.danger-btn:hover { background: rgba(180, 85, 63, 0.14); }
dialog .danger-btn { background: transparent; }

/* Locked sign-in help, locked name field, bio prompt, Contact in the full card. */
.lock-help { margin: 6px 0 4px; padding: 10px 12px; border: 1px solid var(--bronze-dim); border-radius: 12px; }
.lock-help p { margin: 0 0 8px; }
.lock-help .btn { display: inline-flex; align-items: center; min-height: 44px; }
.locked-field { opacity: 0.75; }
.field-note { display: block; margin-top: 4px; color: var(--text-muted); font-weight: 400; }
.bio-prompt { display: inline-flex; align-items: center; min-height: 40px; margin-top: 6px; padding: 0 12px; border: 1px dashed var(--bronze-dim); border-radius: 999px; background: transparent; color: var(--bronze-bright); font-size: 0.88rem; }
.detail-contact { margin-top: 12px; min-height: 44px; }

/* Admin. */
.tag-warn { color: #e8c27a; border-color: #a8873e; }
.invite-helpers { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.invite-helpers .row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-helpers .btn, .invite-helpers button { min-height: 44px; display: inline-flex; align-items: center; }
.drow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule); }
.drow:first-child { border-top: 0; }
.dtext { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reading { position: relative; }
.reading::after { content: ""; position: absolute; inset: -12px -6px; }
