/* BreadMeat brand system (§15) — black, white, warm amber-orange. Mobile-First (§21). */
:root {
  --bm-black: #0a0a0a;
  --bm-white: #ffffff;
  --bm-amber: #f5a524; /* теплый желтый с оттенком оранжевого */
  --bm-amber-dark: #d98a10;
  --bm-gray-900: #141414;
  --bm-gray-700: #2b2b2b;
  --bm-gray-400: #9a9a9a;
  --bm-gray-200: #e6e6e6;
  --bm-gray-100: #f2f0ec;
  --bm-gray-50: #faf9f7;
  --bm-gray-500: #8b8377;
  --bm-amber-tint: #fdf1dd;
  --bm-app-bg: #f1efea;
  --bm-danger: #e5484d;
  --bm-radius: 14px;
  --bm-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  --bm-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--bm-font);
  color: var(--bm-black);
  background: var(--bm-white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bm-amber-dark); text-decoration: none; }

.bm-header {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Верхний отступ учитывает вырез/Dynamic Island на iPhone (safe-area). */
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 12px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  color: var(--bm-black);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--bm-gray-200);
}
.bm-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.bm-brand-logo {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain;
  background: transparent;
}
.bm-brand-tx { display: flex; flex-direction: column; line-height: 1.05; }
.bm-brand-name { font-weight: 800; font-size: 22px; letter-spacing: 0.3px; color: var(--bm-black); }
.bm-brand-sub { font-size: 12px; font-weight: 700; color: var(--bm-amber-dark); margin-top: 3px; letter-spacing: 0.2px; }

/* Совместимость со старой разметкой шапки (админка) */
.bm-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: 0.5px; }
.bm-logo .dot { color: var(--bm-amber); }

.bm-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.bm-hero {
  text-align: center;
  padding: 40px 16px 20px;
}
.bm-hero h1 { font-size: 30px; margin: 0 0 8px; line-height: 1.15; }
.bm-hero p { color: var(--bm-gray-700); font-size: 16px; margin: 0 auto; max-width: 46ch; }
.bm-accent { color: var(--bm-amber-dark); }

.bm-card {
  background: var(--bm-white);
  border: 1px solid var(--bm-gray-200);
  border-radius: var(--bm-radius);
  box-shadow: var(--bm-shadow);
  padding: 22px;
  margin: 18px 0;
}
.bm-card h2 { margin: 0 0 14px; font-size: 20px; }

label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  border: 1px solid var(--bm-gray-200);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--bm-amber); }

.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--bm-black);
  background: var(--bm-amber);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 16px;
  transition: transform 0.05s, background 0.15s;
}
.bm-btn:hover { background: var(--bm-amber-dark); }
.bm-btn:active { transform: translateY(1px); }
.bm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bm-btn.secondary { background: var(--bm-black); color: var(--bm-white); }
.bm-btn.ghost { background: transparent; color: var(--bm-black); border: 1px solid var(--bm-gray-200); }

/* Поле телефона с фиксированным префиксом +7 */
.bm-phone { display: flex; align-items: stretch; }
.bm-phone > .pfx {
  display: flex; align-items: center; padding: 0 14px; font-size: 16px; font-weight: 700;
  color: var(--bm-gray-700); background: #f2f2f2;
  border: 1px solid var(--bm-gray-200); border-right: none; border-radius: 10px 0 0 10px;
}
.bm-phone > input { border-radius: 0 10px 10px 0; }

.bm-note { font-size: 13px; color: var(--bm-gray-400); margin-top: 8px; }
.bm-alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 12px 0; }
.bm-alert.error { background: #fdecec; color: var(--bm-danger); }
.bm-alert.success { background: #fff4e0; color: var(--bm-amber-dark); }

.bm-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--bm-gray-200); }
.bm-row:last-child { border-bottom: none; }
.bm-row .k { color: var(--bm-gray-700); }
.bm-row .v { font-weight: 700; }

.bm-balance { font-size: 40px; font-weight: 800; color: var(--bm-amber-dark); }

