:root {
  --page-bg: #F1EBDD;
  --void: #FBF8F2;
  --surface: #FFFFFF;
  --surface-2: #F5EFE2;
  --surface-3: #ECE2CC;
  --line: rgba(38, 28, 14, 0.10);
  --line-strong: rgba(38, 28, 14, 0.18);
  --text: #2B2013;
  --text-muted: #746650;
  --text-faint: #A99C84;
  --flame: #D68A22;
  --flame-bright: #B96D14;
  --flame-pale: #F6D89B;
  --flame-dim: rgba(214, 138, 34, 0.14);
  --ember: #B85C36;
  --violet: #6E5FC4;
  --violet-pale: #E7E2F7;
  --sage: #4F7A6B;
  --sage-pale: #DCE8E3;
  --on-flame: #FFF7EA;
  --violet-text: #4A3F87;
  --radius-lg: 22px;
  --radius-md: 16px;
}

/* ===== Тема: Ночная — та самая первая тёмная версия ===== */
[data-theme="night"] {
  --page-bg: #0B0712;
  --void: #150E1F;
  --surface: #1F1730;
  --surface-2: #2A2140;
  --surface-3: #362A50;
  --line: rgba(242, 237, 229, 0.09);
  --line-strong: rgba(242, 237, 229, 0.16);
  --text: #F3EEE5;
  --text-muted: #A69CBD;
  --text-faint: #6C6289;
  --flame: #E8A94D;
  --flame-bright: #F7CE8E;
  --flame-pale: #8A6A2E;
  --flame-dim: rgba(232, 169, 77, 0.16);
  --ember: #CC7C55;
  --violet: #9C8FE0;
  --violet-pale: #2E2350;
  --sage: #7FB09E;
  --sage-pale: #1E332C;
  --on-flame: #2A1704;
  --violet-text: #D8CCF5;
}

/* ===== Тема: Серая (светлая, нейтральная) ===== */
[data-theme="gray"] {
  --page-bg: #F0EFED;
  --void: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F5F4F2;
  --surface-3: #E8E6E3;
  --line: rgba(40, 38, 35, 0.08);
  --line-strong: rgba(40, 38, 35, 0.16);
  --text: #262421;
  --text-muted: #6B6862;
  --text-faint: #A6A29B;
  --flame: #A8876B;
  --flame-bright: #8A6B52;
  --flame-pale: #E4D9CC;
  --flame-dim: rgba(168, 135, 107, 0.14);
  --ember: #94A38C;
  --violet: #8B7FA3;
  --violet-pale: #EAE7F0;
  --sage: #7E9C8E;
  --sage-pale: #E1EAE5;
  --on-flame: #FFFFFF;
  --violet-text: #4F4568;
}

/* ===== Тема: Чёрно-белая ===== */
[data-theme="bw"] {
  --page-bg: #FAFAFA;
  --void: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F0F0F0;
  --surface-3: #E2E2E2;
  --line: rgba(0, 0, 0, 0.10);
  --line-strong: rgba(0, 0, 0, 0.22);
  --text: #111111;
  --text-muted: #555555;
  --text-faint: #999999;
  --flame: #222222;
  --flame-bright: #000000;
  --flame-pale: #BBBBBB;
  --flame-dim: rgba(0, 0, 0, 0.08);
  --ember: #444444;
  --violet: #333333;
  --violet-pale: #EAEAEA;
  --sage: #555555;
  --sage-pale: #EFEFEF;
  --on-flame: #FFFFFF;
  --violet-text: #222222;
}

/* ===== Тема: Розовая ===== */
[data-theme="pink"] {
  --page-bg: #FAF0F2;
  --void: #FFFBFC;
  --surface: #FFFFFF;
  --surface-2: #FDF1F3;
  --surface-3: #F7E1E6;
  --line: rgba(190, 60, 90, 0.10);
  --line-strong: rgba(190, 60, 90, 0.20);
  --text: #3A1F26;
  --text-muted: #8A5B66;
  --text-faint: #C093A0;
  --flame: #E0637E;
  --flame-bright: #C94A67;
  --flame-pale: #F6C9D3;
  --flame-dim: rgba(224, 99, 126, 0.14);
  --ember: #E08A5E;
  --violet: #9B6FC7;
  --violet-pale: #ECE1F7;
  --sage: #6FA593;
  --sage-pale: #DDEDE7;
  --on-flame: #FFF5F7;
  --violet-text: #5A3D7A;
}

