/* openQT compiled design system - generated from resources/css tokens. */

/* --- resources/css/tokens/colors.css --- */
/* Design tokens — colors ("말씀이 자라는 정원" concept). Edit palette here only. */
:root {
  --color-bg: #FAF7F0;
  --color-surface: #FFFFFF;
  --color-text: #2B2B26;
  --color-text-sub: #8A8578;
  --color-accent-nature: #5C7457;   /* growth / leaves */
  --color-accent-warm: #B5652C;     /* soil / warmth */
  --color-accent-spirit: #3D4F66;   /* sky / spirit */
  --color-line: #E7E1D6;
  --color-danger: #A23B2C;
}


/* --- resources/css/tokens/typography.css --- */
/* Design tokens — typography. Per-language body font can override --font-body. */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Pretendard', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.6rem;
  --text-2xl: 2.1rem;
  --leading-relaxed: 1.75;
}

/* Language-specific font overrides (extend as more languages are enabled). */
[lang="ja"] { --font-body: 'Noto Sans JP', system-ui, sans-serif; }
[lang="zh-CN"] { --font-body: 'Noto Sans SC', system-ui, sans-serif; }
[lang="ru"] { --font-body: 'PT Sans', system-ui, sans-serif; }


/* --- resources/css/tokens/spacing.css --- */
/* Design tokens — spacing, radius, shadow. */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow-soft: 0 6px 24px rgba(43, 43, 38, 0.06);
  --shadow-card: 0 2px 10px rgba(43, 43, 38, 0.05);
}


/* --- resources/css/tokens/motion.css --- */
/* Design tokens — motion (restrained, gentle). */
:root {
  --transition-gentle: 600ms ease-in-out;
  --transition-quick: 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-gentle: 0ms;
    --transition-quick: 0ms;
  }
  * { animation: none !important; }
}


/* --- resources/css/components/components.css --- */
/* Component classes built on the design tokens. No hardcoded values. */

[x-cloak] { display: none !important; }

/* Honeypot spam-trap field: off-screen (not display:none) so simple bots still fill it. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.qt-app {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: var(--leading-relaxed);
}

.qt-display { font-family: var(--font-display); }
.qt-muted { color: var(--color-text-sub); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-quick), background var(--transition-quick);
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--color-accent-spirit); outline-offset: 2px; }
.btn-primary { background: var(--color-accent-nature); color: #fff; }
.btn-primary:hover { background: #4d6349; }
.btn-warm { background: var(--color-accent-warm); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--color-line); color: var(--color-text); }
.btn-ghost:hover { background: #fff; }

/* Cards — hand-letter feel */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}

.letter-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-8);
}

/* Garden timeline */
.timeline { position: relative; padding-left: var(--space-8); }
.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--color-accent-nature), var(--color-line));
}
.timeline-node { position: relative; margin-bottom: var(--space-8); }
.timeline-node::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent-nature);
  box-shadow: 0 0 0 4px var(--color-bg);
}

/* Forms */
.field {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--text-base);
}
.field:focus-visible { outline: 3px solid var(--color-accent-spirit); outline-offset: 1px; }
.label { display: block; font-weight: 600; margin-bottom: var(--space-2); }

/* AI companion bubble */
.companion {
  background: linear-gradient(180deg, #F3F5EE, var(--color-surface));
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.companion-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent-nature);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}

