/* Theologians of the Pub: fireside chat, old English oak */

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem;

  /* Smoked oak surfaces */
  --color-bg: #15100b;
  --color-surface: #1e1610;
  --color-surface-2: #271d14;
  --color-surface-3: #32261a;
  --color-border: rgb(232 200 150 / 0.13);
  --color-border-strong: rgb(232 200 150 / 0.24);

  /* Parchment text */
  --color-text: #efe4d0;
  --color-text-muted: #bba98e;
  --color-text-faint: #85735d;

  /* Ember accent, brass detail */
  --color-ember: #e48a3a;
  --color-ember-hover: #f2a25a;
  --color-ember-soft: rgb(228 138 58 / 0.14);
  --color-on-ember: #1c1007;
  --color-brass: #caa462;
  --color-danger: #e2735a;
  --color-success: #9dbb75;

  --font-display: "Gambetta", "Georgia", serif;
  --font-body: "Switzer", "Helvetica Neue", sans-serif;
  --font-mark: "UnifrakturMaguntia", "Gambetta", serif;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
  --shadow: 0 10px 30px rgb(8 4 1 / 0.45);
  --sidebar-w: 256px;
  --tabbar-h: 64px;
  --banner-h: 0px;
  --topbar-h: 61px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgb(228 138 58 / 0.07), transparent 60%),
    var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--color-ember); text-underline-offset: 3px; }
a:hover { color: var(--color-ember-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgb(228 138 58 / 0.35); }
:focus-visible { outline: 2px solid var(--color-ember); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-4); top: -100px; background: var(--color-ember); color: var(--color-on-ember); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { top: var(--space-4); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- Wordmark ---------- */
.wordmark { font-family: var(--font-mark); font-weight: 400; color: var(--color-text); letter-spacing: 0.01em; line-height: 1.05; text-decoration: none; }
.wordmark small { display: block; font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-brass); margin-top: var(--space-2); }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.01em;
  background: var(--color-ember); color: var(--color-on-ember);
  transition: background 180ms var(--ease), border-color 180ms var(--ease), transform 120ms var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--color-ember-hover); color: var(--color-on-ember); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); }
.btn.ghost:hover { background: var(--color-surface-3); color: var(--color-text); }
.btn.quiet { background: transparent; color: var(--color-text-muted); padding-inline: var(--space-3); }
.btn.quiet:hover { color: var(--color-text); background: var(--color-surface-2); }
.btn.danger { background: transparent; color: var(--color-danger); border-color: rgb(226 115 90 / 0.4); }
.btn.danger:hover { background: rgb(226 115 90 / 0.12); }
.btn.sm { min-height: 36px; padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--color-text-muted); }
.icon-btn:hover { background: var(--color-surface-3); color: var(--color-text); }
.icon-btn svg, .btn svg, .nav a svg, .tabbar a svg { width: 20px; height: 20px; flex: none; }

.field { display: grid; gap: var(--space-2); }
.field label, .label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: var(--space-3) var(--space-4);
  background: var(--color-bg); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 16px; line-height: 1.5;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
textarea.input { resize: vertical; min-height: 110px; }
.input::placeholder { color: var(--color-text-faint); }
.input:focus { outline: none; border-color: var(--color-ember); box-shadow: 0 0 0 3px var(--color-ember-soft); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: inline-flex; gap: var(--space-2); align-items: center; font-size: var(--text-sm); color: var(--color-text-muted); }
.check input { width: 18px; height: 18px; accent-color: var(--color-ember); }
.form { display: grid; gap: var(--space-5); }
.form-msg { font-size: var(--text-sm); min-height: 1.2em; }
.form-msg.err { color: var(--color-danger); }
.form-msg.ok { color: var(--color-success); }

