/* ===== AMANI · Преподаватели — дизайн-система ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  /* палитра — фуксия / бланш, oklch */
  --rose:        oklch(0.62 0.17 354);
  --rose-deep:   oklch(0.46 0.14 354);
  --rose-soft:   oklch(0.78 0.10 352);
  --blush:       oklch(0.965 0.018 350);
  --blush-2:     oklch(0.945 0.028 350);
  --cream:       oklch(0.987 0.006 60);
  --ink:         oklch(0.26 0.02 350);
  --muted:       oklch(0.50 0.03 350);
  --line:        oklch(0.90 0.02 350);
  --white:       #fff;

  --accent: var(--rose);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Manrope', system-ui, sans-serif;

  --card-radius: 18px;
  --shadow-sm: 0 1px 2px oklch(0.5 0.05 350 / 0.06), 0 4px 14px oklch(0.5 0.05 350 / 0.06);
  --shadow-md: 0 8px 30px oklch(0.45 0.08 350 / 0.12);
  --shadow-lg: 0 24px 70px oklch(0.40 0.10 350 / 0.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ====== фоновый градиент страницы ====== */
.amani-root {
  width: 100%; min-height: 100vh;
  background: radial-gradient(120% 60% at 50% 0%, var(--blush-2), var(--cream) 55%);
}

/* ====== оболочка блока ====== */
.amani-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 64px) 96px;
}

/* ====== шапка ====== */
.amani-head { margin-bottom: clamp(26px, 4vw, 44px); }
.amani-eyebrow {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--rose);
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
}
.amani-eyebrow::before {
  content: ""; width: 34px; height: 1.5px; background: var(--rose-soft); display: inline-block;
}
.amani-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 78px);
  line-height: 0.98; letter-spacing: -0.01em;
  margin: 0 0 16px; color: var(--ink);
}
.amani-title em { font-style: italic; color: var(--rose-deep); }
.amani-lede {
  max-width: 56ch; font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6; color: var(--muted); margin: 0; text-wrap: pretty;
}
.amani-root[data-view="mobile"] .amani-title { font-size: 40px; }

