/* Единый вид · правки по комментариям 17.10 (общие для всех списков). Грузится последним. */

/* 1. Компактный фильтр везде, и на компьютере: строка «Поиск · Фильтр · Найти», остальное — по кнопке «Фильтр» */
html[data-theme] body .has-mfilter>:is(.search-field,.field:first-of-type,.pf-q,.mkk-q)>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(min-width:768px){
  html[data-theme] body .filter-panel:has(.has-mfilter){padding:0;border:0;background:transparent;box-shadow:none}
  html[data-theme] body .filter-panel:has(.has-mfilter:not(.is-open))>:is(.period-bar,.date-range){display:none!important}
  html[data-theme] body .filter-panel:has(.has-mfilter.is-open)>.period-bar{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
  html[data-theme] body .filter-panel:has(.has-mfilter.is-open)>.date-range{margin-top:10px}
  html[data-theme] body .has-mfilter{display:flex!important;flex-wrap:wrap;gap:8px!important;align-items:center;grid-template-columns:none!important}
  html[data-theme] body .has-mfilter>*{order:5}
  html[data-theme] body .has-mfilter>:is(.search-field,.field:first-of-type,.pf-q,.mkk-q){order:1;flex:1 1 280px!important;margin:0;min-width:0}
  html[data-theme] body .has-mfilter>.mf-toggle{display:inline-flex!important;order:2;flex:0 0 auto!important;min-width:120px;justify-content:center;height:44px;min-height:44px;margin:0}
  html[data-theme] body .has-mfilter>.mf-submit{order:3;flex:0 0 120px!important;height:44px;min-height:44px;margin:0}
  html[data-theme] body .has-mfilter>.mf-submit .button,html[data-theme] body .has-mfilter>.mf-submit.button{width:100%}
  html[data-theme] body .has-mfilter>.mkk-filter-btns{display:flex;gap:8px;order:3}
  html[data-theme] body .has-mfilter>.mf-more{display:none!important;order:4;flex:1 1 100%}
  html[data-theme] body .has-mfilter.is-open>.mf-more{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
  html[data-theme] body .has-mfilter.is-open>.mf-toggle{border-color:var(--primary);color:var(--primary)}
  html[data-theme] body .has-mfilter .mf-more>*{width:100%;min-width:0;margin:0}
  html[data-theme] body .has-mfilter .mf-more select{width:100%}
}

/* 2. Строка над списком: «Найдено: N» слева, бледная сортировка справа */
html[data-theme] body .list-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 8px;min-height:44px}
html[data-theme] body .list-bar .list-count{color:var(--muted);font-size:13.5px}
html[data-theme] body .list-bar .list-bar-end{display:flex;align-items:center;gap:6px;margin-left:auto}

/* 3. Карточка записи в списке: метка/статус — правый верхний угол; внизу человек слева, дата справа крупно */
html[data-theme] body .rec-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title badge" "body body" "who date";gap:6px 12px;align-items:start}
html[data-theme] body .rec-card>.rec-title{grid-area:title;margin:0;font-size:15.5px;font-weight:700;line-height:1.35;min-width:0}
html[data-theme] body .rec-card>.rec-badge{grid-area:badge;justify-self:end}
html[data-theme] body .rec-card>.rec-body{grid-area:body;color:var(--muted);font-size:13.5px;min-width:0}
html[data-theme] body .rec-card>.rec-who{grid-area:who;align-self:end;color:var(--muted);font-size:13px;min-width:0}
html[data-theme] body .rec-card>.rec-date{grid-area:date;justify-self:end;align-self:end;font-size:16px;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}
html[data-theme] body .rec-card>.rec-date.is-late{color:var(--danger,#e5484d)}

/* 4. Заголовки групп в списках — обычные, без капса и цвета: «Название · N» */
html[data-theme] body .group-title{margin:18px 0 8px;font-size:17px;font-weight:700;color:var(--ink);text-transform:none;letter-spacing:0}
html[data-theme] body .group-title .group-n{color:var(--muted);font-weight:600}
/* Телефон: тоже одной строкой «Поиск · Фильтр · Найти» во всех разделах */
@media(max-width:767px){
  html[data-theme] body .has-mfilter>:is(.search-field,.field:first-of-type,.pf-q,.mkk-q){flex:1 1 0!important;min-width:0}
  html[data-theme] body .has-mfilter>:is(.mf-toggle,.mf-submit){flex:0 0 auto!important;width:auto;min-width:0;padding:0 14px}
  html[data-theme] body .has-mfilter>.mf-submit .button{width:auto;padding:0 14px}
}

/* 5. Телефон (правки 17.10, вечер): поиск и фильтры свёрнуты в бледную лупу рядом с сортировкой; открываются по нажатию */
@media(max-width:767px){
  html[data-theme] body .mf-phone.mf-collapsed{display:none!important}
  html[data-theme] body .mf-phone{margin-bottom:10px}
}
html[data-theme] body .mf-open{position:relative;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:12px;background:none;color:var(--muted);opacity:.72;cursor:pointer;-webkit-tap-highlight-color:transparent}
html[data-theme] body .mf-open .ui-icon{width:22px;height:22px;stroke-width:1.6}
html[data-theme] body .mf-open.is-head{width:44px;height:44px}
html[data-theme] body .mf-open.is-head .ui-icon{width:26px;height:26px}
html[data-theme] body .mf-open:is(.is-on,.is-open,:hover){opacity:1;color:var(--primary)}
html[data-theme] body .mf-open .mf-dot{position:absolute;top:8px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--primary)}
html[data-theme] body .list-bar-end>.mf-open+.sort-menu>summary{margin-left:-4px}

/* 6. Переключатель «Список / Доска» — две маленькие иконки вместо крупных кнопок с текстом */
html[data-theme] body .list-bar-end>.scope-switch.view-switch,html[data-theme] body .scope-switch.view-switch{display:inline-flex;flex:none;height:36px;padding:2px;gap:2px;border-radius:10px;box-sizing:border-box}
html[data-theme] body .scope-switch.view-switch a{display:grid;place-items:center;width:34px;height:30px;min-height:0;padding:0;border-radius:8px;color:var(--muted)}
html[data-theme] body .scope-switch.view-switch a .ui-icon{width:18px;height:18px;stroke-width:1.7}
html[data-theme] body .scope-switch.view-switch a.is-active,html[data-theme] body .scope-switch.view-switch a.is-active:hover{background:var(--soft,#eef0ff);color:var(--primary);box-shadow:none}
html[data-theme="dark"] body .scope-switch.view-switch a.is-active{background:#ffffff14}

/* РПЦ: логотип в шапке и на входе — иконка приложения вместо значка-календаря */
html[data-theme] body .brand-mark.has-logo{background:none!important;padding:0;overflow:hidden}
html[data-theme] body .brand-mark.has-logo img{width:100%;height:100%;display:block}
/* РПЦ: профиль — ровная сетка 3×2 (Фамилия · Имя · Отчество / Станция · Почта · Сохранить), подписи на одной линии */
html[data-theme] body .profile-compact-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
html[data-theme] body .profile-compact-grid .profile-compact-save{align-self:start;padding-top:27px}
html[data-theme] body .profile-compact-grid .profile-email{min-height:44px;display:flex;align-items:center;margin:0}
@media(max-width:900px){html[data-theme] body .profile-compact-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){html[data-theme] body .profile-compact-grid{grid-template-columns:1fr}html[data-theme] body .profile-compact-grid .profile-compact-save{padding-top:0}}
/* 18.10: «Церковный календарь» — в одну строку: чуть плотнее буквы */
html[data-theme] body .side-nav .nav-tight{letter-spacing:-.022em}
