/* ETAP_IOS_PWA_v1 — iOS/iPad PWA: safe-area (чёлка/home-indicator) в standalone + баннер установки.
   Все safe-area правила ограничены display-mode:standalone → нулевая регрессия к браузеру/Android/десктопу. */
@media (display-mode: standalone) {
  /* Тёмная плашка за статус-баром — белый текст статус-бара читаем поверх любой страницы */
  body::before {
    content: "";
    position: fixed; top: 0; left: 0; right: 0;
    height: env(safe-area-inset-top);
    background: #07070b;
    z-index: 2147483000;
    pointer-events: none;
  }
  /* Контент — ниже чёлки и над home-indicator (кроме 100dvh Smart Plan) */
  body:not(.smart-plan-v2) {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  /* Fixed-шапки вне потока: содержимое опускаем под чёлку, фон шапки заполняет зону */
  header[class*="fixed"][class*="top-0"] { padding-top: env(safe-area-inset-top); }
  /* Smart Plan (100dvh flex): паддим только верхнюю шапку (первый ребёнок body) */
  body.smart-plan-v2 > header { padding-top: env(safe-area-inset-top); }
}

/* Баннер «на экран Домой» (только iOS Safari вне standalone; создаётся ios_install_hint.js) */
.ios-a2hs {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px;
  background: #111318; color: #fff;
  border: 1px solid #2a2d36; border-radius: 14px;
  padding: 11px 12px 11px 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
  z-index: 2147483600;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13.5px; line-height: 1.35;
  transform: translateY(160%);
  transition: transform .32s cubic-bezier(.22,.61,.36,1);
}
.ios-a2hs.show { transform: translateY(0); }
.ios-a2hs-txt { flex: 1 1 auto; }
.ios-a2hs-txt strong { color: #FBBF24; font-weight: 800; }
.ios-a2hs-share { display: inline-flex; align-items: center; vertical-align: -3px; margin: 0 1px; }
.ios-a2hs-share svg { width: 15px; height: 15px; fill: none; stroke: #60a5fa; stroke-width: 2; }
.ios-a2hs-x { flex: 0 0 auto; background: transparent; border: 0; color: #a1a1aa; font-size: 22px; line-height: 1; padding: 2px 6px; cursor: pointer; }
.ios-a2hs-x:hover { color: #fff; }

/* ETAP_A2HS_UNIVERSAL_v1: кнопка «Установить» (Android/desktop) */
.ios-a2hs-btn { flex: 0 0 auto; background: #FBBF24; color: #18181b; border: 0; border-radius: 10px; padding: 8px 14px; font-weight: 800; font-size: 13px; cursor: pointer; }
.ios-a2hs-btn:hover { background: #f59e0b; }