/* ====== панель управления ====== */
.amani-controls {
  display: flex; flex-direction: column; gap: 6px;
  margin: 22px 0 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.amani-tabs {
  display: flex; flex-wrap: wrap; gap: 9px;
}
.amani-tab {
  font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 17px; cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.amani-tab:hover { border-color: var(--rose-soft); color: var(--rose-deep); }
.amani-tab[data-active="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 4px 11px oklch(0.62 0.17 354 / 0.22);
}
.amani-tab .cnt { opacity: .6; font-weight: 600; margin-left: 6px; font-size: 12px; }

.amani-controls-row {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between;
}
.amani-controls-left { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* поиск */
.amani-search {
  position: relative; display: flex; align-items: center;
}
.amani-search input {
  font-family: var(--font-ui); font-size: 14px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px 10px 40px; width: 240px;
  transition: border-color .18s, box-shadow .18s; outline: none;
}
.amani-search input:focus { border-color: var(--rose-soft); box-shadow: 0 0 0 4px oklch(0.78 0.10 352 / 0.18); }
.amani-search input::placeholder { color: oklch(0.62 0.02 350); }
.amani-search svg { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }

/* селект филиала */
.amani-select { position: relative; display: inline-flex; }
.amani-select select {
  appearance: none; font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 38px 10px 16px; cursor: pointer; outline: none;
  transition: border-color .18s;
}
.amani-select select:hover { border-color: var(--rose-soft); }
.amani-select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* переключатель layout (сегмент) */
.amani-seg {
  display: inline-flex; background: var(--blush); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; gap: 2px;
}
.amani-seg button {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: none; border-radius: 999px;
  padding: 7px 14px; cursor: pointer; transition: all .16s ease; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.amani-seg button svg { width: 15px; height: 15px; }
.amani-seg button[data-active="true"] {
  background: var(--white); color: var(--rose-deep); box-shadow: var(--shadow-sm);
}
.amani-seg-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; margin-right: 4px; }

.amani-meta-count { font-size: 13px; color: var(--muted); font-weight: 500; }

/* кнопка-тоггл выбора направления */
.filter-dir-toggle {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all .16s;
  width: 100%; justify-content: space-between;
}
.filter-dir-toggle:hover { border-color: var(--rose-soft); }
.filter-dir-toggle[data-active="true"] { border-color: var(--accent); color: var(--rose-deep); }
.filter-dir-toggle svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }

/* филиалы — плашки (мультивыбор, ИЛИ) */
.amani-branches { display: flex; flex-wrap: wrap; gap: 8px; }
.branch-chip {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; transition: all .16s ease;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.branch-chip svg { width: 13px; height: 13px; color: var(--rose); }
.branch-chip:hover { border-color: var(--rose-soft); }
.branch-chip[data-active="true"] { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 4px 11px oklch(0.62 0.17 354 / 0.20); }
.branch-chip[data-active="true"] svg { color: #fff; }

/* строка-тэглайн / миссия в карточке */
.tline { font-size: 12.5px; line-height: 1.4; color: var(--muted); margin: 1px 0 1px; }
.tline.is-mission { font-family: var(--font-display); font-style: italic; font-size: 15.5px;
  line-height: 1.32; color: var(--rose-deep);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* кнопка пагинации */
.btn-more {
  width: 100%; margin-top: 16px; font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  color: var(--rose-deep); background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .18s ease;
}
.btn-more svg { width: 16px; height: 16px; }
.btn-more:hover { border-color: var(--rose-soft); background: var(--blush); }
.btn-more.is-ghost { color: var(--muted); }

/* ====== СЕТКИ ====== */
.amani-grid { display: grid; gap: 18px; }

/* — layout: rows (компактная строка) — */
.lay-rows .amani-grid { grid-template-columns: 1fr; gap: 11px; }
@media (min-width: 640px)  { .lay-rows .amani-grid { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (min-width: 1100px) { .lay-rows .amani-grid { grid-template-columns: 1fr 1fr 1fr; gap: 16px; } }
.lay-rows .tcard {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  grid-template-areas: "photo head chev" "mission mission mission";
  gap: 8px 14px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--card-radius);
  padding: 13px; cursor: pointer; transition: transform .16s ease, box-shadow .18s ease, border-color .18s;
}
.lay-rows .tcard:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.lay-rows .tcard:active { transform: scale(.985); }
.lay-rows .tcard .photo { grid-area: photo; width: 72px; height: 72px; aspect-ratio: 1; border-radius: 16px; }
.rowhead { grid-area: head; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.toptag { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); display: inline-flex; align-items: center; gap: 4px; }
.toptag svg { width: 11px; height: 11px; }
.lay-rows .tname { font-size: 22px; line-height: 1; }
.lay-rows .tchips { gap: 5px; }
.lay-rows .tchip { font-size: 10.5px; padding: 3px 9px; }
.lay-rows .tchip svg { width: 10px; height: 10px; color: var(--rose-soft); }
.tchip.dir { background: oklch(0.95 0.045 350); color: var(--rose-deep); font-weight: 600; }
.tline { grid-area: mission; margin: 2px 0 0; }
.rowchevron {
  grid-area: chev; align-self: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--blush); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center; transition: background .16s, color .16s;
}
.tcard:hover .rowchevron { background: var(--accent); color: #fff; }
.rowchevron svg { width: 15px; height: 15px; }

/* — layout: tiles (плитки) — */
.lay-tiles .amani-grid { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 22px; }
.lay-tiles .tcard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--card-radius);
  overflow: hidden; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  display: flex; flex-direction: column;
}
.lay-tiles .tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.lay-tiles .tcard .photo { aspect-ratio: 3/3.6; border-radius: 0; }
.lay-tiles .tcard .tilebody { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }

/* — layout: circles (круглые фото) — */
.lay-circles .amani-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 18px; }
.lay-circles .tcard {
  background: transparent; border: none; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px;
  transition: transform .2s ease;
}
.lay-circles .tcard:hover { transform: translateY(-4px); }
.lay-circles .tcard .photo {
  width: 132px; height: 132px; border-radius: 50%; box-shadow: var(--shadow-sm);
  outline: 3px solid var(--white); outline-offset: -3px;
  transition: box-shadow .2s, outline-color .2s;
}
.lay-circles .tcard:hover .photo { box-shadow: 0 10px 30px oklch(0.62 0.17 354 / 0.3); outline-color: var(--blush); }

/* — layout: magazine (редакторская сетка, все одного размера) — */
.lay-magazine .amani-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; align-items: stretch;
}
.lay-magazine .tcard {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--card-radius);
  overflow: hidden; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.lay-magazine .tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.lay-magazine .tcard .photo { aspect-ratio: 4/3.1; border-radius: 0; }
.lay-magazine .tcard .tilebody { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lay-magazine .tcard .tname { font-size: clamp(26px, 2.4vw, 32px); }

/* ====== фрагменты карточки ====== */
.photo {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, var(--blush-2), oklch(0.90 0.045 350));
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.ph-initial {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 2.5em; color: oklch(0.62 0.12 352 / 0.55); line-height: 1; user-select: none;
}
.photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%;
  opacity: 0; transition: opacity .4s ease; }
.photo-img.is-loaded { opacity: 1; }
.photo .photo-tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 10px;
  letter-spacing: .06em; color: oklch(0.58 0.05 350); text-transform: lowercase;
  background: oklch(1 0 0 / 0.7); padding: 4px 9px; border-radius: 6px; backdrop-filter: blur(2px);
}


.badge-top {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 4px 9px; border-radius: 999px;
  box-shadow: 0 3px 10px oklch(0.62 0.17 354 / 0.4);
}
.lay-rows .badge-top, .lay-circles .badge-top { top: 6px; left: 6px; }

.tname { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.05;
  margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.lay-circles .tname { font-size: 20px; }
.trole { font-size: 12.5px; font-weight: 600; color: var(--rose-deep); letter-spacing: .01em;
  text-transform: uppercase; margin: 0; }
.lay-circles .trole { text-transform: none; font-weight: 500; color: var(--muted); }

.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip {
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  background: var(--blush); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.tchip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rose-soft); }

.texp { font-size: 12px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.texp b { color: var(--ink); font-weight: 700; }

.tmore {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--rose-deep);
  background: none; border: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: gap .18s;
}
.tcard:hover .tmore { gap: 10px; }
.tmore svg { width: 14px; height: 14px; }

.btn-cta {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: #fff; background: var(--accent); border: none; border-radius: 999px;
  padding: 11px 20px; transition: filter .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 6px 18px oklch(0.62 0.17 354 / 0.3); white-space: nowrap;
}
.btn-cta:hover { filter: brightness(1.05); box-shadow: 0 10px 24px oklch(0.62 0.17 354 / 0.38); }
.btn-cta:active { transform: translateY(1px); }
.btn-ghost {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: var(--rose-deep); background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 20px; transition: all .18s; white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--rose-soft); background: var(--blush); }