/* ===== Тема: Голубая ===== */
[data-theme="blue"] {
  --page-bg: #EAF3FA;
  --void: #FBFDFF;
  --surface: #FFFFFF;
  --surface-2: #F0F7FC;
  --surface-3: #DCEBF5;
  --line: rgba(30, 80, 130, 0.10);
  --line-strong: rgba(30, 80, 130, 0.18);
  --text: #16324A;
  --text-muted: #4E7392;
  --text-faint: #93B2C9;
  --flame: #3B8FD1;
  --flame-bright: #2A72AE;
  --flame-pale: #BFE0F5;
  --flame-dim: rgba(59, 143, 209, 0.14);
  --ember: #4FAEA0;
  --violet: #8B7FC7;
  --violet-pale: #E7E2F7;
  --sage: #4F9E8C;
  --sage-pale: #D9EFEA;
  --on-flame: #FFFFFF;
  --violet-text: #4A3F87;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--void);
  padding: 24px 18px 40px;
  box-shadow: 0 0 40px rgba(38, 28, 14, 0.06);
}

.hidden { display: none !important; }

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.burger {
  width: 38px; height: 38px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line-strong); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; position: relative;
}
.burger span { width: 16px; height: 2px; background: var(--text-muted); border-radius: 2px; }
.burger.pulse::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--flame); box-shadow: 0 0 0 3px var(--flame-pale);
  animation: pulse-glow 1.8s ease-in-out infinite;
}
.top-right { display: flex; align-items: center; gap: 10px; }
.lang-pill {
  background: var(--surface); border: 1px solid var(--line-strong); padding: 7px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text);
}
.egregore-chip {
  display: flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line-strong); padding: 7px 12px 7px 9px; border-radius: 999px;
  font-size: 11.5px; color: var(--text-muted); max-width: 140px; cursor: pointer;
}
.egregore-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egregore-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, var(--flame-bright), var(--ember) 100%);
  box-shadow: 0 0 0 3px var(--flame-pale);
  animation: pulse-glow 3.2s ease-in-out infinite;
}

.egregore-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 18px; margin-top: 8px; display: flex; gap: 14px; align-items: center;
}
.egregore-orb {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: radial-gradient(circle at 35% 30%, var(--flame-bright), var(--ember) 100%);
}
.egregore-orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--flame-pale); }
.egregore-copy { min-width: 0; }
.egregore-copy .eg-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.egregore-copy .eg-stage { font-family: 'Fraunces', serif; font-style: italic; font-size: 17px; margin: 2px 0 8px; color: var(--text); }
.eg-progress-track { height: 4px; width: 100%; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.eg-progress-fill { height: 100%; width: 0%; background: var(--flame); transition: width .4s ease; }
.eg-numbers { font-size: 11px; color: var(--text-faint); margin-top: 5px; font-family: 'JetBrains Mono', monospace; }

.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; cursor: pointer;
  color: inherit; text-decoration: none;
}
.menu-row.disabled { color: var(--text-faint); cursor: default; font-weight: 600; }
.menu-row.disabled span:last-child { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.menu-row-right { display: flex; align-items: center; gap: 8px; }
.new-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, var(--flame-bright), var(--ember) 100%);
  box-shadow: 0 0 0 3px var(--flame-pale);
  animation: pulse-glow 1.6s ease-in-out infinite;
}

/* ---- Список рекордов в попапе ---- */
.record-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.record-row b { font-family: 'JetBrains Mono', monospace; color: var(--flame-bright); }
.records-thanks { font-size: 13px; color: var(--text-muted); text-align: center; margin: 14px 0 18px; }

