/* =====================================================================
   Книга памяти — стили сайта (стиль «Камень» из макета Claude Design)

   1. Токены          5. Списки           9. Профиль и подписка
   2. База             6. Карточка         10. Вход (allauth)
   3. Каркас и шапка   7. Камень и свеча   11. Просмотр фото
   4. Главная, поиск   8. Страницы, формы  12. Адаптив
   ===================================================================== */

/* ---------- 1. Токены ---------- */
:root{
  --bg:        oklch(0.965 0.009 76);
  --surface:   oklch(0.992 0.005 80);
  --surface-2: oklch(0.978 0.007 78);
  --ink:       oklch(0.305 0.012 58);
  --ink-soft:  oklch(0.40 0.012 58);
  --muted:     oklch(0.53 0.012 60);
  --faint:     oklch(0.70 0.01 65);
  --line:      oklch(0.89 0.010 74);
  --line-soft: oklch(0.93 0.008 76);
  --accent:    #66704f;
  --danger:    #a0402d;
  --flame:     #e8893a;

  --he-font:   "Frank Ruhl Libre", serif;
  --display:   "Cormorant Garamond", Georgia, serif;
  --ui:        "Manrope", system-ui, sans-serif;
  --display-w: 600;

  --radius:    12px;
  --gutter:    16px;                 /* боковой отступ контейнера */
  --shadow-sm: 0 1px 2px rgba(40,35,25,.04);
  --shadow-md: 0 4px 16px rgba(40,35,25,.07);
}