/* Общие подписи ячейки (центрированы) */
.bm-loyalty-label { font-size: 15px; font-weight: 700; color: var(--bm-gray-700); margin-bottom: 8px; text-align: center; }
.bm-loyalty-terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.bm-loyalty-term {
  background: #fff4e0; color: var(--bm-amber-dark);
  border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 700;
}
.bm-loyalty { padding: 24px; background: linear-gradient(160deg, #fff 60%, #fffaf0 100%); border: 1px solid #f2e3c4; }

/* Карта лояльности с 3D-переворотом: лицо = баланс, оборот = штрихкод */
.bm-flip { perspective: 1400px; cursor: pointer; margin: 18px 0; }
.bm-flip-inner {
  position: relative; width: 100%; min-height: 250px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bm-flip.flipped .bm-flip-inner { transform: rotateY(180deg); }
.bm-flip-front, .bm-flip-back {
  position: absolute; inset: 0; box-sizing: border-box; padding: 24px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: 18px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.bm-flip-front {
  background: radial-gradient(120% 120% at 15% 0%, #262626 0%, #0a0a0a 60%);
  border: 1px solid #000; color: #fff;
}
.bm-flip-front .bm-loyalty-label { color: rgba(255, 255, 255, 0.7); }
.bm-flip-front .bm-balance { color: var(--bm-amber); font-size: 48px; line-height: 1; }
.bm-flip-back { background: #fff; border: 1px solid var(--bm-gray-200); transform: rotateY(180deg); }
.bm-flip-hint { margin-top: 16px; font-size: 12px; color: var(--bm-gray-400); }
.bm-flip-front .bm-flip-hint { color: rgba(255, 255, 255, 0.55); }
.bm-pending { margin-top: 8px; font-size: 13px; font-weight: 600; color: rgba(245, 165, 36, 0.9); }
.bm-purchase-bonus { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--bm-amber-dark); background: #fff4e0; border-radius: 20px; padding: 1px 8px; }

.bm-balance { text-align: center; }
.bm-barcode { text-align: center; padding: 10px 6px; background: var(--bm-white); border-radius: 12px; width: 100%; }
.bm-barcode svg { width: 100%; max-width: 320px; height: 150px; }

.bm-hidden { display: none !important; }
.bm-center { text-align: center; }
.bm-spinner {
  width: 22px; height: 22px; border: 3px solid var(--bm-gray-200);
  border-top-color: var(--bm-amber); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bm-footer { text-align: center; color: var(--bm-gray-400); font-size: 13px; padding: 24px; }

/* Landing / login */
.bm-features { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 4px 0 8px; }
.bm-feature { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--bm-gray-200); border-radius: 12px; }
.bm-feature .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: #fff4e0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bm-feature .tx { font-size: 14px; color: var(--bm-gray-700); }
.bm-feature .tx b { color: var(--bm-black); display: block; font-size: 15px; }

.bm-divider { display: flex; align-items: center; gap: 12px; color: var(--bm-gray-400); font-size: 13px; margin: 18px 0 10px; }
.bm-divider::before, .bm-divider::after { content: ''; flex: 1; height: 1px; background: var(--bm-gray-200); }

/* Секция «Как это работает» */
.bm-section-title { font-size: 20px; font-weight: 800; margin: 28px 0 14px; text-align: center; }
.bm-steps { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bm-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: #fff; border: 1px solid var(--bm-gray-200); border-radius: 14px; }
.bm-step .no { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--bm-black); color: var(--bm-amber); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bm-step .tx b { display: block; font-size: 15px; margin-bottom: 2px; }
.bm-step .tx span { font-size: 14px; color: var(--bm-gray-700); }

.bm-cta { background: var(--bm-black); color: #fff; border-radius: 18px; padding: 26px 22px; text-align: center; margin: 24px 0; }
.bm-cta h3 { margin: 0 0 6px; font-size: 20px; }
.bm-cta p { margin: 0 0 16px; color: var(--bm-gray-200); font-size: 14px; }
.bm-cta .bm-btn { max-width: 280px; margin: 0 auto; }

@media (min-width: 720px) {
  .bm-features { grid-template-columns: repeat(3, 1fr); }
  .bm-steps { grid-template-columns: repeat(3, 1fr); }
}

/* Modal */
.bm-overlay {
  position: fixed; inset: 0; background: rgba(10, 10, 10, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.bm-modal {
  position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 440px;
  padding: 26px 24px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 92vh; overflow-y: auto; animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.bm-modal h2 { margin: 0 0 14px; padding-right: 30px; }
.bm-modal-close {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; border: none;
  background: var(--bm-gray-200); border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--bm-gray-700);
}
.bm-modal-close:hover { background: var(--bm-amber); color: #000; }
body.bm-noscroll { overflow: hidden; }

@media (min-width: 720px) {
  .bm-hero h1 { font-size: 38px; }
}

/* ─────────────── Кнопка доставки (WhatsApp) ─────────────── */
.bm-delivery {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff; border-radius: var(--bm-radius); padding: 16px 18px; margin: 16px 0;
  box-shadow: var(--bm-shadow); text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bm-delivery:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(18, 140, 126, 0.35); }
.bm-delivery:active { transform: translateY(0); }
.bm-delivery .ic { font-size: 30px; line-height: 1; }
.bm-delivery .tx { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.bm-delivery .tx b { font-size: 17px; }
.bm-delivery .tx span { font-size: 13px; opacity: 0.9; }
.bm-delivery .arr { font-size: 22px; font-weight: 700; opacity: 0.9; }

/* ─────────────── Информация о магазине ─────────────── */
.bm-store .bm-store-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: 15px; border-bottom: 1px solid var(--bm-gray-200);
}
.bm-store .bm-store-row:last-child { border-bottom: none; }
.bm-store .bm-store-row .ic { font-size: 18px; line-height: 1.4; }
.bm-store .bm-store-row a { color: var(--bm-amber-dark); font-weight: 600; }

/* ─────────────── Кабинет: приветствие ─────────────── */
.bm-welcome { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.bm-avatar {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, var(--bm-amber) 0%, var(--bm-amber-dark) 100%);
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(217, 138, 16, 0.35);
}
.bm-welcome-tx { display: flex; flex-direction: column; min-width: 0; }
.bm-welcome-tx b { font-size: 20px; line-height: 1.2; }
.bm-welcome-tx span { font-size: 13px; color: var(--bm-gray-400); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Быстрые показатели */
.bm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.bm-stat {
  background: #fff; border: 1px solid var(--bm-gray-200); border-radius: 14px;
  padding: 14px 8px; text-align: center;
}
.bm-stat .ic { font-size: 20px; height: 26px; display: flex; align-items: center; justify-content: center; }
.bm-stat .num { font-size: 22px; font-weight: 800; color: var(--bm-black); margin-top: 4px; line-height: 1; font-variant-numeric: tabular-nums; }
.bm-stat .lbl { font-size: 11px; color: var(--bm-gray-400); margin-top: 5px; }

/* История покупок — карточки */
.bm-hist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bm-gray-200); }
.bm-hist-item:last-child { border-bottom: none; }
.bm-hist-item .ic {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: #fff4e0; display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.bm-hist-item .ic.ret { background: #fdecec; }
.bm-hist-item .meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bm-hist-item .meta b { font-size: 15px; }
.bm-hist-item .meta span { font-size: 12px; color: var(--bm-gray-400); }
.bm-hist-item .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bm-hist-item .amt .sum { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Пустая история */
.bm-empty { text-align: center; padding: 24px 12px; color: var(--bm-gray-400); }
.bm-empty .ic { font-size: 34px; }
.bm-empty p { font-size: 14px; margin: 10px 0 0; }

/* Аккаунт — сворачиваемый блок */
.bm-account { padding: 0; }
.bm-account > summary {
  list-style: none; cursor: pointer; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 16px;
}
.bm-account > summary::-webkit-details-marker { display: none; }
.bm-account > summary .chev { color: var(--bm-gray-400); transition: transform 0.2s; font-size: 18px; }
.bm-account[open] > summary .chev { transform: rotate(180deg); }
.bm-account-body { padding: 0 20px 20px; }

/* ─────────────── Компактный герой (лендинг) ─────────────── */
.bm-hero-mini { padding: 14px 4px 6px; }
.bm-badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #fff4e0; color: var(--bm-amber-dark);
  font-size: 12px; font-weight: 800; letter-spacing: 0.3px; margin-bottom: 12px;
  border: 1px solid #f2e0bd;
}
.bm-hero-mini h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.3px; }
.bm-hero-mini p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--bm-gray-700); max-width: 42ch; }

/* Карточка входа — акцент, чтобы сразу цепляла взгляд */
.bm-login { border: 1px solid #f2e0bd; box-shadow: 0 10px 34px rgba(217, 138, 16, 0.14); }

/* ─────────────── Витрина «Наше производство» — карусель ─────────────── */
.bm-mills {
  display: flex; gap: 14px; margin: 4px -16px 6px; padding: 6px 16px 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.bm-mills::-webkit-scrollbar { display: none; }
.bm-mill {
  flex: 0 0 78%; max-width: 300px; scroll-snap-align: center;
  border-radius: 20px; padding: 22px 20px; min-height: 190px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); position: relative; overflow: hidden;
}
.bm-mill .e { font-size: 42px; margin-bottom: auto; }
.bm-mill b { font-size: 21px; font-weight: 800; line-height: 1.15; }
.bm-mill span { font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.88); }
.bm-mill.m1 { background: linear-gradient(155deg, #e8a13a 0%, #b26a12 100%); }
.bm-mill.m2 { background: linear-gradient(155deg, #5bb04a 0%, #2f7d3f 100%); }
.bm-mill.m3 { background: linear-gradient(155deg, #d98a10 0%, #8a4f0a 100%); }
.bm-mill.m4 { background: linear-gradient(155deg, #c0453f 0%, #7d1f1f 100%); }
.bm-mill.pay { background: radial-gradient(120% 120% at 20% 0%, #2a2a2a 0%, #0a0a0a 70%); border: 1px solid rgba(245,165,36,0.4); }
.bm-mill.pay b { color: var(--bm-amber); }
.bm-mill.pay .bm-btn { margin-top: 12px; }
.bm-swipe-hint { text-align: center; font-size: 13px; color: var(--bm-gray-400); margin: 2px 0 8px; }

/* ─────────────── Товары недели ─────────────── */
.bm-prods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 4px 0 8px; }
.bm-prod {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--bm-gray-200); border-radius: 16px; overflow: hidden;
  box-shadow: var(--bm-shadow);
}
.bm-prod-img { width: 100%; aspect-ratio: 1 / 1; background: #f6f6f6; overflow: hidden; }
.bm-prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-prod-noimg { display: flex; align-items: center; justify-content: center; font-size: 44px; background: linear-gradient(160deg,#fff6e6,#ffe9c2); }
.bm-prod-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.bm-prod-body b { font-size: 15px; line-height: 1.2; }
.bm-prod-body > span { font-size: 12px; color: var(--bm-gray-400); line-height: 1.35; }
.bm-prod-order {
  margin-top: auto; text-align: center; text-decoration: none;
  background: linear-gradient(135deg,#25D366 0%,#128C7E 100%); color: #fff;
  font-weight: 700; font-size: 13px; padding: 9px 8px; border-radius: 10px;
}
.bm-prod-order:active { transform: translateY(1px); }
@media (min-width: 620px) { .bm-prods { grid-template-columns: repeat(3, 1fr); } }

/* ─────────────── Кабинет-приложение: нижняя навигация + safe-area ─────────────── */
body.bm-app #app { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.bm-tabview { display: flex; flex-direction: column; gap: 14px; }
.bm-tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 680px; z-index: 20; display: flex;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--bm-gray-200);
  padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
}
.bm-tab {
  flex: 1; border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--bm-gray-400); padding: 6px 0;
}
.bm-tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bm-tab span { font-size: 10.5px; font-weight: 700; }
.bm-tab.on { color: var(--bm-amber-dark); }

/* Профиль */
.bm-prof-top { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.bm-prof-top b { font-size: 21px; }
.bm-prof-top span { color: var(--bm-gray-400); font-size: 13px; }
.bm-avatar-lg { width: 76px; height: 76px; font-size: 34px; }
.bm-ctitle { font-size: 13px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--bm-gray-400); margin-bottom: 4px; }

/* Заголовок раздела со ссылкой «Все товары» */
.bm-shead { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 0; }
.bm-shead a { font-size: 13px; font-weight: 700; color: var(--bm-amber-dark); }

body.bm-app .bm-footer { display: none; }

/* Шапка живёт на общем фоне, а не на белой плашке. */
body.bm-app .bm-header,
body.bm-landing .bm-header {
  background: rgba(241, 239, 234, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ─── Профиль ─── */
.bm-prof-hero {
  display: flex; align-items: center; gap: 16px;
  background: var(--bm-black); color: #fff;
  border-radius: 20px; padding: 20px 22px; margin: 4px 0 12px;
}
.bm-prof-hero .bm-avatar-lg { width: 60px; height: 60px; font-size: 26px; flex: 0 0 auto; }
.bm-prof-id { min-width: 0; flex: 1; }
.bm-prof-id b { display: block; font-size: 20px; line-height: 1.2; }
.bm-prof-id span { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.55); margin-top: 2px; white-space: nowrap; }
.bm-prof-bal { margin-left: auto; text-align: right; }
.bm-prof-bal .l {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; white-space: nowrap;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.45);
}
.bm-prof-bal .n {
  display: block; font-size: 24px; font-weight: 800; color: var(--bm-amber);
  line-height: 1.1; font-variant-numeric: tabular-nums;
}

/* Шапка раздела: иконка + название + статус */
.bm-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bm-sec-h .ic {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bm-amber-tint, #fdf1dd); color: var(--bm-amber-dark);
}
.bm-sec-h h3 { margin: 0; font-size: 16px; font-weight: 800; }
.bm-sec-h .bm-status { margin-left: auto; }

.bm-status {
  font-size: 12px; font-weight: 700; border-radius: 20px; padding: 4px 11px; white-space: nowrap;
}
.bm-status.ok { background: #e6f6ec; color: #1c7a43; }
.bm-status.wait { background: var(--bm-amber-tint); color: var(--bm-amber-dark); }
.bm-status.none { background: var(--bm-gray-100); color: var(--bm-gray-500); }

/* Номер карты — крупно, с ровными цифрами */
.bm-cardnum {
  font-size: 22px; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums;
  color: var(--bm-black); background: var(--bm-gray-50, #faf9f7);
  border: 1px dashed var(--bm-gray-200); border-radius: 12px;
  padding: 14px 16px; text-align: center;
}

/* Выравнивание линейных иконок с текстом + цвета по контексту */
.bm-loyalty-term { display: inline-flex; align-items: center; gap: 6px; }
.bm-pending { display: inline-flex; align-items: center; gap: 6px; }
.bm-prod-order { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; }
.bm-hist-item .ic { color: var(--bm-amber-dark); }
.bm-hist-item .ic.ret { color: var(--bm-danger); }
.bm-store .bm-store-row .ic { color: var(--bm-amber-dark); display: flex; align-items: center; }
.bm-prod-noimg { color: var(--bm-amber-dark); }

/* Компактнее: единый зазор между блоками кабинета (без двойных margin+gap) */
.bm-tabview { gap: 12px; }
.bm-tabview > * { margin-top: 0 !important; margin-bottom: 0 !important; }

/* Карточка товара — крупнее название, аккуратная кнопка */
.bm-prods { gap: 12px; }
.bm-prod-body { padding: 12px 12px 13px; gap: 7px; }
.bm-prod-body b { font-size: 15.5px; }
.bm-prod-order { font-size: 14px; padding: 11px 10px; border-radius: 12px; gap: 6px; }

/* ─────────────── Витрина «Товары недели» (переработка под макет) ─────────────── */
.bm-prods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 8px; }
.bm-prod {
  background: #fff; border: 1px solid var(--bm-gray-200); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--bm-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.bm-prod:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); }
.bm-prod-img { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #efe7d8; }
/* Пока грузится фото, в блоке видно размытое превью из списка товаров;
   сама фотография проявляется поверх, когда придёт. */
.bm-prod-img.has-prev { background-size: cover; background-position: center; }
.bm-prod-img.has-prev::after {
  content: ""; position: absolute; inset: 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bm-prod-photo {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s ease, opacity 0.25s ease;
}
.bm-prod-img.has-prev .bm-prod-photo { opacity: 0; }
.bm-prod-img.has-prev .bm-prod-photo.ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .bm-prod-photo { transition: none; }
}
.bm-prod:hover .bm-prod-photo { transform: scale(1.05); }
.bm-prod-noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--bm-amber-dark); background: linear-gradient(160deg, #fff6e6, #ffe9c2); font-size: 40px;
}
.bm-badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  padding: 5px 10px; border-radius: 999px; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.bm-badge.b-hit { background: linear-gradient(135deg, var(--bm-amber), var(--bm-amber-dark)); }
.bm-badge.b-new { background: linear-gradient(135deg, #43b95c, #2f8f43); }
.bm-prod-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bm-prod-body b {
  font-size: 16px; line-height: 1.22; color: var(--bm-black);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bm-prod-desc {
  font-size: 12.5px; color: var(--bm-gray-400); line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Кнопка всегда прижата к низу — у всех карточек на одном уровне */
.bm-prod-order {
  margin-top: auto; text-decoration: none; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-size: 14px; font-weight: 700; color: #fff; padding: 11px 10px; border-radius: 12px;
  background: linear-gradient(135deg, #25D366, #128C7E);
}
.bm-prod-order:active { transform: translateY(1px); }
@media (min-width: 620px) {
  .bm-prods { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .bm-prod-body { padding: 15px 16px 16px; }
  .bm-prod-body b { font-size: 17px; }
  .bm-prod-desc { font-size: 13px; }
  .bm-prod-order { font-size: 15px; padding: 12px; }
}

.bm-alert.bm-info { background: #eef4fb; color: #2b6cb0; }

/* Товары недели на главной — горизонтальная лента (видно 2 + краешек 3-го) */
.bm-prods-row {
  display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.bm-prods-row::-webkit-scrollbar { display: none; }
.bm-prods-row .bm-prod { flex: 0 0 44%; max-width: 210px; scroll-snap-align: start; }
.bm-prods-row .bm-prod-body { padding: 11px 12px 13px; }
.bm-prods-row .bm-prod-body b { font-size: 13.5px; line-height: 1.2; }
.bm-prods-row .bm-prod-desc { font-size: 11.5px; min-height: 2.6em; }
.bm-prods-row .bm-prod-order { font-size: 13px; padding: 9px 8px; }
/* Название чуть меньше, чтобы длинные помещались в 2 строки */
.bm-prod-body b { font-size: 15px; }
@media (min-width: 620px) { .bm-prod-body b { font-size: 16px; } }

/* ─────────────── Главный экран: герой с фото ─────────────── */
.bm-hero2{
  position:relative;border-radius:22px;overflow:hidden;color:#fff;margin:12px 0 0;
  padding:22px 20px 24px;min-height:190px;display:flex;align-items:flex-end;
  background:linear-gradient(160deg,#d9a05b,#a86c2c);background-size:cover;background-position:center;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}
.bm-hero2::after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(10,10,10,.25) 0%,rgba(10,10,10,.55) 45%,rgba(10,10,10,.86) 100%)}
.bm-hero2-tx{position:relative;z-index:1}
.bm-hero2 h1{margin:0;font-size:27px;line-height:1.08;font-weight:800;letter-spacing:-.4px}
.bm-hero2 p{margin:10px 0 0;font-size:14px;line-height:1.5;color:rgba(255,255,255,.85)}

/* Плашка приветственного бонуса (сумма и видимость — из настроек) */
.bm-plate{display:flex;align-items:center;gap:14px;margin:12px 0 0;
  background:linear-gradient(135deg,var(--bm-amber),var(--bm-amber-dark));color:#1a1206;
  border-radius:18px;padding:14px 18px;box-shadow:0 12px 28px rgba(217,138,16,.28)}
.bm-plate .n{font-size:30px;font-weight:800;line-height:1;white-space:nowrap}
.bm-plate .t{font-size:13.5px;font-weight:700;line-height:1.3}

/* ─────────────── Блок «Вход / Регистрация» ─────────────── */
.bm-auth{position:relative;overflow:hidden;margin:12px 0 0;background:#fff;
  border:1px solid var(--bm-gray-200);border-radius:20px;padding:6px 20px 20px;box-shadow:0 14px 34px rgba(0,0,0,.08)}
.bm-auth::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--bm-amber),var(--bm-amber-dark))}
.bm-auth-top{padding:14px 0 4px}
.bm-seg{display:flex;gap:4px;background:#f2efe9;border-radius:12px;padding:4px}
.bm-seg button{flex:1;border:none;background:none;font-family:inherit;font-size:14.5px;font-weight:700;
  color:var(--bm-gray-400);padding:10px 8px;border-radius:9px;cursor:pointer;transition:background .15s,color .15s}
.bm-seg button.on{background:#fff;color:var(--bm-black);box-shadow:0 2px 8px rgba(0,0,0,.08)}
.bm-pane{display:none;flex-direction:column;gap:10px;padding-top:14px}
.bm-pane.on{display:flex}
.bm-field{display:flex;align-items:center;gap:11px;background:#fff;
  border:1.5px solid var(--bm-gray-200);border-radius:14px;padding:10px 13px;transition:border-color .15s,box-shadow .15s}
.bm-field:focus-within{border-color:var(--bm-amber);box-shadow:0 0 0 4px rgba(245,165,36,.15)}
.bm-field .ic{display:flex;color:var(--bm-amber-dark)}
.bm-field .fbody{flex:1;min-width:0}
.bm-field .flabel{display:block;font-size:11px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;color:var(--bm-gray-400)}
.bm-field input{width:100%;border:none;padding:2px 0 0;font-size:16px;background:transparent;color:var(--bm-black)}
.bm-field input:focus{outline:none}
.bm-field .prow{display:flex;align-items:baseline;gap:6px}
.bm-field .prow .pfx{font-size:16px;font-weight:700;color:var(--bm-black)}
.bm-eye{border:none;background:none;padding:4px;cursor:pointer;color:var(--bm-gray-400);display:flex}
.bm-eye.on{color:var(--bm-amber-dark)}
.bm-mini{font-size:12.5px;font-weight:600;color:var(--bm-amber-dark);text-decoration:none;cursor:pointer}
.bm-mini.right{align-self:flex-end;margin-top:-2px}
.bm-btn.go{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:6px;padding:15px;font-size:16px;border-radius:14px}
.bm-btn.go .arr{font-size:18px;transition:transform .15s}
.bm-btn.go:hover .arr{transform:translateX(3px)}
.bm-btn.go.dark{background:var(--bm-black);color:var(--bm-amber)}
.bm-btn.go.dark:hover{background:#1c1c1c}
.bm-fine{margin:10px 0 0;text-align:center;font-size:12px;color:var(--bm-gray-400);line-height:1.4}

/* ─────────────── Цеха: карточки с фото ─────────────── */
.bm-mills{display:flex;gap:12px;margin:4px -16px 0;padding:2px 16px 10px;
  overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.bm-mills::-webkit-scrollbar{display:none}
.bm-mill{flex:0 0 62%;max-width:230px;scroll-snap-align:start;position:relative;overflow:hidden;
  border-radius:18px;min-height:175px;display:flex;align-items:center;justify-content:center;
  text-align:center;color:#fff;padding:18px 14px;
  background-size:cover;background-position:center;box-shadow:0 10px 24px rgba(0,0,0,.14)}
/* Равномерное затемнение — текст читается в центре плитки на любом фото. */
.bm-mill::after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.42) 0%,rgba(0,0,0,.55) 100%)}
.bm-mill > div{position:relative;z-index:1}
.bm-mill b{display:block;font-size:17px;line-height:1.2;text-shadow:0 1px 8px rgba(0,0,0,.6)}
.bm-mill span{display:block;margin-top:6px;font-size:12.5px;line-height:1.35;opacity:.94;text-shadow:0 1px 8px rgba(0,0,0,.6)}
.bm-mill.m1{background-image:linear-gradient(115deg,#cf9a4f,#bb8238)}
.bm-mill.m2{background-image:linear-gradient(115deg,#5f9c4d,#4c8440)}
.bm-mill.m3{background-image:linear-gradient(115deg,#d9d2c4,#b9b0a0)}
.bm-mill.m4{background-image:linear-gradient(115deg,#b4453c,#9c352f)}
.bm-mill.has-photo{background-image:none}

@media (min-width:620px){
  .bm-hero2{min-height:240px;padding:30px 28px}
  .bm-hero2 h1{font-size:36px}
  .bm-hero2 p{font-size:15.5px;max-width:46ch}
  .bm-mill{flex:1 1 0;max-width:none}
}

/* ─────────────── Подвал: условия бонусной программы ─────────────── */
.bm-terms{background:#fff;border:1px solid var(--bm-gray-200);border-radius:var(--bm-radius);
  box-shadow:var(--bm-shadow);margin:14px 0 0;overflow:hidden}
.bm-terms > summary{list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;
  justify-content:space-between;font-weight:700;font-size:15px}
.bm-terms > summary::-webkit-details-marker{display:none}
.bm-terms > summary .chev{color:var(--bm-gray-400);font-size:18px;transition:transform .2s}
.bm-terms[open] > summary .chev{transform:rotate(180deg)}
.bm-terms-body{padding:0 18px 18px;font-size:13px;line-height:1.55;color:var(--bm-gray-700)}
.bm-terms-body b{display:block;margin:12px 0 6px;font-size:13.5px;color:var(--bm-black)}
.bm-terms-body b:first-child{margin-top:0}
.bm-terms-body ul{margin:0;padding-left:18px}
.bm-terms-body li{margin-bottom:5px}
.bm-terms-body li b{display:inline;margin:0;font-size:inherit}

/* ─────────────── Лендинг: подвал и десктопная раскладка ─────────────── */
.bm-foot{display:flex;flex-direction:column;gap:14px;margin-top:18px}
.bm-foot .bm-card{margin:0}
.bm-foot .bm-terms{margin:0}

@media (min-width:900px){
  body.bm-landing .bm-container{max-width:1060px}
  /* Первый экран в две колонки: слева фото-герой, справа бонус и форма */
  .bm-top{display:grid;grid-template-columns:1.12fr .88fr;gap:20px;align-items:stretch}
  .bm-top .bm-hero2{margin:14px 0 0;height:calc(100% - 14px);min-height:340px}
  .bm-top-side{display:flex;flex-direction:column;gap:14px;margin-top:14px}
  .bm-top-side .bm-plate{margin:0}
  .bm-top-side .bm-auth{margin:0;display:flex;flex-direction:column;flex:1}
  .bm-top-side .bm-pane.on{flex:1}
  /* Подвал в две колонки */
  .bm-foot{display:grid;grid-template-columns:1fr 1.25fr;gap:18px;align-items:start}
  /* Цеха на широком экране — в ряд, без горизонтальной прокрутки */
  .bm-mills{overflow-x:visible;margin:4px 0 0;padding:2px 0 10px}
}

/* ─────────────── Подвал в едином стиле (магазин + условия) ─────────────── */
.bm-foot{
  background:#faf8f5;border:1px solid var(--bm-gray-200);border-radius:18px;
  padding:18px 20px;margin-top:22px;gap:0;
}
/* Внутри подвала карточки не «карточки», а секции общего блока */
.bm-foot .bm-card,
.bm-foot .bm-terms{background:transparent;border:none;box-shadow:none;border-radius:0;padding:0;margin:0}
.bm-foot .bm-store h2{font-size:15px;font-weight:700;margin:0 0 6px}
.bm-foot .bm-store .bm-store-row{border-bottom:none;padding:6px 0;font-size:13.5px;color:var(--bm-gray-700)}
.bm-foot .bm-terms > summary{padding:14px 0 0;font-size:15px;border-top:1px solid var(--bm-gray-200);margin-top:12px}
.bm-foot .bm-terms-body{padding:10px 0 0}

@media (min-width:900px){
  .bm-foot{grid-template-columns:1fr 1.35fr;gap:26px;padding:22px 26px}
  /* На широком экране колонки разделены вертикальной линией, а не верхней */
  .bm-foot .bm-terms > summary{border-top:none;margin-top:0;padding-top:0}
  .bm-foot .bm-terms{border-left:1px solid var(--bm-gray-200);padding-left:26px}
}

/* ─────────────── Секция «Приходите к нам» ─────────────── */
.bm-visit{
  margin:22px 0 0;padding:24px 22px;border-radius:20px;color:#fff;
  background:radial-gradient(120% 130% at 12% 0%,#242424 0%,var(--bm-black) 62%);
  box-shadow:0 16px 38px rgba(0,0,0,.22);
}
.bm-visit h2{margin:0 0 16px;font-size:20px;font-weight:800;color:#fff}
.bm-visit-grid{display:flex;flex-direction:column;gap:14px}
.bm-visit-item{display:flex;align-items:flex-start;gap:12px}
.bm-visit-item .ic{display:flex;color:var(--bm-amber);flex:0 0 auto;margin-top:2px}
.bm-visit-item b{display:block;font-size:11.5px;font-weight:700;letter-spacing:.4px;
  text-transform:uppercase;color:rgba(255,255,255,.55)}
.bm-visit-item span{display:block;font-size:15px;line-height:1.4;color:#fff;margin-top:2px}
.bm-visit-actions{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap}
.bm-visit-btn{flex:1 1 auto;min-width:150px;text-align:center;text-decoration:none;
  padding:13px 16px;border-radius:12px;font-size:15px;font-weight:700;
  background:var(--bm-amber);color:#0a0a0a;transition:background .15s}
.bm-visit-btn:hover{background:var(--bm-amber-dark)}
.bm-visit-btn.ghost{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.28)}
.bm-visit-btn.ghost:hover{border-color:var(--bm-amber);color:var(--bm-amber)}

/* Условия — скромный юридический блок, отдельно от контактов */
.bm-terms{background:transparent;border:none;box-shadow:none;border-radius:0;margin:16px 0 0}
.bm-terms > summary{padding:12px 2px;font-size:13.5px;font-weight:600;color:var(--bm-gray-400)}
.bm-terms > summary .chev{color:var(--bm-gray-400)}
.bm-terms-body{padding:0 2px 8px;font-size:12.5px;color:var(--bm-gray-400)}
.bm-terms-body b{color:var(--bm-gray-700)}

@media (min-width:900px){
  .bm-visit{padding:30px 32px}
  .bm-visit h2{font-size:24px;margin-bottom:20px}
  .bm-visit-grid{flex-direction:row;gap:32px}
  .bm-visit-item{flex:1}
  .bm-visit-actions{margin-top:24px}
  .bm-visit-btn{flex:0 0 auto;min-width:190px}
}

/* ─────────────── Цеха с фото: портретные карточки, фото видно ─────────────── */
.bm-mill{
  /* Портретный формат — вертикальные фото ложатся без жёсткой обрезки */
  aspect-ratio:4/5;min-height:0;
  /* Текст к низу: так фото читается целиком, а подпись остаётся контрастной.
     Направление колонкой задаём явно — иначе align/justify меняются местами. */
  flex-direction:column;justify-content:flex-end;align-items:flex-start;text-align:left;
  padding:14px 14px 15px;
  background-position:center 42%;
}
/* Затемнение только снизу — верх фото остаётся ярким */
.bm-mill::after{
  background:linear-gradient(180deg,rgba(0,0,0,0) 30%,rgba(0,0,0,.35) 58%,rgba(0,0,0,.82) 100%);
}
.bm-mill.has-photo::after{
  background:linear-gradient(180deg,rgba(0,0,0,.05) 25%,rgba(0,0,0,.42) 60%,rgba(0,0,0,.85) 100%);
}
.bm-mill b{font-size:16.5px;text-shadow:0 1px 10px rgba(0,0,0,.75)}
.bm-mill span{font-size:12px;line-height:1.3;margin-top:4px;text-shadow:0 1px 10px rgba(0,0,0,.75)}
/* Герой: фокус чуть выше центра — еда обычно в верхней части кадра */
.bm-hero2{background-position:center 40%}

@media (min-width:620px){
  .bm-mill{aspect-ratio:3/4}
}

/* ─────────────── Кабинет на компьютере: боковое меню + две колонки ─────────────── */
/* ─── Фон кабинета: тонкий узор из колоска, багета, листа и мяса ─── */
/* Фон держим на всю высоту окна, иначе снизу остаётся белая полоса. */
html:has(body.bm-app), html:has(body.bm-landing){background:var(--bm-app-bg)}
body.bm-app, body.bm-landing{
  min-height:100vh;
  background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%20viewBox%3D%220%200%20180%20180%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23b98a4e%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20opacity%3D%220.22%22%3E%3Cg%20transform%3D%22translate%2822%2C20%29%20rotate%28-12%29%22%3E%3Cpath%20d%3D%22M9%2030V6%22%2F%3E%3Cpath%20d%3D%22M9%209c0-3%202.6-5%205-5%200%203-2%205-5%205zM9%209c0-3-2.6-5-5-5%200%203%202%205%205%205z%22%2F%3E%3Cpath%20d%3D%22M9%2016c0-3%202.6-5%205-5%200%203-2%205-5%205zM9%2016c0-3-2.6-5-5-5%200%203%202%205%205%205z%22%2F%3E%3Cpath%20d%3D%22M9%2023c0-3%202.6-5%205-5%200%203-2%205-5%205zM9%2023c0-3-2.6-5-5-5%200%203%202%205%205%205z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28104%2C34%29%20rotate%2828%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2234%22%20height%3D%2213%22%20rx%3D%226.5%22%2F%3E%3Cpath%20d%3D%22M9%204.5%207%208.5M17%204.5%2015%208.5M25%204.5%2023%208.5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2828%2C104%29%20rotate%2814%29%22%3E%3Cpath%20d%3D%22M2%2026C2%2012%2012%202%2026%202c0%2014-10%2024-24%2024z%22%2F%3E%3Cpath%20d%3D%22M6%2022%2022%207%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28112%2C116%29%20rotate%28-18%29%22%3E%3Cpath%20d%3D%22M4%2016c0-7%205-12%2012-12s12%205%2012%2012-5%2010-12%2010S4%2023%204%2016z%22%2F%3E%3Cpath%20d%3D%22M12%2015a4%204%200%201%200%208%200%204%204%200%201%200-8%200z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E"), var(--bm-app-bg, #f1efea);
  background-size:132px 132px;
}

@media (min-width:900px){
  /* ─── Кабинет на компьютере ─── */
  /* Плитка узора на широком экране крупнее */
  body.bm-app, body.bm-landing{background-size:165px 165px}
  body.bm-app .bm-container{max-width:1080px;padding-bottom:40px}
  body.bm-app #app{display:grid;grid-template-columns:212px 1fr;gap:22px;align-items:start;padding-bottom:0}

  /* Нижняя панель превращается в боковое меню */
  body.bm-app .bm-tabbar{
    position:sticky;top:96px;bottom:auto;left:auto;right:auto;transform:none;width:auto;max-width:none;
    order:-1;flex-direction:column;gap:2px;background:none;border:none;box-shadow:none;
    padding:0;backdrop-filter:none;
  }
  body.bm-app .bm-tab{
    flex-direction:row;justify-content:flex-start;align-items:center;gap:11px;
    padding:11px 13px;border-radius:11px;
  }
  body.bm-app .bm-tab span{font-size:14.5px;font-weight:600}
  body.bm-app .bm-tab:hover{background:rgba(0,0,0,.04);color:var(--bm-black)}
  body.bm-app .bm-tab.on{background:var(--bm-black);color:#fff}
  body.bm-app .bm-tab.on span{color:#fff}

  /* ── Главная: одна тёмная панель ── */
  .bm-hero-panel{background:var(--bm-black);border-radius:22px;overflow:hidden;color:#fff}
  .bm-hero-top{display:grid;grid-template-columns:1fr 290px;gap:34px;padding:18px 30px 26px;align-items:center}
  /* Приветствие — отдельной строкой вверху панели, над блоком с балансом. */
  .bm-hero-greet{font-size:18px;color:rgba(255,255,255,.6);letter-spacing:-.2px;padding:22px 30px 0}
  .bm-hero-greet b{color:#fff;font-weight:700}
  .bm-hero-panel .bm-loyalty-label{
    font-size:12px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;
    color:rgba(255,255,255,.4);margin:0;text-align:left;
  }
  .bm-hero-bal{
    font-size:52px;font-weight:800;color:var(--bm-amber);line-height:1;margin:8px 0 10px;
    font-variant-numeric:tabular-nums;
  }
  .bm-hero-bal small{font-size:19px;font-weight:700;color:rgba(255,255,255,.75);margin-left:6px}
  .bm-hero-pend{
    display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;
    color:rgba(255,255,255,.62);
  }
  .bm-hero-pend svg{stroke:var(--bm-amber)}
  .bm-hero-chips{display:flex;gap:8px;margin-top:16px;flex-wrap:nowrap}
  .bm-hero-chips span{
    font-size:12.5px;font-weight:600;color:rgba(255,255,255,.82);white-space:nowrap;
    border:1px solid rgba(255,255,255,.16);border-radius:9px;padding:7px 11px;
  }
  .bm-hero-chips b{color:var(--bm-amber)}

  /* Показатели колонкой справа внутри панели */
  .bm-hstats{
    display:flex;flex-direction:column;gap:1px;
    background:rgba(255,255,255,.11);border-radius:14px;overflow:hidden;
  }
  .bm-hs{display:flex;align-items:center;gap:13px;padding:15px 17px;background:#141414}
  .bm-hs svg{width:22px;height:22px;stroke:var(--bm-amber);flex:0 0 auto}
  .bm-hs .n{font-size:20px;font-weight:800;color:#fff;line-height:1;font-variant-numeric:tabular-nums}
  .bm-hs .l{font-size:11.5px;color:rgba(255,255,255,.5);margin-top:4px}

  /* Два действия в ряд: доставка и магазин */
  .bm-acts{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
  .bm-acts > *{margin:0}
  .bm-acts .bm-delivery{min-height:86px}
  .bm-act-store{
    display:flex;align-items:center;gap:14px;text-decoration:none;min-height:86px;
    padding:18px 20px;border-radius:16px;background:#fff;
    border:1px solid var(--bm-gray-200);color:var(--bm-black);
  }
  .bm-act-store .ic{color:var(--bm-amber-dark);display:flex;flex:0 0 auto}
  .bm-act-store .tx b{font-size:15.5px;display:block;line-height:1.25}
  .bm-act-store .tx > span{font-size:12.5px;display:block;margin-top:2px;color:var(--bm-gray-500)}
  .bm-act-store .arr{margin-left:auto;font-size:19px;font-weight:700;opacity:.55}

  /* Товары — сеткой, а не лентой */
  .tv-home .bm-shead{margin:26px 0 12px}
  .tv-home .bm-prods-row{
    display:grid;grid-template-columns:repeat(4,1fr);gap:14px;
    overflow:visible;margin:0;padding:0;
  }
  .tv-home .bm-prods-row .bm-prod{flex:none;max-width:none}

  /* Профиль: шапка и контакты во всю ширину, данные и пароль — в две колонки */
  .tv-prof{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
  .tv-prof > *{margin:0}
  .tv-prof > .bm-prof-hero,
  .tv-prof > .bm-visit,
  .tv-prof > .bm-terms{grid-column:1 / -1}
  .tv-prof > .bm-prof-hero{padding:22px 26px}
  .tv-prof > .bm-prof-hero .bm-avatar-lg{width:64px;height:64px;font-size:28px}
  .tv-prof > .bm-btn{grid-column:1 / -1;max-width:280px}

  /* История и товары — во всю ширину контента */
  .tv-hist,.tv-shop{display:flex;flex-direction:column;gap:14px}
  .tv-hist .bm-section-title,.tv-shop .bm-section-title{text-align:left}
  .tv-shop .bm-prods{grid-template-columns:repeat(4,1fr)}
}
