/* /pwa/style.css — редизайн: glassmorphism, светлая тема, анимации */
/* ====== БАЗОВЫЕ ПЕРЕМЕННЫЕ ====== */
:root {
  /* Светлая тема */
  --bg: #5b8097;
  --splash-bg: #000000;
  --bg-secondary: rgba(255,255,255,0.6);
  --bg-strong: rgba(255,255,255,0.72);
  --glass-border: 1px solid rgba(255,255,255,0.35);
  --text: #ffffff;
  --text-muted: #ececec;
  --text-muteds: #ffffff;
  --accent: #62e572;
  --accents: #00bfff;
  --card: rgba(255,255,255,0.6);
  --shadow: 0 10px 30px rgba(0,0,0,0.10);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --header-height: 118px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
               "Ubuntu", "Cantarell", "Helvetica Neue", Arial, sans-serif;
  --glass-alpha-top:     0.83; /* градиент: верх */
  --glass-alpha-bot:     0.87; /* градиент: низ */
  --glass-alpha-top-s:   0.20; /* усиленный: верх */
  --glass-alpha-bot-s:   0.12; /* усиленный: низ */
  --glass-border-alpha:  0.18; /* обводка */
  --glass-shadow: 0 8px 20px rgba(10, 5, 30, 0.22);			   
}

/* ====== ГЛОБАЛ ====== */

html {
  font-family: var(--font-sans, sans-serif);
}

input, button, textarea, select {
  font: inherit; /* наследуют шрифт от родителя */
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit; /* заголовки тоже наследуют шрифт */
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  min-height: 100dvh;              /* важно для iOS */
}

.app-root{
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom); /* чтобы фон доходил до края */
}

body {
  background-color: var(--bg);
  color: #ffffff; 
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh; /* или 100vh — но dvh лучше для динамических панелей */
  z-index: -1;
  
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 30px,
    rgba(0, 0, 0, 0.03) 30px,
    rgba(0, 0, 0, 0.03) 31px
  );
  animation: shimmering-silk 20s linear infinite;
}

@keyframes shimmering-silk {
  from { background-position: 0 0; }
  to { background-position: -124px 0; } /* 4 * 31px */
}


/* --- СЛОЙ 1: МЯГКИЙ MESH GRADIENT (УЛУЧШЕННЫЙ) --- */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  z-index: -2;
}

.gradients-container {
  position: relative;
  width: 100%;
  height: 100%;
  filter: blur(100px); /* Размываем пятна */
}

.g1, .g2, .g3, .g4 {
  position: absolute;
  border-radius: 50%;
}

/* Более сложная и нежная палитра */
.g1 {
  background: #c2e59c; /* нежно-зеленый */
  width: 45vmax; height: 45vmax;
  animation: move1 18s ease-in-out infinite alternate;
}
.g2 {
  background: #64b3f4; /* небесно-голубой */
  width: 40vmax; height: 40vmax;
  animation: move2 22s ease-in-out infinite alternate-reverse;
}
.g3 {
  background: #ffdde1; /* розовый кварц */
  width: 35vmax; height: 35vmax;
  animation: move3 15s ease-in-out infinite alternate;
}
.g4 {
  background: #fff2c3; /* ванильный */
  width: 30vmax; height: 30vmax;
  animation: move4 25s ease-in-out infinite alternate-reverse;
}

/* Анимации движения пятен (остаются такими же) */
@keyframes move1 { from { transform: translate(-10vmax, 20vmax) rotate(0deg); } to { transform: translate(40vmax, -10vmax) rotate(180deg) scale(1.2); } }
@keyframes move2 { from { transform: translate(50vmax, 60vmax) rotate(0deg); } to { transform: translate(0, 0) rotate(-150deg) scale(1.1); } }
@keyframes move3 { from { transform: translate(60vmax, 10vmax) rotate(0deg); } to { transform: translate(20vmax, 50vmax) rotate(100deg); } }
@keyframes move4 { from { transform: translate(10vmax, 70vmax) rotate(0deg); } to { transform: translate(50vmax, 20vmax) rotate(-100deg) scale(1.3); } }