/* ---- Большой попап лекции ---- */
.lecture-modal-card { max-height: 90vh; overflow-y: auto; padding-bottom: 30px; }
.lecture-section { margin-bottom: 24px; }
.lecture-section h3 {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 17px;
  color: var(--flame-bright); margin: 0 0 8px;
}
.lecture-section p { font-size: 14px; line-height: 1.75; color: var(--text); margin: 0; }
.lecture-section p strong { color: var(--text); font-weight: 800; }
.lecture-section p u { text-decoration-color: var(--flame); text-underline-offset: 3px; }
.lecture-section p em { font-style: italic; color: var(--text-muted); }

/* ---- Страница GoMantra: аккордеон ---- */
.gm-about { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 20px; text-align: center; }
.accordion { margin-top: 4px; }
.accordion-section { border-bottom: 1px solid var(--line); }
.accordion-section:first-child { border-top: 1px solid var(--line); }
.accordion-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; padding: 16px 2px; cursor: pointer;
  font-size: 15px; font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; text-align: left;
}
.accordion-arrow { color: var(--text-faint); transition: transform .2s ease; font-size: 12px; }
.accordion-section.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.accordion-section.open .accordion-body { max-height: 2000px; }
.accordion-body > div { padding: 4px 2px 22px; }

.gm-stage-heading { text-align: center; margin-bottom: 14px; }
.gm-stage-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 4px; }
.gm-stage-title { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 20px; color: var(--flame-bright); }

.gm-black-square {
  width: 200px; height: 200px; background: #000000; border-radius: 18px;
  margin: 8px auto 16px; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.4);
}
.gm-black-square--small { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 14px; }
.gm-founded { font-size: 12.5px; color: var(--text-faint); text-align: center; }
.gm-story { font-size: 13.5px; line-height: 1.65; color: var(--text-muted); text-align: center; margin: 8px 0 16px; }
.gm-like-btn { display: flex; margin: 0 auto 4px; }

.gm-history-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 18px; margin-bottom: 14px; text-align: center;
}
.gm-history-stage-name { font-family: 'Fraunces', serif; font-style: italic; font-size: 16px; color: var(--flame-bright); margin: 4px 0 6px; }

.gm-hero-stats { display: flex; gap: 10px; margin-bottom: 22px; }
.gm-hero-stats--stacked { flex-direction: column; }
.gm-hero-stat {
  flex: 1; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 16px;
  text-align: center;
}
.gm-hero-stat b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 26px; color: var(--flame-bright); line-height: 1.1; }
.gm-hero-stat span { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }


/* ---- Статистика: горизонтальные бары по категориям ---- */
.gm-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gm-bar-label { flex: 0 0 88px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.gm-bar-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.gm-bar-fill { height: 100%; background: linear-gradient(90deg, var(--ember), var(--flame-bright)); border-radius: 999px; }
.gm-bar-value { flex: 0 0 auto; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text); min-width: 34px; text-align: right; }