.alert { border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.alert-danger { background: #F6E7E4; color: var(--color-danger); border: 1px solid #E4C8C2; }
.alert-info { background: #EEF1F5; color: var(--color-accent-spirit); border: 1px solid #D8DFE8; }

/* Large on/off toggle switch — for choices too easy to skip as a checkbox
   (AI Coach opt-in, public/private). Default (off) state uses the line
   color so it reads as neutral/inactive rather than "unanswered". */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.toggle-row-label { font-weight: 600; }
.toggle-row-hint { color: var(--color-text-sub); font-size: 0.875rem; margin-top: 2px; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px; height: 30px;
  flex-shrink: 0;
}
.toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle-switch-track {
  position: absolute; inset: 0;
  background: var(--color-line);
  border-radius: 999px;
  transition: background var(--motion-fast, 0.15s) ease;
}
.toggle-switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform var(--motion-fast, 0.15s) ease;
}
.toggle-switch input:checked + .toggle-switch-track { background: var(--color-accent-nature); }
.toggle-switch input:checked + .toggle-switch-track .toggle-switch-thumb { transform: translateX(22px); }
.toggle-switch input:focus-visible + .toggle-switch-track { outline: 3px solid var(--color-accent-spirit); outline-offset: 2px; }

/* QT coach mascot — a small animated sprout character next to the writing
   space, tied to the site's "정원" (garden) metaphor. Purely decorative. */
.coach-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.coach-avatar-svg { width: 120px; height: 120px; }
.coach-avatar-caption {
  font-size: 0.8rem;
  color: var(--color-text-sub);
  font-weight: 600;
}

.coach-avatar-glow {
  fill: var(--color-accent-warm);
  opacity: 0.12;
  animation: coach-avatar-pulse 3.2s ease-in-out infinite;
  transform-origin: 80px 86px;
}
.coach-avatar-soil { fill: var(--color-line); }

/* Primary/accent colors are custom properties (default: barnabas' green/green)
   so each persona partial can override --avatar-color/--avatar-accent inline
   without needing its own copy of every rule — same shapes, different mood. */
.coach-avatar-body { fill: var(--avatar-color, var(--color-accent-nature)); }
.coach-avatar-leaf-fill { fill: var(--avatar-color, var(--color-accent-nature)); }
.coach-avatar-stem { stroke: var(--avatar-color, var(--color-accent-nature)); stroke-width: 3; }
.coach-avatar-eyes { fill: var(--color-text); animation: coach-avatar-blink 5s ease-in-out infinite; transform-origin: 80px 94px; }
.coach-avatar-smile { stroke: var(--color-text); stroke-width: 2.4; }
.coach-avatar-arm-left path, .coach-avatar-arm-right path { stroke: var(--avatar-color, var(--color-accent-nature)); stroke-width: 4; }
.coach-avatar-accent-fill { fill: var(--avatar-accent, var(--color-accent-warm)); }
.coach-avatar-accent-stroke { stroke: var(--avatar-accent, var(--color-accent-warm)); stroke-width: 3; }

.coach-avatar-float {
  animation: coach-avatar-bob 4s ease-in-out infinite;
  transform-origin: 80px 128px;
}
/* Pointer-driven whole-body tilt (mouse hover or touch-drag, same code path
   for both) — layered on top of the always-running idle animations above,
   not replacing them, so movement never depends on pointer interaction. */
.coach-avatar-tilt {
  transform-origin: 80px 128px;
  transition: transform 0.25s ease-out;
}
.coach-avatar { cursor: pointer; touch-action: pan-y; }
.coach-avatar-sprout {
  animation: coach-avatar-sway 3.6s ease-in-out infinite;
  transform-origin: 80px 60px;
}
.coach-avatar-arm-left {
  animation: coach-avatar-wave-left 2.8s ease-in-out infinite;
  transform-origin: 60px 96px;
}
.coach-avatar-arm-right {
  animation: coach-avatar-wave-right 2.8s ease-in-out infinite;
  animation-delay: 0.3s;
  transform-origin: 100px 96px;
}

@keyframes coach-avatar-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes coach-avatar-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes coach-avatar-wave-left {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}
@keyframes coach-avatar-wave-right {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg); }
}
@keyframes coach-avatar-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.15); }
}
@keyframes coach-avatar-pulse {
  0%, 100% { transform: scale(1); opacity: 0.12; }
  50% { transform: scale(1.08); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .coach-avatar-glow, .coach-avatar-eyes, .coach-avatar-float,
  .coach-avatar-sprout, .coach-avatar-arm-left, .coach-avatar-arm-right {
    animation: none;
  }
}

/* Full-text verse picker — a native <select> truncates long verse text with
   no cross-browser fix, so verse choice is a custom listbox instead: every
   row wraps in full, nothing is cut off. */
.verse-picker { position: relative; }
.verse-picker-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.verse-picker-trigger-placeholder { color: var(--color-text-sub); }
.verse-picker-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.verse-picker-item {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  border-bottom: 1px solid var(--color-line);
}
.verse-picker-item:last-child { border-bottom: none; }
.verse-picker-item:hover, .verse-picker-item.is-selected { background: var(--color-bg); }
.verse-picker-ref { font-weight: 600; font-size: 0.9rem; }
.verse-picker-text {
  color: var(--color-text-sub);
  font-size: 0.85rem;
  white-space: normal;
  word-break: keep-all;
  margin-top: 2px;
}

/* Verse-selection mode tabs (list vs custom) on the QT form */
.verse-mode-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.verse-mode-tab {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  background: var(--color-surface);
}
.verse-mode-tab.is-active { background: var(--color-accent-nature); color: #fff; border-color: var(--color-accent-nature); }

/* Secondary options section — visually set apart from the core QT fields */
.qt-options-section {
  border-top: 1px dashed var(--color-line);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
}
.qt-options-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-sub);
  margin-bottom: var(--space-3);
}