.app-container {
  max-width: 480px;
  margin: 0 auto;
  /* реальные размеры экрана, без «лишнего» нижнего паддинга */
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: 0; /* ВАЖНО: полосу снизу убираем, safe-area в панели */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ====== GLASS HELPERS ====== */
.glass {
        background: rgba(35, 25, 66, 0.0);
        backdrop-filter: blur(25px) saturate(120%) brightness(80%);
        -webkit-backdrop-filter: blur(25px) saturate(120%) brightness(80%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 12px 0 rgba(10, 5, 30, 0.3);
}
.glass-strong {
        background: rgba(35, 25, 66, 0.0);
        backdrop-filter: blur(25px) saturate(120%) brightness(80%);
        -webkit-backdrop-filter: blur(25px) saturate(120%) brightness(80%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 12px 0 rgba(10, 5, 30, 0.3);
}

/* ====== HEADER ====== */
.header-sticky-wrapper {
  position: fixed;
  top: max(0px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  z-index: 40;
  padding: 14px 14px 0;
  background: transparent;
  margin-top: 0;
  pointer-events: none;
}

.app-header {
  padding: 12px 14px;
  gap: 12px;
  border-radius: 20px;
  pointer-events: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(82, 120, 138, var(--glass-alpha-top)),
    rgba(39, 58, 62, var(--glass-alpha-bot))
  );
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* лого слева, колокольчик справа, заголовок — по центру */
  gap: 8px;
  position: relative;
  height: 28px;
}
.app-header .logo {
  height: 28px;
  left: 0;
  top: 0;
}
.app-header .header-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.search-bar {
  display: flex;
  align-items: center;
  border-radius: 50px;
  padding: 10px 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.search-bar .search-icon { margin-right: 10px; opacity: .65; }
.search-bar input {
  flex: 1 1 auto;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  min-width: 0;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .city-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.32);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  min-width: 0;
  flex-shrink: 1;
}
.city-selector .city-icon { opacity: .7; }
.city-selector #current-city {
  font-weight: 600;
  font-size: 14px;
  max-width: 110px;  /* как было */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.city-selector .dropdown-icon { opacity: .5; }

/* Кнопка очистки поля поиска */
.search-bar .clear-btn {
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  display: none;
  cursor: pointer;
}
.search-bar.has-value .clear-btn { display: inline-flex; }

/* ====== MAIN ====== */

/* Скрываем полосу прокрутки (WebKit) */
.app-main::-webkit-scrollbar {
  display: none;
}

/* Если есть другие скролл-контейнеры */
#modal-city-list::-webkit-scrollbar,
.search-results-list::-webkit-scrollbar {
  display: none;
}

.app-main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-x: contain;

  padding: 14px;

  /* Контент не заезжает под фикс-хедер и не упирается в панель */
  padding-top: calc(var(--header-height) + env(safe-area-inset-top) + 6px);
  padding-bottom: calc(80px + env(safe-area-inset-bottom) + 14px);
height: calc(100dvh - var(--header-height) - 80px
              - env(safe-area-inset-top) - env(safe-area-inset-bottom)
              - 28px);

}

#content-container, #search-results-container, #main-categories {
  animation: fadeIn .28s ease-out;
  min-height: 0;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Сетка категорий */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* важно */
  gap: 14px;
  margin-bottom: 20px;
  width: 90%;
  max-width: 90%;
  margin-inline: auto;
}

.category-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 25px;
  aspect-ratio: 1 / 1;
  position: relative;
  padding: 10px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.category-card .card-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.category-card .card-content img {
  display: block;
  align-self: center;       
  margin: 0 0 10px;        
  max-width: 90px;
  max-height: 90px;
  height: auto;
  object-fit: contain;
}

/* Заголовок — блочный, центрированный */
.category-card .card-content span {
  display: block;
  width: 100%;
  /* margin-top: 6px; */
  text-align: center;
  line-height: 1.2;
  font-size: 14px;
}

/* Подкатегории/сервисы/поиск */
.back-button {
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  margin-bottom: 18px;
  font-size: 16px;
  display: inline-block;
  padding: 8px 0;
}
.subcategories-list, .services-list, .search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subcategory-item, .service-card, .search-result-item {
  display: flex;
  align-items: center;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  transition: transform .12s ease, background .2s ease;
}
.subcategory-item:hover, .service-card:hover, .search-result-item:hover { transform: translateY(-1px); }
.subcategory-item, .service-card, .search-result-item {
        background: rgba(35, 25, 66, 0.0);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 32px 0 rgba(10, 5, 30, 0.3);
	border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.subcategory-item img {
  width: 50px;
  height: 50px;
  margin-right: 14px;
  object-fit: contain;
}

.service-card .service-image {
  width: 50px;
  height: 50px;
  margin-right: 14px;
  flex-shrink: 0;
}
.service-card .service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.service-card .service-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}
.no-results {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
}

/* ====== FOOTER ====== */
.app-footer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0; /* прижали к низу */
  width: min(100%, 480px);
  z-index: 30;
  padding: 0 14px;
  padding-bottom: env(safe-area-inset-bottom); /* safe-area внутрь панели */
  box-sizing: border-box;
}
.bottom-nav {
  position: relative;
  width: 100%;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr 80px 1fr 1fr;
  align-items: center;
  padding: 0 10px;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(82, 120, 138, var(--glass-alpha-top)),
    rgba(39, 58, 62, var(--glass-alpha-bot))
  );
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.bottom-nav .nav-item {
  text-align: center;
  font-size: 22px;
  color: var(--text-muted);
  transition: transform .15s ease, color .2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-decoration: none;
}
.bottom-nav .nav-item:active { transform: scale(.96); }
.bottom-nav .nav-item.active { color: var(--accents); }
.nav-item-placeholder { width: 80px; height: 1px; }

