
/* ============================================================
   ВОРОТА — пошаговый выбор этажа и комнаты
   ============================================================ */
.gate-modal{
  width: min(900px, 100%);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #F0F7F4;
  text-align: left;
  border-radius: 20px;
}
.gate-head{
  padding: 22px 30px 18px;
  background: linear-gradient(135deg, #E4F0EC, #F0F7F4);
  border-bottom: 1px solid #C8DFD6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}
.gate-head h2{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: clamp(20px, 3vw, 30px);
  color: #1E3330;
  margin: 0 0 4px;
  font-weight: 700;
}
.gate-head p{
  font-family: 'Philosopher', serif;
  font-style: italic;
  color: #2F4A44;
  font-size: 14.5px;
  margin: 0;
}
.gate-back{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #C8DFD6;
  background: #fff;
  color: #2F4A44;
  font-size: 16px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: .18s;
  flex-shrink: 0;
  margin-right: 8px;
}
.gate-back:hover{ border-color: #4A9E8E; color: #357A6E; background: rgba(74,158,142,.08); }

.gate-close{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #C8DFD6;
  background: #fff;
  color: #2F4A44;
  font-size: 16px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: .18s;
  flex-shrink: 0;
}
.gate-close:hover{ border-color: #4A9E8E; color: #357A6E; background: rgba(74,158,142,.08); }

/* Прогресс шагов */
.gate-steps{
  display: flex;
  gap: 6px;
  padding: 14px 30px 0;
}
.gate-steps .s{
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #C8DFD6;
  transition: background .3s;
}
.gate-steps .s.on{ background: linear-gradient(90deg, #7FB89C, #4A9E8E); }

/* Тело */
.gate-body{
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px 32px;
  background: #F0F7F4;
}
.gate-body::-webkit-scrollbar{ width: 8px }
.gate-body::-webkit-scrollbar-thumb{ background: #C8DFD6; border-radius: 4px }

/* Схема замка */
.gate-schema{
  margin-bottom: 22px;
  padding: 16px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  text-align: center;
}
.gate-schema svg{
  max-width: 100%;
  height: auto;
  max-height: 180px;
}

/* Сетка этажей / комнат */
/* Большие карточки этажей */
/* Комнаты внутри этажа */
/* Финальный экран */
.gate-final{
  text-align: center;
  padding: 30px 20px;
}
.gate-final .ico{
  font-size: 96px;
  line-height: 1;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 30px rgba(74,158,142,.35));
}
.gate-final h3{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 26px;
  color: #1E3330;
  margin: 0 0 12px;
}
.gate-final p{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15.5px;
  color: #2F4A44;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 480px;
}
.gate-final .btn{
  padding: 14px 32px;
  font-size: 16px;
}

/* Мини-инфо о комнате */
.gate-room-info{
  padding: 14px 20px;
  background: rgba(74,158,142,.08);
  border: 1px solid rgba(74,158,142,.22);
  border-radius: 12px;
  margin-bottom: 18px;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14.5px;
  color: #2F4A44;
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.gate-room-info b{ color: #357A6E; font-weight: 700; }

/* Адаптив */
@media (max-width: 620px){
  .gate-head{ padding: 18px 20px 14px; }
  .gate-body{ padding: 20px 20px 26px; }
  }


/* ============================================================
   ВОРОТА — КРАСИВЫЕ КНОПКИ-КАРТОЧКИ
   ============================================================ */

.gate-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.gate-grid-floors{
  grid-template-columns: repeat(2, 1fr);
}

/* ============ КАРТОЧКА-КНОПКА ЭТАЖА ============ */
.gate-btn{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: #fff;
  border: 2px solid #C8DFD6;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.gate-btn::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74,158,142,.06), rgba(74,158,142,.02));
  opacity: 0;
  transition: opacity .22s;
  pointer-events: none;
}
.gate-btn:hover{
  border-color: #4A9E8E;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(74,158,142,.16);
}
.gate-btn:hover::before{ opacity: 1; }

.gate-btn-ico{
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(135deg, rgba(74,158,142,.14), rgba(74,158,142,.06));
  border: 1px solid rgba(74,158,142,.20);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform .22s;
}
.gate-btn:hover .gate-btn-ico{
  transform: scale(1.08);
  background: linear-gradient(135deg, rgba(74,158,142,.22), rgba(74,158,142,.10));
}

.gate-btn-content{
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.gate-btn-name{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 19px;
  font-weight: 700;
  color: #1E3330;
  line-height: 1.15;
  margin-bottom: 4px;
  letter-spacing: .005em;
}
.gate-btn-desc{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #5A7A74;
  line-height: 1.4;
  margin-bottom: 8px;
}

.gate-btn:hover 

.gate-btn:hover 

/* Заблокированная (18+) */
.gate-btn.disabled{
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.7);
}
.gate-btn.disabled:hover{
  transform: none;
  box-shadow: none;
  border-color: #C8DFD6;
}
.gate-btn.disabled 

/* Бейдж «18+» */
.gate-btn-badge{
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #C08878;
  color: #F0F7F4;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ============ КОМНАТЫ ВНУТРИ ЭТАЖА ============ */
.gate-room-btn{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 2px solid #C8DFD6;
  border-radius: 14px;
  cursor: pointer;
  transition: all .22s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.gate-room-btn:hover{
  border-color: #4A9E8E;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(74,158,142,.14);
}
.gate-room-btn .gate-btn-ico{
  width: 52px;
  height: 52px;
  font-size: 24px;
}
.gate-room-btn .gate-btn-name{
  font-size: 17px;
}
.gate-room-btn .gate-btn-desc{
  font-size: 13px;
}

/* ============ ИНФО-ПОЛОСА ЭТАЖА ============ */
.gate-zone-head{
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(74,158,142,.10), rgba(74,158,142,.04));
  border: 1px solid rgba(74,158,142,.22);
  border-radius: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.gate-zone-head .ico{
  font-size: 32px;
  flex-shrink: 0;
}
.gate-zone-head b{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 18px;
  color: #1E3330;
  font-weight: 700;
  margin-bottom: 2px;
}
.gate-zone-head span{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #5A7A74;
}

/* Адаптив */
@media (max-width: 640px){
  .gate-grid-floors{ grid-template-columns: 1fr; }
  .gate-btn{ padding: 16px; gap: 12px; }
  .gate-btn-ico{ width: 48px; height: 48px; font-size: 24px; }
  .gate-btn-name{ font-size: 17px; }
  .gate-btn-desc{ font-size: 13px; }
  
}


/* ============================================================
   ВОРОТА — CTA КНОПКА С ЖИРНОЙ СТРЕЛКОЙ И МИГАЮЩЕЙ РУКОЙ
   ============================================================ */



/* Текст внутри CTA */


/* ============ СТРЕЛКА — ЖИРНАЯ, МИГАЮЩАЯ ============ */


/* ============ РУКА — МИГАЮЩАЯ, ПОСЛЕ СТРЕЛКИ ============ */


/* ============ HOVER — усиление ============ */
.gate-btn:hover 

.gate-btn:hover 

.gate-btn:hover 

/* ============ DISABLED — без руки ============ */
.gate-btn.disabled 
.gate-btn.disabled 
.gate-btn.disabled 

/* ============ СТРУКТУРА КАРТОЧКИ (ФИКС СЛИПАНИЯ) ============ */
.gate-btn-content{
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.gate-btn-name{
  display: block !important;
  margin: 0 !important;
}
.gate-btn-desc{
  display: block !important;
  margin: 0 0 4px !important;
}

/* Мобильный */
@media (max-width: 640px){
  
  
  
}


/* ============================================================
   КАРТОЧКА ЭТАЖА / КОМНАТЫ — ЧИСТАЯ СТРУКТУРА
   ============================================================ */

.gate-btn{
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  grid-template-rows: auto auto !important;
  gap: 14px 16px !important;
  padding: 18px 20px 20px !important;
  background: #fff !important;
  border: 2px solid #C8DFD6 !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all .22s ease !important;
  width: 100% !important;
  align-items: flex-start !important;
  position: relative !important;
}

.gate-btn:hover{
  border-color: #4A9E8E !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 32px rgba(74,158,142,.16) !important;
}

.gate-btn.disabled{
  opacity: .45 !important;
  cursor: not-allowed !important;
  filter: grayscale(.7) !important;
}
.gate-btn.disabled:hover{
  transform: none !important;
  box-shadow: none !important;
}

/* Иконка слева */
.gate-btn-ico{
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 26px !important;
  background: linear-gradient(135deg, rgba(74,158,142,.14), rgba(74,158,142,.06)) !important;
  border: 1px solid rgba(74,158,142,.20) !important;
  grid-row: span 2 !important;
  grid-column: 1 !important;
  flex-shrink: 0 !important;
  transition: transform .22s !important;
}
.gate-btn:hover .gate-btn-ico{
  transform: scale(1.08) !important;
}

/* Контент справа от иконки */
.gate-btn-content{
  grid-column: 2 !important;
  display: block !important;
  min-width: 0 !important;
}

.gate-btn-name{
  display: block !important;
  font-family: 'Philosopher', serif !important;
  font-style: italic !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #1E3330 !important;
  line-height: 1.15 !important;
  margin: 0 0 6px !important;
}

.gate-btn-desc{
  display: block !important;
  font-family: 'Philosopher', serif !important;
  font-style: italic !important;
  font-size: 13.5px !important;
  color: #5A7A74 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* ============ CTA — ОТДЕЛЬНОЙ КНОПКОЙ ВНИЗУ ============ */
.gate-btn-cta-wrap{
  grid-column: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 8px !important;
  position: relative !important;
}

/* Рука — слева от кнопки, смотрит вправо */
.gate-hand{
  display: inline-block !important;
  font-size: 22px !important;
  line-height: 1 !important;
  animation: hand-flash 1s ease-in-out infinite !important;
  filter: drop-shadow(0 0 6px rgba(255,180,80,.8)) !important;
  flex-shrink: 0 !important;
  transform-origin: left center !important;
}

@keyframes hand-flash{
  0%, 100%{
    opacity: 0.3;
    transform: translateX(-3px) scale(1);
  }
  50%{
    opacity: 1;
    transform: translateX(2px) scale(1.15);
  }
}

/* Кнопка */
.gate-btn-cta{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #5FB3A2, #4A9E8E) !important;
  color: #FFFFFF !important;
  font-family: 'Philosopher', serif !important;
  font-style: italic !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  box-shadow: 0 6px 16px rgba(74,158,142,.30) !important;
  white-space: nowrap !important;
  transition: .2s !important;
}

.gate-btn:hover .gate-btn-cta{
  box-shadow: 0 10px 24px rgba(74,158,142,.55),
              0 0 0 3px rgba(74,158,142,.20) !important;
  transform: translateX(3px) !important;
}

.cta-text{
  display: inline-block !important;
  color: #FFFFFF !important;
}

/* Жирная мигающая стрелка справа от текста, с отступом */
.gate-btn-cta .arr{
  display: inline-block !important;
  font-family: Arial, sans-serif !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #FFFFFF !important;
  margin-left: 8px !important;
  -webkit-text-stroke: 1px #1E3330 !important;
  text-shadow:
    0 0 10px rgba(255,255,255,.9),
    0 0 18px rgba(255,255,255,.6),
    0 2px 4px rgba(0,0,0,.4) !important;
  animation: arrow-pulse 1.2s ease-in-out infinite !important;
  transform-origin: left center !important;
}

@keyframes arrow-pulse{
  0%, 100%{
    transform: translateX(0) scale(1);
    text-shadow:
      0 0 10px rgba(255,255,255,.9),
      0 0 18px rgba(255,255,255,.6),
      0 2px 4px rgba(0,0,0,.4);
  }
  50%{
    transform: translateX(6px) scale(1.25);
    text-shadow:
      0 0 16px rgba(255,255,255,1),
      0 0 32px rgba(255,255,255,.95),
      0 0 48px rgba(255,255,255,.7),
      0 2px 4px rgba(0,0,0,.4);
  }
}

/* Бейдж 18+ */
.gate-btn-badge{
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  background: #C08878 !important;
  color: #F0F7F4 !important;
  font-family: 'Inter', sans-serif !important;
  font-style: normal !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
}

/* Disabled — без руки */
.gate-btn.disabled .gate-hand{ display: none !important; }
.gate-btn.disabled .gate-btn-cta{
  background: #B8D0C9 !important;
  color: #6A8078 !important;
  box-shadow: none !important;
  transform: none !important;
}
.gate-btn.disabled .gate-btn-cta .arr{
  animation: none !important;
  color: #6A8078 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

/* Адаптив */
@media (max-width: 640px){
  .gate-btn{
    padding: 16px !important;
    gap: 12px !important;
  }
  .gate-btn-ico{
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
  }
  .gate-btn-name{ font-size: 17px !important; }
  .gate-btn-desc{ font-size: 13px !important; }
  .gate-hand{ font-size: 19px !important; }
  .gate-btn-cta{
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
  .gate-btn-cta .arr{ font-size: 20px !important; }
}

/* ============================================================
   CTA — ЯВНАЯ РАМКА, ЧТОБЫ БЫЛО ВИДНО, ЧТО ЭТО КНОПКА
   ============================================================ */

.gate-btn-cta{
  /* Рамка вокруг кнопки */
  border: 2px solid #FFFFFF !important;
  outline: 2px solid #357A6E !important;
  outline-offset: 2px !important;

  /* Заливка + градиент */
  background: linear-gradient(135deg, #5FB3A2 0%, #4A9E8E 100%) !important;

  /* Тень — чтобы «отрывалась» от карточки */
  box-shadow:
    0 4px 0 #357A6E,
    0 8px 18px rgba(74,158,142,.45),
    0 0 0 1px rgba(255,255,255,.6) inset !important;

  /* Внутренний отступ побольше */
  padding: 11px 22px !important;

  /* Курсор и позиционирование */
  cursor: pointer !important;
  position: relative !important;
  border-radius: 999px !important;
  transition: all .15s ease !important;
  transform: translateY(0) !important;
}

/* Текст внутри кнопки — белый жирный */
.gate-btn-cta .cta-text{
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: .03em !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25) !important;
}

/* Стрелка — тоже с усилением */
.gate-btn-cta .arr{
  color: #FFFFFF !important;
  text-shadow:
    0 0 10px rgba(255,255,255,.9),
    0 0 18px rgba(255,255,255,.6),
    0 1px 2px rgba(0,0,0,.35) !important;
}

/* Hover — «вдавливание» */
.gate-btn:hover .gate-btn-cta{
  transform: translateY(2px) !important;
  box-shadow:
    0 2px 0 #357A6E,
    0 4px 12px rgba(74,158,142,.55),
    0 0 0 1px rgba(255,255,255,.7) inset !important;
  outline-color: #1E3330 !important;
}

/* Клик — совсем вдавить */
.gate-btn-cta:active{
  transform: translateY(4px) !important;
  box-shadow:
    0 0 0 #357A6E,
    0 2px 6px rgba(74,158,142,.5),
    0 0 0 1px rgba(255,255,255,.7) inset !important;
}

/* ============================================================
   HERO КНОПКИ — тоже явная рамка
   ============================================================ */

.hero .btn-primary{
  border: 2px solid #FFFFFF !important;
  outline: 2px solid #6B2434 !important;
  outline-offset: 2px !important;
  box-shadow:
    0 4px 0 #6B2434,
    0 10px 24px rgba(107,36,52,.4) !important;
}

.hero .btn-ghost{
  border: 2px solid #357A6E !important;
  background: rgba(240,247,244,.6) !important;
  color: #1E3330 !important;
  box-shadow:
    0 4px 0 rgba(53,122,110,.35),
    0 8px 18px rgba(53,122,110,.15) !important;
}

.hero .btn-ghost:hover{
  background: rgba(240,247,244,.9) !important;
  border-color: #1E3330 !important;
}

/* ============================================================
   ОБЩИЕ КНОПКИ — .btn в hero/cta
   ============================================================ */

.cta .btn-primary{
  border: 2px solid #FFFFFF !important;
  outline: 2px solid #357A6E !important;
  outline-offset: 2px !important;
  box-shadow:
    0 4px 0 #357A6E,
    0 10px 24px rgba(74,158,142,.4) !important;
}

.cta .btn-ghost{
  border: 2px solid #357A6E !important;
  background: rgba(240,247,244,.5) !important;
  color: #1E3330 !important;
  box-shadow:
    0 4px 0 rgba(53,122,110,.35),
    0 8px 18px rgba(53,122,110,.15) !important;
}

/* Адаптив */
@media (max-width: 640px){
  .gate-btn-cta{
    padding: 10px 18px !important;
    outline-offset: 1px !important;
    border-width: 2px !important;
  }
  .gate-btn-cta .cta-text{
    font-size: 13.5px !important;
  }
}

/* ============================================================
   HERO — одна кнопка «Осмотреть замок»
   ============================================================ */

.hero-btns{
  display: flex !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin-bottom: 34px !important;
  /* По умолчанию слева. Если хочешь по центру — раскомментируй: */
  /* justify-content: center !important; */
}

.hero-btns .btn-ghost{
  border: 2px solid #357A6E !important;
  outline: 2px solid rgba(53,122,110,.35) !important;
  outline-offset: 2px !important;
  background: rgba(240,247,244,.7) !important;
  color: #1E3330 !important;
  font-weight: 700 !important;
  padding: 15px 30px !important;
  box-shadow:
    0 4px 0 rgba(53,122,110,.4),
    0 10px 22px rgba(53,122,110,.18) !important;
  transition: all .15s ease !important;
}

.hero-btns .btn-ghost:hover{
  background: rgba(240,247,244,1) !important;
  border-color: #1E3330 !important;
  outline-color: #1E3330 !important;
  transform: translateY(2px) !important;
  box-shadow:
    0 2px 0 rgba(53,122,110,.5),
    0 6px 14px rgba(53,122,110,.25) !important;
}

.hero-btns .btn-ghost:active{
  transform: translateY(4px) !important;
  box-shadow:
    0 0 0 rgba(53,122,110,.4),
    0 2px 8px rgba(53,122,110,.3) !important;
}

/* ============================================================
   МОБИЛЬНАЯ ШАПКА — иконки видны и не сжимаются
   ============================================================ */

@media (max-width: 820px){

  /* Шапка — компактная, но все иконки на месте */
  .header-in{
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 8px 0 !important;
    min-height: 60px !important;
  }

  .logo{
    flex: 0 0 auto !important;
  }
  .logo b{
    font-size: 18px !important;
    letter-spacing: .08em !important;
  }
  .logo span{
    font-size: 7px !important;
    letter-spacing: .22em !important;
  }

  /* Меню — прячем (есть бургер) */
  .nav{
    display: none !important;
  }

  /* Правый блок — все иконки в ряд */
  .header-act{
    display: flex !important;
    gap: 2px !important;
    flex-wrap: nowrap !important;
    margin-left: auto !important;
  }

  /* Иконки — компактные */
  .header-act .icon-btn{
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
    display: grid !important;
    place-items: center !important;
  }

  /* Кнопка профиля — компактная */
  .header-act .user-btn{
    padding: 6px 10px !important;
    font-size: 13px !important;
  }

  /* Бургер */
  .header-act .burger{
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
  }

  /* Кнопка темы — точно видна */
  #themeToggle{
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Скрываем только те иконки, которые реально не помещаются */
  /* Например: adминка, поиск, ачивки, сообщения, избранное */
  /* Раскомментируй, если что-то лишнее: */
  /*
  #adminLink,
  #achBtn,
  #headerMsgBtn{
    display: none !important;
  }
  */
}

/* Очень узкий экран (≤480px) — иконки ещё компактнее */
@media (max-width: 480px){
  .header-in{ gap: 4px !important; }
  .logo b{ font-size: 15px !important; }
  .logo span{ font-size: 6.5px !important; }
  .header-act .icon-btn{
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }
  .header-act .user-btn{
    padding: 5px 8px !important;
    font-size: 12px !important;
  }
  .header-act .user-btn .desk{
    display: none !important;
  }
  .header-act .burger{
    width: 34px !important;
    height: 34px !important;
  }
}

/* ============================================================
   МЕССЕНДЖЕР — ПОЛНОЦЕННАЯ СТРАНИЦА
   ============================================================ */
.mess-app{
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 120px);
  min-height: 600px;
  margin: 20px 0;
  border: 1px solid #C8DFD6;
  border-radius: 18px;
  overflow: hidden;
  background: #F0F7F4;
  box-shadow: 0 20px 50px rgba(42,37,32,.08);
}

/* ===== ЛЕВОЕ МЕНЮ ===== */
.mess-side{
  background: #E4F0EC;
  border-right: 1px solid #C8DFD6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mess-side-head{
  padding: 18px 20px 14px;
  border-bottom: 1px solid #C8DFD6;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mess-side-head .ava-mini{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5FB3A2, #357A6E);
  display: grid;
  place-items: center;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  color: #F0F7F4;
  flex-shrink: 0;
  overflow: hidden;
}
.mess-side-head .ava-mini img{ width: 100%; height: 100%; object-fit: cover; }
.mess-side-head .name-mini{
  flex: 1;
  min-width: 0;
}
.mess-side-head .name-mini b{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  color: #1E3330;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mess-side-head .name-mini span{
  display: block;
  font-size: 12px;
  color: #5A7A74;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}
.mess-side-head .status-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7BC97E;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(123,201,126,.3);
}

/* Поиск в мессенджере */
.mess-search{
  padding: 12px 14px;
  border-bottom: 1px solid #C8DFD6;
}
.mess-search input{
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #C8DFD6;
  border-radius: 10px;
  background: #fff;
  color: #1E3330;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.mess-search input:focus{ border-color: #4A9E8E; }

/* Меню разделов */
.mess-nav{
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.mess-nav::-webkit-scrollbar{ width: 6px }
.mess-nav::-webkit-scrollbar-thumb{ background: #C8DFD6; border-radius: 3px }

.mess-nav-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15px;
  color: #2F4A44;
  cursor: pointer;
  transition: .15s;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
}
.mess-nav-item:hover{
  background: rgba(74,158,142,.10);
  color: #1E3330;
}
.mess-nav-item.is-active{
  background: linear-gradient(135deg, #5FB3A2, #4A9E8E);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(74,158,142,.28);
}
.mess-nav-item .ico{
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.mess-nav-item .cnt{
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 8px;
  background: #C08878;
  color: #fff;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}
.mess-nav-item.is-active .cnt{
  background: rgba(255,255,255,.3);
}

.mess-nav-sep{
  height: 1px;
  background: #C8DFD6;
  margin: 8px 12px;
}

/* ===== ПРАВАЯ ОБЛАСТЬ ===== */
.mess-main{
  display: flex;
  flex-direction: column;
  background: #F0F7F4;
  overflow: hidden;
}

.mess-main-head{
  padding: 16px 24px;
  border-bottom: 1px solid #C8DFD6;
  background: #E4F0EC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mess-main-head h2{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 700;
  color: #1E3330;
  margin: 0;
}
.mess-main-head p{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #5A7A74;
  margin: 2px 0 0;
}

.mess-content{
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.mess-content::-webkit-scrollbar{ width: 8px }
.mess-content::-webkit-scrollbar-thumb{ background: #C8DFD6; border-radius: 4px }

/* ===== ДИАЛОГИ ===== */
.dlg-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dlg-item{
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: .15s;
  background: #fff;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}
.dlg-item:hover{
  background: #E4F0EC;
  border-color: #C8DFD6;
}
.dlg-item.unread{
  border-color: rgba(192,136,120,.4);
  background: rgba(192,136,120,.05);
}

.dlg-ava{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5FB3A2, #357A6E);
  display: grid;
  place-items: center;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: #F0F7F4;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.dlg-ava img{ width: 100%; height: 100%; object-fit: cover; }
.dlg-ava .online-dot{
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7BC97E;
  border: 2px solid #fff;
}

.dlg-body{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}
.dlg-line1{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.dlg-name{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 700;
  color: #1E3330;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlg-time{
  font-size: 11.5px;
  color: #7A9690;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  flex-shrink: 0;
}
.dlg-line2{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.dlg-preview{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #5A7A74;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlg-badge{
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #C08878;
  color: #fff;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.mess-empty{
  text-align: center;
  padding: 60px 20px;
  color: #5A7A74;
}
.mess-empty .big-ico{
  font-size: 72px;
  line-height: 1;
  margin-bottom: 20px;
  opacity: .5;
}
.mess-empty b{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 20px;
  color: #1E3330;
  margin-bottom: 10px;
}
.mess-empty p{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 20px;
}

/* ===== КАРТОЧКИ (друзья, сообщества, публикации) ===== */
.mess-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.mess-card{
  padding: 16px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  transition: .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.mess-card:hover{
  border-color: #4A9E8E;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(74,158,142,.10);
}
.mess-card .mc-ico{
  font-size: 28px;
  margin-bottom: 10px;
}
.mess-card .mc-name{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  color: #1E3330;
  margin-bottom: 4px;
}
.mess-card .mc-desc{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13px;
  color: #5A7A74;
  line-height: 1.45;
}
.mess-card .mc-meta{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #C8DFD6;
}
.mess-card .mc-meta span{
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74,158,142,.10);
  color: #357A6E;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

/* ===== СТАТУС ===== */
.status-block{
  padding: 20px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  margin-bottom: 16px;
}
.status-block h3{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 18px;
  color: #1E3330;
  margin: 0 0 14px;
}
.status-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #C8DFD6;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14.5px;
  color: #2F4A44;
}
.status-row:last-child{ border-bottom: 0 }
.status-row .val{
  color: #357A6E;
  font-weight: 700;
}
.status-badge{
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}
.status-badge.ok{ background: rgba(107,122,80,.18); color: #4A5E38 }
.status-badge.no{ background: rgba(192,136,120,.15); color: #A05B48 }
.status-badge.wait{ background: rgba(200,155,90,.18); color: #8B6B2A }

/* ===== МОБИЛЬНЫЙ ===== */
@media (max-width: 820px){
  .mess-app{
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    margin: 10px 0;
    border-radius: 14px;
  }
  .mess-side{
    border-right: 0;
    border-bottom: 1px solid #C8DFD6;
    max-height: 260px;
  }
  .mess-nav{
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px;
    flex: 0 0 auto;
  }
  .mess-nav::-webkit-scrollbar{ height: 4px }
  .mess-nav-item{
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 13.5px;
    white-space: nowrap;
    margin-bottom: 0;
  }
  .mess-nav-item .ico{ font-size: 15px; }
  .mess-nav-item .cnt{ font-size: 10px; padding: 1px 6px; }
  .mess-nav-sep{ display: none }
  .mess-content{ padding: 16px }
  .mess-grid{ grid-template-columns: 1fr }
}

/* ============================================================
   СТЕНА, ПОСТЫ, КАНАЛЫ
   ============================================================ */

.wall-feed{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wall-post{
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  padding: 18px 20px;
  transition: .2s;
}
.wall-post:hover{
  border-color: #4A9E8E;
  box-shadow: 0 8px 20px rgba(74,158,142,.08);
}

.wall-head{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.wall-ava{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5FB3A2, #357A6E);
  display: grid;
  place-items: center;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  color: #F0F7F4;
  flex-shrink: 0;
  overflow: hidden;
}
.wall-ava img{ width: 100%; height: 100%; object-fit: cover; }
.wall-meta{
  flex: 1;
  min-width: 0;
}
.wall-meta b{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 700;
  color: #1E3330;
}
.wall-meta span{
  font-size: 12px;
  color: #7A9690;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}
.wall-delete{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #C08878;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: .2s;
}
.wall-post:hover .wall-delete{ opacity: 1; }
.wall-delete:hover{ background: rgba(192,136,120,.1); border-color: rgba(192,136,120,.3); }

.wall-body{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15.5px;
  color: #2F4A44;
  line-height: 1.6;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.wall-attach{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wall-attach img{
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
}
.wall-attach a{
  padding: 8px 12px;
  background: rgba(74,158,142,.08);
  border-radius: 8px;
  color: #357A6E;
  font-size: 13px;
  text-decoration: none;
}

.wall-actions{
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed #C8DFD6;
}
.wall-like{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #C8DFD6;
  background: transparent;
  color: #2F4A44;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
}
.wall-like:hover{
  border-color: #C08878;
  background: rgba(192,136,120,.06);
}
.wall-like.liked{
  background: linear-gradient(135deg, #C08878, #A05B48);
  color: #fff;
  border-color: #C08878;
}
.wall-stat{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #7A9690;
}

/* Адаптив */
@media (max-width: 640px){
  .wall-post{ padding: 14px 16px; }
  .wall-body{ font-size: 14.5px; }
  .wall-attach{ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ============================================================
   ПОСЛЕДНИЕ ПУБЛИКАЦИИ НА ГЛАВНОЙ
   ============================================================ */
.latest-posts-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media(max-width: 820px){
  .latest-posts-grid{ grid-template-columns: 1fr; }
}
.lp-card{
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  padding: 18px;
  transition: .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-card:hover{
  border-color: #4A9E8E;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(74,158,142,.12);
}
.lp-head{
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-ava{
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#5FB3A2,#357A6E);
  display: grid; place-items: center;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
  color: #F0F7F4;
  flex-shrink: 0;
  overflow: hidden;
}
.lp-ava img{ width: 100%; height: 100%; object-fit: cover; }
.lp-meta{ flex: 1; min-width: 0; }
.lp-meta b{
  display: block;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  color: #1E3330;
}
.lp-meta span{
  display: block;
  font-size: 11.5px;
  color: #7A9690;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}
.lp-tag{
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(74,158,142,.10);
  color: #357A6E;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.lp-body{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15px;
  color: #2F4A44;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-img{
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(74,158,142,.08);
}
.lp-img img{ width: 100%; height: 100%; object-fit: cover; }
.lp-foot{
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed #C8DFD6;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 12px;
  color: #7A9690;
}

/* ============================================================
   ЭМОДЗИ-ПАНЕЛЬ И СТИКЕРЫ
   ============================================================ */
.emoji-panel{
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(42,37,32,.15);
  max-height: 340px;
  overflow: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.emoji-panel.is-open{ display: flex; }

.emoji-tabs{
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid #C8DFD6;
  background: #F0F7F4;
  overflow-x: auto;
  flex-shrink: 0;
}
.emoji-tabs::-webkit-scrollbar{ height: 4px }
.emoji-tabs button{
  padding: 8px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  border-radius: 8px;
  transition: .15s;
  flex-shrink: 0;
}
.emoji-tabs button:hover{ background: rgba(74,158,142,.10); }
.emoji-tabs button.is-active{ background: linear-gradient(135deg, #5FB3A2, #4A9E8E); }
.emoji-tabs button.is-active *{ filter: brightness(2); }

.emoji-grid{
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 2px;
}
.emoji-grid::-webkit-scrollbar{ width: 6px }
.emoji-grid::-webkit-scrollbar-thumb{ background: #C8DFD6; border-radius: 3px }

.emoji-btn{
  width: 100%;
  aspect-ratio: 1/1;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  border-radius: 8px;
  transition: transform .15s, background .15s;
  display: grid;
  place-items: center;
}
.emoji-btn:hover{
  background: rgba(74,158,142,.10);
  transform: scale(1.25);
}

/* Анимированные эмодзи — пульсация */
.emoji-btn.animated{
  animation: emoji-pulse 1.2s ease-in-out infinite;
}
@keyframes emoji-pulse{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.12); }
}
.emoji-btn.animated:hover{
  animation: none;
  transform: scale(1.35) rotate(8deg);
}

/* Анимированные эмодзи с эффектами */
.emoji-btn.heart{
  animation: heart-beat 0.8s ease-in-out infinite;
}
@keyframes heart-beat{
  0%, 100%{ transform: scale(1); }
  25%{ transform: scale(1.15); }
  50%{ transform: scale(0.95); }
  75%{ transform: scale(1.12); }
}
.emoji-btn.fire{
  animation: fire-flicker 0.6s ease-in-out infinite alternate;
}
@keyframes fire-flicker{
  from{ transform: scale(1) rotate(-3deg); filter: hue-rotate(0deg); }
  to{ transform: scale(1.15) rotate(3deg); filter: hue-rotate(-10deg); }
}
.emoji-btn.sparkle{
  animation: sparkle 1.5s ease-in-out infinite;
}
@keyframes sparkle{
  0%, 100%{ transform: scale(1) rotate(0deg); opacity: 1; }
  50%{ transform: scale(1.2) rotate(180deg); opacity: .8; }
}
.emoji-btn.moon{
  animation: moon-glow 2s ease-in-out infinite;
}
@keyframes moon-glow{
  0%, 100%{ filter: drop-shadow(0 0 4px #F0D080); }
  50%{ filter: drop-shadow(0 0 12px #F0D080); }
}

/* ============================================================
   СТИКЕРЫ
   ============================================================ */
.sticker-panel{
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(42,37,32,.15);
  max-height: 360px;
  overflow: hidden;
  z-index: 100;
  flex-direction: column;
}
.sticker-panel.is-open{ display: flex; }

.sticker-tabs{
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid #C8DFD6;
  background: #F0F7F4;
  overflow-x: auto;
  flex-shrink: 0;
}
.sticker-tabs::-webkit-scrollbar{ height: 4px }
.sticker-tabs button{
  padding: 8px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 13px;
  color: #2F4A44;
  border-radius: 8px;
  transition: .15s;
  flex-shrink: 0;
}
.sticker-tabs button:hover{ background: rgba(74,158,142,.10); }
.sticker-tabs button.is-active{ background: linear-gradient(135deg, #5FB3A2, #4A9E8E); color: #fff; }

.sticker-grid{
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.sticker-grid::-webkit-scrollbar{ width: 6px }
.sticker-grid::-webkit-scrollbar-thumb{ background: #C8DFD6; border-radius: 3px }

.sticker-btn{
  aspect-ratio: 1/1;
  border: 1px solid #C8DFD6;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  padding: 8px;
  transition: .2s;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.sticker-btn:hover{
  border-color: #4A9E8E;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 24px rgba(74,158,142,.15);
}
.sticker-btn svg{
  width: 100%;
  height: 100%;
}

/* Анимированные стикеры */
.sticker-btn.anim-1 svg .eye{ animation: blink 3s ease-in-out infinite; }
@keyframes blink{
  0%, 90%, 100%{ transform: scaleY(1); }
  95%{ transform: scaleY(0.1); }
}
.sticker-btn.anim-2 svg .mouth{ animation: smile 2s ease-in-out infinite; }
@keyframes smile{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.15); }
}
.sticker-btn.anim-3 svg{ animation: shake 1.5s ease-in-out infinite; }
@keyframes shake{
  0%, 100%{ transform: rotate(-3deg); }
  50%{ transform: rotate(3deg); }
}
.sticker-btn.anim-4 svg{ animation: bounce-sticker 1s ease-in-out infinite; }
@keyframes bounce-sticker{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

/* Меню вложений (плюс) */
.attach-menu{
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #C8DFD6;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(42,37,32,.15);
  padding: 8px;
  min-width: 220px;
  z-index: 100;
}
.attach-menu.is-open{ display: block; }
.attach-menu button{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 15px;
  color: #2F4A44;
  text-align: left;
  transition: .15s;
}
.attach-menu button:hover{ background: rgba(74,158,142,.10); }
.attach-menu button .ico{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: linear-gradient(135deg, #5FB3A2, #4A9E8E);
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   ЗВОНКИ (audio/video)
   ============================================================ */
.call-modal{
  position: fixed;
  inset: 0;
  z-index: 300;
  background: linear-gradient(135deg, #1A2F2C, #0F1F1D);
  display: none;
  flex-direction: column;
  color: #F0F7F4;
}
.call-modal.is-open{ display: flex; }

.call-header{
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,.2);
}
.call-header b{
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 20px;
  color: #F0F7F4;
}
.call-header span{ color: #B8D0C9; font-size: 14px; }

.call-stage{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}
.call-avatar{
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5FB3A2, #357A6E);
  display: grid;
  place-items: center;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 80px;
  color: #F0F7F4;
  box-shadow: 0 0 80px rgba(95,179,162,.4);
  animation: call-pulse 2s ease-in-out infinite;
}
@keyframes call-pulse{
  0%, 100%{ box-shadow: 0 0 80px rgba(95,179,162,.4); }
  50%{ box-shadow: 0 0 120px rgba(95,179,162,.7); }
}

.call-video-remote{
  width: 100%;
  height: 100%;
  max-width: 800px;
  aspect-ratio: 16/10;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.call-video-remote video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-video-local{
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 160px;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 2px solid #5FB3A2;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.call-video-local video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.call-actions{
  padding: 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  background: rgba(0,0,0,.3);
}
.call-btn{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  display: grid;
  place-items: center;
  transition: .2s;
  background: rgba(255,255,255,.15);
  color: #F0F7F4;
}
.call-btn:hover{ background: rgba(255,255,255,.25); transform: scale(1.06); }
.call-btn.danger{ background: #C08878; }
.call-btn.danger:hover{ background: #A05B48; }
.call-btn.active{ background: #7BC97E; color: #1A2F2C; }
.call-btn.small{
  width: 52px;
  height: 52px;
  font-size: 20px;
}

/* ============================================================
   КРУЖКИ (видео-сообщения)
   ============================================================ */
.circle-record{
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(15,31,29,.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #F0F7F4;
}
.circle-record.is-open{ display: flex; }

.circle-preview{
  width: min(340px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  position: relative;
  border: 4px solid #C08878;
  box-shadow: 0 0 60px rgba(192,136,120,.5);
  animation: circle-pulse 1.5s ease-in-out infinite;
}
@keyframes circle-pulse{
  0%, 100%{ border-color: #C08878; box-shadow: 0 0 60px rgba(192,136,120,.5); }
  50%{ border-color: #E8B888; box-shadow: 0 0 100px rgba(232,184,136,.7); }
}
.circle-preview video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.circle-timer{
  margin-top: 24px;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 28px;
  font-weight: 700;
  color: #F0F7F4;
}
.circle-hint{
  margin-top: 12px;
  font-size: 14px;
  color: #B8D0C9;
  font-family: 'Philosopher', serif;
  font-style: italic;
}
.circle-actions{
  margin-top: 32px;
  display: flex;
  gap: 16px;
}

/* Кружок в ленте сообщений */
.msg.circle{
  padding: 4px;
  background: transparent !important;
  border: 0 !important;
  max-width: 260px;
}
.msg.circle video{
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4A9E8E;
  display: block;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(74,158,142,.3);
  transition: .2s;
}
.msg.circle video:hover{
  border-color: #7FB89C;
  transform: scale(1.03);
}
.msg.circle .circle-progress{
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #7FB89C;
  animation: spin 1.5s linear infinite;
  pointer-events: none;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* Мини-плеер кружка */
.circle-viewer{
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(15,31,29,.95);
  display: none;
  align-items: center;
  justify-content: center;
}
.circle-viewer.is-open{ display: flex; }
.circle-viewer video{
  width: min(400px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #7FB89C;
}
.circle-viewer .close{
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}

/* Индикатор звонка входящего */
.incoming-call{
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  background: linear-gradient(135deg, #4A9E8E, #357A6E);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(74,158,142,.5);
  display: none;
  align-items: center;
  gap: 16px;
  animation: incoming-slide 0.4s ease-out;
}
@keyframes incoming-slide{
  from{ transform: translate(-50%, -120%); }
  to{ transform: translate(-50%, 0); }
}
.incoming-call.is-open{ display: flex; }
.incoming-call .ava{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-family: 'Philosopher', serif;
}
.incoming-call .info{ flex: 1; }
.incoming-call .info b{ display: block; font-size: 15px; }
.incoming-call .info span{ font-size: 12.5px; opacity: .85; }
.incoming-call button{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
}
.incoming-call .accept{ background: #7BC97E; color: #1A2F2C; }
.incoming-call .decline{ background: #C08878; }

/* Кнопки звонков в чате */
.chat-actions{
  display: flex;
  gap: 4px;
}
.chat-actions button{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #C8DFD6;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #2F4A44;
  transition: .15s;
}
.chat-actions button:hover{
  border-color: #4A9E8E;
  background: rgba(74,158,142,.08);
  color: #357A6E;
}

/* ============================================================
   ФИКС: ЭМОДЗИ-ПАНЕЛИ И ПОДЛОЖКА ПОД НИХ
   ============================================================ */

/* Форма чата — всегда relative, чтобы панели позиционировались от неё */
.mess-input,
#chatForm{
  position: relative !important;
}

/* Перебиваем старые правила */
.emoji-panel,
.sticker-panel,
.attach-menu{
  display: none !important;
  position: absolute !important;
  bottom: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  margin-bottom: 0 !important;
  background: #fff !important;
  border: 1px solid #C8DFD6 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(42,37,32,.18) !important;
  z-index: 200 !important;
  overflow: hidden !important;
}
.emoji-panel{
  flex-direction: column !important;
  max-height: 340px !important;
}
.sticker-panel{
  flex-direction: column !important;
  max-height: 380px !important;
}
.attach-menu{
  left: 0 !important;
  right: auto !important;
  min-width: 240px !important;
  padding: 8px !important;
}

/* Класс .is-open — открывает */
.emoji-panel.is-open,
.sticker-panel.is-open,
.attach-menu.is-open{
  display: flex !important;
}
.attach-menu.is-open{
  display: block !important;
}

/* Табы */
.emoji-tabs,
.sticker-tabs{
  display: flex !important;
  gap: 2px !important;
  padding: 8px 10px !important;
  border-bottom: 1px solid #C8DFD6 !important;
  background: #F0F7F4 !important;
  overflow-x: auto !important;
  flex-shrink: 0 !important;
}
.emoji-tabs button,
.sticker-tabs button{
  cursor: pointer !important;
}
.emoji-tabs button.is-active{
  background: linear-gradient(135deg, #5FB3A2, #4A9E8E) !important;
}
.sticker-tabs button.is-active{
  background: linear-gradient(135deg, #5FB3A2, #4A9E8E) !important;
  color: #fff !important;
}

/* Гриды */
.emoji-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)) !important;
  gap: 2px !important;
  padding: 10px !important;
  overflow-y: auto !important;
  max-height: 280px !important;
}
.sticker-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
  gap: 8px !important;
  padding: 10px !important;
  overflow-y: auto !important;
  max-height: 320px !important;
}

/* Кнопки — базовое */
.emoji-btn{
  width: 100% !important;
  aspect-ratio: 1/1 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  font-size: 24px !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  transition: transform .15s, background .15s !important;
}
.emoji-btn:hover{
  background: rgba(74,158,142,.10) !important;
  transform: scale(1.25) !important;
}
.sticker-btn{
  aspect-ratio: 1/1 !important;
  border: 1px solid #C8DFD6 !important;
  background: #fff !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  padding: 8px !important;
  display: grid !important;
  place-items: center !important;
  transition: .2s !important;
}
.sticker-btn:hover{
  border-color: #4A9E8E !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 10px 24px rgba(74,158,142,.15) !important;
}
.sticker-btn svg{
  width: 100% !important;
  height: 100% !important;
}

/* Меню вложений */
.attach-menu button{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  border-radius: 10px !important;
  font-family: 'Philosopher', serif !important;
  font-style: italic !important;
  font-size: 15px !important;
  color: #2F4A44 !important;
  text-align: left !important;
}
.attach-menu button:hover{ background: rgba(74,158,142,.10) !important; }

/* Мини-рейтинг рядом с именем мастера */
.mini-rating{
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-size: 12px;
  color: #F5C842;
  font-family: Inter, sans-serif;
  font-style: normal;
}
.mini-rating b{ color: #5A7A74; font-weight: 600; font-size: 11.5px; margin-left: 3px; }

/* ============================================================
   ОТВЕТ НА СООБЩЕНИЕ (reply)
   ============================================================ */
.msg-reply-quote{
  padding: 6px 10px;
  margin-bottom: 6px;
  border-left: 3px solid #4A9E8E;
  background: rgba(74,158,142,.08);
  border-radius: 6px;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.4;
  color: #2F4A44;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.msg-reply-quote b{
  color: #357A6E;
  margin-right: 4px;
  font-weight: 700;
}

.msg-reply-bar{
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(74,158,142,.10);
  border-top: 1px solid #C8DFD6;
  font-family: 'Philosopher', serif;
  font-style: italic;
  font-size: 13.5px;
  color: #2F4A44;
}
.msg-reply-bar.is-open{ display: flex; }
.msg-reply-bar .reply-icon{
  color: #357A6E;
  font-size: 16px;
  flex-shrink: 0;
}
.msg-reply-bar .reply-text{
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-reply-bar .reply-text b{ color: #357A6E; }
.msg-reply-bar .reply-close{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(192,136,120,.15);
  color: #C08878;
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.msg-reply-bar .reply-close:hover{ background: #C08878; color: #fff; }

/* Кнопка ответа на сообщении */
.msg-action-btn{
  position: absolute;
  top: -6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #C8DFD6;
  background: #fff;
  color: #5A7A74;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: .18s;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(42,37,32,.08);
}
.msg:hover .msg-action-btn{ opacity: 1; }
.msg.me .msg-action-btn{ left: -42px; }
.msg.peer .msg-action-btn{ right: -42px; }
.msg-action-btn:hover{
  background: #4A9E8E;
  color: #fff;
  border-color: #4A9E8E;
}
.msg-highlight{
  animation: msg-flash 1.2s ease-in-out;
}
@keyframes msg-flash{
  0%, 100%{ background-color: transparent; }
  50%{ background-color: rgba(74,158,142,.15); }
}

/* Отступ снизу под reply bar */
.mess-input{ padding-top: 0; }
