/* Alem Credit — витрина в стиле Google Play (только Android).
   Размеры и цвета сняты из сохранённого CSS страницы Приват24,
   класс-источник указан в комментарии рядом. */

:root {
  --brand: #265BFF;          /* фирменный синий Alem Credit */
  --brand-dark: #18279D;
  --gp-green: #01875f;       /* зелёный Google Play (.auoIOc, .Z1Dz7b) */
  --ink: #1f1f1f;
  --ink-2: #5f6368;
  --line: #e8eaed;
  --bg: #ffffff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

.app-wrapper { max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* ── Переключатели из js/config.js ───────────────────────── */
html.no-play-header .top-nav { display: none; }
html.no-play-header .app-header { padding-top: 20px; }

html.no-bottom-nav .gp-bottom-nav { display: none; }
html.no-bottom-nav .floating-bar {
  bottom: 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
html.no-bottom-nav .bottom-spacer { height: 96px; }

/* ── Заставка при запуске из ярлыка ──────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
}
.splash.visible { display: flex; }
.splash-icon { width: 92px; height: 92px; border-radius: 24px; }
.splash-name { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.splash-spinner {
  width: 26px; height: 26px; margin-top: 6px;
  border: 3px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Шрифт иконок Google ─────────────────────────────────── */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  display: inline-block; direction: ltr;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  word-wrap: normal; -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
  /* Защита от опечатки в имени глифа: если значка в шрифте нет,
     браузер отрисует само слово и разнесёт вёрстку.
     Глиф всегда шириной ровно 1em, лишнее обрезается. */
  width: 1em; overflow: hidden;
}

/* ── Верхняя панель ──────────────────────────────────────── */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; position: sticky; top: 0; z-index: 40;
  background: #fff;
  margin: 0 -16px; padding: 0 16px;
  transition: box-shadow .2s ease;
}
.top-nav.scrolled { box-shadow: 0 1px 3px rgba(60,64,67,.22); }
.nav-left, .nav-right { display: flex; align-items: center; gap: 14px; }
/* Поиск и справка ничего не открывают — вести человека из шапки некуда.
   Но кнопка, которая на тап не отвечает вообще, читается как картинка,
   а не как интерфейс. Поэтому круглая подсветка нажатия, как в Play.
   padding 8px увеличивает область попадания до 40px, отрицательный margin
   компенсирует её обратно, чтобы шапка не разъехалась. */
.icon-btn {
  background: none; border: 0; padding: 8px; margin: -6px; color: #5f6368;
  display: flex; align-items: center; cursor: pointer;
  border-radius: 50%; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.icon-btn:active { background: rgba(60,64,67,.12); }

.gp-brand { display: flex; align-items: center; gap: 10px; }
.gp-logo { width: 30px; height: 32px; display: block; flex: 0 0 auto; }
.gp-word {
  font-family: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  font-size: 23px; font-weight: 400; color: #202124; letter-spacing: -.4px;
  white-space: nowrap;
}
/* Аватар — не кнопка входа: аккаунт Google мы подтянуть не можем и не пытаемся.
   Буква в кружке — ровно то, что Play рисует залогиненному пользователю. */
.gp-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #3c4043; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500;
  flex: 0 0 auto; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .15s ease;
}
.gp-avatar:active { box-shadow: 0 0 0 6px rgba(60,64,67,.12); }

/* ── Шапка приложения ────────────────────────────────────── */
.app-header { display: flex; gap: 16px; padding: 8px 0 18px; }
.app-icon-container { flex: 0 0 auto; }
.app-icon {
  width: 72px; height: 72px; border-radius: 18px; display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
.app-info { min-width: 0; padding-top: 2px; }
/* .Fd93Bb — Google Sans 24px/32px, вес 500 */
.app-title {
  font-family: 'Google Sans', 'Product Sans', 'Roboto', Arial, sans-serif;
  font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: 0;
  margin: 0;
}
/* .Vbfug + .auoIOc — 16px/24px, вес 500, зелёный */
.app-developer {
  font-family: 'Google Sans', 'Product Sans', 'Roboto', Arial, sans-serif;
  color: var(--gp-green); font-size: 16px; line-height: 24px;
  font-weight: 500; letter-spacing: .00625em; margin-top: 2px;
}

/* ── Метрики ─────────────────────────────────────────────── */
/* .l8YSdd — `overflow: auto hidden`: строка прокручивается вбок
   и обрезается по краю. Без этого ячейки сжимаются и текст наползает. */
.metrics-strip {
  display: flex; align-items: center;
  margin: 0 -16px; padding: 20px 16px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.metrics-strip::-webkit-scrollbar { display: none; }
/* .wVqUob — фиксированная ячейка, сжиматься не должна */
.metric-item { flex: 0 0 auto; text-align: center; min-width: 96px; padding: 0 16px; }
/* .ClM7O */
/* .ClM7O — в оригинале зазора между «4,6» и звездой нет, ячейка ровно 33px */
.metric-val {
  color: #202124; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 0;
}
/* .ERwvGb — 12px, ровно 12×12. Работает только потому, что style.css
   подключён после таблицы Google с её `.material-icons { font-size: 24px }`. */
.star-mini { font-size: 12px; color: #202124; }
/* .T75of — значок рейтинга: в оригинале это <img height="16" width="auto"> */
.age-badge { display: block; width: 16px; height: 16px; }
/* .g1rdde — подпись и значок «i» стоят в строку по центру */
.metric-label {
  color: #5f6368; font-size: 12px; line-height: 16px; letter-spacing: .025em;
  font-weight: 400; margin-top: 4px; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.metric-divider { flex: 0 0 auto; width: 1px; height: 30px; background: #dadce0; }
/* .oUaal — глиф info, а не типографский символ «ⓘ»: тот берётся из текстового
   шрифта и на разных устройствах выглядит по-разному */
.info-icon { font-size: 12px; color: #5f6368; }

/* ── Установка ───────────────────────────────────────────── */
.install-section { padding-bottom: 20px; }
/* .bgpk6e — высота 48, Google Sans 14px/500, без CAPS */
.install-btn {
  width: 100%; height: 48px; border: 0; border-radius: 8px;
  background: var(--gp-green); color: #fff;
  font-family: 'Google Sans', 'Product Sans', 'Roboto', Arial, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .0178571429em;
  text-transform: none; padding: 0 24px;
  cursor: pointer; transition: background .15s;
}
.install-btn:active,
.install-btn.is-installing,
.install-btn.is-installed { background: #016e4d; }

.install-progress { display: none; margin-top: 12px; }
.progress-track { height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--gp-green); transition: width .1s linear; }
.progress-meta { color: var(--ink-2); font-size: 12px; margin-top: 7px; }

/* Ряд «Поделиться / Добавить в список желаний» */
.gp-actions { display: flex; gap: 34px; padding: 22px 2px 4px; }
.gp-action {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0;
  color: var(--gp-green); font-family: inherit;
  font-size: 14px; font-weight: 500; text-align: left;
  cursor: pointer; line-height: 1.28;
}
.gp-action .material-icons, .gp-action svg { flex: 0 0 auto; }

/* Уведомления под кнопкой */
.gp-notice {
  display: flex; align-items: flex-start; gap: 16px;
  color: #3c4043; font-size: 13.5px; line-height: 1.5; margin-top: 20px;
}
.gp-notice .material-icons { flex: 0 0 22px; font-size: 22px; color: #5f6368; }
.gp-notice span { flex: 1; min-width: 0; }
.gp-link { color: var(--gp-green); text-decoration: underline; }

/* ── Скриншоты ───────────────────────────────────────────── */
.screenshots { margin: 0 -16px 22px; }
.shots-scroll {
  display: flex; gap: 10px; padding: 0 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shots-scroll::-webkit-scrollbar { display: none; }
/* В оригинале у скриншотов нет рамки, радиус 8px */
.shot {
  flex: 0 0 auto; width: 152px; height: 312px;
  border-radius: 8px; border: 0;
  object-fit: cover; scroll-snap-align: start; background: #F2F5FF;
}

/* ── Блоки ───────────────────────────────────────────────── */
.block { padding: 20px 0; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* .vWM94c — Google Sans 18px/24px, вес 400 */
.block-title {
  font-family: 'Google Sans', 'Product Sans', 'Roboto', Arial, sans-serif;
  color: #202124; font-size: 18px; line-height: 24px;
  font-weight: 400; letter-spacing: 0; margin: 0 0 12px;
}
.block-head .block-title { margin-bottom: 0; }
.block-head + .app-desc, .block-head + .filter-row, .block-head + .whats-new-date { margin-top: 14px; }
.chevron { flex: 0 0 auto; color: #5f6368; font-size: 24px; }
.version-badge { color: var(--ink-2); font-size: 12px; white-space: nowrap; }

.app-desc {
  color: var(--ink); font-size: 14px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-desc.is-expanded { -webkit-line-clamp: unset; overflow: visible; }
.link-btn {
  background: none; border: 0; padding: 8px 0 0;
  color: var(--gp-green); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 16px;
  font-size: 12px; color: var(--ink-2);
}

/* ── Условия займа (наш блок, в Play такого нет) ─────────── */
.terms { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.term-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; font-size: 13px;
}
.term-row + .term-row { border-top: 1px solid var(--line); }
.term-row span { color: var(--ink-2); }
.term-row b { text-align: right; }
.terms-note { color: var(--ink-2); font-size: 11.5px; margin: 12px 0 0; }

.whats-new-date { color: var(--ink-2); font-size: 12px; margin-bottom: 10px; }

/* ── Оценки и отзывы ─────────────────────────────────────── */
.verified-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; color: #5f6368;
  font-size: 12px; line-height: 16px; letter-spacing: .025em;
}

.all-reviews-btn {
  margin-top: 18px; padding: 10px 24px;
  background: none; border: 1px solid #c4c7c5; border-radius: 20px;
  font-family: 'Google Sans', 'Product Sans', 'Roboto', Arial, sans-serif;
  font-size: 14px; font-weight: 500; color: var(--gp-green);
  cursor: pointer;
}

.filter-row { display: flex; gap: 8px; margin: 14px 0 18px; }
.filter-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: none; font-family: inherit; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer;
}
.filter-pill .material-icons { font-size: 17px; }
.filter-pill.active { background: #e8f5f0; border-color: #b7ddd0; color: var(--gp-green); font-weight: 500; }

.rating-summary { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.rating-big { text-align: center; flex: 0 0 auto; }
.rating-num { font-size: 44px; font-weight: 400; line-height: 1; }
/* .deXnLd — звезда ровно 16×16, цвет .Z1Dz7b */
.stars-row { display: flex; justify-content: center; color: var(--gp-green); margin-top: 6px; }
.stars-row .material-icons { font-size: 16px; }
.rating-count { color: var(--ink-2); font-size: 11px; margin-top: 4px; }
.rating-bars { flex: 1; }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bar-row span { color: var(--ink-2); font-size: 11px; width: 8px; }
.bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gp-green); }

.review { padding: 14px 0; }
.review + .review { border-top: 1px solid var(--line); }
/* Скрытые фильтром отзывы соседним селектором не учитываются —
   первому видимому линейку сверху убираем через класс */
.review.first-visible { border-top: 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
/* .X5PpBb — 14px/20px, вес 400 */
.reviewer { color: #202124; font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: .0142857143em; }
/* .bp9Aid — 12px/16px, дата отделена одним знакоместом */
.review-meta { color: #5f6368; font-size: 12px; line-height: 16px; letter-spacing: .025em; margin-top: 2px; }
.review-meta .stars-sm { margin-right: 1ch; }
.stars-sm { display: inline-flex; vertical-align: -3px; color: var(--gp-green); }
.stars-sm .material-icons { font-size: 14px; }
/* .h3YV2d — 14px/20px, отступ сверху 8 */
.review-text { color: #202124; font-size: 14px; line-height: 20px; letter-spacing: .0142857143em; margin: 8px 0 0; }

/* .NC0Ppb — 12px/16px */
.helpful-row { margin-top: 16px; }
.helpful-q { color: #5f6368; font-size: 12px; line-height: 16px; letter-spacing: .025em; margin-bottom: 8px; }
.helpful-btns { display: flex; gap: 10px; }
.helpful-btn {
  background: none; border: 1px solid #c4c7c5; border-radius: 18px;
  padding: 7px 22px; font-family: inherit; font-size: 13px; color: #3c4043;
  cursor: pointer;
}
/* Ответ на «Вам помогла эта информация?» */
.helpful-thanks {
  display: flex; align-items: center; gap: 8px;
  color: var(--gp-green); font-size: 13px;
}
.helpful-thanks .material-icons { font-size: 18px; }

.dev-reply {
  margin-top: 12px; padding: 12px 14px;
  background: #f5f6f8; border-radius: 10px;
}
.dev-reply-head { font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.dev-reply p { margin: 0; font-size: 13px; color: var(--ink); }

.reviews-note {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: 11.5px; line-height: 1.5;
}

/* ── Безопасность данных ─────────────────────────────────── */
.safety-verified {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; color: #3c4043; font-size: 13.5px;
}
.safety-verified .material-icons { font-size: 20px; color: var(--gp-green); }
.safety-item { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; margin-bottom: 12px; }
.safety-dot {
  flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px;
  border-radius: 50%; background: var(--gp-green);
}

/* ── Реквизиты ───────────────────────────────────────────── */
.legal-line { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.legal-line b { color: var(--ink); }
.legal-small { font-size: 11px; line-height: 1.4; }

.bottom-spacer { height: 150px; }

/* ── Нижняя навигация Google Play ────────────────────────── */
.gp-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: stretch;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
}
.gp-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  color: #5f6368; font-size: 11px; cursor: pointer;
}
.gp-tab .material-icons { font-size: 23px; }
.gp-tab.active { color: var(--gp-green); font-weight: 500; }

/* ── Панель установки, всплывает при прокрутке ───────────── */
.floating-bar {
  position: fixed; left: 0; right: 0; z-index: 30;
  bottom: calc(58px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(130%); opacity: 0;
  transition: transform .26s ease, opacity .2s ease;
  pointer-events: none;
}
.floating-bar.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.fb-icon { width: 38px; height: 38px; border-radius: 10px; }
.fb-text { flex: 1; min-width: 0; }
.fb-title { font-size: 13.5px; font-weight: 500; }
.fb-sub { color: var(--ink-2); font-size: 11.5px; }
.fb-btn {
  background: var(--gp-green); color: #fff;
  padding: 9px 20px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}

/* Внутри установленного приложения витрина не показывается —
   только заставка Alem Credit и переход на оффер */
html.is-standalone .app-wrapper,
html.is-standalone .floating-bar,
html.is-standalone .gp-bottom-nav { display: none; }
