/* rental_store — маркетплейс-интерфейс (оригинальный брендинг) */

:root {
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --bg-muted: #eef0f4;
  --border: #e2e5eb;
  --border-strong: #d1d5de;
  --text: #1a1d26;
  --text-secondary: #4b5568;
  --text-muted: #8b93a3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #ea580c;
  --accent-soft: #fff7ed;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-card: 0 2px 8px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --top-h: 58px;
  --nav-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Telegram Mini App — цвета из темы клиента (как в документации Telegram WebApp) */
body.is-telegram {
  color: var(--tg-theme-text-color, var(--text));
  background: var(--tg-theme-bg-color, var(--bg));
}
body.is-telegram .top-bar,
body.is-telegram .bottom-nav,
body.is-telegram .mp-card,
body.is-telegram .order-card,
body.is-telegram .profile-card,
body.is-telegram .branch-card,
body.is-telegram .section-block--card,
body.is-telegram .booking-widget {
  background: var(--tg-theme-secondary-bg-color, var(--bg-card));
}
body.is-telegram .btn-primary {
  background: var(--tg-theme-button-color, var(--primary));
  color: var(--tg-theme-button-text-color, #fff);
}
body.is-telegram .search-input,
body.is-telegram select {
  background: var(--tg-theme-secondary-bg-color, var(--bg-muted));
  color: var(--tg-theme-text-color, var(--text));
}
body.is-telegram .profile-tagline,
body.is-telegram .results-count,
body.is-telegram .mp-card-meta {
  color: var(--tg-theme-hint-color, var(--text-muted));
}
body.is-telegram a.link-btn {
  color: var(--tg-theme-link-color, var(--primary));
}
body.is-telegram .app {
  min-height: var(--tg-viewport-stable-height, 100dvh);
}

/* Режим сайта vs Telegram Mini App */
body.is-browser {
  --banner-h: 72px;
}
body.is-telegram {
  --banner-h: 0px;
}
body.is-telegram .browser-banner { display: none !important; }

.browser-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
}
.browser-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.browser-banner-btn {
  flex-shrink: 0;
  background: #fff;
  color: #1d4ed8;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
body.is-browser .top-bar {
  top: var(--banner-h);
}
body.is-browser .app {
  padding-top: calc(var(--banner-h) + var(--top-h));
}

.hidden { display: none !important; }

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  z-index: 999;
  color: var(--text-muted);
  font-size: 14px;
}
.loader-logo {
  width: auto;
  max-width: min(220px, 72vw);
  height: 72px;
  object-fit: contain;
  animation: logo-pulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(37, 99, 235, 0.25));
}
.brand-logo {
  width: auto;
  height: 40px;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
}
@keyframes logo-pulse {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.app {
  min-height: 100%;
  padding-top: var(--top-h);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}

/* ── Top bar (маркетплейс-шапка) ── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px 12px;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.03em;
}
.brand-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.brand-text small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:active { background: var(--bg-muted); }

.search-bar {
  position: relative;
}
.catalog-search {
  margin: 0 0 14px;
  padding: 0 2px;
}
.search-bar.catalog-search .search-input {
  background: var(--bg-card);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.search-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-input::placeholder { color: var(--text-muted); }

/* ── Main ── */
.main {
  padding: 12px 12px 16px;
  max-width: 520px;
  margin: 0 auto;
}
.panel { display: none; animation: fadeIn 0.2s ease; }
.panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.section-block { margin-bottom: 20px; }
.section-block--card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.section-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

/* Promo slider */
.promo-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -4px 14px;
  padding: 0 4px;
}
.promo-slider::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 88%;
  scroll-snap-align: start;
  border-radius: var(--radius);
  padding: 18px 16px;
  color: #fff;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.promo-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.promo-card--blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #60a5fa 100%);
}
.promo-card--orange {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 55%, #fb923c 100%);
}
.promo-card--green {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #4ade80 100%);
}
.promo-card strong {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.promo-card p {
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.promo-card .promo-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Trust strip */
.trust-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.trust-strip::-webkit-scrollbar { display: none; }
.trust-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.trust-item span { font-size: 13px; }

/* Categories */
.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.category-chip:active,
.category-chip.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.category-chip .cat-emoji { font-size: 24px; line-height: 1; }
.category-chip .cat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

/* Product grid (карточки как в маркетплейсе) */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  transform-origin: center center;
}
@media (hover: hover) {
  .mp-card:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-md);
    z-index: 2;
  }
}
.mp-card:active { box-shadow: var(--shadow-md); transform: scale(1.02); }
.mp-card-img {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--bg-muted);
  position: relative;
  overflow: hidden;
}
.mp-card-img .card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mp-card-img:has(.card-photo) .card-emoji-fallback {
  display: none;
}
.mp-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.mp-card-badge--stock {
  background: var(--success-soft);
  color: var(--success);
}
.mp-card-badge--sale {
  background: var(--accent-soft);
  color: var(--accent);
}
.mp-card-body {
  padding: 10px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mp-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}