/* ---------- Auth screen ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #0e0905; }
.auth-art img, .auth-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.quote-inner { transition: opacity 600ms ease; }
.quote-inner.is-changing { opacity: 0; }
.quote-text { margin: 0; }
.quote.is-long { font-size: var(--text-base); line-height: 1.45; }
.auth-art .auth-video.is-done { visibility: hidden; }
.video-toggle { position: fixed; top: var(--space-5); left: var(--space-5); z-index: 5; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(239 228 208 / 0.28); background: rgb(14 9 5 / 0.55); color: var(--color-text); font-size: 11px; letter-spacing: -1px; cursor: pointer; opacity: 0.7; transition: opacity 180ms ease, border-color 180ms ease; }
.video-toggle:hover, .video-toggle:focus-visible { opacity: 1; border-color: var(--color-brass); }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--color-bg)), linear-gradient(0deg, rgb(10 6 3 / 0.8), transparent 45%); }
.auth-art blockquote { position: absolute; left: var(--space-10); bottom: var(--space-12); right: 30%; margin: 0; z-index: 1; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.4; color: var(--color-text); }
.auth-art cite { display: block; margin-top: var(--space-3); font-family: var(--font-body); font-style: normal; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brass); }
/* Desktop: the welcome video fills the whole screen and the sign-in panel sits over its darker right side */
@media (min-width: 861px) {
  .auth > .auth-art { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; }
  .auth > .auth-panel { grid-column: 2; grid-row: 1; position: relative; z-index: 1; justify-self: end; margin-right: clamp(0px, 4vw, var(--space-16)); }
  .auth-art::after { background: linear-gradient(90deg, rgb(14 9 5 / 0.05) 20%, rgb(21 16 11 / 0.78) 58%, rgb(21 16 11 / 0.94) 78%), linear-gradient(0deg, rgb(10 6 3 / 0.85), transparent 40%); }
  .auth-art blockquote { right: auto; max-width: 34ch; }
  /* Mirrored so the fire lands in the open left side instead of behind the form. Delete this line to undo. */
  .auth-art video { transform: scaleX(-1); object-position: 100% 50%; }
}
/* Opening intro: video alone first, then the overlay, quote, and sign-in panel fade in */
.auth-art::after { transition: opacity 1400ms ease; }
.auth .auth-panel, .auth-art blockquote { transition: opacity 1200ms ease, transform 1200ms cubic-bezier(0.16, 1, 0.3, 1); }
.auth.intro .auth-art::after { opacity: 0.2; }
.auth.intro .auth-panel, .auth.intro .auth-art blockquote { opacity: 0; transform: translateY(14px); pointer-events: none; }
.auth.intro .auth-art blockquote { transition-delay: 0ms; }
.auth:not(.intro) .auth-art blockquote { transition-delay: 300ms; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(var(--space-8), 6vw, var(--space-16)); max-width: 560px; width: 100%; }
.auth-panel .wordmark { font-size: var(--text-2xl); margin-bottom: var(--space-10); }
.auth-panel h1 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; margin-bottom: var(--space-2); }
.auth-panel .lede { color: var(--color-text-muted); margin-bottom: var(--space-8); }
.auth-switch { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--color-text-muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--color-ember); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.demo-box { margin-top: var(--space-8); padding: var(--space-4) var(--space-5); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-text-muted); }
.demo-box .row { margin-top: var(--space-3); }

@media (max-width: 860px) {
  /* Phones: the video stays full screen behind the form */
  .auth { grid-template-columns: 1fr; }
  .auth-art { position: fixed; inset: 0; z-index: 0; }
  .auth-art::after { background: linear-gradient(180deg, rgb(14 9 5 / 0.55), rgb(21 16 11 / 0.86) 38%, rgb(21 16 11 / 0.94)); }
  .auth-art blockquote { display: none; }
  .auth-panel { position: relative; z-index: 1; min-height: 100dvh; padding: var(--space-16) var(--space-5) var(--space-12); max-width: none; }
  .auth-panel .wordmark { margin-bottom: var(--space-6); }
}