/* ---------- 2. База ---------- */
*, *::before, *::after{ box-sizing:border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family:var(--ui); font-size:17px; line-height:1.55; color:var(--ink);
  background:radial-gradient(1200px 600px at 50% -10%, var(--surface-2), transparent 70%), var(--bg);
  background-attachment:fixed; min-height:100vh; -webkit-font-smoothing:antialiased;
}
/* мягкое зерно бумаги */
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.4; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
.app{ position:relative; z-index:1; display:flex; flex-direction:column; min-height:100vh; }
a{ color:inherit; }
button{ font-family:inherit; cursor:pointer; }
img{ max-width:100%; }
::selection{ background:color-mix(in oklch, var(--accent) 26%, transparent); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.muted{ color:var(--muted); }
.inline-link{ color:var(--accent); text-decoration:none; border-bottom:1px solid color-mix(in oklch,var(--accent) 35%,transparent); }
.inline-link:hover{ border-bottom-color:var(--accent); }
.form-ok{ font-size:15px; color:var(--accent); font-weight:600; padding:11px 0; margin:0; }
.form-note{ font-size:12.5px; color:var(--muted); margin:14px 0 0; }
/* «Нет аккаунта? Зарегистрироваться» / «Уже есть аккаунт? Войти» — заметно, отдельным блоком под формой */
.auth-switch{ margin:26px 0 0; padding-top:22px; border-top:1px solid var(--line-soft); text-align:center; }
.auth-switch p{ margin:0 0 12px; font-size:16px; color:var(--ink-soft); }
.btn-secondary.auth-switch-btn{ display:block; width:100%; text-align:center; text-decoration:none; font-size:16px; padding:13px 22px; }
.empty-msg{ color:var(--muted); padding:30px 0; text-align:center; }

/* кнопки */
.cta-btn{
  display:inline-block; border:none; background:var(--accent); color:#fff; font-family:var(--ui); font-weight:600;
  font-size:16px; padding:14px 32px; border-radius:999px; text-decoration:none; transition:filter .18s;
}
.cta-btn:hover{ filter:brightness(1.06); }
.link-btn{ border:none; background:none; color:var(--accent); font-weight:600; padding:4px 0; }

/* орнамент */
.ornament{ display:flex; align-items:center; justify-content:center; gap:14px; color:var(--faint); margin:0 auto; }
.ornament-line{ height:1px; width:min(120px,16vw); background:linear-gradient(90deg,transparent,var(--line),transparent); }
.ornament-star{ color:var(--accent); opacity:.8; flex:none; }
.ornament-he{ font-family:var(--he-font); font-size:19px; color:var(--ink-soft); letter-spacing:.04em; }

/* ---------- 3. Каркас и шапка ---------- */
/* контейнер с ширинами как в Bootstrap: 540 / 720 / 960 / 1140 / 1320 */
.container{ width:100%; margin-inline:auto; padding-inline:var(--gutter); }
@media (min-width:576px){  .container{ max-width:540px; } }
@media (min-width:768px){  :root{ --gutter:24px; } .container{ max-width:720px; } }
@media (min-width:992px){  .container{ max-width:960px; } }
@media (min-width:1200px){ .container{ max-width:1140px; } }
@media (min-width:1400px){ .container{ max-width:1320px; } }

.main{ flex:1; padding-top:8px; padding-bottom:40px; }

.site-header{ padding:20px 0 0; }
.header-bar{
  display:grid; align-items:center; column-gap:20px;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"brand toggle" "menu menu";
}
.brand{ grid-area:brand; display:flex; align-items:center; gap:12px; min-width:0; color:var(--ink); text-decoration:none; }
.brand-star{ color:var(--accent); flex:none; }
.brand-text{ display:flex; flex-direction:column; line-height:1.1; min-width:0; }
.brand-name{ font-family:var(--display); font-weight:var(--display-w); font-size:25px; letter-spacing:.01em; }
.brand-sub{ font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-top:3px; }

/* кнопка меню (до 768 px) */
.nav-toggle{
  grid-area:toggle; display:none; width:44px; height:44px; border:1px solid var(--line); border-radius:12px;
  background:var(--surface); align-items:center; justify-content:center;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after{
  display:block; width:18px; height:1.5px; background:var(--ink); border-radius:2px; transition:transform .2s, opacity .2s;
}
.nav-toggle-bar{ position:relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after{ content:""; position:absolute; left:0; }
.nav-toggle-bar::before{ top:-6px; } .nav-toggle-bar::after{ top:6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar{ background:transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before{ transform:translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after{ transform:translateY(-6px) rotate(-45deg); }

/* меню: на широких экранах — содержимое раскладывается по сетке шапки */
.site-menu{ display:contents; }
.main-nav{
  grid-area:menu; display:flex; flex-wrap:wrap; gap:2px; margin-top:16px; padding:6px 0;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
}
.nav-link{
  position:relative; color:var(--ink-soft); font-size:14.5px; font-weight:600; padding:8px 12px;
  border-radius:999px; white-space:nowrap; text-decoration:none; transition:color .16s;
}
.nav-link:hover, .nav-link.is-active{ color:var(--accent); }
.nav-link.is-active::after{ content:""; position:absolute; left:12px; right:12px; bottom:2px; height:1.5px; background:var(--accent); border-radius:2px; }
.header-tools{ grid-area:toggle; display:flex; align-items:center; gap:16px; justify-self:end; }
.header-account{ display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--ink-soft); text-decoration:none; white-space:nowrap; }
.header-account:hover{ color:var(--accent); }
.header-account .dot{ width:8px; height:8px; border-radius:50%; background:var(--accent); }
.profile-ico-wrap{ position:relative; display:inline-flex; flex:none; }
.profile-ico{ color:var(--accent); }
/* точка подписки — в углу значка профиля */
.profile-ico-wrap .dot{ position:absolute; top:-2px; inset-inline-end:-3px; width:7px; height:7px; box-shadow:0 0 0 2px var(--bg); }
.login-ico{ flex:none; color:var(--accent); }
:root[dir="rtl"] .login-ico{ transform:scaleX(-1); }   /* стрелка «внутрь» — к началу строки */
.lang-switch{ display:flex; gap:2px; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; padding:3px; }
.lang-btn{ color:var(--muted); font-size:13px; font-weight:600; padding:7px 13px; border-radius:999px; text-decoration:none; transition:color .18s; white-space:nowrap; }
.lang-btn:hover{ color:var(--ink); }
.lang-btn.is-active{ background:var(--surface); color:var(--accent); box-shadow:0 1px 3px rgba(40,35,25,.07); }
.lang-btn[lang="he"]{ font-family:var(--he-font); }

/* подвал */
.site-footer{ text-align:center; padding:54px 0 60px; }
.site-footer .ornament{ margin-bottom:18px; }
.footer-motto{ font-family:var(--display); font-style:italic; font-size:19px; color:var(--muted); margin:0; }
.footer-links{ margin:14px 0 0; font-size:13px; color:var(--muted); }

/* «назад» */
.back{ display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-weight:600; font-size:14px; padding:6px 0; margin-bottom:18px; text-decoration:none; transition:color .16s; }
.back:hover{ color:var(--accent); }
:root[dir="rtl"] .back span, :root[dir="rtl"] .row-arrow{ display:inline-block; transform:scaleX(-1); }

/* ---------- 4. Главная, поиск, алфавит ---------- */

.hero{ text-align:center; padding:34px 0 14px; }
.hero .ornament{ margin-bottom:26px; }
.hero-title{
  font-family:var(--display); font-weight:var(--display-w); font-size:clamp(34px,5.4vw,58px);
  line-height:1.05; letter-spacing:-.01em; margin:0 auto 16px; max-width:16ch; text-wrap:balance;
}
.hero-lead{ max-width:52ch; margin:0 auto 30px; color:var(--ink-soft); font-size:18px; text-wrap:pretty; }
.hero-count{ margin-top:20px; color:var(--muted); font-size:15px; }
.hero-count strong{ color:var(--ink); font-weight:700; }

.search-bar{
  display:flex; align-items:center; gap:10px; max-width:560px; margin:0 auto; padding:7px 7px 7px 18px;
  background:var(--surface); border:1px solid var(--line); border-radius:999px; box-shadow:var(--shadow-sm); transition:.2s;
}
:root[dir="rtl"] .search-bar{ padding:7px 18px 7px 7px; }
.search-bar:focus-within{ border-color:color-mix(in oklch,var(--accent) 55%,var(--line)); box-shadow:0 4px 18px rgba(40,35,25,.08); }
.search-bar--big{ padding:10px 10px 10px 22px; }
:root[dir="rtl"] .search-bar--big{ padding:10px 22px 10px 10px; }
.search-ico{ color:var(--faint); flex:none; }
.search-bar input{ flex:1; min-width:0; border:none; background:none; outline:none; color:var(--ink); font:inherit; font-size:16px; }
.search-bar--big input{ font-size:18px; padding:4px 0; }
.search-bar input::placeholder{ color:var(--faint); }
.search-go{ flex:none; border:none; background:var(--accent); color:#fff; font-weight:600; font-size:15px; padding:11px 24px; border-radius:999px; transition:filter .18s; }
.search-go:hover{ filter:brightness(1.06); }
.listing-search{ margin:0 0 22px; }
.listing-search .search-bar{ margin:0; max-width:none; }

.alpha-block{ margin:54px 0 10px; }
.block-head{ text-align:center; margin-bottom:24px; }
.block-head h2{ font-family:var(--display); font-weight:var(--display-w); font-size:30px; margin:0 0 6px; }
.block-head p{ margin:0; color:var(--muted); font-size:15px; }
.alphabet{ display:grid; grid-template-columns:repeat(auto-fill,minmax(78px,1fr)); gap:10px; }
.glyph{
  position:relative; aspect-ratio:1/1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); color:var(--ink);
  text-decoration:none; transition:transform .18s, border-color .18s, box-shadow .18s;
}
a.glyph:hover{ transform:translateY(-2px); border-color:color-mix(in oklch,var(--accent) 45%,var(--line)); box-shadow:0 8px 20px rgba(40,35,25,.08); }
.glyph.is-active{ background:color-mix(in oklch,var(--accent) 10%,var(--surface)); }
.glyph-l{ font-family:var(--display); font-weight:var(--display-w); font-size:30px; line-height:1; }
:root[lang="he"] .glyph-l{ font-family:var(--he-font); }
.glyph-n{ font-size:11px; color:var(--accent); font-weight:600; margin-top:5px; min-height:14px; }
.glyph.is-empty{ opacity:.32; background:transparent; border-style:dashed; }
.glyph.is-empty .glyph-l{ color:var(--faint); }
.alphabet--mini{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:26px; }
.glyph--mini{ aspect-ratio:auto; width:42px; height:42px; border-radius:10px; }
.glyph--mini .glyph-l{ font-size:18px; }

/* блок контактов на главной */
.contacts{ margin:64px 0 10px; border-top:1px solid var(--line); padding-top:42px; }
.contacts-inner{ display:flex; gap:26px; align-items:flex-start; max-width:680px; margin:0 auto; }
.contacts-menorah{ color:var(--accent); flex:none; opacity:.7; margin-top:4px; }
.contacts h3{ font-family:var(--display); font-weight:var(--display-w); font-size:24px; margin:0 0 8px; }
.contacts p{ margin:0 0 16px; color:var(--ink-soft); }
.contacts-list{ display:grid; gap:12px; margin:0 0 18px; }
.contacts-list > div{ display:flex; gap:14px; }
.contacts-list dt{ width:130px; flex:none; color:var(--muted); font-size:14px; }
.contacts-list dd{ margin:0; font-weight:500; font-size:15px; }
.contacts .missing{ font-size:14px; color:var(--muted); }

/* ---------- 5. Списки ---------- */
.listing-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.listing-head h2{ font-family:var(--display); font-weight:var(--display-w); font-size:30px; margin:0; }
.big-letter, .q{ color:var(--accent); }
.rows{ display:flex; flex-direction:column; gap:2px; }
.row{
  display:grid; align-items:center; gap:18px; grid-template-columns:18px minmax(0,1fr) auto auto 18px;
  padding:15px 18px; background:var(--surface); color:var(--ink); text-decoration:none; border-radius:8px;
  border:1px solid transparent; border-bottom-color:var(--line-soft); transition:transform .15s, border-color .15s, box-shadow .15s;
}
.row:hover{ position:relative; z-index:1; transform:translateY(-1px); border-color:color-mix(in oklch,var(--accent) 35%,var(--line)); box-shadow:var(--shadow-md); }
.row-mark{ width:8px; height:8px; border-radius:999px; border:1.5px solid var(--accent); justify-self:center; opacity:.7; }
.row-main{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.row-name{ font-size:17px; font-weight:600; }
.row-he{ font-family:var(--he-font); font-size:14px; color:var(--muted); }
.row-dates{ font-variant-numeric:tabular-nums; color:var(--ink-soft); font-size:15px; white-space:nowrap; }
.row-loc{ color:var(--muted); font-size:13.5px; white-space:nowrap; }
.row-arrow{ color:var(--faint); justify-self:end; transition:transform .15s, color .15s; }
.row:hover .row-arrow{ color:var(--accent); transform:translateX(3px); }
:root[dir="rtl"] .row:hover .row-arrow{ transform:translateX(-3px) scaleX(-1); }
.pager{ display:flex; align-items:center; justify-content:center; gap:16px; margin:26px 0 0; color:var(--muted); font-size:14px; }
.pager a{ color:var(--accent); font-weight:600; text-decoration:none; }

/* ---------- 6. Карточка человека ---------- */
.detail-grid{ display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:40px; align-items:start; }
.detail-photo{ position:sticky; top:24px; }
.detail-info{ min-width:0; }
.detail-kicker{ font-family:var(--he-font); font-size:22px; color:var(--accent); margin:0 0 6px; }
.detail-name{ font-family:var(--display); font-weight:var(--display-w); font-size:clamp(30px,4vw,44px); line-height:1.08; margin:0 0 6px; text-wrap:balance; }
.detail-life{ font-variant-numeric:tabular-nums; color:var(--muted); font-size:18px; margin:0 0 26px; }
.auto-note{ font-size:12.5px; color:var(--muted); margin:-14px 0 22px; }

/* фото */
.photo-real{ display:block; border-radius:var(--radius); border:1px solid var(--line); overflow:hidden; background:var(--surface-2); cursor:zoom-in; }
.photo-real img{ display:block; width:100%; height:auto; }
.photo-slot{ position:relative; aspect-ratio:3/4; display:flex; align-items:center; justify-content:center; border-radius:var(--radius); border:1px solid var(--line); background:var(--surface-2); overflow:hidden; }
.photo-slot--none{ color:var(--accent); opacity:.55; }
.photo-thumbs{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.photo-thumbs a{ display:block; width:64px; height:84px; border-radius:8px; overflow:hidden; border:1px solid var(--line); }
.photo-thumbs a.is-active{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.photo-thumbs img{ display:block; width:100%; height:100%; object-fit:cover; }

/* закрытое фото (без подписки) */
.photo-locked{ position:relative; aspect-ratio:3/4; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); background:var(--surface-2); }
.photo-locked img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scale(1.08); }
.photo-locked-cta{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px;
  padding:20px; text-align:center; background:color-mix(in oklch,var(--bg) 55%,transparent);
}
.photo-locked-cta p{ margin:0; font-weight:600; }
.photo-locked-cta svg{ color:var(--accent); }
.photo-locked-login{ margin:10px 0 0; font-size:13.5px; }

/* факты */
.facts{ display:grid; grid-template-columns:1fr 1fr; gap:1px; margin:0 0 26px; background:var(--line-soft); border:1px solid var(--line-soft); border-radius:var(--radius); overflow:hidden; }
.fact{ background:var(--surface); padding:15px 18px; }
.fact:nth-child(odd){ background:var(--surface-2); }
.fact:last-child:nth-child(odd){ grid-column:1 / -1; }   /* нечётное число фактов — без пустой ячейки */
.fact dt{ font-size:11.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); margin-bottom:5px; }
.fact dd{ margin:0; font-size:15.5px; }
.fact-he{ font-family:var(--he-font); font-size:19px; }

.epitaph{ margin:0 0 28px; padding:22px 26px; border-inline-start:2px solid var(--accent); background:var(--surface-2); border-start-end-radius:var(--radius); border-end-end-radius:var(--radius); }
.epitaph blockquote{ margin:0; font-family:var(--display); font-size:21px; line-height:1.4; font-style:italic; text-wrap:pretty; }
.epitaph figcaption{ font-family:var(--he-font); font-size:20px; color:var(--accent); margin-top:12px; }

.also{ margin:0 0 26px; }
.also h2, .report h2{ font-family:var(--display); font-weight:var(--display-w); font-size:22px; margin:0 0 10px; }
.report{ margin-top:30px; }
.report > p{ margin:0 0 14px; color:var(--ink-soft); font-size:15px; }

.fav-btn{ border:1px solid var(--line); background:var(--surface); color:var(--ink-soft); border-radius:999px; padding:6px 14px; font-weight:600; margin-bottom:10px; }
.fav-btn.is-on{ color:#b08a2a; border-color:#e2cf98; background:#fbf5e3; }

/* схема участка (на будущее) */
.plan{ border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--surface); }
.plan-head{ display:flex; align-items:center; justify-content:space-between; padding:13px 18px; border-bottom:1px solid var(--line-soft); font-size:13.5px; }
.plan-head span:first-child{ font-weight:600; }
.plan-sec{ color:var(--accent); font-weight:600; }
.plan-canvas{ position:relative; aspect-ratio:16/7; background:repeating-linear-gradient(0deg,var(--surface-2),var(--surface-2) 1px,transparent 1px,transparent 22px); }
.plan-grid{ position:absolute; inset:0; width:100%; height:100%; stroke:var(--line-soft); stroke-width:.5; }
.plan-pin{ position:absolute; transform:translate(-50%,-50%); color:var(--accent); filter:drop-shadow(0 2px 4px rgba(40,35,25,.2)); }
.plan-pin::after{ content:""; position:absolute; inset:-7px; border-radius:999px; border:1.5px solid color-mix(in oklch,var(--accent) 50%,transparent); animation:pulse 2.4s ease-out infinite; }
.plan-coords{ padding:11px 18px; font-family:ui-monospace,Menlo,monospace; font-size:12px; color:var(--muted); border-top:1px solid var(--line-soft); }
@keyframes pulse{ 0%{ transform:scale(.7); opacity:.8; } 100%{ transform:scale(1.9); opacity:0; } }

/* ---------- 7. Камень и свеча ---------- */
.tribute-stage{ position:relative; }
.tribute-stage .photo-slot--none{ aspect-ratio:3/4; }
/* лёгкое затемнение низа фото, чтобы камни и свеча читались на любом снимке */
.tribute-stage::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:38%; pointer-events:none;
  border-radius:0 0 var(--radius) var(--radius); background:linear-gradient(to top, rgba(30,26,20,.5), rgba(30,26,20,0));
}
.tribute-glow, .tribute-pile, .tribute-candle{ position:absolute; z-index:1; pointer-events:none; }
.tribute-glow{
  inset:0; border-radius:var(--radius); opacity:0; mix-blend-mode:screen; transition:opacity 1.4s ease;
  background:radial-gradient(70% 55% at 88% 96%, rgba(255,178,92,.42), rgba(255,178,92,.12) 45%, transparent 75%);
}
:root[dir="rtl"] .tribute-glow{ background:radial-gradient(70% 55% at 12% 96%, rgba(255,178,92,.42), rgba(255,178,92,.12) 45%, transparent 75%); }
.tribute-stage.is-lit .tribute-glow{ opacity:1; }

/* горка камней — нижний «начальный» угол */
.tribute-pile{ bottom:10px; inset-inline-start:12px; width:64px; height:40px; transform:scale(1.55); transform-origin:bottom left; filter:drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
:root[dir="rtl"] .tribute-pile{ transform-origin:bottom right; }
.tribute-stone{ position:absolute; border-radius:50% 55% 45% 50% / 62% 60% 40% 38%; box-shadow:inset -3px -3px 0 rgba(0,0,0,.16), inset 2px 2px 0 rgba(255,255,255,.18); }
.tribute-stone.is-new{ animation:stone-drop .7s cubic-bezier(.3,1.35,.5,1) both; }

/* свеча — нижний «конечный» угол */
.tribute-candle{ bottom:10px; inset-inline-end:16px; width:16px; height:58px; transform:scale(1.35); transform-origin:bottom center; filter:drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.tc-body{ position:absolute; bottom:0; left:1px; width:14px; height:34px; border-radius:3px 3px 2px 2px; background:linear-gradient(90deg,#efe5cf,#fbf6ea 45%,#e2d6bb); }
.tc-wick{ position:absolute; bottom:34px; left:7px; width:2px; height:5px; background:#4a3f33; border-radius:1px; }
.tc-flame{
  position:absolute; bottom:37px; left:2px; width:12px; height:18px; border-radius:50% 50% 50% 50% / 62% 62% 38% 38%;
  background:radial-gradient(circle at 50% 72%, #fffbe6 0, #ffd36b 38%, #f08a2e 78%, rgba(240,138,46,0) 100%);
  box-shadow:0 0 14px 4px rgba(255,170,70,.45); transform-origin:50% 100%; transform:scale(0); opacity:0;
}
.tribute-stage.is-lit .tc-flame{ animation:flame-in .7s ease-out forwards, flame-flicker 1.8s .7s ease-in-out infinite; }

/* кнопки камня и свечи */
.stone-actions{ display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.stone-btn, .candle-btn{
  display:flex; align-items:center; justify-content:center; gap:9px; padding:11px 16px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-soft); font-weight:600; font-size:14px;
  border-radius:999px; transition:border-color .18s, color .18s, background .18s;
}
.stone-btn svg{ color:var(--accent); }
.stone-btn:hover, .candle-btn:hover{ border-color:color-mix(in oklch,var(--accent) 50%,var(--line)); color:var(--ink); }
.stone-btn.done, .candle-btn.done{ cursor:default; color:var(--ink); }
.stone-btn.done{ background:color-mix(in oklch,var(--accent) 12%,var(--surface)); border-color:color-mix(in oklch,var(--accent) 40%,var(--line)); }
.candle-btn.done{ background:color-mix(in oklch,var(--flame) 10%,var(--surface)); border-color:color-mix(in oklch,var(--flame) 35%,var(--line)); }
.candle-ico{ display:inline-block; width:9px; height:13px; border-radius:50% 50% 50% 50% / 60% 60% 40% 40%; background:linear-gradient(180deg,#ffd27a,var(--flame)); box-shadow:0 0 7px rgba(232,137,58,.6); }
.candle-btn.done .candle-ico{ animation:flame-flicker 1.8s ease-in-out infinite; }
.tribute-count{ font-size:13px; color:var(--muted); text-align:center; margin:10px 0 0; min-height:18px; font-variant-numeric:tabular-nums; }

/* AR: кнопка под фото и окно с 3D-просмотром */
.ar-btn{
  display:flex; align-items:center; justify-content:center; gap:9px; width:100%; margin-top:14px; padding:11px 16px;
  border:1px dashed color-mix(in oklch,var(--accent) 45%,var(--line)); background:transparent; color:var(--ink-soft);
  font:inherit; font-weight:600; font-size:14px; border-radius:999px; cursor:pointer; transition:border-color .18s, color .18s, background .18s;
}
.ar-btn svg{ color:var(--accent); }
.ar-btn:hover{ border-style:solid; color:var(--ink); background:color-mix(in oklch,var(--accent) 7%,transparent); }
.modal--ar{ width:min(560px, calc(100% - 32px)); }
.ar-stage{ position:relative; height:min(58vh,440px); margin:0 0 14px; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line-soft);
  background:radial-gradient(ellipse at 50% 85%, color-mix(in oklch,var(--accent) 10%,var(--surface-2)), var(--surface-2) 70%); }
.ar-stage model-viewer{ width:100%; height:100%; --poster-color:transparent; }
.ar-loading{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; margin:0; color:var(--muted); font-size:14px; }
.ar-start{ position:absolute; bottom:14px; left:50%; transform:translateX(-50%); white-space:nowrap; }
.ar-note{ margin-bottom:16px; font-size:14px; }

@keyframes stone-drop{
  0%{ transform:translateY(-120px) rotate(-35deg); opacity:0; }
  55%{ opacity:1; }
  70%{ transform:translateY(2px) rotate(5deg); }
  85%{ transform:translateY(-3px) rotate(-2deg); }
  100%{ transform:none; }
}
@keyframes flame-in{ 0%{ transform:scale(0); opacity:0; } 70%{ transform:scale(1.25); opacity:1; } 100%{ transform:scale(1); opacity:1; } }
@keyframes flame-flicker{
  0%,100%{ transform:scale(1) rotate(-2deg); }
  25%{ transform:scale(1.06,.94) rotate(2deg); }
  50%{ transform:scale(.95,1.07) rotate(-1deg); }
  75%{ transform:scale(1.03,.97) rotate(1.5deg); }
}

/* ---------- 8. Страницы и формы ---------- */
.page{ padding:6px 0 20px; }
.page-head{ text-align:center; max-width:640px; margin:0 auto 40px; }
.page-head .ornament{ margin-bottom:22px; }
.page-title{ font-family:var(--display); font-weight:var(--display-w); font-size:clamp(32px,4.4vw,48px); margin:0 0 14px; text-wrap:balance; }
.page-lead{ font-size:18px; color:var(--ink-soft); margin:0; text-wrap:pretty; }
.prose{ max-width:640px; margin:0 auto; }
.prose p{ font-size:17.5px; line-height:1.7; color:var(--ink-soft); margin:0 0 20px; text-wrap:pretty; }

.facts-strip{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; max-width:720px; margin:0 auto 38px; background:var(--line-soft); border:1px solid var(--line-soft); border-radius:var(--radius); overflow:hidden; }
.facts-cell{ background:var(--surface); padding:24px 18px; text-align:center; }
.facts-cell:nth-child(even){ background:var(--surface-2); }
.facts-n{ display:block; font-family:var(--display); font-weight:var(--display-w); font-size:34px; line-height:1; color:var(--accent); margin-bottom:8px; }
.facts-l{ font-size:13px; color:var(--muted); }

.trad-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; max-width:920px; margin:0 auto; }
.trad-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px 22px; }
.trad-num{ font-family:var(--display); font-weight:var(--display-w); font-size:20px; color:var(--accent); opacity:.5; }
.trad-card h3{ font-family:var(--display); font-weight:var(--display-w); font-size:22px; margin:6px 0 10px; }
.trad-card p{ margin:0; font-size:15px; color:var(--ink-soft); text-wrap:pretty; }

.svc-list{ list-style:none; margin:0 auto; padding:0; max-width:720px; display:flex; flex-direction:column; gap:2px; }
.svc-item{ display:flex; gap:18px; align-items:flex-start; padding:22px 6px; border-bottom:1px solid var(--line-soft); }
.svc-mark{ color:var(--accent); flex:none; margin-top:3px; opacity:.8; }
.svc-item h3{ font-family:var(--display); font-weight:var(--display-w); font-size:23px; margin:0 0 6px; }
.svc-item p{ margin:0; font-size:16px; color:var(--ink-soft); text-wrap:pretty; }
.svc-body{ flex:1; min-width:0; }
.svc-price{ flex:none; margin-top:4px; color:var(--accent); font-weight:700; font-size:15px; white-space:nowrap; }
.hp-field{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.hidden-note{ margin:18px 0 0; padding:10px 16px; border:1px dashed color-mix(in oklch,var(--accent) 55%,var(--line)); border-radius:var(--radius); background:color-mix(in oklch,var(--accent) 8%,var(--surface)); color:var(--ink-soft); font-size:14px; text-align:center; }
.not-found-search{ max-width:620px; margin:6px auto 0; }
.not-found-home{ text-align:center; margin-top:26px; }
.svc-empty{ max-width:520px; margin:8px auto 0; text-align:center; color:var(--muted); font-size:16px; text-wrap:pretty; }
.svc-cta{ text-align:center; margin-top:34px; }

/* «Подписка» — открытая страница тарифов */
.sub-active{ max-width:720px; margin:-16px auto 28px; text-align:center; padding:12px 16px; border-radius:var(--radius); background:color-mix(in oklch,var(--accent) 9%,var(--surface)); font-size:15px; }
.sub-h{ font-family:var(--display); font-weight:var(--display-w); font-size:28px; text-align:center; margin:40px 0 18px; }
.sub-benefits{ list-style:none; margin:0 auto; padding:0; max-width:880px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.sub-benefit{ display:flex; gap:14px; padding:18px 20px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.sub-mark{ color:var(--accent); flex:none; margin-top:3px; opacity:.8; }
.sub-benefit h3{ font-family:var(--display); font-weight:var(--display-w); font-size:21px; margin:0 0 4px; }
.sub-benefit p{ margin:0; font-size:15px; color:var(--ink-soft); text-wrap:pretty; }
.plan-cards--public{ max-width:720px; margin:34px auto 0; }
.plan-card--link{ text-decoration:none; color:var(--ink); padding:18px; transition:border-color .16s, box-shadow .16s, transform .16s; }
.plan-card--link:hover{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); transform:translateY(-1px); }
.plan-card--link .plan-price{ font-size:20px; }
.plan-choose{ margin-top:6px; font-size:14px; font-weight:600; color:var(--accent); }
:root[dir="rtl"] .plan-choose{ unicode-bidi:plaintext; }
.sub-steps{ max-width:640px; margin:0 auto; padding-inline-start:22px; display:grid; gap:10px; font-size:16px; color:var(--ink-soft); }
.sub-steps li::marker{ color:var(--accent); font-weight:700; }
.sub-note{ max-width:520px; margin:14px auto 0; text-align:center; font-size:14px; color:var(--muted); }
.sub-money{ max-width:640px; margin:22px auto 22px; padding:14px 18px; font-size:15px; color:var(--ink); background:color-mix(in oklch,var(--accent) 16%,var(--surface)); border-inline-start:3px solid var(--accent); border-radius:var(--radius); text-wrap:pretty; }   /* «куда идут деньги» — заметно, но не как реквизиты */
/* в форме кабинета — компактнее и по ширине формы */
.sub-benefits--compact{ max-width:640px; margin-bottom:6px; }   /* по ширине формы оформления */
.sub-benefits--compact .sub-benefit{ padding:14px 16px; }
.sub-benefits--compact .sub-benefit h3{ font-size:19px; }

/* «Дни памяти» и «Мемориал» */
.yz-days{ max-width:760px; margin:0 auto; display:grid; gap:16px; }
.yz-day{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px 22px; }
.yz-day.is-today{ border-color:color-mix(in oklch,var(--accent) 55%,var(--line)); box-shadow:0 0 0 1px color-mix(in oklch,var(--accent) 35%,transparent); }
.yz-date{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 14px; margin:0 0 10px; font-family:var(--ui); font-size:15px; font-weight:600; color:var(--ink-soft); }
.yz-heb{ color:var(--accent); }
.yz-people, .mem-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.mem-list{ max-width:760px; margin:0 auto; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px 24px; }
.yz-name{ font-weight:600; color:var(--ink); text-decoration:none; }
a.yz-name:hover{ color:var(--accent); }
.cform--narrow{ max-width:560px; margin:30px auto 0; }

/* «Помощь» — вопросы и ответы */
.faq{ max-width:760px; margin:0 auto; border-top:1px solid var(--line-soft); }
.faq-item{ border-bottom:1px solid var(--line-soft); }
.faq-item summary{ display:flex; align-items:center; gap:14px; padding:18px 4px; cursor:pointer; list-style:none; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:"+"; margin-inline-start:auto; flex:none; color:var(--accent); font-size:22px; line-height:1; transition:transform .18s; }
.faq-item[open] summary::after{ transform:rotate(45deg); }
.faq-q{ margin:0; font-family:var(--ui); font-weight:600; font-size:17px; }
.faq-item summary:hover .faq-q{ color:var(--accent); }
.faq-a{ padding:0 4px 18px; color:var(--ink-soft); font-size:16px; }
.faq-a p{ margin:0 0 10px; text-wrap:pretty; }
.faq-a p:last-child{ margin:0; }

/* «Прислать данные» */
.field-hint{ display:block; margin-top:6px; font-size:12.5px; color:var(--muted); }
.field input[type=file]{ padding:9px 10px; }
.search-submit{ text-align:center; margin:-10px 0 0; font-size:15px; }
.footer-links--main{ margin-top:16px; font-size:14px; }

.views-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.views-grid a{ display:block; aspect-ratio:4/3; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); background:var(--surface-2); }
.views-grid img{ display:block; width:100%; height:100%; object-fit:cover; transition:transform .3s ease; }
.views-grid a:hover img{ transform:scale(1.03); }

/* появление при прокрутке: элементы контейнера [data-reveal] выезжают снизу (только с JS) */
.js [data-reveal] > *{
  opacity:0; transform:translateY(32px) scale(.97);
  transition:opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--reveal-delay,0s);
}
.js [data-reveal] > .is-revealed{ opacity:1; transform:none; }

.ccards{ display:grid; grid-template-columns:1fr 1fr; gap:24px; max-width:880px; margin:0 auto 28px; align-items:stretch; }
.ccard{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px 26px; }
.ccard-title{ font-family:var(--display); font-weight:var(--display-w); font-size:24px; margin:0 0 14px; }
.ccard-text{ margin:-6px 0 16px; color:var(--ink-soft); font-size:15px; }
.ccard-list{ display:grid; gap:12px; margin:0; }
.ccard-list dt{ font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:3px; }
.ccard-list dd{ margin:0; font-size:16px; overflow-wrap:anywhere; }
.map-btns{ display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.map-btn{ display:inline-flex; align-items:center; gap:7px; padding:9px 16px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink-soft); font-size:14px; font-weight:600; text-decoration:none; transition:border-color .16s, color .16s; }
.map-btn:hover{ border-color:color-mix(in oklch,var(--accent) 55%,var(--line)); color:var(--accent); }
.map-btn-ico{ color:var(--accent); flex:none; }
.cform--wide{ max-width:880px; margin:0 auto; }

/* карточка-форма и поля */
.cform{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:26px 26px 24px; }
.cform h3, .cform h2{ font-family:var(--display); font-weight:var(--display-w); font-size:24px; margin:0 0 18px; }
.field{ display:block; margin-bottom:16px; }
.field > span{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.field input, .field textarea, .field select{
  width:100%; border:1px solid var(--line); background:var(--surface-2); border-radius:8px; padding:11px 13px;
  font:inherit; font-size:15px; color:var(--ink); outline:none; transition:border-color .16s, background .16s;
}
.field textarea{ resize:vertical; }
.field input:focus, .field textarea:focus, .field select:focus{ border-color:color-mix(in oklch,var(--accent) 55%,var(--line)); background:var(--surface); }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field-error{ display:block; color:var(--danger); font-size:13px; margin-top:4px; }

/* ---------- 9. Профиль и подписка ---------- */
/* личный кабинет: боковое меню + раздел */
.account-layout{ display:grid; grid-template-columns:260px minmax(0,1fr); gap:40px; align-items:start; padding-top:12px; }
.account-side{ position:sticky; top:24px; }
.account-user{ display:flex; align-items:center; gap:12px; padding:0 4px 18px; margin-bottom:10px; border-bottom:1px solid var(--line-soft); }
.account-avatar{
  flex:none; width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:color-mix(in oklch,var(--accent) 14%,var(--surface)); color:var(--accent); font-family:var(--display); font-weight:700; font-size:20px;
}
.account-who{ display:flex; flex-direction:column; min-width:0; }
.account-who strong{ font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-status{ font-size:12.5px; color:var(--muted); }
.account-status.is-active{ color:var(--accent); font-weight:600; }
.account-nav{ display:flex; flex-direction:column; gap:2px; }
.account-link{
  display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; color:var(--ink-soft);
  font-size:15px; font-weight:600; text-decoration:none; transition:background .15s, color .15s;
}
.account-link:hover{ background:var(--surface); color:var(--ink); }
.account-link.is-active{ background:var(--surface); color:var(--accent); box-shadow:inset 3px 0 0 var(--accent), var(--shadow-sm); }
:root[dir="rtl"] .account-link.is-active{ box-shadow:inset -3px 0 0 var(--accent), var(--shadow-sm); }
.account-link--muted{ margin-top:10px; color:var(--muted); font-weight:500; }
.account-badge{ margin-inline-start:auto; min-width:22px; padding:1px 7px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); font-size:12px; color:var(--ink-soft); text-align:center; }
.account-dot{ width:7px; height:7px; border-radius:50%; background:var(--flame); }
.account-main{ min-width:0; }
.account-title{ font-family:var(--display); font-weight:var(--display-w); font-size:34px; line-height:1.1; margin:0 0 20px; }
.account-panel{ max-width:620px; }
.account-panel .cta-btn{ margin-top:6px; }
.account-note{ margin:14px 0 0; font-size:15px; }
.sub-state{ font-size:20px; margin:0 0 6px; color:var(--ink-soft); }
.sub-state.is-active{ color:var(--accent); }
.account-danger{ max-width:620px; margin-top:28px; padding-top:22px; border-top:1px solid var(--line-soft); }
.account-danger h2{ font-size:16px; margin:0 0 6px; }
.account-danger p{ margin:0 0 10px; font-size:14px; }
.danger-link{ color:var(--danger); font-weight:600; font-size:14px; }

/* заявки */
.req-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; max-width:720px; }
.req{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius); }
.req-main{ display:grid; gap:2px; min-width:0; font-size:14px; }
.req-plan{ font-weight:600; font-size:15px; }
.req-reason{ color:var(--danger); font-size:13.5px; }
.req-status{ flex:none; font-size:13px; font-weight:600; padding:4px 12px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); color:var(--ink-soft); }
.req--approved .req-status{ color:var(--accent); border-color:color-mix(in oklch,var(--accent) 40%,var(--line)); background:color-mix(in oklch,var(--accent) 10%,var(--surface)); }
.req--rejected .req-status{ color:var(--danger); border-color:color-mix(in oklch,var(--danger) 35%,var(--line)); background:color-mix(in oklch,var(--danger) 7%,var(--surface)); }

/* избранное */
.fav-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; max-width:720px; }
.fav-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 16px; align-items:center; padding:14px 18px; background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius); }
.fav-head{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; min-width:0; }
.fav-name{ font-weight:600; color:var(--ink); text-decoration:none; }
.fav-name:hover{ color:var(--accent); }
.fav-label{ grid-column:1; display:flex; gap:8px; }
.fav-label input{ flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:inherit; font-size:14px; background:var(--surface-2); }
.fav-remove{ grid-column:2; grid-row:1 / span 2; }
.link-btn--muted{ color:var(--muted); font-weight:500; }

.subscribe-form{ max-width:640px; margin:0 auto; }
.subscribe-form h3{ font-family:var(--display); font-weight:var(--display-w); font-size:21px; margin:22px 0 12px; }
.subscribe-form h3:first-of-type{ margin-top:0; }
.plan-cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.plan-card{ position:relative; display:grid; gap:4px; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface-2); cursor:pointer; }
.plan-card:has(input:checked){ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); background:var(--surface); }
.plan-card:has(input:focus-visible){ outline:2px solid var(--accent); outline-offset:2px; }
.plan-card input{ position:absolute; opacity:0; pointer-events:none; }
.plan-title{ font-weight:600; }
.plan-term{ font-size:13.5px; color:var(--muted); }
.plan-price{ color:var(--accent); font-weight:700; }
.pay-details{ background:var(--surface-2); border:1px dashed var(--line); border-radius:8px; padding:14px 16px; font-variant-numeric:tabular-nums; }

/* ---------- 10. Вход и страницы allauth ---------- */
.auth-main{ max-width:480px; }
.auth-box{ max-width:440px; margin:0 auto; }
.auth-box h1, .auth-main h1{ font-family:var(--display); font-weight:var(--display-w); font-size:30px; margin:0 0 16px; }
.auth-main form p{ margin:0 0 14px; }
.auth-main form label{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.auth-main input[type=email], .auth-main input[type=text], .auth-main input[type=tel]{
  width:100%; border:1px solid var(--line); background:var(--surface-2); border-radius:8px; padding:11px 13px; font:inherit; color:var(--ink);
}
.auth-main button[type=submit]{ border:none; background:var(--accent); color:#fff; font-weight:600; font-size:16px; padding:13px 28px; border-radius:999px; }
.auth-main button[type=submit] + button[type=submit]{ background:var(--surface); color:var(--ink-soft); border:1px solid var(--line); }
.auth-main a{ color:var(--accent); }
.auth-main hr{ border:none; border-top:1px solid var(--line-soft); margin:20px 0; }
.auth-box .cta-btn{ width:100%; }
.social-buttons{ display:grid; gap:10px; margin-bottom:6px; }
.social-form{ margin:0; }
.social-btn{ width:100%; font:inherit; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; padding:12px 18px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font-weight:600; text-decoration:none; }
.auth-main .social-btn, .auth-main button.social-btn[type=submit]{ background:var(--surface); color:var(--ink); border:1px solid var(--line); font-weight:600; padding:12px 18px; }
.social-btn:hover{ border-color:color-mix(in oklch,var(--accent) 50%,var(--line)); }
.social-ico{ flex:none; width:20px; height:20px; }
.social-ico--apple{ color:#000; }
.auth-or{ display:flex; align-items:center; gap:12px; color:var(--muted); font-size:13px; margin:16px 0; }
.auth-or::before, .auth-or::after{ content:""; flex:1; height:1px; background:var(--line-soft); }

/* модальное окно (подтверждение выхода) */
.modal{ width:min(420px, calc(100% - 32px)); padding:0; border:1px solid var(--line); border-radius:calc(var(--radius) + 4px); background:var(--surface); color:var(--ink); box-shadow:0 24px 60px rgba(30,26,20,.25); }
.modal::backdrop{ background:rgba(30,26,20,.45); backdrop-filter:blur(2px); }
.modal[open]{ animation:modal-in .18s ease-out; }
.modal-body{ padding:26px 26px 22px; margin:0; }
.modal-title{ font-family:var(--display); font-weight:var(--display-w); font-size:26px; line-height:1.15; margin:0 0 8px; }
.modal-text{ margin:0 0 22px; color:var(--ink-soft); font-size:15px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.modal-actions .cta-btn{ padding:11px 24px; font-size:15px; }
.btn-secondary{ border:1px solid var(--line); background:var(--surface); color:var(--ink-soft); font-weight:600; font-size:15px; padding:11px 22px; border-radius:999px; transition:border-color .16s, color .16s; }
.btn-danger{ border:none; background:var(--danger); color:#fff; font-weight:600; font-size:15px; padding:11px 24px; border-radius:999px; transition:filter .18s; }
.btn-danger:hover{ filter:brightness(1.08); }
.btn-secondary:hover{ border-color:color-mix(in oklch,var(--accent) 50%,var(--line)); color:var(--ink); }
@keyframes modal-in{ from{ opacity:0; transform:translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }

/* кнопка в процессе отправки: заблокирована, со спиннером */
button.is-loading{ position:relative; color:transparent !important; pointer-events:none; }
button.is-loading > *{ visibility:hidden; }
button.is-loading::after{
  content:""; position:absolute; top:50%; left:50%; width:18px; height:18px; margin:-9px 0 0 -9px;
  border-radius:50%; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; animation:spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .ar-btn.is-loading::after, .fav-btn.is-loading::after, .social-btn.is-loading::after, .link-btn.is-loading::after{ border-color:color-mix(in oklch,var(--accent) 30%,transparent); border-top-color:var(--accent); }
button[disabled]:not(.is-loading){ opacity:.6; cursor:default; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---------- 11. Просмотр фото ---------- */
.lightbox{ position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:56px 64px; background:color-mix(in oklch,oklch(0.2 0.01 60) 92%,transparent); }
.lightbox[hidden]{ display:none; }
.lb-open, .lb-open body{ overflow:hidden; }
.lb-img{ max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,.35); background:var(--surface-2); }
.lb-btn{ position:absolute; display:flex; align-items:center; justify-content:center; width:46px; height:46px; border:none; border-radius:999px; background:rgba(255,255,255,.12); color:#fff; font-size:30px; line-height:1; transition:background .16s; }
.lb-btn:hover{ background:rgba(255,255,255,.24); }
.lb-btn[hidden]{ display:none; }
.lb-close{ top:14px; inset-inline-end:14px; font-size:28px; }
.lb-prev, .lb-next{ top:50%; transform:translateY(-50%); }
.lb-prev{ inset-inline-start:12px; }
.lb-next{ inset-inline-end:12px; }
:root[dir="rtl"] .lb-prev, :root[dir="rtl"] .lb-next{ transform:translateY(-50%) scaleX(-1); }
.lb-count{ position:absolute; bottom:16px; left:50%; transform:translateX(-50%); color:rgba(255,255,255,.8); font-size:14px; font-variant-numeric:tabular-nums; }

/* ---------- 12. Адаптив (точки перелома как в Bootstrap) ---------- */
@media (max-width:1199.98px){
  .brand-sub{ max-width:300px; }
}
@media (max-width:991.98px){
  .trad-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:767.98px){
  body{ font-size:16px; }
  .site-header{ padding-top:14px; }
  .brand-name{ font-size:22px; }
  .brand-sub{ display:none; }

  /* меню-гамбургер: навигация, вход и языки — в выпадающей панели */
  .js .nav-toggle{ display:inline-flex; }
  .site-menu{ display:flex; grid-area:menu; flex-direction:column; gap:14px; margin-top:12px; padding:12px 0 16px; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }
  .js .site-menu:not(.is-open){ display:none; }
  .main-nav{ flex-direction:column; margin:0; padding:0; border:none; gap:0; }
  .nav-link{ padding:10px 0; border-radius:0; font-size:16px; }
  .nav-link.is-active::after{ left:0; right:auto; width:24px; bottom:4px; }
  :root[dir="rtl"] .nav-link.is-active::after{ left:auto; right:0; }
  .header-tools{ justify-content:space-between; justify-self:stretch; }

  .account-layout{ grid-template-columns:minmax(0,1fr); gap:18px; padding-top:0; }
  .account-side{ position:static; min-width:0; }
  .account-user{ padding-bottom:12px; }
  .account-nav{ flex-direction:row; overflow-x:auto; gap:6px; padding-bottom:4px; scrollbar-width:none; }
  .account-nav::-webkit-scrollbar{ display:none; }
  .account-link{ flex:none; padding:8px 14px; border:1px solid var(--line); background:var(--surface); border-radius:999px; font-size:14px; }
  .account-link.is-active, :root[dir="rtl"] .account-link.is-active{ box-shadow:none; border-color:var(--accent); }
  .account-link--muted{ margin-top:0; }
  .account-title{ font-size:28px; margin-bottom:14px; }
  .req{ flex-direction:column; align-items:flex-start; }
  .fav-row{ grid-template-columns:1fr; }
  .fav-remove{ grid-column:1; grid-row:auto; }

  .contacts-inner{ flex-direction:column; gap:14px; }
  .contacts-list dt{ width:110px; }
  .detail-grid{ grid-template-columns:1fr; gap:28px; }
  .detail-photo{ position:static; max-width:340px; }
  .facts{ grid-template-columns:1fr; }
  .row{ grid-template-columns:14px minmax(0,1fr) 14px; gap:12px; padding:13px 14px; }
  .row-dates, .row-loc{ display:none; }
  .alphabet{ grid-template-columns:repeat(auto-fill,minmax(58px,1fr)); }
  .glyph-l{ font-size:24px; }
  .facts-strip{ grid-template-columns:repeat(2,1fr); }
  .trad-grid, .ccards, .field-row, .sub-benefits{ grid-template-columns:1fr; }
  .ccards{ gap:18px; }
  .ccard{ padding:20px 18px; }
  .cform{ padding:20px 18px; }
  .lightbox{ padding:60px 10px; }
  .lb-prev, .lb-next{ top:auto; bottom:8px; transform:none; }
  :root[dir="rtl"] .lb-prev, :root[dir="rtl"] .lb-next{ transform:scaleX(-1); }
}
@media (max-width:575.98px){
  .svc-item{ flex-wrap:wrap; row-gap:8px; }
  .svc-price{ order:3; width:100%; margin:0; padding-inline-start:34px; }   /* под описанием, по краю текста */
  .search-go{ padding:10px 16px; }
  .search-bar--big input{ font-size:16px; }
}
/* поля на телефоне — не мельче 16px: иначе Safari на iPhone увеличивает страницу при нажатии на поле */
@media (max-width:767.98px){
  .field input, .field textarea, .field select, .fav-label input,
  .auth-main input[type=email], .auth-main input[type=text], .auth-main input[type=tel]{ font-size:16px; }
}

/* ---------- Плашка согласия на cookie (счётчики посещений) ---------- */
.consent{ position:fixed; inset-inline:0; bottom:0; z-index:60; background:var(--surface); border-top:1px solid var(--line);
  box-shadow:0 -6px 24px rgba(40,35,25,.08); padding:14px 0 calc(14px + env(safe-area-inset-bottom)); }
.consent[hidden]{ display:none; }
.consent-inner{ display:flex; align-items:center; gap:14px 24px; flex-wrap:wrap; }
.consent-text{ flex:1 1 320px; margin:0; font-size:14px; line-height:1.5; color:var(--ink-soft); }
.consent-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.consent-actions .cta-btn{ padding:11px 24px; font-size:15px; }
@media (max-width:575.98px){ .consent-actions{ width:100%; } .consent-actions > *{ flex:1 1 0; } }
.footer-consent{ font:inherit; color:var(--accent); padding:0; border-radius:0;
  border-bottom:1px solid color-mix(in oklch,var(--accent) 35%,transparent); cursor:pointer; }

@media (prefers-reduced-motion:reduce){
  *, *::before, *::after{ transition-duration:.01ms !important; }
  .js [data-reveal] > *{ opacity:1; transform:none; }
  .tribute-stone.is-new, .tribute-stage.is-lit .tc-flame, .candle-btn.done .candle-ico, .plan-pin::after{ animation:none; }
  .tribute-stage.is-lit .tc-flame{ transform:none; opacity:1; }
}