/* ---- Статистика: мини-столбики сегодня/вчера/7 дней ---- */
.gm-mini-group { margin-bottom: 22px; }
.gm-mini-label { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.gm-mini-bars { display: flex; gap: 14px; align-items: flex-end; height: 90px; }
.gm-mini-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.gm-mini-bar-track { width: 100%; max-width: 44px; height: 56px; background: var(--surface-3); border-radius: 8px 8px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.gm-mini-bar-fill { width: 100%; background: linear-gradient(180deg, var(--flame-bright), var(--flame)); min-height: 3px; }
.gm-mini-bar-value { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--text); margin-top: 6px; }
.gm-mini-bar-caption { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }

/* ---- Поддержать проект ---- */
.support-intro { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 20px; }
.support-whatsapp-btn { display: block; width: 100%; box-sizing: border-box; text-align: center; text-decoration: none; }

/* ---- Крипто-адреса (тап = скопировать) ---- */
.crypto-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.crypto-row-label { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.crypto-row-address { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-muted); flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crypto-row-copy { font-size: 11px; font-weight: 700; color: var(--flame-bright); flex-shrink: 0; }
.support-alt-note { font-size: 12.5px; line-height: 1.6; color: var(--text-faint); text-align: center; margin: 18px 0 0; }

/* ---- Расписание на день (компактные строки, их 144) ---- */
.schedule-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.schedule-time { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text-faint); width: 42px; flex-shrink: 0; }
.schedule-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-faint); border: 1px solid var(--line-strong);
}
.schedule-dot.live { background: var(--flame); border-color: var(--flame); box-shadow: 0 0 0 3px var(--flame-pale); animation: pulse-glow 1.6s ease-in-out infinite; }
.schedule-row--live .schedule-category { animation: pulse-glow 1.6s ease-in-out infinite; }
.schedule-category { font-size: 13.5px; font-weight: 700; color: var(--text); flex: 1; }
.schedule-row--finished .schedule-dot { border-color: var(--text-faint); color: var(--text-faint); }

