/* ==========================================================================
   STAND — Stand in the Gap Prayer Community
   Built on Bootstrap 5.3. Brand: Generation Jesus charcoal + flame.
   Contents: 1 tokens · 2 base · 3 app shell · 4 buttons & forms · 5 pieces
             6 home · 7 circles · 8 prayer · 9 events · 10 profile & cord
             11 auth & welcome · 12 moderation · 13 motion & print
   ========================================================================== */

/* 1 ── Tokens ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-var.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("../fonts/Marcellus-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* brand — the charcoal is sampled from the Generation Jesus logo */
  --ink: #1B201E;
  --ink-2: #242B28;
  --ink-3: #303A35;
  --bone: #F3F5F2;
  --pine: #2F4A40;
  --sage: #6E9482;
  --flame: #F5A524;
  --flame-deep: #D98A0B;
  --ember: #D4492A;

  /* surfaces (light) */
  --bg: #EDF1EE;
  --surface: #FFFFFF;
  --surface-2: #F5F7F5;
  --text: #1B201E;
  --muted: #5B6A63;
  --line: #DBE2DD;
  --sage-soft: #DFEAE4;
  --flame-soft: #FDF1D8;
  --ember-soft: #FBE5DE;
  --on-flame: #1B201E;
  --flame-text: #9A5F00;
  --strand-1: var(--flame);
  --strand-2: var(--sage);
  --strand-3: var(--ink);

  --font-ui: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-word: "Marcellus", "Times New Roman", serif;

  --r-card: 20px;
  --r-field: 14px;
  --sidebar-w: 248px;
  --appbar-h: 56px;
  --tabbar-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* Bootstrap hooks */
  --bs-body-font-family: var(--font-ui);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--pine);
  --bs-link-color-rgb: 47, 74, 64;
  --bs-link-hover-color-rgb: 27, 32, 30;
  --bs-border-radius: var(--r-field);
  --bs-emphasis-color: var(--text);
}

[data-bs-theme="dark"] {
  --bg: #121614;
  --surface: #1B201E;
  --surface-2: #242B28;
  --text: #ECF0ED;
  --muted: #9AA8A1;
  --line: #2E3733;
  --sage: #8FB5A2;
  --sage-soft: #233029;
  --flame-soft: #3A2D12;
  --ember-soft: #3D211A;
  --flame-text: #F5B544;
  --strand-3: #ECF0ED;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: #A9CDBB;
  --bs-link-color-rgb: 169, 205, 187;
  --bs-link-hover-color-rgb: 236, 240, 237;
  --bs-emphasis-color: var(--text);
}