.mp-card-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.mp-card-city {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent, #2563eb);
  background: rgba(59, 130, 246, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.35;
}
.mp-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.mp-card-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}
.mp-card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.mp-card-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.mp-card-deposit {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.mp-card-btn {
  margin-top: 10px;
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.mp-card-badge--off {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.mp-card-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.mp-card-btn:active {
  background: #dbeafe;
}

/* Filter chips */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.results-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.highlight-card .icon { font-size: 20px; margin-bottom: 6px; }
.highlight-card strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}
.highlight-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Promo banner CTA */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-top: 4px;
}
.promo-banner-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.promo-banner-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.promo-banner .btn { flex-shrink: 0; }

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-block { width: 100%; }

/* Tariffs */
.tariff-list { display: flex; flex-direction: column; gap: 8px; }
.tariff-item {
  padding: 12px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}
.tariff-item strong { font-size: 14px; }
.tariff-item p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Booking widget */
.booking-widget {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.booking-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.booking-widget h3 { font-size: 16px; font-weight: 700; }
.widget-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 999px;
}
.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.form-row select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.price-result {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  padding: 14px;
  margin: 10px 0 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent);
  letter-spacing: -0.02em;
}
.price-result small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Map */
.map-container {
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  z-index: 1;
  box-shadow: var(--shadow-card);
}
.branch-list { display: flex; flex-direction: column; gap: 8px; }
.branch-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.branch-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.branch-card .name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.main-badge {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}
.branch-card .addr {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 5px 0;
  line-height: 1.4;
}
.branch-card .hours {
  font-size: 12px;
  color: var(--text-muted);
}

/* Profile / Info */
/* Cabinet / orders */
.cabinet-header { margin-bottom: 16px; }
.cabinet-user { flex: 1; min-width: 0; }
.cabinet-username {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.cabinet-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* Loyalty stars */
.stars-card {
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
body.theme-dark .stars-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(234, 88, 12, 0.1) 100%);
  border-color: rgba(234, 179, 8, 0.35);
}
.stars-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stars-icon {
  font-size: 32px;
  line-height: 1;
}
.stars-card-main strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.stars-card-main small {
  font-size: 12px;
  color: var(--text-secondary);
}
.stars-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-gate {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.auth-gate-icon { font-size: 28px; margin-bottom: 8px; }
.auth-gate strong { display: block; margin-bottom: 6px; }
.auth-gate p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.4; }
.auth-code-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.auth-code-input {
  width: 100%;
  padding: 12px;
  font-size: 22px;
  letter-spacing: 0.35em;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}