/* ---------- Waiting room (pending / denied) ---------- */
.waiting { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-6); background: linear-gradient(rgb(14 9 5 / 0.82), rgb(14 9 5 / 0.92)), url("../img/hearth.webp") center / cover; }
.not-configured { align-content: center; gap: var(--space-4); text-align: center; color: var(--color-text-muted); }
.waiting-card { max-width: 480px; background: rgb(30 22 16 / 0.92); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-10) var(--space-8); box-shadow: var(--shadow); }
.waiting-card .wordmark { font-size: var(--text-xl); margin-bottom: var(--space-8); }
.waiting-card h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); margin-bottom: var(--space-3); }
.waiting-card p { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: var(--banner-h); height: calc(100dvh - var(--banner-h)); display: flex; flex-direction: column;
  padding: var(--space-8) var(--space-4) var(--space-6);
  background:
    linear-gradient(180deg, rgb(21 16 11 / 0.55), rgb(21 16 11 / 0.92)),
    url("../img/oak-table.webp") 30% 50% / cover;
  border-right: 1px solid var(--color-border);
}
.sidebar .wordmark { font-size: 1.85rem; padding-inline: var(--space-3); margin-bottom: var(--space-10); }
.nav { display: grid; gap: var(--space-1); }
.nav-label { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint); padding: var(--space-5) var(--space-3) var(--space-2); }
.nav a {
  display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav a:hover { background: rgb(232 200 150 / 0.07); color: var(--color-text); }
.nav a[aria-current="page"] { background: var(--color-ember-soft); color: var(--color-ember-hover); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--color-ember); color: var(--color-on-ember); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.who { min-width: 0; flex: 1; }
.who b { display: block; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: var(--text-xs); color: var(--color-text-faint); }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--color-on-ember); background: var(--av, var(--color-brass)); }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

.topbar { display: none; }
.tabbar { display: none; }

main { min-width: 0; }
.page { max-width: 820px; margin: 0 auto; padding: var(--space-10) clamp(var(--space-5), 4vw, var(--space-12)) var(--space-16); }
.page.wide { max-width: 1080px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); }
.page-head p { color: var(--color-text-muted); margin-top: var(--space-1); font-size: var(--text-sm); }
.eyebrow { font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-brass); margin-bottom: var(--space-2); }

.has-demo { --banner-h: 38px; }
.demo-banner { position: sticky; top: 0; z-index: 30; height: var(--banner-h); display: flex; align-items: center; gap: var(--space-3); flex-wrap: nowrap; overflow: hidden; padding: 0 var(--space-5); background: #2c1c0d; border-bottom: 1px solid rgb(228 138 58 / 0.3); font-size: var(--text-xs); color: var(--color-text-muted); }
@media (max-width: 900px) { .demo-banner > span { display: none; } }
.demo-banner b { color: var(--color-ember-hover); letter-spacing: 0.1em; text-transform: uppercase; }
.demo-banner select { background: var(--color-bg); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 4px 8px; font-size: var(--text-xs); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; min-height: calc(100dvh - var(--banner-h)); }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: calc(var(--topbar-h) + env(safe-area-inset-top));
    position: sticky; top: var(--banner-h); z-index: 20; padding: var(--space-3) var(--space-4);
    padding-top: calc(var(--space-3) + env(safe-area-inset-top));
    background: rgb(21 16 11 / 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
  }
  .topbar .wordmark { font-size: 1.35rem; }
  .topbar a { text-decoration: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgb(24 18 12 / 0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--color-text-faint); text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
  .tabbar a[aria-current="page"] { color: var(--color-ember-hover); }
  .tabbar .dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--color-ember); }
  .page { padding: var(--space-6) var(--space-4) calc(var(--tabbar-h) + var(--space-12)); }
  .page-head { margin-bottom: var(--space-6); }
}