.broadcast-status { font-size: 13.5px; color: var(--text-faint); text-align: center; padding: 30px 0; }
.broadcast-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 12px;
}
.broadcast-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.broadcast-from { font-size: 12px; font-weight: 800; color: var(--flame-bright); }
.broadcast-dot { color: var(--text-faint); font-size: 12px; }
.broadcast-date { font-size: 11.5px; color: var(--text-faint); }
.broadcast-text { font-size: 15px; line-height: 1.6; color: var(--text); font-weight: 600; margin-bottom: 14px; white-space: pre-wrap; }
.broadcast-actions { display: flex; gap: 8px; }
.broadcast-like-btn {
  display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-muted);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'JetBrains Mono', monospace;
}
.broadcast-like-btn.liked { border-color: var(--flame); color: var(--flame-bright); background: var(--flame-dim); cursor: default; }
.broadcast-like-icon { font-size: 13px; font-family: initial; }
.broadcast-share-btn { flex: 1; padding: 9px 14px; font-size: 13px; }
.media-intro { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 24px; }
.media-section { margin-bottom: 28px; }
.media-section-heading {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 18px;
  color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.media-icon { font-size: 18px; font-style: normal; }
.media-card {
  border-radius: var(--radius-md); border: 1px solid var(--line-strong); border-left-width: 3px;
  padding: 14px 16px; margin-bottom: 10px; background: var(--surface);
}
.media-card-title { font-weight: 800; font-size: 14.5px; color: var(--text); }
.media-card-subtitle { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin: 2px 0 8px; }
.media-card-body { font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.media-card--flame { border-left-color: var(--flame); }
.media-card--flame .media-card-title { color: var(--flame-bright); }
.media-card--violet { border-left-color: var(--violet); background: var(--violet-pale); }
.media-card--violet .media-card-title { color: var(--violet-text); }
.media-card--sage { border-left-color: var(--sage); background: var(--sage-pale); }
.media-card--sage .media-card-title { color: var(--sage); }
.settings-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-option {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: var(--radius-md); border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text-muted);
}
.theme-option.selected { border-color: var(--flame); color: var(--text); background: var(--flame-dim); }
.theme-swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); }
.theme-swatch--white { background: linear-gradient(135deg, #FBF8F2 50%, #D68A22 50%); }
.theme-swatch--gray { background: linear-gradient(135deg, #F0EFED 50%, #A8876B 50%); }
.theme-swatch--bw { background: linear-gradient(135deg, #FFFFFF 50%, #111111 50%); }
.theme-swatch--night { background: linear-gradient(135deg, #150E1F 50%, #E8A94D 50%); }
.theme-swatch--pink { background: linear-gradient(135deg, #FAF0F2 50%, #E0637E 50%); }
.theme-swatch--blue { background: linear-gradient(135deg, #EAF3FA 50%, #3B8FD1 50%); }

.settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line);
}
.settings-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.info-btn {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-faint); font-size: 11px; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.toggle-switch {
  width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--line-strong); position: relative; cursor: pointer; padding: 0; flex-shrink: 0;
}
.toggle-switch .toggle-knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform .2s ease, background-color .2s ease;
}
.toggle-switch.on { background: var(--violet); border-color: var(--violet); }
.toggle-switch.on .toggle-knob { transform: translateX(18px); background: var(--on-flame); }

/* Плавный переход при смене темы */
body, .app-shell, .hero, .prayer-row, .onboarding-card, .egregore-chip, .lang-pill, .burger,
.gm-stat, .gm-hero-stat, .lecture-card, .stat-strip, .together-section, .theme-option {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* ---- Hero card ---- */
.hero {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 24px 22px 22px; position: relative; overflow: hidden; margin-bottom: 22px;
  box-shadow: 0 2px 14px rgba(38, 28, 14, 0.06);
}
.hero-eyebrow { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; }
.hero-title {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 30px; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0 0 16px; color: var(--text);
}
.timer-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.timer { font-family: 'JetBrains Mono', monospace; font-size: 44px; font-weight: 600; color: var(--flame-bright); }
.timer-label { font-size: 12.5px; color: var(--text-muted); }
.reps-line { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; }
.progress-track { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--ember), var(--flame-bright)); border-radius: 999px; transition: width .4s ease; }
.progress-caption { font-size: 11.5px; color: var(--text-faint); margin-bottom: 20px; }
.hero-actions { display: flex; gap: 10px; }

.btn {
  flex: 1; text-align: center; padding: 13px 14px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700; border: 1px solid transparent; cursor: pointer;
}
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-flame { background: linear-gradient(180deg, var(--flame), var(--flame-bright)); color: var(--on-flame); box-shadow: 0 8px 18px -8px rgba(185, 109, 20, 0.55); }

/* ---- List ---- */
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin: 26px 0 12px 4px; }
.prayer-row {
  display: flex; align-items: center; justify-content: space-between; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(38, 28, 14, 0.04);
}
.prayer-row.finished { opacity: 0.55; box-shadow: none; }
.row-left { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.status-dot.live { background: var(--flame); box-shadow: 0 0 0 4px var(--flame-pale); animation: pulse-glow 3.2s ease-in-out infinite; }
.status-check { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--text-faint); color: var(--text-faint); font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row-title { font-size: 14.5px; font-weight: 700; }
.row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.row-right { font-size: 12.5px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ---- Живой тост (не модалка) — уведомление "рекорд побит" / "почти рядом" ---- */
.live-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  max-width: 420px;
  width: calc(100% - 40px);
  background: rgba(20, 14, 5, 0.78);
  backdrop-filter: blur(6px);
  color: #FFF7EA;
  padding: 14px 18px;
  border-radius: 14px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}
.live-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  cursor: pointer;
}
.footer-link { text-align: center; margin-top: 26px; font-size: 13px; color: var(--text-faint); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---- Onboarding overlays ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 14, 5, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s ease; z-index: 50;
}
.overlay.visible { opacity: 1; }
.onboarding-card {
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 26px 22px 30px;
  max-width: 480px; width: 100%; transform: translateY(16px); transition: transform .25s ease;
}
.overlay.visible .onboarding-card { transform: translateY(0); }
.onboarding-card.small { border-radius: 22px; margin: 0 18px 24px; }
.language-sheet-card { max-height: 75vh; overflow-y: auto; padding-top: 0 !important; }
.language-sheet-card .detail-top {
  position: sticky; top: 0; z-index: 5; background: var(--surface);
  padding: 22px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.language-row.disabled { color: var(--text-faint); cursor: default; }
.language-row.disabled span:last-child { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.lang-row { display: flex; gap: 8px; margin-bottom: 18px; }
.lang-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.lang-chip.active { border-color: var(--flame); color: var(--flame-bright); background: var(--flame-dim); }
.onboarding-card h2 { font-family: 'Fraunces', serif; font-size: 22px; margin: 0 0 12px; }
.onboarding-card p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 22px; }
.wording-options { display: flex; gap: 10px; margin-top: 14px; }

/* ---- Prayer detail modal ---- */
.modal-card { max-height: 88vh; overflow-y: auto; overflow-x: hidden; border-radius: 22px 22px 0 0; padding-top: 0 !important; }
.modal-card .detail-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  padding: 26px 0 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 12px -8px rgba(38, 28, 14, 0.10);
}
.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px; cursor: pointer;
}
.detail-heading { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; }
.detail-center { text-align: center; padding: 26px 0 22px; }
.detail-glow {
  width: 110px; height: 110px; margin: 0 auto 16px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 38% 32%, var(--flame-bright), var(--ember) 70%);
}
.detail-glow::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--flame-pale); }
.detail-glow::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1px solid var(--line-strong); }
.detail-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 22px; text-transform: uppercase; margin-bottom: 8px; }
.detail-timer { font-family: 'JetBrains Mono', monospace; font-size: 42px; font-weight: 600; color: var(--flame-bright); line-height: 1; margin-bottom: 4px; }
.detail-timer-label { font-size: 12px; color: var(--text-muted); }