.auth-message { margin-top: 10px; font-size: 12px; color: var(--text-muted); min-height: 1.2em; }
.auth-message.is-error { color: #dc2626; }

.orders-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.orders-state p { margin-bottom: 12px; }
.orders-list { display: flex; flex-direction: column; gap: 8px; }
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.order-card-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.order-card-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  white-space: nowrap;
}
.order-card-status.is-new {
  background: var(--accent-soft);
  color: var(--accent);
}
.order-card-status.is-confirmed {
  background: var(--success-soft);
  color: var(--success);
}
.order-card-status.is-rejected {
  background: #fef2f2;
  color: #dc2626;
}
.order-card-device {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.order-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.order-card-price {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.profile-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.info-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.info-tile {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.info-tile-icon { font-size: 20px; }
.info-tile small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.info-tile strong {
  font-size: 12px;
  line-height: 1.3;
}
.about-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-line;
}

.services-list { display: flex; flex-direction: column; gap: 8px; }
.service-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.service-row .emoji { font-size: 24px; }
.service-row h3 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.service-row p { font-size: 12px; color: var(--text-muted); line-height: 1.45; }

.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.faq-q {
  width: 100%;
  padding: 13px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.faq-q::after {
  content: "+";
  color: var(--primary);
  font-size: 18px;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 14px 13px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.faq-item.open .faq-a { display: block; }

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(16, 24, 40, 0.06);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}
.nav-item svg {
  width: 20px;
  height: 20px;
}
.nav-item span {
  font-size: 9px;
}
.nav-item.active {
  color: var(--primary);
}
.nav-item.active svg { stroke: var(--primary); }

/* Games catalog */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.game-card-img {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(160deg, #1e293b 0%, #334155 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.game-card-img .card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card-img:has(.card-photo) .card-emoji-fallback {
  display: none;
}
.game-card-img.out-of-stock {
  opacity: 0.55;
}
.game-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}
.game-card-body {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  min-height: 32px;
}
.game-card-platform {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.game-card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  margin-top: auto;
}
.game-card-condition {
  font-size: 10px;
  color: var(--text-muted);
}
.game-card-btn {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.game-card-btn:disabled {
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: not-allowed;
}
.games-note {
  margin-top: 14px;
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

/* Leaflet */
.leaflet-container { background: #e8ecf0; font-family: inherit; }
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.leaflet-popup-tip { background: var(--bg-card); }

/* Telegram dark theme adaptation */
body.theme-dark {
  --bg: #111318;
  --bg-card: #1c1f28;
  --bg-muted: #252830;
  --border: #2e3340;
  --border-strong: #3d4454;
  --text: #f3f4f6;
  --text-secondary: #c4c9d4;
  --text-muted: #8b93a3;
  --primary-soft: rgba(37, 99, 235, 0.15);
  --accent-soft: rgba(234, 88, 12, 0.12);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.18);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── Сайт (браузер) vs Mini App ── */
body.is-browser {
  --banner-h: 44px;
  --top-h: 72px;
  --site-max: 1180px;
  background: #f8fafc;
}
body.is-browser.theme-dark {
  background: var(--bg);
}
body.is-browser.theme-dark .top-bar {
  background: var(--bg-card);
  border-bottom-color: var(--border);
}
body.is-browser.theme-dark .landing-showcase {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}
body.is-browser.theme-dark .showcase-card {
  background: var(--bg-card);
  border-color: var(--border);
}
body.is-browser.theme-dark.is-scrolled .top-bar {
  background: rgba(28, 31, 40, 0.92);
}
body.is-browser .theme-toggle {
  display: inline-flex;
}
body.is-telegram .theme-toggle {
  display: none;
}
.theme-toggle .theme-icon-moon { display: none; }
body.theme-dark .theme-toggle .theme-icon-sun { display: none; }
body.theme-dark .theme-toggle .theme-icon-moon { display: block; }
body.is-browser .browser-banner {
  background: #0f172a;
  padding: 8px 16px;
  font-size: 13px;
  box-shadow: none;
}
body.is-browser .browser-banner-inner {
  max-width: var(--site-max);
}
body.is-browser .top-bar {
  padding: 14px 24px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
body.is-browser .top-bar-inner {
  max-width: var(--site-max);
  margin: 0 auto 12px;
}
body.is-browser .search-bar.site-search,
body.is-browser .search-bar.catalog-search {
  max-width: var(--site-max);
}
body.is-browser .site-nav {
  display: none;
  gap: 20px;
  align-items: center;
}
body.is-browser .site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
body.is-browser .site-nav a:hover {
  color: var(--primary);
}
body.is-browser .top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.is-browser .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
}
body.is-browser .site-order-btn {
  display: none;
}
body.is-browser .main {
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
body.is-browser .site-hero {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 8px 0 20px;
  padding: 36px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff;
}
body.is-browser .site-hero-content {
  position: relative;
  z-index: 1;
}
body.is-browser .site-hero-inner {
  display: grid;
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
}
body.is-browser .site-hero-visual {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
}
body.is-browser .hero-float-item {
  position: absolute;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: heroProductFloat 5.5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
body.is-browser .hero-float-item:nth-child(1) { top: 8%; left: 4%; width: 46%; z-index: 2; }
body.is-browser .hero-float-item:nth-child(2) { top: 18%; right: 0; width: 42%; z-index: 3; animation-duration: 6.2s; }
body.is-browser .hero-float-item:nth-child(3) { bottom: 6%; left: 12%; width: 38%; z-index: 1; animation-duration: 4.8s; }
body.is-browser .hero-float-item:nth-child(4) { bottom: 10%; right: 8%; width: 34%; z-index: 4; animation-duration: 5.8s; }
body.is-browser .hero-float-glow {
  position: absolute;
  inset: 10% 5% 0;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.55;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.7), transparent 70%);
}
body.is-browser .hero-float-item--ps .hero-float-glow { background: radial-gradient(circle, rgba(59, 130, 246, 0.75), transparent 70%); }
body.is-browser .hero-float-item--xbox .hero-float-glow { background: radial-gradient(circle, rgba(74, 222, 128, 0.65), transparent 70%); }
body.is-browser .hero-float-item--vr .hero-float-glow { background: radial-gradient(circle, rgba(167, 139, 250, 0.65), transparent 70%); }
body.is-browser .hero-float-item--pc .hero-float-glow { background: radial-gradient(circle, rgba(251, 191, 36, 0.55), transparent 70%); }
body.is-browser .hero-float-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.35));
  transition: transform 0.35s ease, filter 0.35s ease;
}
body.is-browser .hero-float-item:hover .hero-float-img {
  transform: scale(1.06) translateY(-6px);
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.42));
}
@keyframes heroProductFloat {
  0%, 100% { transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0); }
  50% { transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-14px); }
}

/* Product photos — cutout style (без белого фона) */
.mp-card-img--product {
  background: var(--bg-muted);
}
.card-photo--product {
  object-fit: contain !important;
  padding: 8px 10px 12px;
  background: transparent !important;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.14));
}
body.theme-dark .card-photo--product {
  mix-blend-mode: normal;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
body.is-browser .card-photo--product {
  animation: productCardFloat 4.8s ease-in-out infinite;
  animation-delay: calc(var(--card-i, 0) * 0.15s);
}
@keyframes productCardFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}
body.is-browser .mp-card:hover .card-photo--product {
  transform: scale(1.05) translateY(-4px);
  filter: drop-shadow(0 16px 28px rgba(37, 99, 235, 0.22));
}