/* ---------- Cards & lists ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-6); }
.stack { display: grid; gap: var(--space-4); }
.meta { font-size: var(--text-xs); color: var(--color-text-faint); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.meta .sep::before { content: "\00b7"; }
.prose { color: var(--color-text); }
.note { font-size: var(--text-xs); color: var(--color-text-faint); }
.prose p + p { margin-top: var(--space-3); }
.prose a { word-break: break-word; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; background: var(--color-surface-3); color: var(--color-text-muted); }
.badge.ember { background: var(--color-ember-soft); color: var(--color-ember-hover); }
.badge.brass { background: rgb(202 164 98 / 0.15); color: var(--color-brass); }
.badge.ok { background: rgb(157 187 117 / 0.14); color: var(--color-success); }
.actions { display: flex; gap: var(--space-1); flex-wrap: wrap; }

.announcement { position: relative; }
.announcement h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin: var(--space-2) 0 var(--space-3); }
.announcement.pinned { background: linear-gradient(180deg, rgb(228 138 58 / 0.09), transparent 70%), var(--color-surface); border-color: rgb(228 138 58 / 0.3); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap; }

.next-up {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5); align-items: center;
  padding: var(--space-5) var(--space-6); margin-bottom: var(--space-8);
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: linear-gradient(90deg, rgb(21 16 11 / 0.95) 35%, rgb(21 16 11 / 0.55)), url("../img/hearth.webp") 70% 60% / cover;
}
.datechip { width: 60px; text-align: center; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); overflow: hidden; background: rgb(21 16 11 / 0.7); }
.datechip span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--color-ember); color: var(--color-on-ember); padding: 2px 0; }
.datechip b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.5; }
.next-up h2 { font-size: var(--text-base); font-weight: 600; }
.next-up p { font-size: var(--text-sm); color: var(--color-text-muted); }
@media (max-width: 560px) { .next-up { grid-template-columns: auto 1fr; } .next-up .btn { grid-column: 1 / -1; } }

/* Tabs */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-6); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: var(--space-3) var(--space-4); min-height: 44px; color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--color-text); border-color: var(--color-ember); }

/* Study */
.study-item { display: block; text-decoration: none; color: inherit; transition: border-color 160ms var(--ease), background 160ms var(--ease); }
.study-item:hover { border-color: var(--color-border-strong); background: var(--color-surface-2); color: inherit; }
.study-item h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin: var(--space-2) 0; }
.study-item .reading { color: var(--color-brass); font-size: var(--text-sm); }
.study-item p.excerpt { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.study-detail h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); margin: var(--space-2) 0 var(--space-3); }
.reading-line { display: inline-flex; gap: var(--space-2); align-items: center; color: var(--color-brass); font-size: var(--text-sm); margin-bottom: var(--space-6); }
.questions { counter-reset: q; list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-3); }
.questions li { counter-increment: q; display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); padding: var(--space-4); background: var(--color-surface-2); border-radius: var(--radius-sm); }
.questions li::before { content: counter(q); font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-ember); line-height: 1.2; }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin: var(--space-10) 0 var(--space-4); }
.back { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; margin-bottom: var(--space-6); }
.back:hover { color: var(--color-text); }
.back svg { width: 18px; height: 18px; }