/* --- resources/css/components/hero.css --- */
/* Home hero — animated garden background + floating icons. Motion respects
   prefers-reduced-motion via motion.css (disables animations). */

/* Wordmark: "Open" in ink, "QT" emphasized in leaf green + heavier weight. */
.brand-word {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-text);
  white-space: nowrap;
}
.brand-qt {
  color: var(--color-accent-nature);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: var(--space-16) var(--space-6) var(--space-12);
  background:
    radial-gradient(120% 90% at 50% -10%, #FFFDF8 0%, var(--color-bg) 55%, #F1EEE4 100%);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

/* Soft rolling hills at the base of the hero. */
.hero-hills {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
}

/* Big logo lockup */
.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 2;
}
.hero-logo .brand-word {
  font-size: clamp(3.2rem, 10vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.hero-mark {
  animation: hero-bob 5s ease-in-out infinite;
}

.hero-content { position: relative; z-index: 2; }

/* Floating decorative icons */
.floaty {
  position: absolute;
  opacity: 0.5;
  animation: floaty-rise var(--dur, 9s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
  z-index: 1;
}
.floaty svg { display: block; }

@keyframes floaty-rise {
  0%   { transform: translateY(8px) rotate(-6deg); opacity: 0.25; }
  50%  { transform: translateY(-14px) rotate(6deg); opacity: 0.6; }
  100% { transform: translateY(8px) rotate(-6deg); opacity: 0.25; }
}

@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.9); }
  50%      { opacity: 0.7; transform: scale(1.05); }
}
.twinkle { animation: twinkle 4s ease-in-out infinite; }


/* --- resources/css/components/social.css --- */
/* Social-feed components. Built entirely on the existing tokens — no new
   palette, no hardcoded values. Extends components.css, does not replace it. */

/* ---------- Feed navigation ---------- */

.feed-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-nav::-webkit-scrollbar { display: none; }

.feed-nav-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--color-text-sub);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition-quick), color var(--transition-quick);
}
.feed-nav-item:hover { background: var(--color-bg); color: var(--color-text); }
.feed-nav-item[aria-current="page"] {
  background: var(--color-accent-nature);
  color: #fff;
}
.feed-nav-item svg { width: 18px; height: 18px; flex: none; }