body.is-browser .landing-showcase {
  padding: 28px 0 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
body.is-browser .landing-showcase-stage {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
body.is-browser .landing-showcase-track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 8px 0 16px;
  animation: showcaseMarquee 42s linear infinite;
}
body.is-browser .landing-showcase-track:hover {
  animation-play-state: paused;
}
@keyframes showcaseMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
body.is-browser .showcase-card {
  flex: 0 0 220px;
  height: 260px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
body.is-browser .showcase-card:hover {
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.14);
}
body.is-browser .showcase-card-bg {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background: radial-gradient(circle at 50% 85%, rgba(59, 130, 246, 0.12), transparent 55%);
}
body.is-browser .showcase-card--ps .showcase-card-bg { background: radial-gradient(circle at 50% 80%, rgba(37, 99, 235, 0.14), transparent 60%); }
body.is-browser .showcase-card--xbox .showcase-card-bg { background: radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.12), transparent 60%); }
body.is-browser .showcase-card--vr .showcase-card-bg { background: radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.14), transparent 60%); }
body.is-browser .showcase-card--pc .showcase-card-bg { background: radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.12), transparent 60%); }
body.is-browser .showcase-card-img {
  position: absolute;
  inset: 12px 12px 56px;
  width: calc(100% - 24px);
  height: calc(100% - 68px);
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.14));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  animation: showcaseImgFloat 5s ease-in-out infinite;
}
body.is-browser.theme-dark .showcase-card-img {
  mix-blend-mode: normal;
}
body.is-browser .showcase-card:hover .showcase-card-img {
  transform: scale(1.08) translateY(-8px);
}
@keyframes showcaseImgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
body.is-browser .showcase-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.96) 35%);
}
body.is-browser .showcase-card-label strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
body.is-browser .showcase-card-label span {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

body.is-browser .landing-price-photo {
  height: 120px;
  margin: -4px -4px 12px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(160deg, #eef2ff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.is-browser .landing-price-photo .card-photo--product {
  position: static;
  width: 100%;
  height: 100%;
  padding: 8px;
  animation: none;
}
body.is-browser .landing-price-emoji {
  font-size: 42px;
}
body.is-browser .landing-price-card {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
}

@media (min-width: 900px) {
  body.is-browser .site-hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 12px;
  }
  body.is-browser .site-hero {
    padding: 40px 36px 44px;
  }
  body.is-browser .site-hero-visual {
    min-height: 340px;
  }
}
@media (max-width: 899px) {
  body.is-browser .site-hero-visual {
    min-height: 220px;
    margin-top: 8px;
  }
  body.is-browser .hero-float-item:nth-child(1) { width: 40%; }
  body.is-browser .hero-float-item:nth-child(2) { width: 36%; }
  body.is-browser .hero-float-item:nth-child(3) { width: 32%; }
  body.is-browser .hero-float-item:nth-child(4) { display: none; }
}
body.is-browser .site-hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
body.is-browser .site-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: heroOrbFloat 14s ease-in-out infinite;
}
body.is-browser .site-hero-orb--1 {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -40px;
  background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
}
body.is-browser .site-hero-orb--2 {
  width: 220px;
  height: 220px;
  bottom: -60px;
  left: 10%;
  background: radial-gradient(circle, #818cf8 0%, transparent 70%);
  animation-delay: -4s;
  animation-duration: 18s;
}
body.is-browser .site-hero-orb--3 {
  width: 160px;
  height: 160px;
  top: 40%;
  right: 25%;
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  animation-delay: -8s;
  animation-duration: 12s;
}
@keyframes heroOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(18px, -22px) scale(1.06); }
  66% { transform: translate(-14px, 16px) scale(0.94); }
}
body.is-browser.is-scrolled .top-bar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.35s ease, background 0.35s ease;
}
body.is-browser .site-hero-kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 10px;
}
body.is-browser .site-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 640px;
}
body.is-browser .site-hero-text {
  font-size: 16px;
  opacity: 0.92;
  max-width: 560px;
  line-height: 1.55;
  margin-bottom: 20px;
}
body.is-browser .site-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.is-browser .site-hero-actions .btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
body.is-browser .site-footer {
  display: block;
  margin-top: 48px;
  padding: 32px 24px 120px;
  background: #0f172a;
  color: #cbd5e1;
}
body.is-browser .site-footer-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}
body.is-browser .site-footer-brand strong {
  color: #fff;
  font-size: 18px;
}
body.is-browser .site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
body.is-browser .site-footer-links a,
body.is-browser .site-footer-meta a {
  color: #93c5fd;
  text-decoration: none;
}
body.is-browser .site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  align-items: center;
}
body.is-browser .site-footer-copy {
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
body.is-browser .site-footer-copy:hover {
  background: rgba(37, 99, 235, 0.28);
}
body.is-browser .site-footer-share {
  font-size: 12px;
  word-break: break-all;
}
body.is-browser .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
body.is-browser .games-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
body.is-browser .promo-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
body.is-browser .promo-slider .promo-card {
  min-width: 0;
}
body.is-browser .bottom-nav {
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}

body.is-telegram .site-hero,
body.is-telegram .site-footer,
body.is-telegram .site-nav,
body.is-telegram .guest-login {
  display: none !important;
}

.site-hero,
.site-footer {
  display: none;
}
body.is-browser .guest-login:not(.hidden) {
  display: block;
}

@media (min-width: 900px) {
  body.is-browser {
    --top-h: 64px;
    --nav-h: 0px;
  }
  body.is-browser .site-nav {
    display: flex;
  }
  body.is-browser .site-order-btn {
    display: inline-flex;
  }
  body.is-browser .search-bar.catalog-search {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--site-max);
  }
  body.is-browser .bottom-nav {
    display: none;
  }
  body.is-browser .app {
    padding-bottom: 32px;
  }
  body.is-browser .site-footer {
    padding-bottom: 40px;
  }
  body.is-browser .site-footer-inner {
    grid-template-columns: 2fr 2fr 1fr;
    align-items: start;
  }
}