/* 2 ── Base ───────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar-h) + var(--safe-t) + 12px); }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
a { text-underline-offset: 0.18em; }
.text-muted { color: var(--muted) !important; }
::selection { background: var(--flame); color: var(--ink); }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; background: var(--flame); color: var(--ink); padding: 8px 14px; border-radius: 999px; }
.word { font-family: var(--font-word); letter-spacing: 0; }

/* 3 ── App shell ──────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1030;
  background: var(--ink); color: var(--bone);
  display: none; flex-direction: column; padding: 22px 14px 14px;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; text-decoration: none; }
.sidebar-brand img { height: 46px; width: auto; }
.sidebar-brand b { display: block; font-family: var(--font-word); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.14em; line-height: 1; }
.sidebar-brand small { display: block; margin-top: 5px; font-size: 0.75rem; color: #A9B6AF; letter-spacing: 0.02em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #C4CEC8; text-decoration: none; font-weight: 500;
}
.side-link i { font-size: 1.15rem; width: 22px; text-align: center; }
.side-link:hover { background: var(--ink-2); color: #fff; }
.side-link.active { background: var(--ink-3); color: #fff; }
.side-link.active i { color: var(--flame); }
.side-sep { height: 1px; background: var(--ink-3); margin: 10px 12px; }
.count-pill { margin-left: auto; background: var(--flame); color: var(--ink); font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ink-3); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 600; }
.side-user:hover { background: var(--ink-2); color: #fff; }
.side-user i { color: #A9B6AF; }

.appbar {
  position: sticky; top: 0; z-index: 1030;
  display: flex; align-items: center; gap: 4px;
  height: calc(var(--appbar-h) + var(--safe-t)); padding: var(--safe-t) 8px 0;
  background: var(--ink); color: #fff;
}
.appbar-logo { display: grid; place-items: center; width: 44px; height: 44px; }
.appbar-logo img { height: 34px; width: auto; }
.appbar-title { flex: 1; min-width: 0; margin: 0; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.appbar-actions { display: flex; }
.appbar-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 1.25rem; text-decoration: none; }
.appbar-btn:active { background: var(--ink-3); }
.appbar-btn .dot { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--flame); border: 2px solid var(--ink); }

.main { padding: 16px 16px calc(var(--tabbar-h) + var(--safe-b) + 40px); }
.main-col, .rail { min-width: 0; }
.rail { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 1035;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--ink); border-top: 1px solid var(--ink-3);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9FADA6; text-decoration: none; font-size: 0.6875rem; font-weight: 600; }
.tab-icon { font-size: 1.3rem; line-height: 1; display: grid; place-items: center; height: 26px; }
.tab.active { color: #fff; }
.tab.active .tab-icon { color: var(--flame); }
.tab-prayer .tab-icon {
  width: 52px; height: 52px; margin-top: -24px; border-radius: 50%;
  background: var(--flame); color: var(--ink) !important; font-size: 1.5rem;
  box-shadow: 0 0 0 5px var(--ink);
}
.tab-prayer.active .tab-icon { background: #FFC14D; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head .lead-in { color: var(--muted); margin: 0; flex: 1 1 14rem; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; }

.toast-container { top: calc(var(--appbar-h) + var(--safe-t)); left: 0; right: 0; display: grid; justify-items: center; z-index: 1090; pointer-events: none; }
.toast { pointer-events: auto; border: 0; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(10, 14, 12, 0.3); width: min(26rem, 100%); }
.toast-body { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; }
.toast-body > i { font-size: 1.15rem; color: var(--flame); margin-top: 1px; }
.toast-error .toast-body > i { color: #FF9E85; }
.toast .btn-close { filter: invert(1) grayscale(1) brightness(2); flex-shrink: 0; }

@media (min-width: 992px) {
  .sidebar { display: flex; }
  .appbar, .tabbar { display: none; }
  .shell { margin-left: var(--sidebar-w); }
  .main { padding: 36px 40px 64px; max-width: 760px; margin: 0 auto; }
  .main.has-rail { max-width: 1140px; }
  .app-narrow .main { max-width: 680px; }
  .app-wide .main { max-width: 1040px; }
  .page-head { margin-bottom: 24px; }
  .page-head h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 2rem; margin: 0; }
  .page-head .lead-in { flex-basis: 100%; order: 3; }
  .toast-container { top: auto; bottom: 0; left: auto; right: 0; justify-items: end; }
}
@media (min-width: 1200px) {
  .main.has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
  .rail { margin-top: 0; position: sticky; top: 36px; }
}

/* 4 ── Buttons & forms ────────────────────────────────────────────────── */
.btn { border-radius: 999px; font-weight: 600; padding: 0.55rem 1.15rem; border-width: 1.5px; --bs-btn-focus-box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.45); }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.875rem; }
.btn-flame { background: var(--flame); border-color: var(--flame); color: var(--on-flame); }
.btn-flame:hover, .btn-flame:focus-visible { background: #FFB733; border-color: #FFB733; color: var(--on-flame); }
.btn-flame:active { background: var(--flame-deep) !important; border-color: var(--flame-deep) !important; color: var(--on-flame) !important; }
.btn-ink { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ink:hover, .btn-ink:active { background: var(--pine) !important; border-color: var(--pine) !important; color: #fff !important; }
[data-bs-theme="dark"] .btn-ink:hover, [data-bs-theme="dark"] .btn-ink:active { background: #fff !important; border-color: #fff !important; color: var(--ink) !important; }
.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-soft:hover, .btn-soft:active { background: var(--sage-soft) !important; border-color: var(--sage-soft) !important; color: var(--text) !important; }
.btn-ghost-light { background: transparent; border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.btn-ghost-light:hover, .btn-ghost-light:active { background: rgba(255, 255, 255, 0.1) !important; border-color: rgba(255, 255, 255, 0.5) !important; color: #fff !important; }
.btn-danger-soft { background: var(--ember-soft); border-color: var(--ember-soft); color: var(--ember); }
.btn-danger-soft:hover { background: var(--ember); border-color: var(--ember); color: #fff; }
[data-bs-theme="dark"] .btn-danger-soft { color: #FF9E85; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.form-control, .form-select { border-radius: var(--r-field); border-color: var(--line); background-color: var(--surface); color: var(--text); padding: 0.6rem 0.9rem; }
.form-control-lg, .form-select-lg { border-radius: 16px; font-size: 1.0625rem; padding: 0.8rem 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--flame-deep); box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.3); background-color: var(--surface); color: var(--text); }
.form-control::placeholder { color: var(--muted); opacity: 0.8; }
.form-label { font-weight: 600; margin-bottom: 0.35rem; }
.form-text { color: var(--muted); }
.form-check-input { border-color: var(--muted); }
.form-check-input:checked { background-color: var(--pine); border-color: var(--pine); }
[data-bs-theme="dark"] .form-check-input:checked { background-color: var(--flame); border-color: var(--flame); }
.form-check-input:focus { border-color: var(--flame-deep); box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.3); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; margin-top: 0.1em; }
.form-switch { padding-left: 3.3em; }
.form-switch .form-check-input { margin-left: -3.3em; }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.seg-btn { text-align: center; padding: 0.55rem 0.5rem; border-radius: 12px; font-weight: 600; color: var(--muted); cursor: pointer; margin: 0; }
.btn-check:checked + .seg-btn { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 26, 23, 0.14); }
.btn-check:focus-visible + .seg-btn { outline: 3px solid var(--flame); }

/* pill filters (links) */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px 8px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--muted); color: var(--text); }
.pill.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.pill .n { opacity: 0.65; font-weight: 500; margin-left: 2px; }
@media (min-width: 992px) { .pills { flex-wrap: wrap; padding: 2px 0 10px; margin: 0 0 12px; } }

/* checkbox chips (onboarding) */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip label { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0.85rem 1rem; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.chip input:checked + label { border-color: var(--flame-deep); background: var(--flame-soft); }
.chip input:checked + label .circle-emoji { background: var(--surface); }
.chip input:checked + label::after { content: "\F26E"; font-family: "bootstrap-icons"; margin-left: auto; color: var(--flame-text); }
.chip input:focus-visible + label { outline: 3px solid var(--flame); outline-offset: 2px; }
.choice { padding: 0.7rem 0.9rem 0.7rem 2.6rem; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 8px; background: var(--surface); }
.choice .form-check-input { margin-left: -1.7rem; }
.choice label { display: block; cursor: pointer; font-weight: 500; }

/* 5 ── Pieces ─────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel-title { font-size: 1.0625rem; margin: 0 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-head h2 { font-size: 1.25rem; margin: 0; }
.section-head a { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.stack { display: grid; gap: 12px; }

.avatar { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; font-weight: 700; line-height: 1; color: #fff; background: var(--pine); user-select: none; }
.avatar-xs { width: 24px; height: 24px; font-size: 0.7rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.875rem; }
.avatar-md { width: 42px; height: 42px; font-size: 1.05rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.5rem; }
.avatar-c-pine { background: #2F4A40; } .avatar-c-flame { background: #F5A524; color: #1B201E; }
.avatar-c-ember { background: #D4492A; } .avatar-c-sky { background: #3F7CAC; }
.avatar-c-plum { background: #6B4E8A; } .avatar-c-moss { background: #6E8B3D; }
.avatar-c-rose { background: #C2577A; } .avatar-c-slate { background: #55616B; }
.avatar-anon { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--muted); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.flag { display: inline-flex; align-items: center; gap: 5px; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.flag-flame { background: var(--flame-soft); color: var(--flame-text); }
.flag-sage { background: var(--sage-soft); color: var(--pine); }
[data-bs-theme="dark"] .flag-sage { color: #A9CDBB; }
.flag-ember { background: var(--ember-soft); color: var(--ember); }
[data-bs-theme="dark"] .flag-ember { color: #FF9E85; }
.flag-muted { background: var(--surface-2); color: var(--muted); }

.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; font-size: 0.9375rem; }
.notice > i { font-size: 1.15rem; line-height: 1.35; }
.notice a { color: inherit; font-weight: 600; }
.notice-flame { background: var(--flame-soft); color: var(--text); }
.notice-flame > i { color: var(--flame-text); }
.notice-sage { background: var(--sage-soft); color: var(--text); }
.notice-ember { background: var(--ember-soft); color: var(--text); }
.notice-ember > i { color: var(--ember); }

.empty { text-align: center; padding: 36px 20px; border: 1.5px dashed var(--line); border-radius: var(--r-card); }
.empty-emoji { font-size: 2.25rem; }
.empty h3 { font-size: 1.125rem; margin: 8px 0 4px; }
.empty p { color: var(--muted); max-width: 26rem; margin: 0 auto 14px; }

.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--flame); }

.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-rows > li:last-child { border-bottom: 0; }

.dropdown-menu { border-radius: 16px; border-color: var(--line); background: var(--surface); padding: 6px; box-shadow: 0 12px 32px rgba(10, 14, 12, 0.16); --bs-dropdown-link-hover-bg: var(--surface-2); --bs-dropdown-link-active-bg: var(--surface-2); --bs-dropdown-link-active-color: var(--text); }
.dropdown-item { border-radius: 10px; padding: 0.55rem 0.8rem; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.dropdown-menu form { margin: 0; }

.modal-content { border: 0; border-radius: 24px; background: var(--surface); color: var(--text); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-header { padding: 16px 20px; } .modal-body { padding: 20px; } .modal-footer { padding: 12px 20px; }
@media (max-width: 575.98px) {
  .sheet .modal-dialog { margin: 0; min-height: 100%; align-items: flex-end; max-width: none; }
  .sheet .modal-content { border-radius: 24px 24px 0 0; padding-bottom: var(--safe-b); }
  .sheet.fade .modal-dialog { transform: translateY(40px); }
  .sheet.show .modal-dialog { transform: none; }
}

.braid { display: block; width: 100%; height: 44px; }
.qr { display: inline-block; padding: 12px; background: #fff; border-radius: 16px; line-height: 0; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }

/* 6 ── Home ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff; border-radius: 28px; padding: 24px 22px 22px;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; right: -90px; top: -110px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 165, 36, 0.42), rgba(245, 165, 36, 0));
}
.hero-mark { position: absolute; z-index: -1; right: 18px; bottom: 14px; height: 150px; width: auto; opacity: 0.07; }
.hero-hello { font-size: 1rem; font-weight: 500; color: #C9D3CD; margin: 0 0 18px; }
.hero-hello b { color: #fff; font-weight: 700; }
.hero-label { font-size: 0.875rem; font-weight: 600; color: var(--flame); margin: 0 0 6px; }
.hero-prayer { font-family: var(--font-word); font-size: clamp(1.5rem, 5.4vw, 2.15rem); line-height: 1.22; margin: 0 0 8px; max-width: 22ch; text-wrap: balance; }
.hero-ref { color: #A9B6AF; font-size: 0.9375rem; margin: 0 0 20px; }
.hero-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-streak { font-size: 0.9375rem; color: #C9D3CD; }
.hero-streak b { color: #fff; }
[data-bs-theme="dark"] .hero { background: var(--surface-2); }
@media (min-width: 992px) { .hero { padding: 34px 36px 32px; } .hero-mark { height: 210px; right: 36px; } .hero-prayer { max-width: 19ch; } }

.now-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 576px) { .now-grid { grid-template-columns: 1fr 1fr; } }
.now-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.now-card h2 { font-size: 1.125rem; margin: 0; }
.now-card p { color: var(--muted); margin: 0; }
.now-card .btn { align-self: flex-start; margin-top: auto; }
.now-card .big { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.now-kicker { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.now-card.wide { grid-column: 1 / -1; }

.circle-today { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.circle-today h2 { font-size: 1.35rem; margin: 2px 0 4px; }
@media (max-width: 420px) { .circle-today { grid-template-columns: 1fr; justify-items: center; text-align: center; } .circle-today .btn { align-self: center; } }

.rhythm { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0; margin: 0 0 14px; }
.rhythm li { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 12px; }
.rhythm-day { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.rhythm-emoji { font-size: 1.1rem; line-height: 1.2; filter: grayscale(1); opacity: 0.55; }
.rhythm-label { display: none; }
.rhythm li.today { background: var(--flame-soft); }
.rhythm li.today .rhythm-day { color: var(--flame-text); }
.rhythm li.today .rhythm-emoji { filter: none; opacity: 1; }
.rhythm li.past .rhythm-emoji { filter: none; opacity: 0.5; }
.today-title { font-size: 1.25rem; margin: 2px 0 6px; }
.today-ref { font-family: var(--font-word); color: var(--muted); }

/* 7 ── Circles ────────────────────────────────────────────────────────── */
.ring { --d: 176px; --seat: 34px; position: relative; width: var(--d); height: var(--d); flex-shrink: 0; }
.ring-sm { --d: 132px; --seat: 28px; }
.ring-lg { --d: 248px; --seat: 44px; }
.ring-track { position: absolute; inset: calc(var(--seat) / 2); border-radius: 50%; border: 1.5px dashed var(--line); }
.ring-core { position: absolute; inset: 27%; border-radius: 50%; background: var(--flame-soft); display: grid; place-content: center; justify-items: center; text-align: center; }
.ring-core span { font-size: calc(var(--d) * 0.2); line-height: 1; }
.ring-core small { font-size: 0.75rem; font-weight: 700; color: var(--flame-text); margin-top: 4px; }
.ring-seat {
  position: absolute; top: 50%; left: 50%; width: var(--seat); height: var(--seat); margin: calc(var(--seat) / -2);
  transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(calc((var(--d) - var(--seat)) / -2)) rotate(calc(-360deg / var(--n) * var(--i)));
}
.ring-seat .avatar { width: var(--seat); height: var(--seat); font-size: calc(var(--seat) * 0.42); box-shadow: 0 0 0 3px var(--surface); }
.ring-seat.lit .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--flame); }
.hero .ring-track { border-color: rgba(255, 255, 255, 0.2); }
.hero .ring-core { background: rgba(245, 165, 36, 0.16); }
.hero .ring-core small { color: var(--flame); }
.hero .ring-seat .avatar { box-shadow: 0 0 0 3px var(--ink); }
.hero .ring-seat.lit .avatar { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4.5px var(--flame); }

.circle-card, .event-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--text); text-decoration: none; }
.circle-card:hover, .event-card:hover { border-color: var(--muted); color: var(--text); }
.circle-emoji { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--flame-soft); font-size: 1.5rem; flex-shrink: 0; }
.circle-info, .event-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.circle-info b, .event-info b { font-size: 1.0625rem; letter-spacing: -0.01em; }
.circle-focus { color: var(--muted); font-size: 0.9375rem; }
.circle-meta, .event-tags { display: flex; flex-wrap: wrap; column-gap: 12px; font-size: 0.8125rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.circle-reason { font-size: 0.8125rem; font-weight: 600; color: var(--flame-text); }

.circle-hero { display: grid; gap: 20px; justify-items: center; text-align: center; }
.circle-hero h1 { font-size: 1.75rem; margin: 0 0 4px; color: #fff; }
.circle-hero p { color: #C9D3CD; margin: 0; max-width: 34ch; }
.circle-hero .hero-meta { font-size: 0.9375rem; color: #A9B6AF; margin-top: 8px; }
.circle-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
@media (min-width: 768px) {
  .circle-hero { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; gap: 32px; }
  .circle-hero-actions { justify-content: flex-start; }
  .circle-hero h1 { font-size: 2.1rem; }
}

.tabs4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin: 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; position: sticky; top: calc(var(--appbar-h) + var(--safe-t) + 8px); z-index: 5; }
.tabs4 a { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border-radius: 14px; color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.tabs4 a i { font-size: 1.1rem; }
.tabs4 a.active { background: var(--ink); color: #fff; }
.tabs4 a.active i { color: var(--flame); }
[data-bs-theme="dark"] .tabs4 a.active { background: var(--ink-3); }
@media (min-width: 992px) { .tabs4 { top: 12px; } .tabs4 a { grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; padding: 10px; font-size: 1rem; } }

.msg { display: flex; gap: 12px; padding: 12px 0; }
.msg + .msg { border-top: 1px solid var(--line); }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-head b { font-weight: 700; }
.msg-head span { font-size: 0.8125rem; color: var(--muted); }
.msg p { margin: 2px 0 0; }
.msg-scripture { border-left: 3px solid var(--flame); padding-left: 12px; margin-top: 6px; }
.msg-scripture cite { display: block; font-family: var(--font-word); font-style: normal; font-size: 1.125rem; }
.msg-encourage p { background: var(--flame-soft); border-radius: 4px 16px 16px 16px; padding: 8px 12px; display: inline-block; }
.composer { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; }
.composer textarea { border: 0; padding: 4px 6px; resize: none; box-shadow: none !important; background: transparent; }
.composer-row { display: flex; gap: 8px; align-items: center; }
.composer-row .form-select { width: auto; border-radius: 999px; padding-top: 0.4rem; padding-bottom: 0.4rem; font-size: 0.9375rem; }

.reading { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reading:last-child { border-bottom: 0; }
.reading-day { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.reading.done .reading-day { background: var(--flame); color: var(--ink); }
.reading-info { flex: 1; min-width: 0; }
.reading-info b { display: block; font-family: var(--font-word); font-weight: 400; font-size: 1.0625rem; }
.reading-info span { color: var(--muted); font-size: 0.875rem; }
.check-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: transparent; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.check-btn:hover { border-color: var(--muted); color: var(--line); }
.check-btn.on { background: var(--pine); border-color: var(--pine); color: #fff; }
[data-bs-theme="dark"] .check-btn.on { background: var(--flame); border-color: var(--flame); color: var(--ink); }

.devo-verse { font-family: var(--font-word); font-size: 1.35rem; line-height: 1.3; margin: 0 0 6px; }
.devo-body p { margin-bottom: 0.9rem; max-width: 62ch; }
.devo-q { border-left: 3px solid var(--flame); padding: 4px 0 4px 14px; font-weight: 600; }

/* 8 ── Prayer ─────────────────────────────────────────────────────────── */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 16px 12px; }
.post-testimony { border-left: 4px solid var(--flame); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-who { min-width: 0; display: grid; line-height: 1.25; }
.post-name { font-weight: 700; color: var(--text); text-decoration: none; }
.post-name:hover { text-decoration: underline; color: var(--text); }
.post-meta { font-size: 0.8125rem; color: var(--muted); }
.post-meta a { color: inherit; font-weight: 600; }
.post-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post-body { display: block; margin: 10px 0 14px; font-size: 1.125rem; line-height: 1.45; color: var(--text); text-decoration: none; max-width: 60ch; }
.post-body-link:hover { color: var(--text); }
.post-actions { display: flex; align-items: center; gap: 6px; }
.post-actions-rest { margin-left: auto; display: flex; gap: 2px; }
.pray-btn { display: inline-flex; align-items: center; gap: 10px; padding: 0.5rem 0.55rem 0.5rem 1rem; border-radius: 999px; border: 1.5px solid var(--text); background: transparent; color: var(--text); font-weight: 700; }
.pray-btn-count { min-width: 28px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 0.875rem; font-weight: 700; text-align: center; }
.pray-btn:hover { background: var(--surface-2); }
.pray-btn.on { background: var(--flame); border-color: var(--flame); color: var(--on-flame); }
.pray-btn.on .pray-btn-count { background: rgba(27, 32, 30, 0.14); }
.pray-btn.pop { animation: pop 0.35s ease-out; }
.act { display: inline-flex; align-items: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; justify-content: center; }
.act:hover { background: var(--surface-2); color: var(--text); }
.act.on { color: var(--ember); }
.act.on .bi-bookmark-fill { color: var(--flame-text); }
[data-bs-theme="dark"] .act.on { color: #FF9E85; }

.fab { position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 1020; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 1.5rem; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(10, 14, 12, 0.32); }
@media (min-width: 992px) { .fab { display: none; } }
.only-desktop { display: none; }
@media (min-width: 992px) { .only-desktop { display: inline-flex; } }

.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.comment-body { flex: 1; min-width: 0; }
.comment-body p { margin: 2px 0 0; }

.challenge { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.challenge-emoji { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; background: var(--flame-soft); display: grid; place-items: center; font-size: 1.6rem; }
.challenge h3 { font-size: 1.125rem; margin: 0; align-self: end; }
.challenge-sub { color: var(--muted); font-size: 0.875rem; }
.challenge-rest { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 8px; }
.challenge-rest p { margin: 0; }
.challenge.done { border-color: var(--flame); }

.pray-modal .modal-content { background: var(--ink); color: #fff; padding: 28px 24px calc(24px + var(--safe-b)); text-align: center; overflow: hidden; }
.pray-modal .btn-close { position: absolute; top: calc(16px + var(--safe-t)); right: 16px; z-index: 2; }
.pray-step { display: flex; flex-direction: column; align-items: center; min-height: 100%; justify-content: center; }
.pray-kicker { color: var(--flame); font-weight: 600; margin: 0 0 4px; }
.breath { position: relative; width: 120px; height: 120px; margin: 12px 0 8px; }
.breath span { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(245, 165, 36, 0.55); }
.breath span:nth-child(2) { inset: 18px; border-color: rgba(245, 165, 36, 0.8); }
.breath span:nth-child(3) { inset: 38px; background: var(--flame); border: 0; }
.pray-modal.show .breath span { animation: breathe 7s ease-in-out infinite; }
.pray-modal.show .breath span:nth-child(2) { animation-delay: 0.25s; }
.pray-modal.show .breath span:nth-child(3) { animation-delay: 0.5s; }
.pray-text { font-family: var(--font-word); font-size: clamp(1.5rem, 6vw, 1.9rem); line-height: 1.25; margin: 10px 0 6px; text-wrap: balance; }
.pray-ref { color: #A9B6AF; margin: 0 0 16px; }
.pray-hint { color: #C9D3CD; font-size: 0.9375rem; margin: 0 0 20px; }
.pray-done-mark { font-size: 3.5rem; line-height: 1; margin-bottom: 12px; }
.pray-done-title { font-family: var(--font-word); font-weight: 400; font-size: 1.75rem; letter-spacing: 0; margin: 0 0 8px; }
.pray-done-sub { color: #C9D3CD; margin: 0 0 24px; }
@media (max-width: 575.98px) { .pray-modal .modal-content { border-radius: 0; min-height: 100%; justify-content: center; } }

/* 9 ── Events ─────────────────────────────────────────────────────────── */
.date-chip { display: grid; justify-items: center; align-content: center; width: 52px; height: 56px; border-radius: 14px; background: var(--ink); color: #fff; flex-shrink: 0; line-height: 1; }
.date-chip small { font-size: 0.6875rem; font-weight: 700; color: var(--flame); letter-spacing: 0.04em; text-transform: uppercase; }
.date-chip b { font-size: 1.35rem; margin-top: 3px; }
[data-bs-theme="dark"] .date-chip { background: var(--ink-3); }
.event-meta { color: var(--muted); font-size: 0.9375rem; }
.event-tags .going { color: var(--pine); font-weight: 700; }
[data-bs-theme="dark"] .event-tags .going { color: #A9CDBB; }
.feature h2, .feature h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0 0 8px; color: #fff; max-width: 18ch; }
.feature p { color: #C9D3CD; margin: 0 0 4px; }
.countdown { display: flex; gap: 8px; margin: 18px 0; }
.countdown div { min-width: 62px; padding: 10px 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); text-align: center; }
.countdown b { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 0.75rem; color: #A9B6AF; }
.facts { display: grid; gap: 14px; margin: 0; }
.facts div { display: flex; gap: 14px; align-items: flex-start; }
.facts i { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.facts dt { font-weight: 700; } .facts dd { margin: 0; color: var(--muted); }
.update { padding: 14px 0; border-bottom: 1px solid var(--line); }
.update:last-child { border-bottom: 0; padding-bottom: 0; } .update:first-child { padding-top: 0; }
.update h3 { font-size: 1rem; margin: 0 0 2px; } .update p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.update time { font-size: 0.8125rem; color: var(--muted); }

/* 10 ── Profile & Cord ────────────────────────────────────────────────── */
.profile-top { display: flex; align-items: center; gap: 16px; }
.profile-top h1 { font-size: 1.6rem; margin: 0; }
.profile-top p { margin: 2px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.stats div { text-align: center; padding: 0 4px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { font-size: 0.8125rem; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 16px 6px; }
.badge-item { display: grid; justify-items: center; text-align: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; background: none; border: 0; color: var(--text); padding: 0; }
.badge-medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; background: var(--flame-soft); box-shadow: inset 0 0 0 2px var(--flame); }
.badge-item.locked { color: var(--muted); }
.badge-item.locked .badge-medal { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); filter: grayscale(1); opacity: 0.55; }
.menu-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--text); text-decoration: none; font-weight: 600; text-align: left; }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.menu-list i:first-child { font-size: 1.2rem; width: 24px; text-align: center; color: var(--muted); }
.menu-list .bi-chevron-right { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.menu-list .sub { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 0.9375rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.25rem; border: 1.5px solid var(--line); background: var(--surface); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--flame); }
.swatch input:focus-visible + span { outline: 3px solid var(--flame); outline-offset: 5px; }

.cord-hero { text-align: center; }
.cord-hero h1 { font-family: var(--font-word); font-weight: 400; letter-spacing: 0; font-size: clamp(1.7rem, 6vw, 2.4rem); margin: 14px auto 8px; max-width: 20ch; color: #fff; }
.cord-hero p { color: #C9D3CD; margin: 0 auto; max-width: 36ch; }
.cord-hero { --strand-3: #ECF0ED; }
.strands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.strand { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-align: center; font-weight: 600; min-width: 0; }
.strand.open { border-style: dashed; color: var(--muted); background: transparent; }
.strand .avatar-open { width: 56px; height: 56px; border-radius: 50%; border: 1.5px dashed var(--muted); display: grid; place-items: center; font-size: 1.3rem; color: var(--muted); }
.strand .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
.strand span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strand:nth-child(1):not(.open) { border-bottom: 4px solid var(--strand-1); }
.strand:nth-child(2):not(.open) { border-bottom: 4px solid var(--strand-2); }
.strand:nth-child(3):not(.open) { border-bottom: 4px solid var(--strand-3); }
.net { display: grid; gap: 18px; justify-items: center; }
.net svg { width: min(100%, 340px); height: auto; overflow: visible; }
.net-ring { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 5; }
.net-dot { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.net-dot.on-1 { fill: var(--flame); stroke: var(--flame); }
.net-dot.on-2 { fill: var(--sage); stroke: var(--sage); }
.net-dot.on-3 { fill: var(--text); stroke: var(--text); }
.net-you { fill: var(--ink); } [data-bs-theme="dark"] .net-you { fill: var(--ink-3); }
.net-you-t { fill: #fff; font-weight: 700; font-size: 13px; font-family: var(--font-ui); }
.net-key { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; text-align: center; }
.net-key div + div { border-left: 1px solid var(--line); }
.net-key b { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.net-key span { font-size: 0.8125rem; color: var(--muted); }
.net-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.invite-box { display: flex; gap: 8px; }
.invite-box input { font-size: 0.9375rem; min-width: 0; }

.notif { display: flex; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); color: var(--text); }
.notif-emoji { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.notif.unread .notif-emoji { background: var(--flame-soft); }
.notif-text { display: grid; gap: 2px; min-width: 0; }
.notif-text b { font-weight: 400; }
.notif.unread .notif-text b { font-weight: 600; }
.notif time { font-size: 0.8125rem; color: var(--muted); }
.notif.unread::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--flame); margin: 8px 0 0 auto; flex-shrink: 0; }

.entry { padding: 16px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry time { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.entry p { font-family: var(--font-word); font-size: 1.125rem; line-height: 1.5; margin: 4px 0 0; max-width: 62ch; }

.prose h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.prose p, .prose li { max-width: 66ch; }
.prose li { margin-bottom: 6px; }

/* 11 ── Auth & welcome ────────────────────────────────────────────────── */
body.auth { background: var(--ink); }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.auth-brand { color: #fff; text-align: center; padding: calc(20px + var(--safe-t)) 24px 8px; }
.auth-logo img { width: 150px; height: 150px; object-fit: cover; object-position: 50% 42%; display: block; margin: 0 auto; }
.auth-brand-copy { display: none; }
.auth-main { background: var(--bg); border-radius: 28px 28px 0 0; padding: 28px 20px calc(32px + var(--safe-b)); }
.auth-card { max-width: 26rem; margin: 0 auto; }
.auth-mini { display: none; }
.auth-title { font-size: 1.75rem; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-alt { text-align: center; margin: 20px 0 0; color: var(--muted); }
.auth-alt a { font-weight: 700; }
.steps-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.steps-dots span { height: 5px; flex: 1; border-radius: 999px; background: var(--line); }
.steps-dots span.on { background: var(--flame); }
@media (min-width: 992px) {
  .auth-shell { grid-template-rows: none; grid-template-columns: minmax(360px, 5fr) 7fr; }
  .auth-brand { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; position: sticky; top: 0; height: 100vh; }
  .auth-logo img { width: min(360px, 80%); height: auto; }
  .auth-brand-copy { display: block; margin-top: 8px; }
  .auth-brand-name { font-family: var(--font-word); font-size: 1.5rem; letter-spacing: 0.04em; margin: 0 0 4px; }
  .auth-brand-tag { color: #A9B6AF; margin: 0; }
  .auth-main { border-radius: 0; display: grid; align-items: center; padding: 48px; }
  .auth-card { width: 100%; }
  .auth-card.wide { max-width: 34rem; }
}

body.welcome { background: var(--ink); color: #fff; }
.welcome-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; max-width: 30rem; margin: 0 auto; padding: calc(16px + var(--safe-t)) 24px calc(24px + var(--safe-b)); }
.welcome .carousel, .welcome .carousel-inner, .welcome .carousel-item { height: 100%; }
.welcome-slide { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 12px; }
.welcome-slide .art { height: 220px; display: grid; place-items: center; margin-bottom: 20px; width: 100%; }
.welcome-slide .art img { height: 220px; width: auto; }
.welcome-slide h1, .welcome-slide h2 { font-family: var(--font-word); font-weight: 400; letter-spacing: 0; font-size: clamp(1.9rem, 8vw, 2.5rem); margin: 0 0 12px; color: #fff; }
.welcome-slide p { color: #C9D3CD; font-size: 1.0625rem; max-width: 30ch; margin: 0; }
.welcome-slide .invited { background: rgba(245, 165, 36, 0.14); color: #FFD489; border-radius: 999px; padding: 6px 16px; font-weight: 600; margin-bottom: 18px; font-size: 0.9375rem; }
.welcome .ring-track { border-color: rgba(255, 255, 255, 0.22); }
.welcome .ring-core { background: rgba(245, 165, 36, 0.16); }
.welcome .ring-seat .avatar { box-shadow: 0 0 0 3px var(--ink); }
.welcome .braid { height: 70px; } .welcome { --strand-3: #ECF0ED; }
.welcome-dots { display: flex; justify-content: center; gap: 8px; margin: 8px 0 20px; }
.welcome-dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.28); transition: width 0.2s; }
.welcome-dots button.active { width: 26px; background: var(--flame); }
.welcome-foot { display: grid; gap: 10px; }
.welcome-foot .small-link { text-align: center; color: #C9D3CD; }
.welcome-foot .small-link a { color: #fff; font-weight: 700; }

/* 12 ── Moderation ────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; text-decoration: none; color: var(--text); display: block; }
.tile b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 0.9375rem; }
.tile.alert-tile { border-color: var(--flame); background: var(--flame-soft); }
a.tile:hover { border-color: var(--muted); color: var(--text); }
.queue-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.queue-item blockquote { margin: 10px 0; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; font-size: 1.0625rem; }
.queue-meta { font-size: 0.875rem; color: var(--muted); }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.queue-actions form { margin: 0; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); vertical-align: middle; }
.table th { font-size: 0.8125rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 16px; }
.qr-card { background: #fff; color: #1B201E; border-radius: var(--r-card); border: 1px solid var(--line); padding: 18px; text-align: center; }
.qr-card .qr { padding: 0; width: 100%; }
.qr-card b { display: block; margin-top: 10px; font-family: var(--font-word); font-weight: 400; font-size: 1.1rem; letter-spacing: 0.06em; }
.qr-card span { font-size: 0.8125rem; color: #5B6A63; }

.accordion { --bs-accordion-bg: var(--surface); --bs-accordion-color: var(--text); --bs-accordion-border-color: var(--line); --bs-accordion-btn-color: var(--text);
  --bs-accordion-active-bg: var(--surface-2); --bs-accordion-active-color: var(--text); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.3);
  --bs-accordion-border-radius: var(--r-card); --bs-accordion-inner-border-radius: calc(var(--r-card) - 1px); }
.input-group-text { background: var(--surface-2); border-color: var(--line); color: var(--muted); border-radius: var(--r-field); }
code { color: var(--flame-text); }

/* 14 ── Feed ───────────────────────────────────────────────────────────── */
.appbar-me { padding: 0; }
.appbar-me .avatar { width: 30px; height: 30px; font-size: 0.8rem; box-shadow: 0 0 0 2px var(--ink); }
.appbar-me.active .avatar { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--flame); }

.composer-start { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r-card);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 1rem; text-align: left; }
.composer-start > span:nth-child(2) { flex: 1; }
.composer-start:hover { border-color: var(--muted); }
.composer-start-icons { display: flex; gap: 14px; font-size: 1.2rem; color: var(--flame-text); }

.fpost { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 16px 10px; }
.fpost-title { font-size: 1.25rem; margin: 12px 0 4px; letter-spacing: -0.015em; }
.fpost-title a { color: var(--text); text-decoration: none; }
.fpost-title a:hover { text-decoration: underline; }
.fpost-body { margin: 0 0 4px; max-width: 62ch; }
.fmedia { display: grid; gap: 3px; margin: 12px -16px 0; overflow: hidden; background: var(--surface-2); }
.fmedia-item { display: block; padding: 0; border: 0; background: var(--surface-2); cursor: zoom-in; overflow: hidden; aspect-ratio: 1; }
.fmedia-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-1 .fmedia-item { aspect-ratio: auto; max-height: 620px; }
.fm-2 { grid-template-columns: 1fr 1fr; }
.fm-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.fm-3 .fmedia-item:first-child { grid-row: span 2; aspect-ratio: auto; }
.fm-4 { grid-template-columns: 1fr 1fr; }
.fvideo { margin: 12px -16px 0; background: #000; display: grid; place-items: center; }
.fvideo video { display: block; width: 100%; height: auto; max-height: 640px; background: #000; }
@media (min-width: 576px) {
  .fmedia, .fvideo { margin: 12px 0 0; border-radius: 14px; }
}

.fpost-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rx { position: relative; }
.rx-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.45rem 0.95rem 0.45rem 0.8rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; color: var(--text); font-weight: 700; }
.rx-btn:hover { background: var(--surface-2); }
.rx-btn.on { border-color: var(--flame); background: var(--flame-soft); }
.rx-mine { font-size: 1.1rem; line-height: 1; }
.rx-btn .bi-heart { color: var(--muted); }
.rx-pick { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(10, 14, 12, 0.18); }
.rx-pick[hidden] { display: none; }
.rx-opt { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; transition: transform 0.12s; }
.rx-opt:hover, .rx-opt:focus-visible { transform: scale(1.2); background: var(--surface-2); }
.rx-opt.on { background: var(--flame-soft); }
.rx-sum { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.rx-icons { letter-spacing: -2px; }
.rx-btn.pop { animation: pop 0.35s ease-out; }

.fpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fpicks:empty { display: none; }
.fpick { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); border: 1px solid var(--line); }
.fpick img, .fpick video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fpick-video { grid-column: 1 / -1; aspect-ratio: 16 / 9; background: #000; }
.fpick-video video { object-fit: contain; }
.fpick-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(27, 32, 30, 0.75); color: #fff; display: grid; place-items: center; }
.fpick-meter { position: absolute; left: 10px; right: 46px; top: 14px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.3); overflow: hidden; }
.fpick-meter span { display: block; height: 100%; width: 0; background: var(--flame); transition: width .2s; }
.fpick-tag { position: absolute; left: 6px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(27, 32, 30, 0.75); color: #fff; font-size: 0.75rem; font-weight: 600; }
.fpick.busy::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23D98A0B' stroke-width='3' stroke-dasharray='40 20'/%3E%3C/svg%3E") center / 28px no-repeat; }

.lightbox .modal-content { background: rgba(10, 12, 11, 0.96); display: grid; place-items: center; border-radius: 0; }
.lightbox .btn-close { position: absolute; top: calc(16px + var(--safe-t)); right: 16px; z-index: 3; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 56px 8px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.4rem; z-index: 2; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-count { position: absolute; bottom: calc(18px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #C9D3CD; font-size: 0.875rem; }

.mini-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; display: block; }
.mini-thumb-text { display: grid; place-items: center; background: var(--flame-soft); color: var(--flame-text); font-size: 1.2rem; }
.mini-thumb-wrap { position: relative; flex-shrink: 0; }
.mini-thumb-wrap i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.4rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.queue-media { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.queue-media img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.queue-media video { width: 260px; max-width: 100%; border-radius: 12px; background: #000; }

/* 13 ── Motion & print ────────────────────────────────────────────────── */
@keyframes breathe { 0%, 100% { transform: scale(0.82); opacity: 0.75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .appbar, .tabbar, .no-print, .toast-container, .fab { display: none !important; }
  .shell { margin: 0 !important; } .main { padding: 0 !important; max-width: none !important; }
  body { background: #fff !important; }
  .qr-card { break-inside: avoid; border-color: #999; }
}

/* Feed: choosing which 30 seconds of a long video to keep */
.fpick-trim { grid-column: 1 / -1; padding: 12px 14px; border: 1.5px solid var(--flame); border-radius: 12px; background: var(--flame-soft); }
.fpick-trim .form-label { font-weight: 700; }
.form-range::-webkit-slider-thumb { background: var(--flame-deep); }
.form-range::-moz-range-thumb { background: var(--flame-deep); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.35); }

/* Moderation → Storage */
:root { --chart-bar: #C9800A; --status-good: #2E7D4F; --status-warning: #B26A00; --status-critical: #C0392B; }
[data-bs-theme="dark"] { --status-good: #6FCF97; --status-warning: #F2B33D; --status-critical: #FF8A7A; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.875rem; }
.status-good { color: var(--status-good); } .status-warning { color: var(--status-warning); } .status-critical { color: var(--status-critical); }
.storage-big { margin: 10px 0 8px; color: var(--muted); }
.storage-big b { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin-right: 4px; }
.meter-lg { height: 12px; }
.meter-good span { background: var(--status-good); } .meter-warning span { background: var(--status-warning); } .meter-critical span { background: var(--status-critical); }
.storage-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 12px; margin-top: 16px; }
.storage-split div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.storage-split span { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.storage-split b { font-size: 1.25rem; font-weight: 800; }
.storage-split small { color: var(--muted); }

.wchart { position: relative; padding-top: 22px; }
.wchart-top { position: absolute; top: 0; left: 0; font-size: 0.75rem; color: var(--muted); }
.wchart-bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; height: 160px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--muted); }
.wbar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.wbar span { display: block; width: min(24px, 60%); background: var(--chart-bar); border-radius: 4px 4px 0 0; }
.wbar em { position: absolute; bottom: calc(100% + 4px); font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.wbar:has(span[style*="height:100%"]) em { bottom: auto; top: -20px; }
.wbar:hover, .wbar:focus-visible { background: var(--surface-2); }
.wbar:hover::after, .wbar:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3;
  white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 0.8125rem; font-weight: 600; box-shadow: 0 6px 18px rgba(10,14,12,.25); }
.wbar:first-child:hover::after, .wbar:first-child:focus-visible::after, .wbar:nth-child(2):hover::after, .wbar:nth-child(2):focus-visible::after { left: 0; transform: none; }
.wbar:nth-last-child(-n+2):hover::after, .wbar:nth-last-child(-n+2):focus-visible::after { left: auto; right: 0; transform: none; }
.wchart-x { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 6px; }

/* Email code */
.otp-input { text-align: center; font-size: 2rem; font-weight: 700; letter-spacing: 0.45em; padding-left: 0.45em; font-variant-numeric: tabular-nums; }
.otp-input::placeholder { letter-spacing: 0.45em; color: var(--line); }
.otp-help { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.otp-help summary { cursor: pointer; }

/* Moderation → Activity log */
.log-day { padding: 10px 16px; font-size: 0.8125rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.log-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.log-emoji { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.log-text { flex: 1; min-width: 0; }
.log-sum { color: var(--text); font-size: 0.9375rem; overflow-wrap: anywhere; }
.log-why { color: var(--muted); font-size: 0.875rem; }
.log-row time { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.notice > span { flex: 1; }