.comment { display: grid; grid-template-columns: 36px 1fr; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border); }
.comment:last-child { border-bottom: 0; }
.comment .head { display: flex; gap: var(--space-2); align-items: baseline; flex-wrap: wrap; }
.comment .head b { font-size: var(--text-sm); }
.composer { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.composer .row { justify-content: flex-end; }

.question { display: flex; gap: var(--space-4); align-items: flex-start; justify-content: space-between; }
.question p { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.35; }
.question.done p { color: var(--color-text-faint); text-decoration: line-through; text-decoration-color: rgb(232 200 150 / 0.3); }

/* Chat */
.chat-page { display: flex; flex-direction: column; height: calc(100dvh - var(--banner-h)); max-width: 900px; margin: 0 auto; padding: 0 clamp(var(--space-4), 3vw, var(--space-10)); }
.chat-head { padding: var(--space-8) 0 var(--space-4); border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); }
.chat-head h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); }
.chat-head p { color: var(--color-text-muted); font-size: var(--text-sm); }
.chat-log { flex: 1; overflow-y: auto; padding: var(--space-4) 0; overscroll-behavior: contain; }
.day-divider { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0 var(--space-3); color: var(--color-text-faint); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: var(--space-3); padding: var(--space-2) var(--space-2); border-radius: var(--radius-sm); }
.msg:hover { background: rgb(232 200 150 / 0.03); }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .head { display: flex; gap: var(--space-2); align-items: baseline; }
.msg .head b { font-size: var(--text-sm); }
.msg .body { white-space: pre-wrap; word-break: break-word; }
.msg .del { opacity: 0; margin-left: auto; }
.msg:hover .del, .msg:focus-within .del { opacity: 1; }
.chat-form { display: flex; gap: var(--space-3); align-items: flex-end; padding: var(--space-4) 0 var(--space-6); border-top: 1px solid var(--color-border); }
.chat-form textarea { min-height: 46px; max-height: 160px; resize: none; }
@media (max-width: 900px) {
  .chat-page { height: calc(100dvh - var(--banner-h) - var(--topbar-h) - env(safe-area-inset-top)); padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .chat-head { padding-top: var(--space-4); }
  .chat-form { padding-bottom: var(--space-3); }
  .msg .del { opacity: 1; }
}

/* Calendar */
.cal-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
.cal { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); }
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.cal-bar h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid .dow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); text-align: center; padding: var(--space-2) 0; }
.cal-day { min-width: 0; min-height: 84px; padding: 6px; border-radius: var(--radius-sm); background: var(--color-surface-2); font-size: var(--text-xs); display: flex; flex-direction: column; gap: 3px; border: 1px solid transparent; text-align: left; color: var(--color-text-muted); }
.cal-day.out { background: transparent; color: var(--color-text-faint); }
.cal-day.today { border-color: var(--color-ember); }
.cal-day .num { font-weight: 600; }
.cal-day.today .num { color: var(--color-ember-hover); }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 2px 6px; background: var(--color-ember-soft); color: var(--color-ember-hover); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { background: rgb(228 138 58 / 0.28); }
@media (max-width: 600px) {
  .cal-day { min-height: 48px; padding: 4px; align-items: center; }
  .cal-ev { font-size: 0; width: 7px; height: 7px; padding: 0; border-radius: 50%; background: var(--color-ember); }
  .cal-day .evs { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
}
.event-row { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; padding: var(--space-4); border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); text-align: left; width: 100%; color: inherit; }
button.event-row:hover { border-color: var(--color-border-strong); }
.event-row h3 { font-size: var(--text-base); font-weight: 600; }
.event-row p { font-size: var(--text-sm); color: var(--color-text-muted); }
.subscribe { margin-top: var(--space-6); }
.subscribe h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin-bottom: var(--space-2); }
.subscribe > p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.feed-url { display: flex; gap: var(--space-2); }
.feed-url input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.howto { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.howto details { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); background: var(--color-surface-2); }
.howto summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); min-height: 28px; display: flex; align-items: center; }
.howto ol { margin: var(--space-3) 0 0; padding-left: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); display: grid; gap: var(--space-2); }

/* Members */
.member { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.member .info { flex: 1; min-width: 0; }
.member .info b { display: block; }
.member .info span { font-size: var(--text-xs); color: var(--color-text-faint); word-break: break-all; }
.member-list { padding: 0; overflow: hidden; }
.member-list .member + .member { border-top: 1px solid var(--color-border); }
@media (max-width: 560px) { .member { flex-wrap: wrap; } .member .actions { width: 100%; } .member .actions:has(> .btn.quiet:first-child) { width: calc(100% + var(--space-3)); margin-left: calc(-1 * var(--space-3)); } }

/* Empty, loading, toast */
.empty { text-align: center; padding: var(--space-12) var(--space-6); color: var(--color-text-muted); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); }
.empty h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--color-text); margin-bottom: var(--space-2); }
.skeleton { height: 120px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-surface-2) 50%, var(--color-surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60; background: var(--color-surface-3); border: 1px solid var(--color-border-strong); color: var(--color-text); padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: var(--text-sm); transition: opacity 200ms var(--ease), transform 200ms var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 900px) { .toast { bottom: calc(var(--tabbar-h) + var(--space-4) + env(safe-area-inset-bottom)); } }