/* Mobile bottom bar — the social-first entry point on small screens. */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: var(--space-2) var(--space-2);
  background: var(--color-surface);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -2px 12px rgba(43, 43, 38, 0.05);
}
.mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--color-text-sub);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.mobile-bar-item[aria-current="page"] { color: var(--color-accent-nature); }
.mobile-bar-item svg { width: 20px; height: 20px; }

@media (max-width: 767px) {
  .mobile-bar { display: flex; }
  body.qt-app { padding-bottom: 68px; }
}

/* Unread badge on the notification bell. */
.nav-badge {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--color-accent-warm);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ---------- Post cards ---------- */

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.post-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
}

.post-body { padding: 0 var(--space-6) var(--space-4); }

.post-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-top: 1px solid var(--color-line);
}

/* Verse card — the signature "Today's verse" visual. */
.verse-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border: 1px solid var(--color-line);
  overflow: hidden;
}
.verse-card .verse-ref {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.verse-card .verse-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.verse-card-nature { background: linear-gradient(160deg, #EEF3EA, var(--color-surface)); }
.verse-card-warm   { background: linear-gradient(160deg, #F7EDE3, var(--color-surface)); }
.verse-card-spirit { background: linear-gradient(160deg, #E9EDF3, var(--color-surface)); }

/* Reels / shorts keep a portrait frame. */
.reel-frame {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-bg);
}

/* ---------- Reactions ---------- */

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: transform var(--transition-quick), background var(--transition-quick);
}
.reaction-btn:hover { transform: translateY(-1px); background: var(--color-bg); }
.reaction-btn.is-active {
  background: var(--color-accent-nature);
  border-color: var(--color-accent-nature);
  color: #fff;
}
.reaction-btn:focus-visible { outline: 3px solid var(--color-accent-spirit); outline-offset: 2px; }

/* ---------- Hashtags ---------- */

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  color: var(--color-accent-spirit);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
}
.tag-chip:hover { background: var(--color-surface); }
.tag-chip.is-active {
  background: var(--color-accent-spirit);
  border-color: var(--color-accent-spirit);
  color: #fff;
}

/* ---------- Avatars ---------- */

.avatar-sm, .avatar-md, .avatar-lg {
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-accent-nature);
  flex: none;
}
.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-md { width: 44px; height: 44px; font-size: var(--text-sm); }
.avatar-lg { width: 84px; height: 84px; font-size: var(--text-lg); }

/* ---------- Progress / streaks ---------- */

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-nature), var(--color-accent-warm));
  transition: width var(--transition-slow, 400ms) ease;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: var(--color-accent-warm);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
}

/* Day grid used by challenge check-ins. */
.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: var(--space-2);
}
.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-sub);
  background: var(--color-surface);
}
.day-cell.is-done {
  background: var(--color-accent-nature);
  border-color: var(--color-accent-nature);
  color: #fff;
}
.day-cell.is-today {
  border-color: var(--color-accent-warm);
  border-width: 2px;
  color: var(--color-accent-warm);
}

/* ---------- Badges & ranking ---------- */

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
}
.badge-bronze { border-color: #D8B18C; }
.badge-silver { border-color: #C2C6CC; }
.badge-gold   { border-color: #D9BC6A; }

.rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
}
.rank-row:last-child { border-bottom: 0; }
.rank-number {
  width: 26px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text-sub);
  text-align: center;
}
.rank-row:nth-child(1) .rank-number { color: var(--color-accent-warm); }

/* ---------- Coach ---------- */

.coach-section {
  border-left: 3px solid var(--color-accent-nature);
  padding-left: var(--space-4);
  margin-bottom: var(--space-6);
}
.coach-question {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.chat-bubble {
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  max-width: 42rem;
}
.chat-bubble-ai {
  background: linear-gradient(180deg, #F3F5EE, var(--color-surface));
  border: 1px solid var(--color-line);
}
.chat-bubble-user {
  background: var(--color-accent-spirit);
  color: #fff;
  margin-left: auto;
}

/* ---------- Prayer ---------- */

.prayer-card {
  border-left: 3px solid var(--color-accent-spirit);
  background: var(--color-surface);
  border-radius: var(--radius);
  border-top: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  padding: var(--space-6);
}
.prayer-card.is-answered { border-left-color: var(--color-accent-nature); }

/* ---------- Misc ---------- */

.stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-sub);
}

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-sub);
}