/* ── Landing (браузер) ── */
.landing-block,
.site-hero-badges,
.site-phone {
  display: none;
}
body.is-browser .landing-block {
  display: block;
}
body.is-browser .landing-mini-only {
  display: none !important;
}
body.is-browser .site-phone {
  display: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
body.is-browser .site-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
body.is-browser .site-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 600;
}
body.is-browser .landing-section {
  margin: 40px 0;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
body.is-browser .landing-section-head {
  margin-bottom: 24px;
  max-width: 720px;
}
body.is-browser .landing-section-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 8px;
}
body.is-browser .landing-lead {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
body.is-browser .landing-signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
body.is-browser .landing-sign-card {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
body.is-browser .landing-sign-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
body.is-browser .landing-sign-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
body.is-browser .landing-about-grid {
  display: grid;
  gap: 28px;
  align-items: start;
}
body.is-browser .landing-about-text p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
body.is-browser .landing-about-list {
  list-style: none;
  display: grid;
  gap: 10px;
}
body.is-browser .landing-about-list li {
  padding-left: 22px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
}
body.is-browser .landing-about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
body.is-browser .landing-pill-stack {
  display: grid;
  gap: 10px;
}
body.is-browser .landing-pill {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
}
body.is-browser .landing-pill strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
body.is-browser .landing-pill span {
  font-size: 13px;
  color: var(--text-muted);
}
body.is-browser .landing-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
body.is-browser .landing-price-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
}
body.is-browser .landing-price-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}
body.is-browser .landing-price-card .emoji {
  font-size: 28px;
  margin-bottom: 8px;
}
body.is-browser .landing-price-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
body.is-browser .landing-price-card .price {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}
body.is-browser .landing-price-card .deposit {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
body.is-browser .landing-price-card button {
  margin-top: 12px;
  width: 100%;
}
body.is-browser .landing-price-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
body.is-browser .landing-callback-card {
  display: grid;
  gap: 24px;
  align-items: start;
}
body.is-browser .landing-callback-copy h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
body.is-browser .landing-callback-copy p {
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
body.is-browser .landing-callback-phone {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
body.is-browser .landing-lead-form {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
body.is-browser .landing-lead-form input,
body.is-browser .landing-lead-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
}
body.is-browser .landing-lead-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
body.is-browser .landing-steps-list {
  list-style: none;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
body.is-browser .landing-step-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
body.is-browser .landing-step-num {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
body.is-browser .landing-step-item h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}
body.is-browser .landing-step-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
body.is-browser.theme-dark .landing-step-item {
  background: var(--bg-muted);
  border-color: var(--border);
}
body.is-browser.theme-dark .landing-step-item h3 {
  color: var(--text);
}
body.is-browser.theme-dark .landing-section.landing-steps,
body.is-browser.theme-dark .landing-steps .landing-section-head h2 {
  color: var(--text);
}
body.is-browser .landing-step-item > div {
  position: relative;
  z-index: 1;
}
body.is-browser .landing-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
body.is-browser .landing-offer-card {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0f172a, #1e3a8a);
  color: #fff;
  min-height: 140px;
}
body.is-browser .landing-offer-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
body.is-browser .landing-offer-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
body.is-browser .landing-offer-card p {
  font-size: 13px;
  opacity: 0.88;
  line-height: 1.5;
}
body.is-browser .landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
body.is-browser .landing-stat-value {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
body.is-browser .landing-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
body.is-browser .landing-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
body.is-browser .landing-review-card {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
body.is-browser .landing-review-card p {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
body.is-browser .landing-review-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
body.is-browser .landing-branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
body.is-browser .landing-branch-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
body.is-browser .landing-branch-card .name {
  font-weight: 700;
  margin-bottom: 8px;
}
body.is-browser .landing-branch-card .meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
body.is-browser .landing-map-link {
  width: 100%;
  max-width: 280px;
}
body.is-browser .landing-faq-list .faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
body.is-browser .landing-cta-card {
  text-align: center;
  padding: 12px 8px;
}
body.is-browser .landing-cta-card h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}
body.is-browser .landing-cta-card p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.55;
}
body.is-browser .landing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
body.is-browser .landing-catalog-preview {
  margin-top: 8px;
}
body.is-browser .landing-section.landing-stats {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border-color: #bfdbfe;
}

/* ── Landing scroll animations (Tilda-style) ── */
body.is-browser {
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --anim-duration: 0.9s;
}
body.is-browser .anim-hero,
body.is-browser .anim-item {
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity var(--anim-duration) var(--anim-ease),
    transform var(--anim-duration) var(--anim-ease);
  transition-delay: var(--anim-delay, 0s);
  will-change: opacity, transform;
}
body.is-browser .anim-item.anim-from-left {
  transform: translateX(-48px);
}
body.is-browser .anim-item.anim-from-right {
  transform: translateX(48px);
}
body.is-browser .anim-item.anim-scale-in {
  transform: scale(0.88) translateY(24px);
}
body.is-browser .anim-hero.anim-visible,
body.is-browser .anim-item.anim-visible {
  opacity: 1;
  transform: none;
}
body.is-browser .anim-visible .landing-step-num {
  animation: stepPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--anim-delay, 0s);
}
@keyframes stepPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
body.is-browser .landing-price-card,
body.is-browser .landing-offer-card,
body.is-browser .landing-sign-card,
body.is-browser .landing-review-card {
  transition:
    transform 0.35s var(--anim-ease),
    box-shadow 0.35s var(--anim-ease),
    border-color 0.35s ease;
}
body.is-browser .landing-price-card:hover,
body.is-browser .landing-sign-card:hover,
body.is-browser .landing-review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
}
body.is-browser .landing-offer-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.35);
}
body.is-browser .landing-offer-card {
  transition: transform 0.4s var(--anim-ease), box-shadow 0.4s var(--anim-ease);
}
body.is-browser .landing-section {
  transition: box-shadow 0.4s ease;
}
body.is-browser .anim-item.anim-visible.landing-section {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
body.is-browser .landing-faq-list .faq-a {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--anim-ease), padding 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  padding: 0 16px;
}
body.is-browser .landing-faq-list .faq-item.open .faq-a {
  max-height: 320px;
  opacity: 1;
  padding: 0 16px 14px;
}
body.is-browser .landing-faq-list .faq-q {
  transition: color 0.2s ease;
}
body.is-browser .landing-faq-list .faq-item.open .faq-q {
  color: var(--primary);
}
body.is-browser .mp-card.anim-item {
  transition:
    opacity var(--anim-duration) var(--anim-ease),
    transform var(--anim-duration) var(--anim-ease),
    box-shadow 0.3s ease;
}
body.is-browser .mp-card.anim-visible:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
@media (prefers-reduced-motion: reduce) {
  body.is-browser .anim-hero,
  body.is-browser .anim-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body.is-browser .site-hero-orb {
    animation: none;
  }
  body.is-browser .hero-float-item,
  body.is-browser .card-photo--product,
  body.is-browser .showcase-card-img,
  body.is-browser .landing-showcase-track {
    animation: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ИИ-оператор на сайте — FAB в правом нижнем углу */
.ai-chat {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  z-index: 1200;
}
body.is-browser .ai-chat {
  bottom: calc(var(--nav-h, 64px) + var(--safe-bottom, 0px) + 16px);
}
@media (min-width: 900px) {
  body.is-browser .ai-chat {
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }
}
.ai-chat-fab {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.ai-chat-fab:hover { transform: scale(1.06); }
.ai-chat-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, 70vh);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ai-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.ai-chat-head small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}
.ai-chat-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}
.ai-chat-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ai-chat-msg--bot {
  align-self: flex-start;
  background: var(--bg-muted);
  color: var(--text);
}
.ai-chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
}
.ai-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.ai-chat-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font: inherit;
  background: var(--bg-muted);
  color: var(--text);
}
.ai-chat-form .btn {
  flex-shrink: 0;
  padding: 10px 14px;
}
.ai-chat-msg--typing {
  opacity: 0.7;
  font-style: italic;
}
.about-page .landing-about-list {
  margin-top: 16px;
}
body.is-telegram .landing-block {
  display: none !important;
}