/* Dialog */
dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(8 5 2 / 0.7); backdrop-filter: blur(3px); }
dialog[open] { animation: pop 220ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border); }
.dlg-head h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); }
.dlg-body { padding: var(--space-6); }
.dlg-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-6) var(--space-6); flex-wrap: wrap; }
.dlg-foot .left { margin-right: auto; }

/* More menu (mobile) */
.more-list { display: grid; gap: var(--space-2); }
.more-list a { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; }
.more-list a svg { width: 20px; height: 20px; color: var(--color-text-muted); }
.more-list .count { margin-left: auto; }

/* ---------- Headshot avatars ---------- */
.avatar.has-photo { background: var(--color-surface-3); overflow: hidden; padding: 0; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Create a Theologian ---------- */
.theo-form { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-8); align-items: start; }
.theo-photo { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.headshot-preview { width: 168px; height: 168px; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: var(--space-1); border: 2px dashed var(--color-border-strong); background: var(--color-surface-2); color: var(--color-text-faint); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; overflow: hidden; }
.headshot-preview svg { width: 40px; height: 40px; }
.headshot-preview.has-photo { border: 2px solid var(--color-brass); display: block; box-shadow: 0 0 0 6px var(--color-ember-soft); }
.headshot-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.theo-photo .hint, .theo-fields .hint { font-size: var(--text-xs); color: var(--color-text-faint); line-height: 1.5; }
.theo-photo .hint { max-width: 22ch; }
.theo-card { display: flex; align-items: center; gap: var(--space-8); }
.theo-card-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--color-brass); box-shadow: 0 0 0 6px var(--color-ember-soft), 0 12px 32px rgb(0 0 0 / 0.35); }
.theo-card-text .eyebrow { margin-bottom: var(--space-1); }
.theo-name { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); line-height: 1.15; overflow-wrap: anywhere; }
.theo-real { color: var(--color-text-muted); margin-top: var(--space-2); }
.theo-welcome { margin-top: var(--space-4); color: var(--color-text-muted); font-size: var(--text-sm); }
.theo-welcome a { color: var(--color-ember); }
.account-card { margin-top: var(--space-6); }
.account-card .section-title { margin-top: 0; margin-bottom: var(--space-2); }
@media (max-width: 640px) {
  .theo-form { grid-template-columns: 1fr; gap: var(--space-6); }
  .theo-card { flex-direction: column; text-align: center; gap: var(--space-5); }
  .theo-card-photo { width: 128px; height: 128px; }
}

.theo-style { margin-top: var(--space-2); color: var(--color-brass); font-size: var(--text-sm); letter-spacing: 0.02em; }
.theo-locked { display: inline-flex; gap: 6px; align-items: flex-start; text-align: left; }
.theo-locked svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--color-brass); }
.btn svg { flex: none; }

