/* ЛекБаланс v37.68 — слой вёрстки для iPad и компьютера (подключается последним).
   Телефон (< 744 px) не затрагивается. Согласовано по макетам 09.11.2026. */

/* v37.69: мини-шар на Главной крупнее (было 260 px) */
html:root body .ck-mini .mapw{max-width:400px}
html:root body .ck-mini .map-sel:empty{display:none}
html:root body .ck-mini .map-sel{text-align:left}
@media (min-width:744px){html:root body .ck-mini .mapw{max-width:460px}}

/* Боковое меню: подпись не обрезается значком «Бесплатно» */
@media (min-width:821px){
  html:root body #nav button > span:not(.pill){min-width:auto;white-space:nowrap}
  html:root body #nav button .pill{font-size:.66rem;padding:2px 5px}
}

/* ===== iPad вертикально в режиме нижней панели (744–820) ===== */
@media (min-width:744px) and (max-width:820px){
  html:root body main{padding:24px 32px calc(124px + env(safe-area-inset-bottom));max-width:none}
  html:root body #tabbar.tabbar{left:50%;right:auto;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));
    width:min(640px,calc(100vw - 48px));border:1px solid var(--border);border-radius:22px;box-shadow:0 8px 28px rgba(30,40,35,.14);padding:6px 8px}
  html:root body #tabbar.tabbar button{border-radius:14px;min-height:56px}
  html:root body .x-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px;align-items:start}
  html:root body .lbh{max-width:720px;margin-inline:auto}
  html:root body .x-combos .mapw{max-width:620px;margin-inline:auto}
}

/* ===== общие правила для iPad и компьютера ===== */
@media (min-width:744px){
  html:root body .x-blister,html:root body .x-blister.scroll{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));overflow:visible}
  html:root body .x-blister .x-cell{flex:none;min-width:0}
  html:root body .x-cell .st{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;padding:0 4px}
  html:root body .shop-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  html:root body .shop-card{height:100%}
  html:root body .shop-li>.shop-card{height:auto}
  html:root body .shop-card .shop-ph{aspect-ratio:16/9}
  html:root body .x-combos .map-scroll,html:root body .x-combos .map-scroll svg{overflow:visible}
  html:root body .x-det summary{min-width:0}
  html:root body .x-det summary > *{min-width:0;overflow-wrap:anywhere}
}

/* ===== iPad вертикально с боковым меню (821–1023, например iPad Pro 11) ===== */
@media (min-width:821px) and (max-width:1023px){
  html:root body #app{grid-template-columns:224px minmax(0,1fr)}
  html:root body main{padding:28px 28px 40px}
}

/* ===== компьютер и iPad горизонтально (≥ 1024) ===== */
@media (min-width:1024px){
  html:root body #app{grid-template-columns:248px minmax(0,1fr)}
  html:root[data-large=true] body #app{grid-template-columns:288px minmax(0,1fr)}
  html:root body main{max-width:1280px;margin-inline:auto;padding:32px 40px 48px}
  html:root body .x-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 32px;align-items:start}
  /* Главная: описание слева, поиск справа */
  html:root body .lbh.lbh-m.fresh{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:24px;align-items:center;padding:24px}
  html:root body .lbh.lbh-m.fresh .lbh-desc{margin:0;text-align:left;padding:24px}
  html:root body .lbh.lbh-m.fresh .lbh-desc svg{margin:0 0 8px}
  html:root body .lbh.lbh-m.fresh .lbh-desc h2,html:root body .lbh.lbh-m.fresh .lbh-desc p{text-align:left;max-width:none;margin-left:0}
  html:root body .lbh.lbh-m.fresh .ck-find{margin:0}
  /* Сочетания: схема шире и закреплена при прокрутке списка */
  html:root body .x-cols:has(.x-combos){grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
  html:root body .x-combos{position:sticky;top:16px}
  html:root body .x-combos .map-scroll{overflow:visible}
  /* Магазин: карточки сеткой */
  html:root body .shop-list{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  html:root body .shop-grp{margin:24px 0}
}
@media (min-width:1280px){
  html:root body .shop-list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