@media (min-width: 768px) {
  body.is-browser .landing-about-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  body.is-browser .landing-callback-card {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  body.is-browser .site-phone {
    display: inline-flex;
  }
}
@media (max-width: 720px) {
  body.is-browser .landing-section {
    padding: 20px 16px;
    margin: 24px 0;
  }
  body.is-browser .landing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Checkout modal */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.checkout-modal.hidden {
  display: none;
}
.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.checkout-sheet {
  position: relative;
  width: min(100%, 480px);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  box-shadow: var(--shadow-md);
}
body.is-browser .checkout-modal {
  align-items: center;
}
body.is-browser .checkout-sheet {
  border-radius: 20px;
  width: min(100%, 520px);
}
.checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.checkout-head h2 {
  font-size: 18px;
}
.checkout-close {
  border: none;
  background: var(--bg-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.checkout-price {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  margin: 8px 0 12px;
}
.checkout-coins-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}
.checkout-coins-info small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.checkout-free-day {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin: 8px 0;
  cursor: pointer;
}
.referral-card {
  padding: 14px;
  margin-bottom: 12px;
}
.referral-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.45;
}
.referral-link-row {
  display: flex;
  gap: 8px;
}
.referral-link-input {
  flex: 1;
  font-size: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
}
.referral-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.checkout-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 12px;
}
.checkout-payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.checkout-payment-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}
.checkout-payment-option input {
  margin-top: 3px;
}
.order-pay-btn {
  margin-top: 10px;
  width: 100%;
}
.payment-result-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f8fafc);
  padding: 24px;
}
.payment-result {
  text-align: center;
  max-width: 420px;
}
.payment-result h1 {
  margin: 16px 0 8px;
}
.payment-result .btn {
  margin-top: 20px;
}
.checkout-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 10px;
}
.checkout-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 20px);
  transform: translateX(-50%);
  z-index: 2100;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  max-width: calc(100% - 32px);
  text-align: center;
}
body.is-browser .checkout-toast {
  bottom: 24px;
}
.guest-login {
  margin: 12px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.guest-login p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 12px;
}