/* Portrait painting and picking */
.look-board { padding: var(--space-6); }
.look-group { font-family: var(--font-display); font-weight: 500; font-size: var(--text-base); color: var(--color-brass); margin: var(--space-6) 0 var(--space-3); }
.look-group:first-child, .painting-status + .look-group { margin-top: 0; }
.look-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.look-tile { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-2); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--color-surface-2); color: var(--color-text); text-align: center; cursor: pointer; transition: border-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.look-tile:hover { border-color: var(--color-border-strong); }
.look-tile:focus-visible { outline: 2px solid var(--color-ember); outline-offset: 2px; }
.look-tile[aria-checked="true"] { border-color: var(--color-ember); box-shadow: 0 0 0 4px var(--color-ember-soft), 0 10px 28px rgb(0 0 0 / 0.35); }
.look-img { display: block; width: 100%; aspect-ratio: 1; height: auto; border-radius: calc(var(--radius-md) - 4px); object-fit: cover; background: var(--color-surface); }
.look-label { font-size: var(--text-sm); line-height: 1.35; padding: 0 var(--space-1) var(--space-1); color: var(--color-text-muted); }
.look-tile[aria-checked="true"] .look-label { color: var(--color-text); }
.look-tile.is-painting { cursor: default; }
.look-tile.is-painting .look-img, .look-tile.is-painting .look-label { background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-surface-3) 50%, var(--color-surface) 100%); background-size: 200% 100%; animation: shimmer 1.6s infinite linear; }
.look-tile.is-painting .look-label { height: 14px; width: 70%; justify-self: center; border-radius: 7px; padding: 0; margin-bottom: var(--space-1); }
.painting-status { display: flex; align-items: center; gap: var(--space-2); color: var(--color-ember); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.painting-status svg { width: 18px; height: 18px; animation: brush 1.6s ease-in-out infinite; }
@keyframes brush { 50% { transform: rotate(-14deg) translateX(2px); } }
.look-confirm { position: sticky; bottom: var(--space-4); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-4); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--color-surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.look-confirm p { font-family: var(--font-display); color: var(--color-text); min-width: 0; }
@media (max-width: 900px) { .look-confirm { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-3)); } }
@media (max-width: 640px) {
  .look-board { padding: var(--space-4); }
  /* On phones each look is a row: portrait on the left, label on the right. */
  .look-grid { grid-template-columns: 1fr; gap: var(--space-2); }
  .look-tile { grid-template-columns: 88px 1fr; align-items: center; text-align: left; gap: var(--space-4); }
  .look-label { padding: 0; }
  .look-tile.is-painting .look-label { justify-self: start; margin: 0; }
  .look-confirm { flex-direction: column; align-items: stretch; text-align: center; padding: var(--space-3); gap: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) { .painting-status svg, .look-tile.is-painting .look-img, .look-tile.is-painting .look-label { animation: none; } }

/* Prompt shown in place of a composer until the member has a Theologian */
.theo-gate { display: flex; align-items: center; gap: var(--space-5); border-color: var(--color-border-strong); background: linear-gradient(135deg, var(--color-ember-soft), transparent 60%), var(--color-surface); }
.theo-gate h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin-bottom: var(--space-1); }
.theo-gate p { color: var(--color-text-muted); font-size: var(--text-sm); }
.theo-gate > div { flex: 1; min-width: 0; }
.theo-gate-mark { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed var(--color-brass); color: var(--color-brass); }
.chat-gate { padding: var(--space-4) 0 var(--space-6); border-top: 1px solid var(--color-border); }
@media (max-width: 640px) {
  .theo-gate { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .theo-gate-mark { display: none; }
  .chat-gate { padding-bottom: var(--space-3); }
}

/* What the Theologian is holding (Theobrogian Generator) */
.held-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.held-field legend { padding: 0; margin-bottom: var(--space-2); }
.held-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.held-field .held-opt { text-transform: none; letter-spacing: normal; font-weight: 500; }
.held-opt { position: relative; display: flex; align-items: center; gap: var(--space-2); padding: 10px 12px; min-height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); font-size: var(--text-sm); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.held-opt:hover { border-color: var(--color-border-strong); }
.held-opt input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--color-ember); }
.held-opt:has(input:checked) { border-color: var(--color-ember); background: var(--color-ember-soft); }
.held-opt:has(input:focus-visible) { outline: 2px solid var(--color-ember); outline-offset: 2px; }
@media (max-width: 420px) { .held-grid { grid-template-columns: 1fr; } }