/* пусто */
.amani-empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.amani-empty .big { font-family: var(--font-display); font-size: 30px; color: var(--ink); margin: 0 0 8px; }

/* ====== МОДАЛКА / СТРАНИЦА ПЕДАГОГА ====== */
.amani-overlay {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: oklch(0.3 0.04 350 / 0.46); backdrop-filter: blur(6px);
  animation: ov-in .25s ease;
}
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
.amani-modal {
  position: relative; width: 412px; max-width: 100%; max-height: 92vh; overflow: hidden;
  background: var(--cream); border-radius: 30px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: mod-in .32s cubic-bezier(.16,1,.3,1);
}
@keyframes mod-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.modal-body::-webkit-scrollbar { width: 0; }

/* ----- HERO: фото + имя поверх скрима ----- */
.modal-hero { position: relative; height: 340px; flex: 0 0 auto; overflow: hidden; }
.modal-photo {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, var(--rose-soft), oklch(0.55 0.15 354));
  display: flex; align-items: flex-start; justify-content: center;
}
.modal-photo .ph-initial { font-size: 150px; color: oklch(1 0 0 / 0.28); margin-top: 24px; }
.modal-photo .photo-img { object-position: center 18%; }
.modal-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, oklch(0.25 0.06 350 / 0) 38%, oklch(0.22 0.06 350 / 0.82) 100%);
}
.hero-head { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 26px 22px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 6px 13px; border-radius: 999px;
  box-shadow: 0 4px 12px oklch(0.5 0.15 354 / 0.5);
}
.hero-badge svg { width: 12px; height: 12px; }
.modal-name { font-family: var(--font-display); font-weight: 500; font-size: 46px;
  line-height: 0.96; margin: 0 0 12px; letter-spacing: -0.01em; color: #fff; }
.hero-dirs { gap: 7px; }
.hero-dirs .dirchip {
  background: oklch(1 0 0 / 0.16); border-color: oklch(1 0 0 / 0.28); color: #fff;
  backdrop-filter: blur(3px); font-size: 12px; padding: 5px 12px;
}

/* ----- статы ----- */
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 22px;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-align: center; }
.modal-stat + .modal-stat { border-left: 1px solid var(--line); }
.modal-stat .k { font-family: var(--font-display); font-size: 27px; color: var(--rose-deep); line-height: 1; }
.modal-stat .l { font-size: 11px; color: var(--muted); margin-top: 5px; letter-spacing: .02em; }

/* ----- миссия как пулл-цитата ----- */
.mission-quote { position: relative; margin: 22px 22px 4px; padding: 6px 0 6px 26px;
  font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.32;
  color: var(--rose-deep); text-wrap: pretty; }