/* ── Достижения (карта арендатора) ── */
.achievements-card {
  margin-bottom: 16px;
  padding: 18px 16px 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(234, 88, 12, 0.08), transparent 45%),
    linear-gradient(145deg, var(--bg-card) 0%, var(--bg-muted) 100%);
  border: 2px solid rgba(234, 88, 12, 0.35);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.achievements-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(234, 88, 12, 0.25);
  border-radius: 14px;
  pointer-events: none;
}
.achievements-card::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: 12px;
  transform: translateY(-50%);
  background: radial-gradient(circle, var(--bg) 4px, transparent 4px) repeat-x center / 12px 12px;
  pointer-events: none;
  opacity: 0.85;
}
.achievements-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.achievements-card-head h2 {
  font-size: 16px;
  margin: 0;
}
.achievements-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}
.achievements-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}
.achievements-track::before {
  content: "";
  position: absolute;
  top: 38px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  border-radius: 999px;
  z-index: 0;
  opacity: 0.65;
}
.achievement-stamp {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  padding: 14px 10px 12px;
  text-align: center;
  border: 2px dashed var(--border-strong);
  background: var(--bg-muted);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.achievement-stamp.is-unlocked {
  border-style: solid;
  border-color: var(--primary);
  background: linear-gradient(160deg, var(--primary-soft), var(--bg-card));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}
.achievement-stamp.is-locked {
  opacity: 0.72;
  filter: grayscale(0.45);
}
.achievement-stamp-inner strong {
  display: block;
  font-size: 12px;
  margin-top: 6px;
}
.achievement-stamp-inner small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.achievement-emoji {
  font-size: 28px;
  line-height: 1;
}
.achievement-check {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.achievements-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

/* ── Тёмная тема — полное покрытие ── */
body.theme-dark {
  color-scheme: dark;
  --primary-dark: #93c5fd;
}
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark .auth-code-input {
  color: var(--text);
}
body.theme-dark .browser-banner-btn {
  background: var(--bg-card);
  color: var(--primary-dark);
}
body.is-browser.theme-dark .top-bar {
  background: var(--bg-card);
  border-bottom-color: var(--border);
}
body.is-browser.theme-dark .showcase-card-label {
  background: linear-gradient(180deg, transparent, rgba(28, 31, 40, 0.96) 35%);
}
body.is-browser.theme-dark .showcase-card-label strong {
  color: var(--text);
}
body.is-browser.theme-dark .landing-section-head h2,
body.is-browser.theme-dark .landing-section-head h3,
body.is-browser.theme-dark .landing-sign-card h3,
body.is-browser.theme-dark .landing-price-card h3,
body.is-browser.theme-dark .landing-faq-item summary,
body.is-browser.theme-dark .landing-branch-card h3,
body.is-browser.theme-dark .landing-offer-card h3 {
  color: var(--text);
}
body.is-browser.theme-dark .landing-price-card .price {
  color: var(--primary-dark);
}
body.theme-dark .order-card,
body.theme-dark .referral-card,
body.theme-dark .guest-login,
body.theme-dark .auth-gate {
  background: var(--bg-card);
  border-color: var(--border);
}
body.theme-dark .order-card-meta,
body.theme-dark .order-card-price,
body.theme-dark .checkout-head h2,
body.theme-dark .auth-gate strong,
body.theme-dark .cabinet-username,
body.theme-dark .mp-card-desc,
body.theme-dark .mp-card-price,
body.theme-dark label {
  color: var(--text);
}
body.theme-dark .order-card-status.is-rejected {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
}
body.theme-dark .order-card-status.is-confirmed {
  background: var(--success-soft);
  color: #86efac;
}
body.theme-dark .order-card-status.is-new {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
body.theme-dark .achievement-stamp.is-locked {
  opacity: 0.85;
  filter: grayscale(0.2);
}
body.theme-dark .achievements-card {
  border-color: rgba(251, 146, 60, 0.45);
  background:
    radial-gradient(circle at 0% 0%, rgba(234, 88, 12, 0.12), transparent 45%),
    linear-gradient(145deg, var(--bg-card) 0%, var(--bg-muted) 100%);
}
body.theme-dark .achievements-card::before {
  border-color: rgba(251, 146, 60, 0.3);
}
body.theme-dark .achievements-badge {
  background: rgba(234, 88, 12, 0.18);
  color: #fdba74;
}
body.is-browser.theme-dark .top-bar {
  background: var(--bg-card);
  border-bottom-color: var(--border);
}
body.theme-dark .search-input,
body.theme-dark select,
body.theme-dark .auth-code-input,
body.theme-dark .referral-link-input {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
}
body.theme-dark .checkout-price {
  background: var(--primary-soft);
  color: var(--text);
}
body.theme-dark .checkout-coins-row {
  background: var(--bg-muted);
  border-color: var(--border);
}
body.theme-dark .stars-card-main strong {
  color: #fbbf24;
}
body.is-browser.theme-dark .landing-section,
body.is-browser.theme-dark .landing-price-card,
body.is-browser.theme-dark .landing-sign-card,
body.is-browser.theme-dark .landing-faq-item,
body.is-browser.theme-dark .landing-branch-card,
body.is-browser.theme-dark .landing-offer-card,
body.is-browser.theme-dark .landing-review-card,
body.is-browser.theme-dark .landing-stat-card,
body.is-browser.theme-dark .landing-callback-card,
body.is-browser.theme-dark .landing-cta-card,
body.is-browser.theme-dark .site-footer {
  background: var(--bg-card);
  border-color: var(--border);
}
body.is-browser.theme-dark .landing-sign-card,
body.is-browser.theme-dark .landing-pill,
body.is-browser.theme-dark .landing-price-photo,
body.is-browser.theme-dark .section-block--card {
  background: var(--bg-muted);
}
body.is-browser.theme-dark .landing-pill {
  border-color: var(--border);
}
body.is-browser.theme-dark .landing-showcase {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}
body.is-browser.theme-dark .showcase-card {
  background: var(--bg-card);
  border-color: var(--border);
}
body.theme-dark .card-photo--product,
body.theme-dark .mp-card-img--product {
  background: var(--bg-muted);
  mix-blend-mode: normal;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}
body.is-browser.theme-dark .showcase-card-img {
  mix-blend-mode: normal;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
}
body.theme-dark .hero-float-img {
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.55));
}
body.theme-dark .mp-card-img {
  background: var(--bg-muted);
}
body.theme-dark .mp-card-badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
body.theme-dark .mp-card-badge--stock {
  background: rgba(22, 101, 52, 0.88);
  color: #bbf7d0;
  border-color: rgba(134, 239, 172, 0.55);
}
body.theme-dark .mp-card-badge--sale {
  background: rgba(154, 52, 18, 0.88);
  color: #fed7aa;
  border-color: rgba(253, 186, 116, 0.5);
}
body.theme-dark .mp-card-badge--off {
  background: rgba(127, 29, 29, 0.88);
  color: #fecaca;
  border-color: rgba(252, 165, 165, 0.45);
}
body.theme-dark .mp-card-city {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.28);
}
body.theme-dark .trust-item {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border-strong);
}
body.theme-dark .faq-q,
body.theme-dark .section-head h2,
body.theme-dark .mp-card-title,
body.theme-dark .order-card-device {
  color: var(--text);
}
body.theme-dark .link-btn {
  color: var(--primary-dark);
}
body.theme-dark .checkout-sheet,
body.theme-dark .checkout-modal .checkout-backdrop + .checkout-sheet,
body.theme-dark .ai-chat-panel {
  background: var(--bg-card);
  border-color: var(--border);
}
body.theme-dark .ai-chat-msg--bot {
  background: var(--bg-muted);
  color: var(--text);
}
body.theme-dark .achievement-stamp.is-unlocked {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
body.theme-dark .leaflet-container {
  background: #1a1f2e;
}
@media (max-width: 480px) {
  .achievements-track {
    grid-template-columns: 1fr;
  }
}

/* ── Кнопка «Наверх» ── */
.scroll-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h, 64px) + var(--safe-bottom, 0px) + 16px);
  z-index: 1190;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.scroll-top svg {
  width: 22px;
  height: 22px;
}
.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
body.is-browser .scroll-top {
  right: 84px;
  bottom: calc(var(--nav-h, 64px) + var(--safe-bottom, 0px) + 16px);
}
body.is-browser .scroll-top.is-visible {
  bottom: calc(var(--nav-h, 64px) + var(--safe-bottom, 0px) + 16px);
}
body.is-telegram .scroll-top {
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h, 64px) + var(--safe-bottom, 0px) + 16px);
}
@media (min-width: 900px) {
  body.is-browser .ai-chat {
    right: max(24px, calc((100vw - var(--site-max, 1180px)) / 2 - 72px));
  }
  body.is-browser .scroll-top,
  body.is-browser .scroll-top.is-visible {
    right: max(92px, calc((100vw - var(--site-max, 1180px)) / 2 + 8px));
    bottom: max(28px, env(safe-area-inset-bottom, 0px));
  }
}

/* ── Акции ── */
.promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.promotion-card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--bg-card), var(--bg-muted));
  box-shadow: var(--shadow-sm);
}
.promotion-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}
.promotion-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.promotion-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px;
}
.promotion-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.promotion-meta small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.promotions-tier-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.5;
}
.promotions-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.promotion-tier-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-muted);
  display: grid;
  gap: 4px;
}
.promotion-tier-card strong { font-size: 14px; }
.promotion-tier-card span { font-size: 13px; color: var(--primary); font-weight: 700; }
.promotion-tier-card small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.promotion-tier-min { color: var(--accent) !important; }
.section-lead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.checkout-promo-row {
  margin: 10px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1px solid var(--border);
}
.checkout-promo-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.45;
}
.checkout-promo-trigger-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
body.theme-dark .promotion-card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-muted));
}
body.theme-dark .checkout-promo-row {
  background: var(--bg-muted);
}