.voice-search-btn {
  position: absolute;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: white;
  background: linear-gradient(135deg, #63e6f9 0%, #c7d2fe 100%);
  box-shadow: 0 10px 25px rgba(0,0,0,0.28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  z-index: 1001;
}
.voice-search-btn:active { transform: translateX(-50%) scale(.95); }
.voice-search-btn .voice-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.voice-search-btn.listening {
  animation: pulse 1.6s infinite;
  filter: saturate(115%);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78,201,255,0.6), 0 10px 25px rgba(0,0,0,0.28); }
  70% { box-shadow: 0 0 0 16px rgba(78,201,255,0), 0 10px 25px rgba(0,0,0,0.28); }
  100% { box-shadow: 0 0 0 0 rgba(78,201,255,0), 0 10px 25px rgba(0,0,0,0.28); }
}

/* ====== МОДАЛКИ ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,20,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn .2s ease;
  padding: 20px;
}
.modal-content {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  padding: 18px;
  color: var(--text);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(82, 120, 138, var(--glass-alpha-top)),
    rgba(39, 58, 62, var(--glass-alpha-bot))
  );
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
}
.close-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  z-index: 10;
}
#modal-city-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #ffffff00;
  color: var(--text);
  outline: none;
  margin-top: 10px;
  font-size: 16px;
  box-sizing: border-box;
}
#modal-city-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  max-height: 60vh;
  overflow-y: auto;
  flex: 1;
}
#modal-city-list li {
  padding: 12px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(100,100,100,0.1);
  border-radius: 10px;
}
#modal-city-list li:hover { background: rgba(0,0,0,0.04); }
#modal-city-list .no-results { text-align: center; color: var(--text-muted); }

/* ====== ОНБОРДИНГ (СПЛЭШ) НА ВЕСЬ ЭКРАН ====== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  text-align: center;
  opacity: 1;
  transition: opacity .28s ease;
  background: var(--splash-bg);
}
.onboarding-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.onboarding-content {
  max-width: 320px;
}
.onboarding-logo {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
}
.onboarding-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text);
}
.onboarding-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.onboarding-actions {
  margin-top: 40px;
}
.btn {
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
}
.btn.primary {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ====== ОРГАНИЗАЦИЯ КАРТОЧКА ====== */
.organization-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-alpha));
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.organization-card > div {
  text-align: center;
  margin-bottom: 20px;
}
.organization-card img {
  max-height: 80px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.organization-card h2 {
  margin-top: 15px;
  font-weight: 700;
}
.organization-card p {
  color: var(--text-muteds);
}
.organization-card > div:last-child {
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 15px;
}
.organization-card .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  border-radius: 12px;
}



@media (max-width: 320px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    aspect-ratio: 2/1;
  }
}



/* iOS specific fixes */
@supports (padding: max(0px, 0px)) {
  .app-container {
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: 0;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}
  
  /* padding-top для .app-main уже задан выше корректно */
  
  .header-sticky-wrapper {
    padding-top: max(14px, env(safe-area-inset-top));
  }
  
  .app-footer {
    bottom: 0;
  }
}

/* карточка хедера должна клиповать содержимое */
.app-header {
  overflow: hidden;              /* главное: обрезаем всё за радиусом */
  display: flex;                 /* сетка тут не нужна — простая колонка */
  flex-direction: column;
}