.mission-quote::before { content: "\201C"; position: absolute; left: -4px; top: 6px;
  font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--rose-soft); }

.modal-section { padding: 0 22px; margin-top: 26px; }
.sec-h { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--rose); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.sec-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.bio-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bio-list li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.45; color: oklch(0.34 0.02 350); }
.bio-list li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 8px;
  border-radius: 50%; border: 2px solid var(--rose-soft); }

/* ----- видео-визитка 16:9 ----- */
.video-card { position: relative; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--rose-deep), oklch(0.34 0.08 350)); }
.video-init { font-family: var(--font-display); font-style: italic; font-size: 64px; color: oklch(1 0 0 / 0.22); }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 28%; filter: brightness(0.6) saturate(1.05); opacity: 0; transition: opacity .4s ease; }
.video-poster.is-loaded { opacity: 1; }
.video-card::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(0.3 0.05 350 / 0), oklch(0.2 0.05 350 / 0.5)); }
.video-card .amani-play-btn { position: relative; z-index: 2; width: 60px; height: 60px; border-radius: 50%;
  background: oklch(1 0 0 / 0.95); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px oklch(0.3 0.08 350 / 0.4); transition: transform .18s; }
.video-card:hover .play { transform: scale(1.09); }
.video-card .amani-play-btn::after { content: ""; width: 0; height: 0; margin-left: 5px;
  border-left: 17px solid var(--rose-deep); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video-card .vtag { position: absolute; bottom: 12px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 12px; color: #fff; font-weight: 600; letter-spacing: .01em; }
.video-card .vtag svg { width: 15px; height: 15px; }

.branchlist { display: flex; flex-direction: column; gap: 12px; }
.branchrow { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.branchrow .pin { width: 34px; height: 34px; border-radius: 10px; background: var(--blush);
  display: flex; align-items: center; justify-content: center; color: var(--rose); flex: 0 0 auto; }
.branchrow .pin svg { width: 16px; height: 16px; }
.branchrow b { font-weight: 600; display: block; }
.branchrow .addr { color: var(--muted); font-size: 12.5px; }

.dirchips { display: flex; flex-wrap: wrap; gap: 8px; }
.dirchip { font-size: 13px; font-weight: 500; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; white-space: nowrap; }

/* группы — пример */
.groups-stub { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.group-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); }
.group-row:last-of-type { border-bottom: none; }
.group-row .ginfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.group-row .glevel { font-weight: 600; font-size: 14px; }
.group-row .gmeta { font-size: 11.5px; color: var(--muted); }
.group-row .gtime { font-family: var(--font-display); font-size: 23px; color: var(--rose-deep); line-height: 1; }
.groups-note { font-size: 11px; color: var(--muted); text-align: center; padding: 11px; background: var(--blush); }

/* ----- липкий футер ----- */
.modal-foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; align-items: center;
  padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); background: var(--white);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px oklch(0.4 0.06 350 / 0.06); }
.modal-foot .btn-cta { width: 100%; padding: 16px; font-size: 15px; border-radius: 14px; }
.foot-note { font-size: 11.5px; color: var(--muted); }

/* ----- inline signup form ----- */
.signup-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.signup-label { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }
.signup-input {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: var(--font-body); color: var(--ink); background: var(--white);
  outline: none; box-sizing: border-box; transition: border-color .15s;
}
.signup-input:focus { border-color: var(--rose); }
.signup-ok { font-size: 15px; color: var(--rose-deep); text-align: center; font-weight: 600; margin: 0; padding: 8px 0; }
.signup-err { font-size: 12px; color: #d0021b; text-align: center; margin: 0; }

.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  background: oklch(1 0 0 / 0.9); border: none; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: all .18s; box-shadow: var(--shadow-md);
}
.modal-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.modal-close svg { width: 17px; height: 17px; }

.modal-section:last-of-type { margin-bottom: 28px; }

/* модалка всегда по центру */
.amani-overlay { padding: 24px 18px; }
.amani-modal { height: min(900px, 92vh); }

/* ===== desktop: фильтр в строку ===== */
@media (min-width: 900px) {
  .amani-controls { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .filter-dir-toggle { width: auto; flex-shrink: 0; }
  .amani-tabs { width: 100%; order: 3; }
  .amani-branches { flex: 1; }
}

/* ===== mobile ===== */
@media (max-width: 639px) {
  .amani-block { padding: 24px 16px 60px; }
  .amani-tabs { flex-wrap: wrap; padding: 2px 0; }
}