/* ---------- Ranks and points ---------- */
.rank { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-brass); white-space: nowrap; }
.msg .head { flex-wrap: wrap; row-gap: 0; }
.question .meta .rank { margin-left: var(--space-2); }
.question-link { color: inherit; text-decoration: none; }
.question-link:hover p { color: var(--color-ember-hover); }
.reply-link { margin-top: var(--space-3); }
.question-title { max-width: none; font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); line-height: 1.35; margin: var(--space-2) 0 0; }
.member .info .member-rank { display: block; margin-top: 2px; word-break: normal; color: var(--color-text-muted); }
.member .info .member-rank b { display: inline; color: var(--color-brass); font-weight: 600; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.member-list .member { flex-wrap: wrap; }
.member-list .member .info { min-width: 240px; }
.member-list .member .actions { margin-left: auto; }
.bump { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-right: var(--space-2); }
.bump .btn { padding-inline: 10px; }
.bump .btn { font-variant-numeric: tabular-nums; }

.standing { margin-top: var(--space-6); }
.standing-top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.standing-rank { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-brass); margin: 0; }
.standing-pts { margin: 0; text-align: right; line-height: 1.1; }
.standing-pts b { display: block; font-family: var(--font-display); font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.standing-pts span { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.rank-bar { height: 8px; border-radius: 4px; background: var(--color-surface-3); margin: var(--space-4) 0 var(--space-2); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-ember), var(--color-brass)); }
.standing-more { margin-top: var(--space-4); border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.standing .hint { font-size: var(--text-sm); color: var(--color-text-muted); }
.standing-more summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-text-muted); }
.standing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-4); }
.standing-grid h3 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-faint); margin: 0 0 var(--space-2); }
.earn, .ranks { list-style: none; padding: 0; margin: 0; font-size: var(--text-sm); }
.earn li, .ranks li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.earn b, .ranks b { font-variant-numeric: tabular-nums; color: var(--color-text-muted); font-weight: 600; }
.ranks li.on { color: var(--color-brass); }
.ranks li.on b { color: var(--color-brass); }
@media (max-width: 640px) { .standing-grid { grid-template-columns: 1fr; } }

/* ---------- Theologian name picker ---------- */
.name-board { padding: var(--space-6); }
.name-board .look-group:first-of-type { margin-top: 0; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-5); }
.name-opt { min-height: 56px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--color-surface-2); color: var(--color-text); font-family: var(--font-display); font-size: var(--text-base); line-height: 1.3; text-align: left; cursor: pointer; overflow-wrap: anywhere; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.name-opt:hover { border-color: var(--color-border-strong); }
.name-opt[aria-checked="true"] { border-color: var(--color-ember); box-shadow: 0 0 0 4px var(--color-ember-soft); }
.name-opt.is-writing { cursor: default; background: linear-gradient(90deg, var(--color-surface-2), var(--color-surface-3), var(--color-surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.theo-locked-name { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-brass); margin: var(--space-1) 0 var(--space-1); }
@media (max-width: 560px) { .name-board { padding: var(--space-4); } .name-grid { grid-template-columns: 1fr; } }
.name-opt.is-writing:hover { border-color: transparent; }
.standing-grid:has(> :only-child) { grid-template-columns: 1fr; }

/* ---------- Invite a friend ---------- */
.invite-card { margin-top: var(--space-5); padding: var(--space-6); }
.invite-card .meta { font-size: var(--text-sm); }
.invite-row { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-4); }
.invite-row .input { flex: 1; min-width: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.invite-card .hint { margin-top: var(--space-3); color: var(--color-brass); }
.invite-note { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-ember-soft); color: var(--color-text); font-size: var(--text-sm); }
.invite-note svg { width: 16px; height: 16px; flex: none; color: var(--color-ember); }
@media (max-width: 560px) { .invite-card { padding: var(--space-4); } .invite-row { flex-wrap: wrap; } .invite-row .input { flex-basis: 100%; } }

/* ---------- C.S. Lewis, pinned first message in Group Chat ---------- */
.lewis-msg { margin-bottom: var(--space-2); padding: var(--space-3); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-ember-soft); }
.lewis-msg .body { font-family: var(--font-display); font-style: italic; font-size: var(--text-base); }

/* ---------- Locked sections ---------- */
.nav-lock { display: inline-flex; margin-left: auto; color: var(--color-text-faint); }
.nav-lock svg { width: 14px; height: 14px; }
.nav-lock + .count { margin-left: var(--space-2); }
.locked-card { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); text-align: center; }
.locked-card h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); margin: 0; }
.locked-card p { max-width: 46ch; color: var(--color-text-muted); margin: 0; }
