/* 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; }


/* ETAP_RUSTORE_INSTALL_v1 — статический блок «Скачать приложение» (стартовые страницы) */
.sb-getapp { margin-top: 20px; max-width: 460px; }
.sb-getapp-title { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 3px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.sb-getapp-sub { font-size: 12.5px; color: rgba(255,255,255,.55); margin-bottom: 12px; line-height: 1.45;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.sb-getapp-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-getapp-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); color: #fff;
  border-radius: 14px; padding: 9px 14px; cursor: pointer; text-align: left;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background .2s, border-color .2s; }
.sb-getapp-btn:hover { background: rgba(255,255,255,.15); }
.sb-getapp-btn--store { background: #FBBF24; border-color: #FBBF24; color: #18181b; }
.sb-getapp-btn--store:hover { background: #f59e0b; border-color: #f59e0b; }
.sb-getapp-ic { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.sb-getapp-b1 { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; opacity: .68; }
.sb-getapp-b2 { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.2; }
a.ios-a2hs-btn { text-decoration: none; display: inline-block; }
@media (max-width: 420px) { .sb-getapp-btn { flex: 1 1 100%; justify-content: flex-start; } }

.sb-getapp-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 20px 44px;
  border-top: 1px solid rgba(255,255,255,.07); }
.sb-getapp-wrap .sb-getapp { margin-top: 0; }
@media (max-width: 767px) { .sb-getapp-wrap { padding-bottom: 108px; } }