/* сама строка поиска не должна разъезжаться шире карточки */
.search-bar {
  width: 100%;
  max-width: 100%;
  min-width: 0;                  /* критично для flex-переноса */
}

/* внутри строки: пусть элементы могут сжиматься */
.search-bar input {
  flex: 1 1 auto;                /* уже есть flex:1, добавим явное сжатие */
  min-width: 0;                  /* без этого многие браузеры не сжимают */
}

/* правый блок города не должен «держать» ширину */
.search-bar .city-selector {
  flex: 0 0 auto;                /* разрешаем сжатие */
  min-width: 0;
  white-space: nowrap;           /* можно оставить, но с min-width:0 ок */
}

/* на сверхузких экранах ещё сильнее ограничим название города */
@media (max-width: 360px) {
  .city-selector #current-city {
    max-width: 80px;             /* было 110px — уменьшили */
  }
}

/* ничего в контенте не должно вытолкнуть сетку по X */
.categories-grid, .category-card, .category-card * { min-width: 0; }
img, svg { max-width: 100%; height: auto; }

input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance: none;
  height: 18px; width: 18px;
  cursor: pointer;
  background: no-repeat center/18px 18px
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
  <path d='M6 6L18 18M18 6L6 18' stroke='%23fff' stroke-width='2' stroke-linecap='round'/>\
</svg>");
}



/* === Animations: fade/stagger/pulse === */
@keyframes fadeFast {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.is-fading-out {
  opacity: 0 !important;
  transition: opacity .22s ease;
}

.fade-in-fast {
  animation: fadeFast .22s ease-out both;
}

/* Stagger container: children appear with small delays */
.stagger > * {
  opacity: 0;
  animation: fadeIn .18s ease-out forwards;
}

/* precompute simple nth-child delays up to 24 items */
.stagger > *:nth-child(1)  { animation-delay: .00s; }
.stagger > *:nth-child(2)  { animation-delay: .06s; }
.stagger > *:nth-child(3)  { animation-delay: .12s; }
.stagger > *:nth-child(4)  { animation-delay: .18s; }
.stagger > *:nth-child(5)  { animation-delay: .24s; }
.stagger > *:nth-child(6)  { animation-delay: .30s; }
.stagger > *:nth-child(7)  { animation-delay: .36s; }
.stagger > *:nth-child(8)  { animation-delay: .42s; }
.stagger > *:nth-child(9)  { animation-delay: .48s; }
.stagger > *:nth-child(10) { animation-delay: .54s; }
.stagger > *:nth-child(11) { animation-delay: .60s; }
.stagger > *:nth-child(12) { animation-delay: .66s; }
.stagger > *:nth-child(13) { animation-delay: .72s; }
.stagger > *:nth-child(14) { animation-delay: .78s; }
.stagger > *:nth-child(15) { animation-delay: .84s; }
.stagger > *:nth-child(16) { animation-delay: .90s; }
.stagger > *:nth-child(17) { animation-delay: .96s; }
.stagger > *:nth-child(18) { animation-delay: 1.02s; }
.stagger > *:nth-child(19) { animation-delay: 1.08s; }
.stagger > *:nth-child(20) { animation-delay: 1.14s; }
.stagger > *:nth-child(21) { animation-delay: 1.20s; }
.stagger > *:nth-child(22) { animation-delay: 1.26s; }
.stagger > *:nth-child(23) { animation-delay: 1.32s; }
.stagger > *:nth-child(24) { animation-delay: 1.38s; }

/* Offline loading: pulsating logo */
.offline-loading { text-align: center; padding: 20px; }
.loading-logo {
  display: block;
  width: 128px;
  max-width: 45vw;
  height: auto;
  margin: 14px auto 0;
  opacity: .95;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  animation: pulseLogo 2.8s ease-in-out infinite;
}

@keyframes pulseLogo {
  0%   { transform: scale(0.98); opacity: .92; }
  50%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(0.98); opacity: .92; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gradient-bg, .typing-placeholder, .loading-logo { animation: none !important; }
  .stagger > * { animation: none !important; opacity: 1 !important; }
}


/* Push bell in header */
.header-action.bell-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.header-action.bell-btn:hover { background: rgba(255,255,255,.08); }
.header-action.bell-btn:active { transform: scale(.96); }

/* Только для iOS: делаем текст крупнее и жирнее */
@supports (-webkit-backdrop-filter: blur(1px)) and (not (selector(*.android-chrome))) {
  .category-card span {
    font-size: 16px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
}