.alert-success {
  background: #EDF3EA;
  color: var(--color-accent-nature);
  border: 1px solid #D3E0CC;
}

/* ---------- Admin: account state pills ---------- */

.state-pill {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.state-active {
  border-color: var(--color-accent-nature);
  color: var(--color-accent-nature);
  background: #EDF3EA;
}
.state-unverified {
  border-color: var(--color-line);
  color: var(--color-text-sub);
}
.state-dormant {
  border-color: var(--color-accent-spirit);
  color: var(--color-accent-spirit);
  background: #EEF1F5;
}
.state-suspended,
.state-deleted {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: #F6E7E4;
}

/* ---------- Email verification screen ---------- */

.verify-mark {
  width: 96px;
  height: 96px;
}
.verify-mark svg { width: 100%; height: 100%; }

.verify-email-chip {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  font-weight: 600;
  word-break: break-all;
}

.verify-tips {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
}

/* Step indicator: signup -> verify -> start */
.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text-sub);
  font-size: 0.7rem;
  font-weight: 700;
  flex: none;
}
.step-dot.is-done {
  background: var(--color-accent-nature);
  border-color: var(--color-accent-nature);
  color: #fff;
}
.step-dot.is-current {
  border-color: var(--color-accent-warm);
  border-width: 2px;
  color: var(--color-accent-warm);
}
.step-line {
  width: 20px;
  height: 1px;
  background: var(--color-line);
  flex: none;
}

@media (max-width: 480px) {
  /* Keep the step rail on one line on small screens. */
  .step-line { width: 10px; }
}

/* Long-form admin-authored copy (privacy / terms / about). */
.prose-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin: var(--space-8) 0 var(--space-3);
}
.prose-content h3 {
  font-weight: 600;
  margin: var(--space-6) 0 var(--space-2);
}
.prose-content p { margin-bottom: var(--space-4); }
.prose-content ul, .prose-content ol {
  margin: 0 0 var(--space-4) var(--space-6);
  list-style: disc;
}
.prose-content ol { list-style: decimal; }
.prose-content li { margin-bottom: var(--space-2); }
.prose-content a { color: var(--color-accent-spirit); text-decoration: underline; }
.prose-content blockquote {
  border-left: 3px solid var(--color-line);
  padding-left: var(--space-4);
  color: var(--color-text-sub);
  margin-bottom: var(--space-4);
}
.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}
.prose-content th, .prose-content td {
  border: 1px solid var(--color-line);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.prose-content hr { border: 0; border-top: 1px solid var(--color-line); margin: var(--space-8) 0; }
.prose-content > *:first-child { margin-top: 0; }

/* ---------- Membership / billing ---------- */

.current-plan-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: linear-gradient(135deg, #EDF3EA, var(--color-surface));
  border: 2px solid var(--color-accent-nature);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
}
.current-plan-icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-accent-nature);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
}

.plan-card-current {
  border: 2px solid var(--color-accent-nature) !important;
  box-shadow: 0 0 0 4px rgba(92, 116, 87, 0.12), var(--shadow-soft);
}
.plan-current-badge {
  position: absolute;
  top: -10px;
  right: var(--space-4);
  background: var(--color-accent-nature);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px var(--space-3);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}

.custom-amount-prefix {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-sub);
  font-weight: 600;
  pointer-events: none;
}
.custom-amount-input { padding-left: calc(var(--space-3) + 14px); }

.giving-notice {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  line-height: var(--leading-relaxed);
}

/* Screen-reader-only helper for icon-only controls. */
.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;
}

