/* Сайт общины Наш Дидан — светлый, лёгкий интерфейс.
   Inter — русский и латиница, Rubik — иврит. Лазурит — действия, гранат — арамитские слова.
   Крупный базовый размер: сайтом пользуются люди всех возрастов. */

@font-face { font-family: 'ND Sans'; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'ND Sans'; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'ND Sans'; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'ND Sans'; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'ND Sans'; font-weight: 300 900; font-display: swap; src: url(../fonts/rubik-hebrew-wght-normal.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

@font-face { font-family: 'ND Serif'; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'ND Serif'; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'ND Serif'; font-weight: 700; font-display: swap; src: url(../fonts/frank-ruhl-libre-hebrew-700-normal.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --bg: #FFFFFF;
  --surface: #F6F7FB;
  --surface-2: #EEF1F7;
  --ink: #1B2232;
  --muted: #667085;
  --line: #E7EAF0;
  --accent: #3355D1;
  --accent-ink: #2440A8;
  --accent-soft: #EDF1FD;
  --pom: #BE2F48;
  --pom-soft: #FCEFF1;
  --gold: #E3B341;
  --ok: #12805C;
  --ok-soft: #E7F6EF;
  --r: 18px;
  --r-s: 12px;
  --tap: 50px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --side: 296px;
  font-size: 18px;
}
:root[data-size="l"] { font-size: 20px; }
:root[data-size="xl"] { font-size: 22.5px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 'ND Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
body.menu-open { overflow: hidden; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 .75em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(51, 85, 209, .45); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
html[dir="ltr"] [dir="auto"], html[dir="ltr"] [dir="rtl"] { text-align: left; } /* владелец предпочитает левое выравнивание */
.ic { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .ic-chevron { transform: scaleX(-1); }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--bg); padding: 8px 14px; z-index: 90; }
.skip:focus { inset-inline-start: 8px; }

/* ——— Каркас: боковое меню + страница ——— */
.shell { min-height: 100vh; }
.page { min-width: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.brand-name { font-size: 1.08rem; white-space: nowrap; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 650; font-size: .9rem; }

.top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.top .brand { justify-self: center; }

.side { position: fixed; z-index: 60; inset-block: 0; inset-inline-start: 0; width: min(86vw, 320px); background: var(--bg);
  display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 14px 18px; overflow-y: auto;
  transform: translateX(-104%); box-shadow: 0 0 40px rgba(16, 24, 40, .18); }
[dir="rtl"] .side { transform: translateX(104%); }
.side.open { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(23, 30, 45, .32); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 16px; }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 48px; min-width: 0; padding: 6px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.side-link span:first-of-type { flex: 1; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
.side-link .ic { color: var(--muted); }
.side-link:hover { background: var(--surface); }
.side-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-link[aria-current="page"] .ic { color: var(--accent); }
.side-group { margin: 18px 12px 6px; font-size: .8rem; color: var(--muted); }
.side-foot { margin-top: auto; padding: 20px 6px 0; }
.side-label { font-size: .8rem; color: var(--muted); margin: 12px 4px 6px; }
.seg-small { display: flex; background: var(--surface); border-radius: 12px; padding: 3px; gap: 3px; }
.seg-small button { flex: 1; border: 0; background: transparent; border-radius: 9px; min-height: 38px; cursor: pointer; color: var(--muted); }
.seg-small button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); font-weight: 600; }
.seg-small .sz-m { font-size: .85rem; } .seg-small .sz-l { font-size: 1rem; } .seg-small .sz-xl { font-size: 1.2rem; }
.soon { font-size: .72rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 2px 9px; white-space: nowrap; font-weight: 500; }

.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; padding: 6px 2px;
  color: var(--muted); text-decoration: none; font-size: .74rem; border: 0; background: none; cursor: pointer; }
.tab-item[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tab-item[aria-current="page"] .ic { stroke-width: 2.1; }

/* ——— Кнопки, метки ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: 999px;
  border: 0; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover { background: var(--accent-ink); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { background: #E2E8FC; }
.btn-quiet { background: transparent; color: var(--muted); font-weight: 500; }
.btn-big { width: 100%; min-height: 56px; font-size: 1.02rem; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .count { background: var(--pom-soft); color: var(--pom); border-radius: 999px; padding: 0 9px; font-size: .82rem; }
.link { background: none; border: 0; color: var(--accent); padding: 10px 0; cursor: pointer; display: inline-block; text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 5px 14px; font-size: .86rem; text-decoration: none; font-weight: 500; }
.note { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-s); padding: 12px 16px; }
.error:empty { display: none; }
.error { color: var(--pom); font-weight: 600; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 40em; }
.fine { font-size: .84rem; color: var(--muted); margin-top: 20px; }

/* ——— Поиск ——— */
.search { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; min-height: 60px; padding-inline: 18px 6px; box-shadow: var(--shadow); }
.search:focus-within { border-color: rgba(51, 85, 209, .55); box-shadow: 0 0 0 4px rgba(51, 85, 209, .12), var(--shadow); }
.search-lead { color: var(--muted); display: flex; }
.search-input { flex: 1; border: 0; background: transparent; font-size: 1.1rem; padding: 14px 10px; min-width: 0; outline: none; }
.search-input::placeholder { color: #98A2B3; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-btn { border: 0; background: transparent; color: var(--muted); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.search-btn:hover { background: var(--surface); }
.search-btn.mic { color: var(--accent); }
.search-btn.mic.on { background: var(--pom); color: #fff; }

/* ——— Главная: дашборд ——— */
.tile { background: var(--surface); border-radius: 24px; padding: 20px; min-width: 0; }
.tile-label { font-size: .86rem; color: var(--muted); margin-bottom: 10px; font-weight: 500; }
.tile-link { display: inline-block; margin-top: 12px; font-weight: 600; text-decoration: none; }
.tile-link:hover { text-decoration: underline; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hello { color: var(--accent-ink); font-weight: 600; margin-bottom: 6px; }
.day-word { display: grid; gap: 2px; text-decoration: none; color: var(--ink); }
.day-ar { font-size: 2.4rem; font-weight: 650; color: var(--pom); line-height: 1.1; letter-spacing: -.02em; overflow-wrap: break-word; }
.day-lat { color: #8E5A64; }
.day-mean { font-size: 1.2rem; font-weight: 600; margin-top: 10px; }
.day-alt { color: var(--muted); }
.stat-big { font-size: 2.6rem; font-weight: 650; letter-spacing: -.03em; line-height: 1; margin-bottom: 14px; }
.stat-big span { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.meter { height: 10px; border-radius: 999px; background: var(--pom-soft); overflow: hidden; margin-bottom: 14px; }
.meter-fill { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.stat-line { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-done { background: var(--ok); } .dot-todo { background: #E8A3AF; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.mini-main { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ar { color: var(--pom); grid-column: 1; font-size: .95rem; }
.mini-date { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: .8rem; }
.tile-soon { display: grid; gap: 4px; align-content: start; text-decoration: none; color: var(--ink); padding: 18px; }
.tile-soon:hover { background: var(--surface-2); }
.tile-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--bg); color: var(--accent); display: grid; place-items: center; margin-bottom: 8px; }
.soon-name { font-weight: 600; }
.soon-desc { color: var(--muted); font-size: .86rem; }
.tile-soon .soon { justify-self: start; margin-top: 6px; background: var(--bg); }

/* ——— Словарь ——— */
.dict-head h1 { margin-bottom: 4px; }
.dict-head .lead { margin-bottom: 14px; }
.dict-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; position: sticky; top: 59px; z-index: 20; background: rgba(255, 255, 255, .97); padding: 8px 0 12px; }
.dict-bar > * { min-width: 0; }
.topic-select, .field select, .page-narrow > select { min-height: var(--tap); border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 0 16px; width: 100%; }
.segmented { display: inline-flex; background: var(--surface); border-radius: 14px; padding: 4px; gap: 4px; margin: 6px 0 14px; }
.segmented button { border: 0; background: transparent; border-radius: 11px; min-height: 42px; padding: 0 18px; cursor: pointer; color: var(--muted); font-weight: 500; }
.segmented button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-n { font-size: .8rem; opacity: .7; }
.abc { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.abc::-webkit-scrollbar { display: none; }
.abc-l { flex: none; min-width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--surface); cursor: pointer; font-weight: 600; }
.abc-all { padding: 0 14px; }
.abc-l[aria-pressed="true"] { background: var(--accent); color: #fff; }
.abc-l:disabled { opacity: .3; cursor: default; }
.topic-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: 10px; font-size: 1.15rem; font-weight: 650; }
.topic-now .link { font-size: .9rem; font-weight: 500; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.topic { background: var(--surface); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-height: 56px; }
.topic:hover { background: var(--accent-soft); color: var(--accent-ink); }
.topic-name { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.topic-n { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.help-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; background: var(--pom-soft); border-radius: 20px; padding: 18px 20px; }
.help-title { font-weight: 650; margin: 0; }
.help-sub { margin: 0; color: var(--muted); }
.help-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.found { color: var(--muted); margin: 4px 2px 8px; font-size: .92rem; }
.entries { border-top: 1px solid var(--line); }
.entry { display: grid; gap: 2px 24px; padding: 14px 4px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
.entry:hover { background: var(--surface); }
.entry-mean { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.entry-head { font-weight: 600; font-size: 1.04rem; }
.entry-alt { color: var(--muted); font-size: .95rem; }
.entry-aramit { display: grid; }
.entry-ar { color: var(--pom); font-size: 1.22rem; font-weight: 600; line-height: 1.3; }
.entry-sub { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.entry-aramit.missing { color: #98A2B3; font-size: .92rem; }
.entry-why { justify-self: start; background: var(--accent-soft); color: var(--accent-ink); font-size: .78rem; border-radius: 999px; padding: 2px 10px; margin-top: 4px; }
.more { display: block; margin: 16px auto; }
.more:not(.btn) { min-height: var(--tap); padding: 0 26px; border-radius: 999px; border: 0; background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.empty { text-align: center; padding: 48px 12px; max-width: 34em; margin: 0 auto; }
.empty-title { font-size: 1.15rem; font-weight: 650; }

/* ——— Карточка слова ——— */
.word { max-width: 760px; }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); padding: 8px 0; cursor: pointer; margin-bottom: 6px; }
.back .ic { transform: scaleX(-1); }
[dir="rtl"] .back .ic { transform: none; }
.word-head h1 { font-size: 2.1rem; margin-bottom: 4px; }
.word-sub { font-size: 1.15rem; color: var(--muted); }
.word-sec { margin-top: 26px; }
.word-sec h2 { font-size: .9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-bottom: 8px; }
.word-aramit { background: var(--pom-soft); border-radius: 24px; padding: 18px 22px 20px; }
.word-aramit h2 { color: #8E2A3C; }
.variants { list-style: none; margin: 0; padding: 0; }
.variants li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 8px 0; }
.variants li + li { border-top: 1px solid rgba(190, 47, 72, .15); }
.v-ar { color: var(--pom); font-size: 1.8rem; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
.v-lat { color: #8E5A64; font-size: 1.02rem; }
.v-arh { font-size: 1.45rem; }
.variants-loose p { margin: 4px 0; }
.word-he { font-size: 1.45rem; }
.forms { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.forms dt { color: var(--muted); }
.forms dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.forms .v-ar { font-size: 1.15rem; }
.missing-box p { color: var(--muted); }
.word-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stamp { color: var(--muted); font-size: .84rem; margin-top: 16px; }

/* ——— Новые слова ——— */
.page-head { margin-bottom: 16px; }
.tl-item { border-bottom: 1px solid var(--line); }
.tl-item .entry { border-bottom: 0; padding-top: 2px; }
.tl-meta { margin: 0; padding: 12px 4px 0; color: var(--muted); font-size: .86rem; }
.tl-kind { color: var(--ok); font-weight: 600; }
.tl-kind[data-kind="changed"] { color: var(--accent); }

/* ——— Формы ——— */
.page-narrow { max-width: 620px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; }
.tip { margin: 0; color: var(--muted); font-size: .86rem; }
.field input, .field textarea, .tr-row input { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 10px 14px; }
.field input:focus, .field textarea:focus, .tr-row input:focus { border-color: rgba(51, 85, 209, .6); outline: none; box-shadow: 0 0 0 4px rgba(51, 85, 209, .12); }
.more-fields { margin-bottom: 18px; }
.more-fields summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 10px 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.he-line { font-size: 1.2rem; }
.auth-options { display: grid; gap: 10px; margin-top: 18px; }
.auth-options .btn { background: var(--bg); border: 1px solid var(--line); }
.auth-options .btn:hover { background: var(--surface); }
.google .g { font-weight: 700; color: #4285F4; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); }
.auth-form .btn-big { margin-top: 6px; }
.code-input { font-size: 2rem !important; letter-spacing: .4em; text-align: center; }
.tr-row { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.tr-word { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.tr-word span { color: var(--muted); }
.sticky-actions { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); padding: 10px 0; }
.page-narrow > select { margin-bottom: 10px; }

/* ——— Профиль и управление ——— */
.role { color: var(--muted); }
.contacts { color: var(--muted); margin: 18px 0; }
.mine-list, .user-list { list-style: none; padding: 0; margin: 0; }
.mine-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.status { font-size: .82rem; border-radius: 999px; padding: 1px 10px; background: var(--accent-soft); color: var(--accent-ink); }
.status[data-status="approved"] { background: var(--ok-soft); color: var(--ok); }
.status[data-status="rejected"] { background: var(--pom-soft); color: var(--pom); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 16px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); white-space: nowrap; }
.tab[aria-current="page"] { background: var(--ink); color: #fff; }
.mod-card { background: var(--surface); border-radius: 20px; padding: 18px; margin-bottom: 14px; }
.mod-kind { font-weight: 650; margin-bottom: 2px; }
.mod-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .95rem; }
.mod-table th { text-align: start; color: var(--muted); font-weight: 400; padding: 6px 8px 6px 0; vertical-align: top; width: 28%; }
.mod-table td { padding: 4px 6px; vertical-align: top; }
.mod-table input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg); }
.mod-table tr.changed input { border-color: rgba(190, 47, 72, .5); background: var(--pom-soft); }
blockquote { margin: 8px 0; padding: 8px 14px; border-inline-start: 3px solid var(--line); color: var(--muted); }
.user { padding: 14px 0; border-top: 1px solid var(--line); }
.user.blocked { opacity: .55; }
.user-name { font-weight: 650; margin: 0; }
.user p { margin: 2px 0; }
.soon-page { text-align: center; margin: 30px auto; }
.soon-page .form-actions { justify-content: center; }
.soon-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }

.toast { position: fixed; inset-inline: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 80; max-width: 520px; margin: 0 auto;
  background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(16, 24, 40, .25); }
.toast[data-kind="error"] { background: var(--pom); }
.noscript { padding: 20px; }

/* ——— Планшет ——— */
@media (min-width: 640px) {
}

/* ——— Компьютер: меню слева всегда ——— */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: 100vh; width: auto; transform: none !important; box-shadow: none; background: var(--surface);
    border-inline-end: 1px solid var(--line); padding: 22px 16px 20px; }
  .side-close, .scrim, .top, .tabbar { display: none !important; }
  main { padding: 34px 36px 60px; }
  .dict-bar { top: 0; grid-template-columns: minmax(0, 1fr) 260px; }
  .abc { flex-wrap: wrap; overflow: visible; }
  .entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; padding: 14px 12px; }
  .entry-why { grid-column: 1 / -1; }
  .tr-row { grid-template-columns: 1.2fr 1fr 1fr; align-items: center; }
  .sticky-actions { bottom: 0; }
  .toast { bottom: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .side { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .btn, .entry, .chip-btn, .abc-l, .side-link, .topic { transition: background-color .15s, color .15s, box-shadow .15s; }
}

/* ——— Календарь и памятные даты ——— */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flip .ic { transform: scaleX(-1); }
[dir="rtl"] .flip .ic { transform: none; }
.cal-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; margin-bottom: 18px; }
.cal-page-head .lead { margin: 0; }
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.city { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.city-select { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 0 14px; color: var(--ink); }
.cal-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.cal-side h2 { margin-bottom: 12px; }

.cal { background: var(--surface); border-radius: 24px; padding: 16px 12px 14px; }
.cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; padding: 0 6px 12px; }
.cal-title { font-size: 1.2rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.cal-htitle { margin: 0; color: #8A6A1F; font-weight: 500; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-todaybtn { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: .74rem; color: var(--muted); padding: 4px 0; text-transform: capitalize; }
.cal-wd.is-shabbat { color: var(--accent); font-weight: 600; }
.cal-day { position: relative; display: grid; align-content: start; justify-items: center; gap: 1px; min-height: 58px; padding: 6px 2px; border: 0; border-radius: 12px; background: var(--bg); cursor: pointer; }
.cal-day:hover { background: var(--accent-soft); }
.cal-day.is-shabbat { background: #F3F5FD; }
.cal-g { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.cal-h { font-size: .68rem; color: #8A6A1F; line-height: 1.15; white-space: nowrap; overflow: hidden; max-width: 100%; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.is-today .cal-g { color: var(--accent); }
.cal-day.is-picked { background: var(--accent); }
.cal-day.is-picked .cal-g, .cal-day.is-picked .cal-h { color: #fff; }
.cal-dots { display: flex; gap: 3px; margin-top: 2px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.cal-dot[data-kind="birthday"] { background: var(--pom); }
.cal-day.is-picked .cal-dot { background: #fff; }
.day-panel { margin-top: 14px; padding: 4px 6px; }
.day-panel-title { font-weight: 650; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.day-panel-title span { color: #8A6A1F; font-weight: 500; }
.bd-body .link { justify-self: start; padding: 4px 0; }
.cal-main { order: -1; }
.day-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.day-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-list .ic-candle { color: var(--gold); }
.day-list .ic-cake { color: var(--pom); }

.yz-list { display: grid; gap: 10px; }
.yz, .bd { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; }
.yz > summary, .bd { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 14px 16px; cursor: pointer; }
.yz > summary::-webkit-details-marker { display: none; }
.yz[open] { box-shadow: var(--shadow); }
.yz.is-soon, .bd.is-soon { border-color: #EBCB7C; background: #FFFCF3; }
.yz-date, .bd-date { grid-row: span 3; display: grid; justify-items: center; align-content: center; width: 64px; min-height: 64px; border-radius: 16px; background: #FBF4E2; color: #7A5A10; }
.bd-date { background: var(--pom-soft); color: #8E2A3C; }
.yz-d, .bd-d { font-size: 1.5rem; font-weight: 650; line-height: 1; }
.yz-m, .bd-m { font-size: .72rem; }
.yz-body, .bd-body { display: grid; gap: 2px; min-width: 0; }
.yz-name, .bd-name { font-weight: 650; font-size: 1.05rem; }
.yz-parent { font-weight: 400; color: var(--muted); }
.yz-greg, .bd-greg, .bd-heb { color: var(--ink); font-size: .94rem; }
.bd-heb { color: #7A5A10; }
.yz-greg::first-letter, .bd-greg::first-letter { text-transform: uppercase; }
.yz-eve { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.yz-eve .ic { color: var(--gold); margin-top: 1px; }
.yz-when { grid-column: 2; justify-self: start; font-size: .8rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-top: 4px; }
.bd .yz-when { grid-column: 2; }
.yz-more { padding: 0 16px 16px 94px; color: var(--ink); }
[dir="rtl"] .yz-more { padding: 0 94px 16px 16px; }
.yz-more p { margin: 4px 0; }
.empty-soft { background: var(--surface); border-radius: 20px; padding: 20px; }
.all-names { margin-top: 26px; background: var(--surface); border-radius: 20px; padding: 6px 18px; }
.all-names summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.names { list-style: none; padding: 0; margin: 0 0 12px; }
.names li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }

.label { font-weight: 600; }
.seg-wide { max-width: 360px; }
.check { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 14px; cursor: pointer; line-height: 1.4; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.date-box { margin-bottom: 6px; }
.heb-date { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; }
.heb-date .field { margin-bottom: 12px; }
.date-result:empty { display: none; }
.date-result { background: #FBF4E2; color: #7A5A10; border-radius: 14px; padding: 12px 16px; font-weight: 600; }
.btn-wa { background: #E7F8EE; color: #0E7A3E; }
.btn-wa:hover { background: #D5F2E2; }
.wa-link { display: inline-flex; align-items: center; gap: 6px; color: #0E7A3E; font-weight: 600; text-decoration: none; font-size: .9rem; }
.tile-mem { background: #FFFBF0; }
.tile-mem .tile-label { color: #7A5A10; }
.mini-heb { color: #7A5A10; }
.mini-bd { color: var(--pom); }

@media (min-width: 640px) {
  .tile-mem, .tile-bd { grid-column: span 1; }
}
@media (min-width: 960px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
  .cal-main { position: sticky; top: 20px; order: 0; }
  .cal-day { min-height: 66px; }
  .cal-h { font-size: .72rem; }
  .tile-mem { grid-column: span 2; }
  .tile-bd { grid-column: span 2; }
}
.yz-kaddish { font-size: .86rem; color: #7A5A10; background: #FBF4E2; border-radius: 10px; padding: 4px 10px; justify-self: start; margin-top: 4px; }
.cal-dot[data-kind="kaddish"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold); }
/* Фонд общины */
.side-donate { display: flex; align-items: center; gap: 12px; min-height: 50px; margin-top: 14px; padding: 6px 14px; border-radius: 14px;
  background: var(--pom); color: #fff; text-decoration: none; font-weight: 600; }
.side-donate:hover, .side-donate[aria-current="page"] { background: #A3263D; }
.tile-donate { background: var(--pom-soft); }
.tile-donate .tile-ic { color: var(--pom); }
.tile-donate:hover { background: #F9E3E7; }
.donate { text-align: center; margin: 20px auto; }
.donate .lead { margin-inline: auto; }
.donate section { margin-top: 22px; text-align: start; }
.donate-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: var(--pom-soft); color: var(--pom); margin-bottom: 14px; }
.donate-links { display: grid; gap: 10px; }
.donate-details { white-space: pre-wrap; font: inherit; background: var(--surface); border-radius: 16px; padding: 14px 16px; margin: 0 0 10px; }
.donate .empty-soft { text-align: start; margin-top: 20px; }
/* Видео */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #1B2232; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #1B2232; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-btn { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.player-btn .ic { width: 72px; height: 72px; padding: 14px; border-radius: 50%; background: rgba(190, 47, 72, .92); stroke-width: 1.6; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.player-poster:hover .player-btn .ic { background: var(--pom); transform: scale(1.04); }
.player-out { display: block; text-decoration: none; background: linear-gradient(150deg, #2A3550, #1B2232); }
.player-cap { position: absolute; inset-inline: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 600; }
.tile-video { display: grid; gap: 16px; background: var(--surface); }
.tile-video .video-text h2 { font-size: 1.35rem; margin-bottom: 6px; }
.tile-video-empty { grid-template-columns: auto 1fr; align-items: start; background: #F3F5FD; }
.tile-video-empty .btn { margin-top: 10px; }
.videos-page .lead { margin-bottom: 18px; }
.video-add { margin-bottom: 22px; }
.video-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.video-add > summary::-webkit-details-marker { display: none; }
.video-add[open] > summary { margin-bottom: 16px; }
.video-add form { max-width: 620px; background: var(--surface); border-radius: 20px; padding: 18px; }
.video-list { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
.video { display: grid; gap: 12px; }
.video-text h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
@media (min-width: 640px) { .tile-video { grid-column: 1 / -1; } }
@media (min-width: 960px) {
  .tile-video { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; padding: 20px; }
  .tile-video-empty { grid-template-columns: auto 1fr; }
  .video-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: no-preference) { .player-btn .ic { transition: transform .15s, background-color .15s; } }
/* Фото */
.ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 16px; overflow: hidden; }
.ph-cell { padding: 0; border: 0; background: var(--surface); aspect-ratio: 1; cursor: zoom-in; overflow: hidden; }
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cell:hover img { opacity: .9; }
.filters.albums .chip-btn { min-height: 36px; font-size: .9rem; }
.ph-previews { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.ph-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 14px; overflow: hidden; }
.ph-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.cat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.mod-photo { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; display: block; margin: 8px 0; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0E121B; color: #fff; }
.lightbox::backdrop { background: #0E121B; }
.lightbox[open] { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; }
.lb-fig { margin: 0; display: grid; gap: 10px; justify-items: center; max-height: 100dvh; padding: 56px 0 20px; }
.lb-img { max-width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 6px; }
.lb-cap { text-align: center; max-width: 640px; padding: 0 10px; }
.lb-cap p { margin: 2px 0; } .lb-cap .muted { color: #A9B1C3; }
.lightbox .icon-btn { color: #fff; } .lightbox .icon-btn:hover { background: rgba(255, 255, 255, .1); }
.lb-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 10px; }
.lb-remove { position: absolute; bottom: 12px; inset-inline-end: 12px; color: #A9B1C3; }
.tile-photos { grid-column: 1 / -1; }
@media (min-width: 640px) { .ph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ph-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ph-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } }

/* Новости общины */
.tile-news { background: #F2F7F4; }
.tile-news .tile-label { color: #1E6B47; }
@media (min-width: 960px) { .tile-news { grid-column: span 2; } }
.news-page .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.news-page .filters .chip-btn { text-decoration: none; color: var(--ink); }
.news-page .filters .chip-btn[aria-pressed="true"] { color: #fff; }
.news-upcoming { background: var(--accent-soft); border-radius: var(--r); padding: 16px 18px; margin-bottom: 18px; }
.news-upcoming h2 { font-size: 1.05rem; margin-bottom: 4px; }
.news-list { display: grid; gap: 14px; }
.news { background: var(--surface); border-radius: var(--r); padding: 18px 20px; border-inline-start: 5px solid var(--accent); }
.news h2 { font-size: 1.3rem; margin: 4px 0 8px; }
.news-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--accent-ink); }
.news-when, .news-where { margin: 0 0 6px; }
.news-when .ic { color: var(--muted); vertical-align: -3px; margin-inline-end: 6px; }
.news-when .chip { margin-inline-start: 8px; padding: 2px 10px; font-size: .8rem; }
.news-body p { margin: 0 0 10px; white-space: pre-line; }
.news-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; font-size: .9rem; }
.news-foot .muted { flex: 1 1 auto; }
.news-congrats { border-color: var(--gold); }
.news-congrats .news-kind { color: #7A5A10; }
.news-sad { border-color: #6B7280; background: #F4F4F6; }
.news-sad .news-kind { color: #4B5563; }
.news-announce { border-color: var(--ok); }
.news-announce .news-kind { color: var(--ok); }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.kind-choice { display: grid; gap: 8px; }
.kind-opt { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg); cursor: pointer; line-height: 1.35; }
.kind-opt input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.kind-opt .ic { color: var(--accent); flex: none; }
.kind-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kind-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Главная — лента общины в духе соцсети */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

.c-news { background: #E6F3EC; color: #1E6B47; } .c-dictionary, .c-new { background: var(--pom-soft); color: var(--pom); }
.c-memorial { background: #FFF6E0; color: #8A6410; } .c-birthdays { background: #FDEBF3; color: #B0306A; }
.c-photos { background: #FFF1E6; color: #B45309; } .c-videos { background: #ECEFFD; color: var(--accent); }

.composer { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.composer-row { display: flex; align-items: center; gap: 12px; }
.composer-input { flex: 1; min-height: 50px; display: flex; align-items: center; padding: 0 18px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; }
.composer-input:hover { background: var(--surface-2); color: var(--ink); }
.composer-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.quick { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 8px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; min-width: 0; }
.quick:hover { background: var(--surface); }
.q-event .ic { color: #1E6B47; } .q-congrats .ic { color: #B0306A; } .q-photo .ic { color: #B45309; } .q-word .ic { color: var(--pom); }

.ava { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: #E6F3EC; color: #1E6B47; }
.ava-me { background: var(--accent); color: #fff; }
.ava-pom { background: var(--pom-soft); color: var(--pom); } .ava-accent { background: var(--accent-soft); color: var(--accent); } .ava-gold { background: #FFF1E6; color: #B45309; }
.feed { display: grid; gap: 14px; }
.post { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.post.is-pinned { border-color: #CBD5F5; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-who { display: grid; min-width: 0; }
.post-who b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-who span { color: var(--muted); font-size: .84rem; }
.post-title { font-size: 1.2rem; margin: 0 0 8px; line-height: 1.3; }
.post-text { margin: 0 0 6px; } .post-text p { margin: 0 0 8px; white-space: pre-line; }
.post-event { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 4px 0 10px; }
.post-event b { display: block; font-weight: 600; } .post-event span { display: block; color: var(--muted); font-size: .92rem; }
.post-event .chip { display: inline-block; margin-top: 6px; background: #fff; color: var(--accent-ink); font-size: .8rem; padding: 3px 10px; }
.post-event-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--accent); display: grid; place-items: center; }
.news-congrats .post-event, .news-congrats.post .ava:not(.ava-me) { background: #FFF6E0; }
.news-sad .post-event { background: #F1F2F4; }
.post-media { margin: 4px -16px 8px; } .post-media .player { border-radius: 0; }
.post-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.post-act { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .92rem; }
.post-act:hover { background: var(--surface); }
.post-act.wa { color: #0E7A3E; margin-inline-start: auto; }
[dir="rtl"] .post-act .ic-chevron { transform: scaleX(-1); }
.post-words-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.post-words-list a { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); min-width: 0; }
.post-words-list a:hover { background: var(--pom-soft); }
.pw-ru { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-ar { color: var(--pom); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-grid { display: grid; gap: 4px; grid-template-columns: repeat(2, 1fr); border-radius: 14px; overflow: hidden; }
.post-grid.n1 { grid-template-columns: 1fr; }
.post-grid img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.post-grid.n1 img { aspect-ratio: 4 / 3; }
.feed-more { justify-self: center; }
.card-day { background: var(--pom-soft); }
.card-day .day-ar { font-size: 2rem; } .card-day .wa-link { margin-top: 12px; }
.card-week { background: #FFFBF0; }
.week-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.week-list a { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 12px; padding: 8px 6px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.week-list a:hover { background: rgba(255, 255, 255, .7); }
.wk-date { display: grid; justify-items: center; background: #fff; border-radius: 12px; padding: 4px 0; line-height: 1.1; }
.wk-date b { font-size: 1.2rem; } .wk-date span { font-size: .72rem; color: var(--muted); }
.wk-body { display: grid; min-width: 0; }
.wk-title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.wk-sub { color: var(--muted); font-size: .84rem; line-height: 1.3; } .wk-sub .ic { vertical-align: -2px; margin-inline-end: 4px; }
.wk-when { justify-self: start; margin-top: 4px; font-size: .78rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.wk-birthday .wk-sub .ic { color: #B0306A; } .wk-memorial .wk-sub .ic { color: #8A6410; } .wk-event .wk-sub .ic { color: #1E6B47; }

@media (min-width: 640px) {
  .composer-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .post { padding: 18px 20px; } .post-media { margin-inline: -20px; }
  .post-words-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  main:has(> .home) { max-width: 1180px; }
  .post-words-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Главная: приветствие, баннер, «Сегодня в общине» */
.home-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.home-top .today { color: var(--muted); font-size: .9rem; margin-bottom: 4px; }
.home-h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }
.banner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: 24px; color: #fff;
  background: linear-gradient(120deg, #2A49C4 0%, #3355D1 45%, #2B5BE0 100%); box-shadow: 0 10px 30px rgba(51, 85, 209, .25); }
.banner-text { position: relative; z-index: 1; padding: 22px 20px; display: grid; gap: 10px; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.banner-tag { justify-self: start; font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 3px 12px; }
.banner h2 { color: #fff; font-size: 1.55rem; line-height: 1.2; margin: 0; max-width: 15em; }
.banner p { margin: 0; opacity: .9; max-width: 30em; }
.banner .search { margin-top: 8px; box-shadow: none; border-color: transparent; }
.section-title { font-size: 1.2rem; margin: 6px 2px -4px; }
.today-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.today-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; min-width: 0; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tc-fund { background: var(--pom-soft); color: var(--pom); } .tc-word { background: #FFF3D6; color: #9A6A00; } .tc-week { background: var(--accent-soft); color: var(--accent); }
.tc-label { font-size: .8rem; color: var(--muted); margin: 0; font-weight: 500; }
.tc-title { font-weight: 650; margin: 0; }
.tc-text { color: var(--muted); margin: 0; }
.card-fund .btn { justify-self: start; }
.fund-goal-head { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.meter-blue { background: var(--accent-soft); margin-bottom: 6px; } .meter-blue .meter-fill { background: var(--accent); }
.today-card.card-day { background: var(--bg); } .today-card .day-ar { font-size: 2rem; }
.today-card.card-week { background: var(--bg); }
.today-card .tile-link { margin-top: 0; }
@media (min-width: 640px) {
  .home-h1 { font-size: 2rem; }
  .banner-text { padding: 30px 30px 28px; }
  .banner h2 { font-size: 2rem; }
  .banner-text { max-width: 62%; }
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home { grid-template-columns: minmax(0, 1fr); }
}

/* Формы глагола */
.entry-forms { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verb-forms { display: grid; gap: 8px; }
.verb-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); }
.verb-form:hover { background: var(--pom-soft); }
.vf-kind { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); font-weight: 600; }
.vf-ru { font-weight: 600; }
.vf-ar { color: var(--pom); font-weight: 600; }
.vf-ar.missing { color: var(--muted); font-weight: 400; }
.vf-lat { grid-column: 2; color: var(--muted); font-size: .88rem; }
@media (min-width: 1100px) { }

/* Управление: таблица слов */
main:has(.wt-page) { max-width: none; }
.wt-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.wt-bar select, .wt-search { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; color: var(--ink); caret-color: var(--accent); -webkit-text-fill-color: var(--ink); font: inherit; }
.wt-search { flex: 1 1 220px; }
.wt-save { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; background: var(--bg); }
.wt-save .wt-info { flex: 1; margin: 0; }
.wt-wrap { overflow: auto; max-height: calc(100vh - 190px); min-height: 320px; border: 1px solid var(--line); border-radius: 14px; }
.wt { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .95rem; }
.wt th { position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: start; font-weight: 600; font-size: .82rem; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wt tbody tr { content-visibility: auto; contain-intrinsic-size: auto 42px; }
.wt td { border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); padding: 0; background: var(--bg); }
.wt td input, .wt td select { width: 100%; min-height: 40px; border: 0; background: transparent; padding: 6px 8px; font: inherit; color: var(--ink); }
.wt td input:focus, .wt td select:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
.wt td.dirty { background: #FFF6CC; }
.wt tr.is-new td { background: #EEF7F1; }
.wt .c-n { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); color: var(--muted); font-size: .78rem; text-align: center; padding: 0 8px; min-width: 48px; }
.wt th.c-n { z-index: 3; }
.wt .c-ru { min-width: 260px; } .wt .c-ar, .wt .c-latin, .wt .c-arHebrew { min-width: 150px; } .wt .c-he { min-width: 170px; }
.wt .c-category { min-width: 160px; } .wt .c-comment { min-width: 240px; }
.wt td.c-ar input { color: var(--pom); font-weight: 600; }
.wt-note { margin-top: 10px; font-size: .88rem; }

/* Управление: конструктор */
.cs-page { display: grid; gap: 16px; max-width: 820px; }
.cs-card { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.cs-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.cs-list { display: grid; gap: 8px; margin-top: 12px; }
.cs-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.cs-row .cs-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cs-row-block { grid-template-columns: minmax(0, 1fr); }
.cs-block-name { font-weight: 600; }
.cs-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--accent); }
.cs-names { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.cs-names label { display: grid; gap: 2px; }
.cs-names input, .cs-names textarea { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font: inherit; background: #fff; width: 100%; }
.cs-small { font-size: .78rem; color: var(--muted); }
.cs-label { font-weight: 600; margin: 12px 0 6px; }
.cs-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cs-toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.cs-arrows { display: inline-flex; gap: 6px; }
.cs-arrows .icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; }
.cs-arrows .icon-btn:disabled { opacity: .35; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 640px) {
  .cs-names { grid-template-columns: 1fr 1fr; }
  .cs-row .cs-side { justify-content: flex-end; }
  .cs-row-block { grid-template-columns: minmax(0, 1fr) auto; }
}
.verb-same { margin: 0 0 10px; font-size: 1.05rem; } .verb-same .vf-kind { display: inline; }

/* Проверка повторов */
.dup-box { background: #FFF8E6; border: 1px solid #F3D98B; border-radius: 16px; padding: 14px 16px; margin: 0 0 16px; }
.dup-title { font-weight: 700; margin: 0 0 2px; color: #7A5A10; }
.dup-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.dup-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: #fff; border-radius: 12px; padding: 10px 12px; }
.dup-word { flex: 1 1 220px; display: grid; gap: 2px; text-decoration: none; color: var(--ink); }
.dup-ar { color: var(--pom); font-weight: 600; }
.dup-why { font-size: .82rem; color: var(--accent-ink); }
.dup-ok { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.dup-ok input { width: 22px; height: 22px; accent-color: var(--accent); }

/* Вход и регистрация: коллаж из слов словаря, поверх — тёмная стеклянная карточка. */
body.gated .top, body.gated .side, body.gated .tabbar { display: none; }
body.gated { background: #141A2B; }
.gate { position: fixed; inset: 0; z-index: 80; overflow-y: auto; display: grid; place-items: center; padding: 24px 14px; background: #141A2B; }
.gate-bg { position: fixed; inset: -4%; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 120px; gap: 10px;
  padding: 10px; transform: rotate(-6deg) scale(1.08); opacity: .55; pointer-events: none; }
.gate-bg::after { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(20,26,43,.35), rgba(20,26,43,.92) 70%); }
.gate-tile { display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; border-radius: 16px; color: #fff; }
.gate-tile.t0 { background: #3355D1; } .gate-tile.t1 { background: #BE2F48; } .gate-tile.t2 { background: #B8862B; }
.gate-tile.t3 { background: #12805C; } .gate-tile.t4 { background: #5B3FA8; } .gate-tile.t5 { background: #2C3A5C; }
.gate-tile:nth-child(3n) { grid-row: span 2; }
.gate-ar { font-size: 26px; font-weight: 750; line-height: 1.1; }
.gate-ru { font-size: 14px; opacity: .8; }
.gate-card { position: relative; width: min(100%, 420px); padding: 26px 22px 20px; border-radius: 26px; color: #fff;
  background: rgba(22, 28, 46, .78); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 60px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.gate-close { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); }
.gate-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 18px; }
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.08); }
.gate-tab { min-height: 42px; padding: 0 8px; white-space: nowrap; font-size: 15px; border: 0; border-radius: 999px; color: rgba(255,255,255,.75); background: none; font: inherit; font-weight: 600; cursor: pointer; }
.gate-tab[aria-selected="true"] { color: #141A2B; background: #fff; }
.gate-title { margin: 22px 0 6px; font-size: 26px; line-height: 1.2; }
.gate-lead { margin: 0 0 14px; color: rgba(255,255,255,.75); line-height: 1.5; }
.gate-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); margin-top: 16px; border-radius: 14px;
  color: #141A2B; background: #fff; font-weight: 650; text-decoration: none; }
.gate-g { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #3355D1; font-weight: 800; font-size: 14px; }
.gate-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; color: rgba(255,255,255,.6); font-size: 14px; }
.gate-or::before, .gate-or::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.18); }
.gate-form { display: grid; gap: 12px; margin-top: 10px; }
.gate-field { display: grid; gap: 6px; }
.gate-field label { font-size: 14px; color: rgba(255,255,255,.8); }
.gate-field input { width: 100%; min-height: var(--tap); padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
  color: #fff; background: rgba(255,255,255,.07); font: inherit; font-size: 16px; }
.gate-field input::placeholder { color: rgba(255,255,255,.4); }
.gate-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.gate-pass { position: relative; }
.gate-pass input { padding-inline-end: 48px; }
.gate-eye { position: absolute; inset-block: 0; inset-inline-end: 4px; width: 44px; border: 0; background: none; color: rgba(255,255,255,.7); cursor: pointer; }
.gate-eye .ic { fill: none; stroke: currentColor; stroke-width: 1.8; }
.gate-link { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gate-error { min-height: 0; margin: 0; color: #FFB4C0; font-size: 14px; }
.gate-error:empty { display: none; }
.gate-submit { min-height: var(--tap); margin-top: 6px; border: 0; border-radius: 14px; color: #1B2232; background: var(--gold); font: inherit; font-weight: 750; font-size: 17px; cursor: pointer; width: 100%; }
.gate-submit:disabled { opacity: .6; }
.gate-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 16px; color: rgba(255,255,255,.65); font-size: 14px; }
.gate-fine { margin: 18px 0 0; color: rgba(255,255,255,.5); font-size: 12.5px; line-height: 1.5; }
.gate-code { color: var(--ink); background: #fff; border-radius: 18px; padding: 4px; }
.gate-card :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pass-form { margin: 18px 0 24px; }
@media (prefers-reduced-motion: no-preference) { .gate-card { animation: gate-in .35s ease-out; } }
@keyframes gate-in { from { opacity: 0; transform: translateY(12px); } }
.user.pending { border-inline-start: 4px solid var(--gold); }
.pending-note { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-s); background: #FFF6DD; font-weight: 600; }
.cs-radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.cs-radio input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--accent); }
.cs-radio > span { display: grid; gap: 2px; }
.cs-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Двойной календарь: крупно обычная дата, под ней мелко еврейская (число и месяц), праздники подсвечены. */
.cal-h { display: grid; justify-items: center; gap: 0; white-space: normal; }
.cal-hd { font-size: .74rem; font-weight: 600; line-height: 1.15; }
.cal-hm { font-size: .6rem; line-height: 1.1; opacity: .9; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hol { display: none; max-width: 100%; margin-top: 2px; padding: 1px 5px; border-radius: 6px; font-size: .62rem; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6B4A0B; background: rgba(227, 179, 65, .28); }
.cal-day.hol-yomtov, .cal-day.hol-holiday { background: #FFF5DA; }
.cal-day.hol-modern, .cal-day.hol-minor { background: #FBF7EC; }
.cal-day.hol-fast { background: repeating-linear-gradient(135deg, #F2F3F6 0 6px, #E8EAF0 6px 7px); }
.cal-day.hol-fast .cal-hol { color: #4B5468; background: rgba(102, 112, 133, .16); }
.cal-day.hol-yomtov::after, .cal-day.hol-holiday::after { content: ''; position: absolute; inset-block-start: 5px; inset-inline-end: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.cal-day.is-picked.hol-yomtov, .cal-day.is-picked.hol-holiday, .cal-day.is-picked.hol-fast, .cal-day.is-picked.hol-modern, .cal-day.is-picked.hol-minor { background: var(--accent); }
.cal-day.is-picked .cal-hol { color: #fff; background: rgba(255,255,255,.22); }
.cal-day.is-picked::after { background: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 6px 10px; font-size: .76rem; color: var(--muted); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-g { font-weight: 700; color: var(--ink); font-size: .9rem; }
.lg-h { color: #8A6A1F; font-size: .72rem; font-weight: 600; }
.lg-sw { width: 14px; height: 14px; border-radius: 4px; background: #FFF5DA; box-shadow: inset 0 0 0 1px rgba(227,179,65,.6); }
.lg-sw.hol-fast { background: repeating-linear-gradient(135deg, #F2F3F6 0 3px, #D9DCE4 3px 4px); box-shadow: inset 0 0 0 1px #D9DCE4; }
@media (min-width: 720px) { .cal-hol { display: block; } }

.hol-day { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 4px; }
.hol-day li { padding: 8px 12px; border-radius: 10px; background: #FFF5DA; }
.hol-day li.hol-fast { background: #F2F3F6; }
.hol-day li.hol-rc, .hol-day li.hol-minor, .hol-day li.hol-modern { background: #FBF7EC; }
.hol-box { margin-top: 26px; }
.hol-box h2 { margin-bottom: 10px; }
.hol-sub { color: var(--muted); font-weight: 500; font-size: .85em; }
.hol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hol-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.hol-mark { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--gold); }
.hol-list li.hol-fast .hol-mark { background: #98A2B3; }
.hol-list li.hol-rc .hol-mark { background: transparent; box-shadow: inset 0 0 0 2px var(--gold); }
.hol-list li.hol-modern .hol-mark { background: var(--accent); }
.hol-name { margin: 0; font-weight: 650; }
.hol-list li.hol-rc .hol-name { font-weight: 500; }
.hol-dates { margin: 2px 0 0; font-size: .9rem; }
.hol-heb { color: #8A6A1F; }
.hol-when { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
.hol-when:empty { display: none; }
.hol-until { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.hol-heb { white-space: nowrap; }
@media (max-width: 719px) {
  .cal-grid { gap: 3px; }
  .cal-day { padding: 6px 0 5px; }
  .cal-hm { font-size: .54rem; letter-spacing: -.02em; text-overflow: clip; }
}

/* Светлый фон сайта: те же плитки со словами, но пастельные и за белой дымкой, чтобы текст читался. */
.site-bg { position: fixed; inset: -6%; z-index: -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 120px;
  gap: 12px; padding: 12px; transform: rotate(-6deg) scale(1.08); pointer-events: none; }
.site-bg::after { content: ''; position: fixed; inset: -20%; background: rgba(255, 255, 255, .58); }
.site-bg .gate-tile { color: inherit; }
.site-bg .gate-tile.t0 { background: #E4EAFC; color: #4A63C4; } .site-bg .gate-tile.t1 { background: #FBE4E8; color: #B4475A; }
.site-bg .gate-tile.t2 { background: #FBEFD2; color: #A47A22; } .site-bg .gate-tile.t3 { background: #DDF1E7; color: #2F8063; }
.site-bg .gate-tile.t4 { background: #ECE6FA; color: #6A55A8; } .site-bg .gate-tile.t5 { background: #E6EAF2; color: #4E5B78; }
.site-bg .gate-ar { opacity: .75; } .site-bg .gate-ru { opacity: .6; }
body.has-bg { background: #F7F8FB; }
@media (min-width: 960px) { body.has-bg .side { background: rgba(255, 255, 255, .92); } }
@media (prefers-reduced-transparency: reduce) { .site-bg::after { background: rgba(255, 255, 255, .8); } }
.site-bg::after { background: rgba(255, 255, 255, .45); }
body.has-bg main { background: rgba(255, 255, 255, .8); border-radius: 28px; margin-top: 14px; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(16,24,40,.03), 0 10px 40px rgba(16,24,40,.05); }
@media (max-width: 719px) { body.has-bg main { margin: 10px 8px; border-radius: 22px; padding-inline: 12px; } }

/* Управление → Тексты сайта */
.tx-page { display: grid; gap: 12px; padding-bottom: 80px; }
.tx-page .lead { margin: 0; max-width: 70ch; }
.tx-tools { display: grid; gap: 10px; position: sticky; top: 64px; z-index: 5; padding: 10px 0; background: rgba(255,255,255,.94); }
.tx-search { width: 100%; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 16px; }
.tx-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tx-chips .chip-btn { flex: none; }
.tx-count { margin: 0; font-size: .88rem; }
.tx-list { display: grid; gap: 8px; }
.tx-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.tx-row.is-custom { border-color: rgba(51,85,209,.35); }
.tx-row.is-dirty { border-color: var(--gold); background: #FFFBEF; }
.tx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tx-key { font-size: .72rem; color: var(--muted); direction: ltr; overflow-wrap: anywhere; }
.tx-reset { width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.tx-reset:hover { background: var(--surface); }
.tx-row:not(.is-custom) .tx-reset { visibility: hidden; }
.tx-fields { display: grid; gap: 6px; margin-top: 4px; }
.tx-field { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 6px; }
.tx-field .tx-warn { grid-column: 2; margin: 0; font-size: .8rem; color: var(--pom); }
.tx-field .tx-warn:empty { display: none; }
.tx-lang { padding-top: 11px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.tx-field input, .tx-field textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15px; resize: vertical; }
.tx-field input::placeholder, .tx-field textarea::placeholder { color: #98A2B3; }
.tx-field .is-bad { border-color: var(--pom); background: var(--pom-soft); }
.tx-savebar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; pointer-events: none; }
.tx-savebar .btn { pointer-events: auto; box-shadow: 0 8px 24px rgba(51,85,209,.3); }
@media (min-width: 900px) { .tx-fields { grid-template-columns: 1fr 1fr; gap: 10px; } .tx-savebar { bottom: 18px; } .tx-tools { top: 0; } }

/* Раздел «Календарь» */
.cp-list { display: grid; gap: 8px; }
.cp-date { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.cp-date:hover { background: var(--accent-soft); }
.cp-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #FFF5DA; color: #8A6A1F; }
.cp-ic.k-birthday { background: var(--pom-soft); color: var(--pom); }
.cp-body { display: grid; gap: 2px; min-width: 0; }
.cp-name { font-weight: 650; }
.cp-sub { font-size: .86rem; color: var(--muted); }
.cp-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: .92rem; }
.cp-legend { display: flex; gap: 14px; margin: 0 0 8px; font-size: .8rem; color: var(--muted); }
.cp-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cp-when { color: var(--muted); font-size: .84rem; white-space: nowrap; align-self: start; padding-top: 2px; }

/* Фонд общины внизу главной: широкая карточка */
.home-fund { margin-top: 28px; }
@media (min-width: 720px) {
  .home-fund .card-fund { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; }
  .home-fund .card-fund > .tc-head { grid-column: 1; }
  .home-fund .card-fund > :not(.tc-head):not(.btn) { grid-column: 1; }
  .home-fund .card-fund > .btn { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
.side-foot .side-donate { margin-top: 20px; margin-bottom: 8px; }
@media (max-width: 959px) { .side-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); } }

/* Баннер главной: тёмный, с плитками слов словаря — как на странице входа. */
.banner { background: #141A2B; box-shadow: 0 14px 36px rgba(20, 26, 43, .28); isolation: isolate; }
.banner-bg { position: absolute; inset: -30% -10%; z-index: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: 58px;
  gap: 7px; transform: rotate(-6deg); opacity: .85; pointer-events: none; }
.banner-bg .gate-tile { padding: 7px 10px; border-radius: 11px; justify-content: center; }
.banner-bg .gate-tile:nth-child(3n) { grid-row: auto; }
.banner-bg .gate-tile:nth-child(7n) { grid-row: span 2; }
.banner-bg .gate-ar { font-size: 16px; font-weight: 750; white-space: nowrap; }
.banner-bg .gate-ru { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 26, 43, .9) 0%, rgba(20, 26, 43, .7) 42%, rgba(20, 26, 43, .08) 75%); }
[dir="rtl"] .banner::after { background: linear-gradient(270deg, rgba(20, 26, 43, .9) 0%, rgba(20, 26, 43, .7) 42%, rgba(20, 26, 43, .08) 75%); }
@media (max-width: 719px) { .banner::after { background: linear-gradient(180deg, rgba(20, 26, 43, .45) 0%, rgba(20, 26, 43, .8) 100%); } }
.banner .banner-tag { background: rgba(227, 179, 65, .2); border-color: rgba(227, 179, 65, .55); color: #F6D78A; }
.banner h2, .banner .banner-text > p { text-shadow: 0 1px 14px rgba(20, 26, 43, .9), 0 0 2px rgba(20, 26, 43, .6); }

/* Управление → Уведомления */
.nt-page { display: grid; gap: 16px; max-width: 760px; }
.nt-page .lead { margin: 0; }
.nt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nt-step { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.nt-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.nt-step-title { margin: 4px 0 4px; font-weight: 650; }
.nt-step p.muted { margin: 0 0 10px; }
.nt-token { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-token input { flex: 1 1 240px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-family: ui-monospace, monospace; font-size: 15px; }
.nt-ok { margin: 0; color: #12805C; font-weight: 650; }
.nt-wait { flex-basis: 100%; margin: 4px 0 0; }
.nt-chats { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 6px; }
.nt-chats li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); }
.nt-more { margin-top: 10px; }
.nt-link { overflow-wrap: anywhere; font-size: .9rem; }
.perm-box { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; }
.perm-box legend { padding: 0 6px; font-size: .88rem; color: var(--muted); }
.perm { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.perm input { width: 20px; height: 20px; accent-color: var(--accent); }
/* Вкладки управления переносятся на новые строки — на телефоне видно все сразу. */
.tabs { flex-wrap: wrap; overflow-x: visible; }
.tabs .tab { flex: none; }
.nt-chats .nt-chat { display: grid; gap: 6px; padding: 12px 14px; }
.nt-chat-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.nt-kinds { display: grid; gap: 0 14px; }
@media (min-width: 720px) { .nt-kinds { grid-template-columns: 1fr 1fr; } }
.nt-off { margin: 0; color: var(--pom); font-size: .88rem; }

.mf-photo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mf-photo-preview { display: grid; place-items: center; width: 96px; height: 120px; border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--muted); border: 1px dashed var(--line); }
.mf-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.mf-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mf-photo-actions label { cursor: pointer; }

/* Подвал «По всем вопросам» */
.site-foot { padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); }
body.gated .site-foot { display: none; }
.foot-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 14px; padding: 22px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #1B2440 0%, #141A2B 100%); box-shadow: 0 12px 30px rgba(20, 26, 43, .2); }
.foot-title { margin: 0; font-size: 1.25rem; font-weight: 750; }
.foot-lead { margin: 2px 0 0; color: rgba(255,255,255,.72); }
.foot-links { display: grid; gap: 10px; }
.foot-btn { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-radius: 16px; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.foot-btn:hover, .foot-btn:focus-visible { background: rgba(255,255,255,.13); }
.foot-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.foot-tg .foot-ic { background: #2AABEE; }
.foot-mail .foot-ic { background: var(--gold); color: #1B2232; }
.foot-ic .ic { fill: none; stroke: currentColor; stroke-width: 1.8; }
.foot-tg .foot-ic .ic { fill: #fff; stroke: none; }
.foot-label { display: grid; gap: 1px; min-width: 0; }
.foot-label small { color: rgba(255,255,255,.7); font-size: .88rem; overflow-wrap: anywhere; }
.foot-made { margin: 4px 0 0; font-size: .82rem; color: rgba(255,255,255,.5); }
@media (min-width: 720px) {
  .foot-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 26px 30px; }
  .foot-links { grid-auto-flow: column; }
  .foot-made { grid-column: 1 / -1; }
}
@media (min-width: 960px) { .site-foot { padding: 8px 32px 32px; } }
/* В меню */
.side-contacts { display: grid; gap: 2px; margin-top: 16px; }
.side-contact { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 8px; border-radius: 12px; color: inherit; text-decoration: none; font-size: .95rem; }
.side-contact:hover { background: var(--surface); }
.ct-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; }
.ct-tg { background: #2AABEE; color: #fff; }
.ct-tg .ic { fill: #fff; stroke: none; }
.ct-mail { background: #FFF1CC; color: #8A6A1F; }
.ct-mail .ic { fill: none; stroke: currentColor; stroke-width: 1.8; }
.side-install { width: 100%; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; }

/* Предложение установить на телефон */
.in-sheet { position: fixed; z-index: 90; inset-inline: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: 440px; margin-inline: auto;
  padding: 18px 18px 16px; border-radius: 22px; color: #fff; background: rgba(22, 28, 46, .96); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 50px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
@media (min-width: 960px) { .in-sheet { bottom: 24px; inset-inline: auto 24px; } }
@media (prefers-reduced-motion: no-preference) { .in-sheet { animation: in-up .35s ease-out; } }
@keyframes in-up { from { opacity: 0; transform: translateY(24px); } }
.in-close { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; color: #fff; background: rgba(255,255,255,.08); }
.in-head { display: flex; align-items: center; gap: 12px; padding-inline-end: 40px; }
.in-icon { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.in-title { margin: 0; font-size: 1.08rem; font-weight: 750; line-height: 1.3; }
.in-text { margin: 12px 0 0; color: rgba(255,255,255,.78); line-height: 1.5; }
.in-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.in-actions .btn-main { background: var(--gold); color: #1B2232; }
.in-actions .btn-quiet { color: rgba(255,255,255,.8); }
.in-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.in-steps li { display: flex; align-items: center; gap: 10px; }
.in-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 700; font-size: .85rem; flex: none; }
.in-sym { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.1); color: #6CB7FF; margin-inline-start: auto; }
.in-sym .ic { fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Галерея памяти: чёрная страница, золото свечи, портреты по годам. Тихо и торжественно. */
body.page-dark main { background: #0D0E12 !important; color: #ECE6D8; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
body.page-dark .site-foot .foot-inner { background: linear-gradient(135deg, #17181E, #0D0E12); }
.gl-page { --gl-gold: #D9B45A; --gl-gold-soft: rgba(217, 180, 90, .16); --gl-ink: #ECE6D8; --gl-muted: #9C978C; --gl-card: #15161C;
  --gl-serif: Georgia, 'Noto Serif', 'Times New Roman', serif; display: grid; gap: 18px; color: var(--gl-ink); }
.gl-hero { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 34px 12px 26px; overflow: hidden; border-radius: 22px;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(217, 180, 90, .2), transparent 70%); }
@media (prefers-reduced-motion: no-preference) { }
@keyframes gl-glow { from { opacity: .65; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }
.gl-hero h1 { margin: 4px 0 0; font-family: var(--gl-serif); font-weight: 600; font-size: clamp(2.1rem, 6vw, 3.2rem); letter-spacing: .01em; color: #F4EEDF; }
.gl-zl { margin: 0; font-family: var(--gl-serif); font-size: 1.25rem; color: var(--gl-gold); direction: rtl; }
.gl-lead { margin: 4px 0 0; max-width: 46ch; color: var(--gl-muted); line-height: 1.6; }
.gl-add { margin-top: 10px; background: var(--gl-gold) !important; color: #15120A !important; border: 0; }
.gl-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.gl-search { flex: 1 1 260px; min-height: var(--tap); padding: 0 16px; border-radius: 14px; font-size: 16px; color: var(--gl-ink);
  background: #17181F; border: 1px solid rgba(255,255,255,.1); }
.gl-search::placeholder { color: #6F6B63; }
.gl-search:focus { outline: 2px solid var(--gl-gold); outline-offset: 1px; }
.gl-page .seg-small { background: #17181F; }
.gl-page .seg-small button { color: var(--gl-muted); }
.gl-page .seg-small button[aria-pressed="true"] { background: #2A2B33; color: var(--gl-ink); }
.gl-count { margin: 0; font-size: .9rem; color: var(--gl-muted) !important; }
.gl-yearnav { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-yearnav:empty { display: none; }
.gl-yearnav .chip-btn { min-height: 34px; padding: 0 12px; font-size: .9rem; text-decoration: none; color: var(--gl-ink); background: #17181F; border-color: rgba(255,255,255,.1); }
.gl-yearnav .chip-btn:hover { border-color: var(--gl-gold); color: var(--gl-gold); }
.gl-years { display: grid; gap: 34px; }
.gl-year { scroll-margin-top: 80px; }
.gl-year-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; }
.gl-year-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(217,180,90,.6), transparent); align-self: center; }
[dir="rtl"] .gl-year-title::after { background: linear-gradient(270deg, rgba(217,180,90,.6), transparent); }
.gl-y { font-family: var(--gl-serif); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--gl-gold); }
.gl-hy { font-size: .95rem; color: var(--gl-muted); }
.gl-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .gl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .gl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gl-card { border-radius: 18px; background: var(--gl-card); border: 1px solid rgba(255,255,255,.07); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.gl-card:hover { border-color: rgba(217,180,90,.55); }
@media (prefers-reduced-motion: no-preference) { .gl-card:not([open]):hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.45); } }
.gl-card > summary { list-style: none; cursor: pointer; display: grid; }
.gl-card > summary::-webkit-details-marker { display: none; }
.gl-card > summary:focus-visible { outline: 3px solid var(--gl-gold); outline-offset: -3px; border-radius: 18px; }
.gl-photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; background: #0A0B0E; overflow: hidden; }
.gl-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.02) brightness(.95); transition: filter .3s; }
.gl-card:hover .gl-photo img, .gl-card[open] .gl-photo img { filter: grayscale(0) brightness(1); }
.gl-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, rgba(13,14,18,.75)); }
.gl-initials { display: grid; justify-items: center; gap: 10px; color: var(--gl-gold); }
.gl-initials b { font-family: var(--gl-serif); font-size: 2.6rem; font-weight: 600; letter-spacing: .06em; }
.gl-initials .ic { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .7; }
.gl-card.no-photo .gl-photo { background: radial-gradient(circle at 50% 38%, #24252D, #0A0B0E 72%); }
.gl-cap { display: grid; gap: 3px; padding: 12px 14px 14px; }
.gl-name { font-family: var(--gl-serif); font-size: 1.22rem; font-weight: 600; line-height: 1.2; color: #F4EEDF; }
.gl-parent { font-size: .88rem; color: var(--gl-muted); }
.gl-life { font-size: .9rem; color: var(--gl-gold); letter-spacing: .03em; }
.gl-more { padding: 0 16px 16px; display: grid; gap: 8px; color: #D8D2C4; }
.gl-more p { margin: 0; line-height: 1.55; }
.gl-more b { color: #F4EEDF; font-weight: 600; }
.gl-story { display: grid; gap: 10px; margin-top: 6px; padding: 16px 18px; border-radius: 14px; background: #1C1D24; border-inline-start: 2px solid var(--gl-gold);
  font-family: var(--gl-serif); font-size: 1.15rem; line-height: 1.55; color: #EFE8D8; }
.gl-story p { margin: 0; }
.gl-he { font-family: var(--gl-serif); font-size: 1.3rem; color: var(--gl-gold); }
.gl-more .btn-wa { background: rgba(37, 211, 102, .12); color: #7EE2A8; }
.gl-photo-btn { cursor: pointer; background: rgba(255,255,255,.08) !important; color: var(--gl-ink) !important; }
.gl-card[open] { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); border-color: rgba(217,180,90,.45); }
@media (min-width: 640px) {
  .gl-card[open] { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: start; }
  .gl-card[open] > summary { grid-row: 1 / span 2; }
  .gl-card[open] .gl-more { padding: 22px 24px; }
}
.gl-empty { padding: 30px 20px; text-align: center; color: var(--gl-muted); border: 1px dashed rgba(217,180,90,.35); border-radius: 18px; }
.foot-made a { color: rgba(255,255,255,.65); }

/* Живая свеча галереи памяти (рисуется на холсте) */
.rcv { position: relative; display: block; pointer-events: none; }
.rcv canvas { position: relative; display: block; width: 100%; height: 100%; }
.rcv-glow { position: absolute; left: 50%; top: 36%; width: 520%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 84, .30) 0%, rgba(255, 150, 60, .12) 28%, rgba(255, 140, 50, .04) 50%, transparent 68%); }
.rcv-hero { margin: -6px auto 0; }
.rcv-float { position: fixed; z-index: 40; inset-inline-end: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .rcv-float { bottom: 22px; inset-inline-end: 24px; } }
.gl-sample { justify-self: start; margin-bottom: 4px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; letter-spacing: .03em;
  color: #0D0E12; background: rgba(217, 180, 90, .85); }
.gl-sample-note { padding: 8px 12px; border-radius: 10px; font-size: .9rem; color: #E8D7A8 !important; background: rgba(217, 180, 90, .12); }

/* Галерея памяти: компактнее на телефоне, портреты меньше */
.gl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .gl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .gl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.gl-cap { padding: 8px 9px 10px; gap: 1px; }
.gl-name { font-size: .98rem; }
.gl-parent, .gl-life { font-size: .78rem; }
.gl-sample { font-size: .64rem; padding: 0 6px; margin-bottom: 2px; }
.gl-initials b { font-size: 1.7rem; }
.gl-initials .ic { width: 20px; height: 20px; }
@media (max-width: 639px) {
  .gl-hero { padding: 14px 10px 16px; gap: 4px; }
  .gl-hero h1 { font-size: 1.75rem; margin-top: 0; }
  .gl-zl { font-size: 1.05rem; }
  .gl-lead { font-size: .92rem; line-height: 1.45; }
  .gl-add { margin-top: 6px; }
  .gl-y { font-size: 1.9rem; }
  .gl-years { gap: 22px; }
  .gl-year-title { margin-bottom: 10px; }
  /* Раскрытая карточка на телефоне: маленькое фото слева, подписи справа, рассказ ниже. */
  .gl-card[open] > summary { grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
  .gl-card[open] .gl-cap { padding: 10px 12px; }
  .gl-card[open] .gl-name { font-size: 1.15rem; }
}
@media (max-width: 639px) {
  .gl-hero { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: start; column-gap: 14px; row-gap: 2px; padding: 14px 14px 16px; }
  .gl-hero .rcv-hero { grid-row: 1 / span 2; margin: 0; align-self: center; }
  .gl-hero h1 { align-self: end; }
  .gl-hero .gl-zl { align-self: start; }
  .gl-hero .gl-lead, .gl-hero .gl-add { grid-column: 1 / -1; }
  .gl-hero .gl-lead { margin-top: 8px; }
  .gl-tools { gap: 8px; }
  .gl-tools .gl-count { flex-basis: 100%; }
}
/* Галерея ещё компактнее: подробности открываются по нажатию */
.gl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .gl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .gl-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; } }
.gl-card { border-radius: 12px; }
.gl-card > summary:focus-visible { border-radius: 12px; }
.gl-cap { padding: 6px 7px 8px; }
.gl-name { font-size: .84rem; line-height: 1.15; }
.gl-parent, .gl-life { font-size: .7rem; }
.gl-sample { font-size: .58rem; padding: 0 5px; }
.gl-initials { gap: 4px; }
.gl-initials b { font-size: 1.25rem; }
.gl-initials .ic { width: 16px; height: 16px; }
@media (max-width: 639px) {
  .gl-card:not([open]) .gl-parent { display: none; }
  .gl-card[open] > summary { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (min-width: 640px) { .gl-card[open] { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); } }
.gl-life { white-space: nowrap; }
/* Портреты квадратные — ниже, чем были (4:5). */
.gl-photo { aspect-ratio: 1 / 1; }
.gl-photo img { object-position: 50% 25%; }

/* Главная: аккуратнее и плотнее (шрифты те же) */
.home { gap: 14px; }
.home-top { display: grid; gap: 2px; align-items: start; }
.home-top .today { margin: 0; }
.banner { border-radius: 20px; }
.banner-text { padding: 18px 18px; gap: 8px; }
.banner .search { margin-top: 4px; }
.section-title { margin: 4px 2px 8px; }
.home-today, .home-updates { display: grid; min-width: 0; }
.today-grid { gap: 10px; }
.today-card { padding: 14px; border-radius: 16px; gap: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.tc-ic { width: 36px; height: 36px; border-radius: 10px; }
.tc-dict { background: #E3F4EC; color: #12805C; }
.card-day .wa-link { margin-top: 4px; }
.card-stats { background: var(--bg); }
.card-stats .stat-big { margin: 2px 0 8px; }
.card-stats .meter { margin-bottom: 8px; height: 8px; }
.card-stats .stat-line { margin: 2px 0; }
.card-stats .tile-actions { margin-top: 6px; }
@media (min-width: 720px) { .today-grid.n2, .today-grid.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .today-grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-updates { gap: 10px; max-width: 760px; }
.composer { padding: 10px; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.composer-input { min-height: 44px; }
.composer-quick { margin-top: 8px; padding-top: 6px; gap: 4px; }
.quick { min-height: 40px; }
.feed { gap: 10px; }
.post { padding: 14px; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.post-head { margin-bottom: 8px; }
.post-media { margin: 4px -14px 8px; }
.post-actions { margin-top: 8px; padding-top: 4px; }
.post-act { min-height: 40px; }
.home-fund { margin-top: 10px; }
.home-fund .today-card { padding: 16px 18px; }
.composer-quick { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important; }
.composer-quick { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important; }
.card-stats .tile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-stats .tile-actions .btn { min-height: 42px; padding: 0 16px; }
.today-card > .tile-actions:last-child, .today-card > .tile-link:last-child { margin-top: auto; }
/* Помочь с переводом: шапка столбцов (на телефоне подписи в самих полях) */
.tr-head { display: none; }
@media (min-width: 960px) {
  .tr-head { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; padding: 0 0 8px; font-size: .84rem; color: var(--muted); font-weight: 600; }
}
.tr-row input::placeholder { font-size: .92em; }

/* Поиск: текст всегда тёмный, даже внутри тёмного баннера (раньше наследовал белый цвет) */
.search-input { color: var(--ink); caret-color: var(--accent); }
/* Быстрые кнопки под «Что нового?» — не вылезают за край */
.composer-quick { display: flex !important; flex-wrap: wrap; justify-content: space-around; }
.quick { flex: 1 1 auto; padding: 6px 6px; gap: 6px; white-space: nowrap; }
/* Помочь с переводом: поля шире, чтобы подсказка помещалась */
@media (min-width: 960px) { .tr-row, .tr-head { grid-template-columns: .9fr 1.2fr 1.2fr; } }

/* Окончания */
.endings-link { display: inline-flex; margin: 0 0 12px; font-weight: 600; }
.endings h1 { margin: 6px 0 4px; }
.en-group { margin: 22px 0; }
.en-group h2 { font-size: 1.15rem; margin: 0 0 2px; }
.en-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.en-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.en-word { font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.en-end { color: var(--pom); font-weight: 800; }
.en-label { color: var(--muted); font-size: .95rem; }

.adm-add { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 18px; }
.adm-add p { margin: 0; flex: 1 1 260px; }
.cal-dot[data-kind="event"] { background: var(--accent); }
.cp-ic.k-event { background: var(--accent-soft); color: var(--accent-ink); }
.adm-h { font-size: 1.1rem; margin: 26px 0 10px; }
.mod-edit { display: grid; gap: 10px; }
.mod-edit label.field { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.mod-edit input, .mod-edit select, .mod-edit textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.pub-card { padding-block: 14px; }
.pub-card .mod-photo { max-width: 120px; border-radius: 10px; }

/* Таблица слов на весь экран */
body.wt-lock { overflow: hidden; }
.wt-page.wt-full { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: var(--bg); padding: 10px 16px 12px; overflow: hidden; }
.wt-page.wt-full > .lead, .wt-page.wt-full > .wt-note { display: none; }
.wt-page.wt-full .wt-bar { margin: 0 0 6px; }
.wt-page.wt-full .wt-save { position: static; padding: 4px 0; }
.wt-page.wt-full .wt-wrap { flex: 1; max-height: none; min-height: 0; }

.en-ed { display: grid; gap: 18px; }
.en-edgroup { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; background: var(--surface); }
.en-edhead { display: grid; gap: 8px; }
.en-edtools { display: flex; flex-wrap: wrap; gap: 6px; }
.en-edlist { display: grid; gap: 8px; }
.en-edrow { display: grid; grid-template-columns: 1fr 90px 1.4fr auto; gap: 8px; align-items: center; }
.en-ed input { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; background: #fff; color: var(--ink); font: inherit; min-width: 0; width: 100%; }
.en-edend { color: var(--pom) !important; font-weight: 700; }
.en-edtitle { font-weight: 700; }
@media (max-width: 600px) { .en-edrow { grid-template-columns: 1fr 80px; } .en-edrow input:nth-child(3) { grid-column: 1 / -1; } }

/* Меню: на компьютере сворачивается в узкую полосу с иконками */
.side-collapse { display: none; }
@media (min-width: 960px) {
  .side-collapse { display: inline-grid; flex: none; }
  [dir="rtl"] .side-collapse svg { transform: scaleX(-1); }
  .side-head { gap: 8px; }
  body.side-mini .shell { grid-template-columns: 76px minmax(0, 1fr); }
  body.side-mini .side { padding: 18px 10px 16px; overflow-x: hidden; }
  body.side-mini .side-head { flex-direction: column; gap: 10px; padding: 0 0 14px; }
  body.side-mini .brand-name, body.side-mini .side-link span, body.side-mini .side-group, body.side-mini .side-foot > :not(.side-donate),
  body.side-mini .side-donate span { display: none; }
  body.side-mini .side-link { justify-content: center; padding: 6px; }
  body.side-mini .side-donate { justify-content: center; padding: 6px; }
  body.side-mini .side-foot { padding: 12px 0 0; }
}
@media (prefers-reduced-motion: no-preference) { .shell { transition: grid-template-columns .2s ease; } }

/* Лента на широком экране занимает всю ширину в две колонки — справа не остаётся пустого места */
.home-updates { max-width: none; }
@media (min-width: 1000px) {
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .feed > .feed-more, .feed > .empty-soft { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  body.side-mini main:has(> .home) { max-width: 1480px; }
  body.side-mini main { max-width: 1320px; }
}
@media (min-width: 1500px) { body.side-mini .today-grid.n3 { gap: 14px; } }

.ic.ic-brand { fill: currentColor; stroke: none; }
@media (min-width: 960px) {
  .side-head { justify-content: flex-start; }
  .side-collapse { margin-inline-end: 4px; border-radius: 12px; color: var(--ink); }
  .side-collapse:hover { background: var(--accent-soft); }
  body.side-mini .side-head { align-items: center; }
}

/* Галерея памяти: компактная шапка на десктопе — свеча слева, текст рядом, кнопка справа. */
@media (min-width: 640px) {
  .gl-hero { grid-template-columns: auto minmax(0, 1fr) auto; justify-items: start; text-align: start; align-items: center; column-gap: 20px; row-gap: 0; padding: 14px 22px; }
  .gl-hero .rcv-hero { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  .gl-hero h1 { grid-column: 2; grid-row: 1; margin: 0; font-size: 1.9rem; align-self: end; }
  .gl-hero .gl-zl { grid-column: 2; grid-row: 2; font-size: 1.05rem; }
  .gl-hero .gl-lead { grid-column: 2; grid-row: 3; margin: 2px 0 0; max-width: 60ch; font-size: .92rem; line-height: 1.4; align-self: start; }
  .gl-hero .gl-add { grid-column: 3; grid-row: 1 / span 3; margin: 0; align-self: center; }
}

/* Грамматика */
.gr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.gr-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; background: var(--card, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.1)); color: inherit; text-decoration: none; }
.gr-card:hover { border-color: var(--accent, #D9B45A); }
.gr-card b { font-size: 1.1rem; }
.gr-card span { color: var(--muted, #9C978C); font-size: .92rem; }
.gr-body { max-width: 70ch; line-height: 1.7; }
.gr-body h2 { margin: 1.4em 0 .4em; }
.gr-edbody { width: 100%; min-height: 220px; font: inherit; line-height: 1.5; padding: 10px 12px; border-radius: 12px; }

/* Фонд общины */
.fd { max-width: 860px; text-align: start; }
.fd-hero { text-align: center; padding: 8px 0 6px; }
.fd-hero .lead { max-width: 52ch; margin-inline: auto; }
.fd-demo { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; padding: 14px 18px; border-radius: 14px; background: #FFF6E0; color: #7A5600; border: 1px solid #F0D99A; font-weight: 500; }
.fd-demo .ic { flex: none; margin-top: 2px; }
.fd-sec { margin-top: 18px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.donate .fd-sec { margin-top: 18px; }
.fd-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.fd-head h2 { margin: 0; font-size: 1.3rem; }
.fd-head p { margin: 2px 0 0; }
.fd-ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); }
.fd-wallet { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.fd-qr { display: block; width: 188px; height: 188px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.fd-qr svg { display: block; width: 100%; height: 100%; }
.fd-wbody { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.fd-coin { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fd-coin b { font-size: 1.5rem; }
.fd-chip { padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .86rem; font-weight: 600; }
.fd-lab { margin-top: 4px; font-size: .84rem; color: var(--muted); }
.fd-addr { display: block; max-width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font: 600 .95rem/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.fd-note { margin: 0; font-size: .92rem; }
.fd-scan { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .84rem; }
.fd-rows { margin: 0 0 12px; display: grid; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.fd-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; }
.fd-row + .fd-row { border-top: 1px solid var(--line); }
.fd-row dt { color: var(--muted); font-size: .9rem; }
.fd-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fd-cp { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.fd-cp:hover { background: var(--accent-soft); color: var(--accent-ink); }
.fd-cash { margin: 0 0 14px; line-height: 1.65; white-space: pre-line; }
.fd-trust { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: #EAF6EF; color: #17603A; }
.fd-trust div { display: grid; gap: 2px; }
.fd-trust span { font-size: .92rem; }
.fd-thanks { text-align: center; margin: 22px 0 8px; font-size: 1.15rem; font-weight: 600; color: var(--pom); }
.fd-edrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.fd-edrow input { flex: 1 1 130px; min-width: 0; }
.fd-edrow .fd-wide { flex: 3 1 260px; }
@media (max-width: 639px) {
  .fd-sec { padding: 16px; }
  .fd-wallet { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .fd-wbody { justify-items: center; }
  .fd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fd-row dt { grid-column: 1 / -1; margin-bottom: -6px; }
  .fd-row dd { grid-column: 1; }
}
.pl .fd-lab { display: block; margin: 12px 0 6px; }
.pl-curs, .pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.pl-chip:hover { border-color: var(--accent); }
.pl-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-amt { font-weight: 600; }
.pl-custom { min-height: 44px; width: 180px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); font: inherit; }
.pl-field { display: block; }
.pl-field input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font: inherit; }
.pl-result { margin-top: 18px; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--accent); }
.pl-result .fd-lab { margin-top: 0; }
.pl-sum { margin: 4px 0 12px; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.pl-sum.pl-empty { color: var(--muted); font-weight: 400; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Дизайн: больше контраста — страница, белая подложка и карточки не сливаются. */
:root { --muted: #566074; --line: #D8DEEB; --surface: #F0F3FA; --surface-2: #E4E9F4; --accent-soft: #E2E9FC; }
body.has-bg { background: #E6EBF5; }
.site-bg::after { background: rgba(230, 235, 245, .62); }
body.has-bg main { background: #FFFFFF; border: 1px solid #D5DCEB; box-shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 16px 48px rgba(16, 24, 40, .1); }
body.has-bg .side { background: #FFFFFF; border-inline-end: 1px solid #D5DCEB; }
body.has-bg main .card, body.has-bg main .tile, body.has-bg main article{ border-color: var(--line); }
main h1 { color: #131A2B; }
main h2, main h3 { color: #1B2438; }
.btn-soft { background: var(--accent-soft); border: 1px solid #C9D5F7; color: var(--accent-ink); }
.btn-soft:hover { background: #D5E0FB; }
.side-link[aria-current="page"] { background: #DCE5FC; color: #1E3590; }
.cal-dot, .muted { opacity: 1; }

/* Музыка и живая речь */
.track { display: grid; gap: 10px; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.tr-head { display: flex; gap: 12px; align-items: center; }
.tr-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.tr-title { flex: 1; min-width: 0; }
.tr-title h2 { margin: 0; font-size: 1.15rem; }
.tr-who { margin: 2px 0 0; color: var(--muted); font-size: .94rem; }
.tr-audio { width: 100%; height: 48px; }
.tr-desc { margin: 0; line-height: 1.55; }
.tr-date { margin: 0; font-size: .86rem; }
.tr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tracks-page .video-list { display: grid; gap: 14px; margin-top: 10px; }
@media (min-width: 900px) { .tracks-page .video-list { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Годовщины и дни рождения — только списки; месяц и праздники смотрят в «Календаре». */
.cal-layout.one { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cal-layout.one .yz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; } }
.cal-layout.one .cal-side > .btn { justify-self: start; margin-top: 12px; }
.shabbat-box .shab-times{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0}
.shabbat-box .shab-times>div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 8px;border-radius:12px;background:var(--surface-2,#f5efe6);text-align:center}
.shabbat-box .shab-times strong{font-size:1.6rem;font-variant-numeric:tabular-nums}
.shabbat-box .shab-note{font-size:.82rem;margin:4px 0 0}

/* Правки по аудиту: боковая прокрутка в админке, прыжки страницы при загрузке, размер кнопок */
.check { min-width: 0; max-width: 100%; }
.check > span, .check > div { min-width: 0; overflow-wrap: anywhere; }
.en-ed { min-width: 0; max-width: 100%; }
.cs-arrows .btn, .cs-arrows button { min-width: 36px; min-height: 36px; }
.cs-row, .cs-item { flex-wrap: wrap; }
main { min-height: 70vh; }
@media (max-width: 959px) { .btn.btn-sm, .chip, .cs-arrows button { min-height: 44px; } }
/* Контраст и размер мелкого текста */
.tab-item span, .soon { font-size: .8rem; }
.tab-item { color: #4A5468; }
.brand-mark { font-size: .78rem; }
.cs-row .cs-side { flex-wrap: wrap; min-width: 0; }
.cs-row, .cs-row > * { min-width: 0; }
.en-ed .check input { width: 22px; min-height: 22px; padding: 0; flex: none; }
.city { flex-wrap: wrap; align-items: center; gap: 8px; }
.locate-msg { font-size: .85rem; flex-basis: 100%; }
.side-biz-box { margin: 4px 8px; border-radius: 14px; background: linear-gradient(135deg, #fff4dc, #ffe9b8); border: 1px solid #f0d28a; }
.side-biz-box .side-link { font-weight: 600; }

/* Новости: современная лента с фото, страница новости, выбор фото */
.ngrid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ngrid { grid-template-columns: repeat(2, 1fr); } .ngrid .ncard-big { grid-column: 1 / -1; flex-direction: row; } .ngrid .ncard-big .ncard-media { flex: 1.3 1 0; aspect-ratio: auto; min-height: 320px; } .ngrid .ncard-big .ncard-text { flex: 1 1 0; justify-content: center; } .ngrid .ncard-big h2 { font-size: 1.9rem; } }
@media (min-width: 1000px) { .ngrid-3 { grid-template-columns: repeat(3, 1fr); } }
.ncard { display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(20,30,60,.06), 0 8px 24px rgba(20,30,60,.07); transition: transform .18s, box-shadow .18s; }
.ncard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,30,60,.08), 0 14px 32px rgba(20,30,60,.12); }
.ncard-media { position: relative; aspect-ratio: 16 / 10; background: var(--accent-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ncard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ncard-ic { color: var(--accent-ink); opacity: .55; }
.ncard-kind { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.94); font-size: .82rem; font-weight: 600; color: var(--accent-ink); }
.ncard-more { position: absolute; inset-block-end: 12px; inset-inline-end: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(15,20,40,.72); color: #fff; font-size: .8rem; }
.ncard-text { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 16px; flex: 1; }
.ncard h2 { font-size: 1.25rem; line-height: 1.25; margin: 0; }
.ncard-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .92rem; color: var(--muted); }
.ncard-ex { margin: 0; color: #3b4254; line-height: 1.5; }
.ncard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: auto 0 0; padding-top: 6px; font-size: .88rem; }
.ncard-read { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--accent-ink); }
.news-congrats .ncard-kind { color: #7A5A10; background: #FFF3D1; }
.news-sad .ncard-kind { color: #4B5563; }
.ncard-noimg.news-congrats .ncard-media { background: linear-gradient(135deg, #FFF3D1, #FFE29A); }
.ncard-noimg.news-sad .ncard-media { background: #ECEDF0; }
.news-upcoming { margin-top: 22px; }
.nitem { max-width: 820px; margin: 0 auto; }
.nitem h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin: 6px 0 8px; }
.nitem-hero { display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; margin: 8px 0 18px; background: var(--accent-soft); cursor: zoom-in; box-shadow: 0 10px 30px rgba(20,30,60,.14); }
.nitem-hero img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.nitem-meta { margin: 0 0 12px; }
.nitem-body { font-size: 1.1rem; line-height: 1.65; margin: 16px 0 20px; }
.nitem-gallery h2, .nitem-others h2 { font-size: 1.2rem; margin: 26px 0 10px; }
.ng-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .ng-grid { grid-template-columns: repeat(3, 1fr); } }
.ng-item { padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--accent-soft); }
.ng-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.ng-item:hover img { transform: scale(1.04); }
.nitem-others { max-width: none; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,10,20,.92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lb img { max-width: 100%; max-height: 92vh; border-radius: 10px; object-fit: contain; }
.lb-x, .lb-nav { position: absolute; background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.lb-x { inset-block-start: 14px; inset-inline-end: 14px; }
.lb-prev { inset-inline-start: 12px; transform: scaleX(-1); } .lb-next { inset-inline-end: 12px; }
[dir=rtl] .lb-prev { transform: none; } [dir=rtl] .lb-next { transform: scaleX(-1); }
.pp-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-item { position: relative; width: 104px; height: 104px; border-radius: 12px; overflow: hidden; background: var(--accent-soft); }
.pp-item img { width: 100%; height: 100%; object-fit: cover; }
.pp-act { position: absolute; inset-inline: 4px; inset-block-start: 4px; display: flex; justify-content: space-between; }
.pp-act button, .pp-main { width: 30px; height: 30px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; color: #B8860B; font-size: 1rem; }
.pp-act button { color: var(--ink); }
.pp-add { width: 104px; height: 104px; border-radius: 12px; border: 2px dashed var(--line, #c9cfdc); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .82rem; color: var(--muted); cursor: pointer; }

/* Новости: строгая «газетная» подача — главная новость на всю ширину, справа короткие, ниже сетка */
.news-page h1 { letter-spacing: -.01em; }
.nsec { font-size: 1.05rem; text-transform: none; margin: 22px 0 12px; padding-top: 10px; border-top: 4px solid #C8102E; font-weight: 800; }
.nlead-row { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .nlead-row { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; } .nside .nsec:first-child { margin-top: 0; } }
.nlead { position: relative; display: block; border-radius: 18px; overflow: hidden; min-height: 320px; color: #fff; text-decoration: none; background: #1d2a4a; box-shadow: 0 10px 30px rgba(20,30,60,.18); }
.nlead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.nlead:hover > img { transform: scale(1.03); }
.nlead::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,12,28,.92) 0%, rgba(8,12,28,.55) 38%, rgba(8,12,28,0) 70%); }
.nlead-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; min-height: 460px; padding: 26px; }
@media (max-width: 640px) { .nlead-text { min-height: 380px; padding: 18px; } }
.nlead h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.12; margin: 0; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; }
.nlead-ex { margin: 0; font-size: 1.02rem; line-height: 1.5; color: rgba(255,255,255,.88); max-width: 62ch; }
.nlead-meta { margin: 0; font-size: .86rem; color: rgba(255,255,255,.72); }
.nlead-noimg { background: linear-gradient(135deg, #1d2a4a, #3451d1); }
.ntag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; background: #C8102E; color: #fff; font-size: .78rem; font-weight: 700; border-radius: 4px; }
.ntag-s { padding: 2px 8px; font-size: .72rem; }
.news-congrats .ntag { background: #B8860B; } .news-sad .ntag { background: #4B5563; } .news-announce .ntag { background: #1F7A4D; } .news-event .ntag { background: #3451D1; }
.nrow { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #E3E6EE; color: var(--ink); text-decoration: none; }
.nrow:last-child { border-bottom: 0; }
.nrow-text { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nrow h3 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 700; }
.nrow:hover h3 { text-decoration: underline; }
.nrow img, .nrow-ic { width: 96px; height: 72px; flex: none; border-radius: 10px; object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-ink); }
.nrow-date { font-size: .8rem; }
.ncard h2 { font-weight: 800; }
.nitem { border-top: 0; }
.nitem h1 { font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.nitem .news-kind { color: #C8102E; text-transform: none; font-weight: 700; }
.nitem-body p:first-child::first-line { font-weight: 600; }
.nitem-body { font-size: 1.15rem; max-width: 68ch; }
.nitem-hero { border-radius: 14px; }
.nlead h2, .nlead .nlead-ex, .nlead .nlead-meta { color: #fff; }
.nlead .nlead-ex { color: rgba(255,255,255,.88); } .nlead .nlead-meta { color: rgba(255,255,255,.72); }
.nlead h2 { text-shadow: 0 2px 12px rgba(0,0,0,.45); }
/* лид-новость: читаемость текста на ярких фото */
.nlead::after { background: linear-gradient(to top, rgba(8,12,28,.96) 0%, rgba(8,12,28,.82) 45%, rgba(8,12,28,.25) 80%, rgba(8,12,28,0) 100%); }
.nlead .nlead-ex { text-shadow: 0 1px 6px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .nlead { min-height: 0; background: #0f1830; }
  .nlead > img { position: relative; inset: auto; display: block; height: auto; aspect-ratio: 16/10; }
  .nlead::after { display: none; }
  .nlead-text { min-height: 0; padding: 16px 18px 20px; justify-content: flex-start; }
  .nlead h2 { font-size: 1.45rem; text-shadow: none; }
  .nlead .nlead-ex { text-shadow: none; font-size: .98rem; }
}
.nlead-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #14203f; font-weight: 700; font-size: .95rem; }
.nlead:hover .nlead-btn { background: #C8102E; color: #fff; }
/* новость в ленте на главной */
.post-news.has-img { padding: 0; overflow: hidden; }
.post-news .post-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; align-items: flex-start; }
.post-news:not(.has-img) { padding: 0; }
.post-cover { position: relative; display: block; width: 100%; aspect-ratio: 16/10; background: #1d2a4a; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover-n { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(8,12,28,.72); color: #fff; font-size: .8rem; padding: 4px 9px; border-radius: 999px; }
.post-news .post-title { margin: 0; font-size: 1.3rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.post-news .post-title a { color: inherit; text-decoration: none; }
.post-news .post-ex { margin: 0; color: var(--text-2, #44506b); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-news .post-meta { margin: 0; color: var(--muted); font-size: .86rem; }
.post-news .post-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; border: 0; padding: 4px 0 0; margin: 0; }
.post-news .post-read { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; font-weight: 700; }
/* Главная на телефоне: аккуратнее и компактнее */
.stat-lines { display: grid; gap: 2px; }
@media (max-width: 640px) {
  .home-h1 { font-size: 1.45rem; }
  .today-card { padding: 14px 16px; gap: 10px; }
  .tc-head { gap: 10px; }
  .today-card .day-ar { font-size: 1.9rem; }
  .day-mean { font-size: 1.05rem; margin-top: 6px; }
  .stat-big { font-size: 2rem; margin-bottom: 8px; }
  .stat-line { font-size: .95rem; margin: 0; }
  .today-card .btn, .post-news .post-read { min-height: 44px; }
  .post-title { font-size: 1.1rem; }
  .post-words-list a { padding: 8px 10px; }
  .post-news .post-title { font-size: 1.2rem; }
  .post-news .post-body { padding: 14px 16px 16px; }
}
/* Главная на телефоне: мельче и ровнее */
@media (max-width: 640px) {
  .home-h1 { font-size: 1.3rem; }
  .today-card .day-ar { font-size: 1.6rem; }
  .day-lat, .day-alt { font-size: .9rem; }
  .day-mean { font-size: .98rem; margin-top: 4px; }
  .stat-big { font-size: 1.7rem; margin-bottom: 6px; }
  .stat-big span { font-size: .9rem; }
  .stat-line { font-size: .9rem; }
  .tc-title { font-size: .98rem; } .tc-label { font-size: .74rem; }
  .tc-ic { width: 34px; height: 34px; }
  .today-card .btn, .post-news .post-read, .home-fund .btn { min-height: 40px; padding: 0 16px; font-size: .92rem; }
  .post-title { font-size: 1rem; }
  .post-news .post-title { font-size: 1.1rem; }
  .post-news .post-ex { font-size: .92rem; -webkit-line-clamp: 2; }
  .post-meta, .post-who span { font-size: .78rem; }
  .post-act { font-size: .86rem; min-height: 38px; }
  .post-words-list a { font-size: .9rem; }
  .composer-input { font-size: .92rem; min-height: 40px; }
  .composer-quick .post-act, .composer-quick a { font-size: .88rem; }
}
/* Новые слова: мельче, длинные слова переносятся, ничего не обрезается */
.pw-ru, .pw-ar { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.post-words-list { gap: 6px; }
.post-words-list a { padding: 7px 10px; gap: 1px; }
.pw-ru { font-size: .88rem; } .pw-ar { font-size: .86rem; }
.side-sub { margin-inline-start: 22px; min-height: 40px; font-size: .95rem; border-inline-start: 2px solid var(--line); border-radius: 0 12px 12px 0; }
.side-chev { margin-inline-start: auto; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; }
.side-chev:hover { background: var(--surface-2); }
.side-chev .ic { transition: transform .2s; transform: rotate(90deg); }
.side-chev[aria-expanded="true"] .ic { transform: rotate(-90deg); }
/* Заголовки — книжная антиква (Source Serif 4 / Frank Ruhl Libre), текст и кнопки — Inter */
:root { --serif: 'ND Serif', 'Source Serif 4', Georgia, 'Times New Roman', serif; }
h1, .home-h1, .nlead h2, .nitem h1, .post-news .post-title, .ncard h3, .nrow h3, .page-title { font-family: var(--serif); letter-spacing: -.012em; font-weight: 700; }
h1 { font-size: 2.1rem; }
.home-h1 { font-weight: 700; }
.nsec, main > section > h2, .home-sec-title { font-family: var(--serif); font-weight: 700; }
h1, .home-h1, .nlead h2, .nitem h1, .post-news .post-title, .ncard h3, .nrow h3 { font-weight: 650; }
h1 { font-size: 2rem; line-height: 1.12; }
.home-h1 { font-size: 1.6rem; }
@media (max-width: 640px) { h1 { font-size: 1.75rem; } .home-h1 { font-size: 1.4rem; } }
/* Современная подача: тихие пустые экраны, мягкие карточки, ровные поля */
.empty-soft { background: linear-gradient(180deg, #F8F9FD, #F2F4FA); border: 1px dashed #D5DCEB; border-radius: 18px; padding: 22px 20px; color: var(--muted); text-align: center; }
.empty-soft p { margin: 0 0 12px; line-height: 1.5; } .empty-soft p:last-child { margin-bottom: 0; }
.empty-soft .btn { margin-top: 2px; }
.today-card, .post, .composer, .tile { border-color: #E3E7F0; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.05); }
.field input, .field textarea, .field select, .tr-row input { border-color: #D9DFEC; background: #FCFCFE; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:hover, .field textarea:hover { border-color: #B9C3DD; }
.field label { font-size: .92rem; color: #2A3350; }
.btn { font-weight: 600; letter-spacing: .005em; }
.btn-main { box-shadow: 0 1px 2px rgba(36,64,168,.25), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-soft { border: 1px solid #DCE3F8; }
.chip-btn { border-color: #D9DFEC; font-weight: 500; }
main > section > h2, .nsec { letter-spacing: -.005em; }
main p.muted.lead, main > header p { color: #5B6580; }

/* Шаббат: экран отдыха вместо сайта (иврит, русский, английский) */
html.sh-on body { overflow: hidden; }
.shabbat { position: fixed; inset: 0; z-index: 1000; overflow: auto; display: grid; place-items: center; padding: 28px 18px; color: #f4efe4;
  background: radial-gradient(120% 90% at 50% 0%, #22305f 0%, #141c3c 55%, #0d1329 100%); }
.sh-glow { position: fixed; left: 50%; top: 14%; width: min(80vw, 560px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 92, .22), rgba(255, 196, 92, 0)); }
.sh-wrap { position: relative; width: min(100%, 980px); text-align: center; }
.sh-candles { display: flex; justify-content: center; gap: 56px; height: 74px; margin: 0 auto 6px; }
.sh-candle { position: relative; width: 14px; height: 74px; }
.sh-wax { position: absolute; left: 0; right: 0; bottom: 0; height: 50px; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, #efe6d2, #fffaf0 45%, #dccfb4); }
.sh-flame { position: absolute; left: 50%; top: 6px; width: 12px; height: 20px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 70%, #fff6c9 0 22%, #ffc457 55%, #ff9a2e 100%); box-shadow: 0 0 22px 6px rgba(255, 186, 80, .45); transform-origin: 50% 90%; animation: sh-flick 3.2s ease-in-out infinite; }
.sh-candle:last-child .sh-flame { animation-delay: -1.4s; }
@keyframes sh-flick { 0%, 100% { transform: scale(1) rotate(-1deg); } 35% { transform: scale(.94, 1.06) rotate(1.5deg); } 70% { transform: scale(1.04, .97) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .sh-flame { animation: none; } }
.shabbat .sh-he { text-align: center !important; margin: 14px 0 4px; font-family: 'ND Serif', serif; font-weight: 700; font-size: clamp(46px, 9vw, 88px); line-height: 1.1; color: #ffe2a6; letter-spacing: .01em; }
.sh-sub { margin: 0 0 22px; font-family: 'ND Serif', serif; font-size: clamp(19px, 3vw, 26px); color: #e8dfc8; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sh-sub i, .sh-lab i { font-style: normal; opacity: .5; }
.sh-clock { max-width: 520px; margin: 0 auto 26px; padding: 16px 18px 18px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 226, 166, .22); }
.sh-lab { margin: 0 0 6px; font-size: 13px; color: #cfc7b3; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sh-timer { margin: 0; font-size: clamp(40px, 8vw, 62px); font-weight: 600; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: #fff; }
.sh-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; text-align: start; }
.sh-col { padding: 4px 22px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.sh-col:first-child { border-inline-start: 0; }
.sh-text { margin: 0 0 12px; line-height: 1.65; font-size: 15.5px; color: #ece6d6; }
.sh-meta { margin: 2px 0; font-size: 13.5px; color: #b9b3a4; }
@media (max-width: 760px) {
  .shabbat { place-items: start center; padding: 22px 16px 28px; }
  .sh-cols { grid-template-columns: 1fr; }
  .sh-col { padding: 14px 4px; border-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .sh-col:first-child { border-top: 0; }
  .sh-text { font-size: 15px; margin-bottom: 8px; }
}
.sh-owner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 900; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 12px; background: #fff3d6; color: #6b4a08; font-size: 13.5px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