.stat-strip { display: flex; justify-content: space-around; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 14px 8px; margin-bottom: 16px; }
.stat-strip .stat { text-align: center; }
.stat b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--text); }
.stat span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }

.lecture-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.lecture-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lecture-label { font-weight: 700; font-size: 14px; }
.update-badge { font-size: 10px; font-weight: 700; color: var(--on-flame); background: var(--flame-bright); padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }

.lecture-card { cursor: pointer; }
.lecture-teaser { font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.lecture-read-link { font-size: 12px; font-weight: 700; color: var(--flame-bright); margin-top: 8px; }

.share-row { display: flex; gap: 10px; margin-bottom: 16px; }
.not-live-note { font-size: 13px; color: var(--text-muted); text-align: center; padding: 10px 4px 4px; }

/* ---- Совместное чтение (локально, не по сети) ---- */
.together-section { margin-bottom: 14px; }
.together-expanded-card {
  background: var(--violet-pale); border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.together-label { font-size: 12.5px; font-weight: 700; color: var(--violet-text); margin-bottom: 10px; }
.together-options-row { display: flex; gap: 8px; }
.together-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; text-align: center;
  padding: 13px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer;
  box-sizing: border-box;
}
.together-toggle::before { content: "👥"; font-size: 14px; }
.together-toggle.selected { background: var(--violet); color: var(--on-flame); border-color: var(--violet); }
.together-chip {
  flex: 1; text-align: center; padding: 9px 6px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--violet-text); cursor: pointer;
}
.together-chip.selected { background: var(--violet); color: var(--on-flame); border-color: var(--violet); }
.together-chip.disabled { opacity: 0.4; cursor: default; }
.together-note { font-size: 11.5px; color: var(--violet); margin-top: 8px; }
.multiplier-hint {
  font-size: 12px; color: var(--flame-bright); text-align: center;
  margin: -6px 0 14px; font-weight: 700;
}

/* ---- Как читать молитвы (кнопка-триггер + чекбокс внутри отдельного модуля) ---- */
#htr-trigger-btn { width: 100%; box-sizing: border-box; margin-bottom: 16px; }
.checkbox-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 14px; cursor: pointer;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--flame); cursor: pointer; flex-shrink: 0; }

.sheet-label { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; text-align: center; }
.reps-options { display: flex; gap: 8px; margin-bottom: 14px; }
.rep-pill { flex: 1; text-align: center; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line-strong); font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text-muted); background: var(--surface); cursor: pointer; }
.rep-pill.selected { background: var(--flame-dim); border-color: var(--flame); color: var(--flame-bright); font-weight: 700; }
.sheet-actions { display: flex; gap: 10px; align-items: center; }
.decline-link { font-size: 12.5px; color: var(--text-faint); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@keyframes pulse-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot.live, .burger.pulse::after { animation: none; }
}
