/* =========================================================
   MatchMate — магазин, слой организации и оформления.
   Подключается ПОСЛЕ shop.css: визуал самих товаров (рамки,
   ники, значки) остаётся в shop.css, здесь только раскладка,
   карточки, панели и элементы управления.
   ========================================================= */

.shop-body{
  --s-bg:#05070f;
  --s-panel:rgba(9,13,23,.86);
  --s-panel-2:rgba(15,21,35,.92);
  --s-line:rgba(255,255,255,.09);
  --s-line-soft:rgba(255,255,255,.06);
  --s-text:#eaf1ff;
  --s-dim:#94a5be;
  --s-accent:#3fd7f5;
  --s-grad:linear-gradient(135deg,#48dcf7 0%,#6f7bff 60%,#9a63ff 100%);
  --s-radius:16px;
  --s-radius-sm:11px;
}

/* ---------- страница ---------- */
body.shop-body{
  color:var(--s-text);
}
body.shop-body .shop-page{
  max-width:1220px !important;
  margin:0 auto !important;
  padding:26px 20px 96px !important;
  background:none !important;
}
body.shop-body .shop-page::before,
body.shop-body .shop-page::after{content:none !important}
body.shop-body .shop-shell{
  display:grid !important;
  gap:22px !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  background:none !important;
}

/* ---------- ежедневный кейс ---------- */
body.shop-body .shop-hero-compact{margin:0 !important;padding:0 !important;background:none !important;border:0 !important}
body.shop-body .shop-case-widget{
  display:grid !important;
  grid-template-columns:auto 1fr auto !important;
  align-items:center !important;
  gap:18px !important;
  padding:16px 18px !important;
  margin:0 !important;
  border-radius:var(--s-radius) !important;
  background:var(--s-panel) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
  min-height:0 !important;
}
body.shop-body .shop-case-art{
  width:62px !important;height:62px !important;
  flex:none !important;
  display:grid !important;place-items:center !important;
  border-radius:13px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
  overflow:hidden !important;padding:0 !important;margin:0 !important;
}
body.shop-body .shop-case-art img{width:170% !important;height:170% !important;max-width:none !important;object-fit:contain !important}
body.shop-body .shop-case-copy{min-width:0 !important;display:grid !important;gap:3px !important}
body.shop-body .shop-case-kicker{
  margin:0 !important;
  font-size:11px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;
}
body.shop-body .shop-case-title{
  margin:0 !important;
  font-size:18px !important;font-weight:800 !important;letter-spacing:-.01em !important;
  color:var(--s-text) !important;
}
body.shop-body .shop-case-meta{
  display:flex !important;flex-wrap:wrap !important;gap:6px 14px !important;
  font-size:13px !important;color:var(--s-dim) !important;
}
body.shop-body .shop-case-meta span{background:none !important;border:0 !important;padding:0 !important;font-size:13px !important}
body.shop-body .shop-case-action{
  height:44px !important;padding:0 24px !important;
  border-radius:12px !important;border:0 !important;cursor:pointer !important;
  font-size:14.5px !important;font-weight:800 !important;
  color:#04070f !important;background:var(--s-grad) !important;
  box-shadow:none !important;
  transition:transform .16s ease !important;
}
body.shop-body .shop-case-action:hover{transform:translateY(-1px) !important}

/* ---------- панель управления: поиск, баланс, категории ---------- */
body.shop-body .shop-toolbar-compact{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  grid-template-areas:"search balance" "cats cats" !important;
  align-items:center !important;
  gap:14px !important;
  margin:0 !important;
  padding:16px 18px !important;
  border-radius:var(--s-radius) !important;
  background:var(--s-panel) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
body.shop-body .shop-search{
  grid-area:search !important;
  display:block !important;
  max-width:380px !important;width:100% !important;
  margin:0 !important;padding:0 !important;
  background:none !important;border:0 !important;
}
body.shop-body .shop-search input{
  width:100% !important;height:44px !important;
  padding:0 16px !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.04) !important;
  border:1px solid var(--s-line) !important;
  color:var(--s-text) !important;
  font-size:14.5px !important;font-family:inherit !important;
  outline:none !important;
  transition:border-color .16s ease,background .16s ease !important;
}
body.shop-body .shop-search input::placeholder{color:rgba(148,165,190,.6) !important}
body.shop-body .shop-search input:focus{
  border-color:rgba(63,215,245,.5) !important;
  background:rgba(63,215,245,.05) !important;
}
body.shop-body .shop-balance-inline{
  grid-area:balance !important;
  display:flex !important;align-items:center !important;gap:10px !important;
  height:44px !important;padding:0 18px !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line) !important;
  text-decoration:none !important;
}
body.shop-body .shop-balance-info{display:flex !important;align-items:baseline !important;gap:9px !important;flex-direction:row !important}
body.shop-body .shop-balance-label{
  font-size:11px !important;font-weight:800 !important;
  letter-spacing:.12em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;
}
body.shop-body .shop-balance-value{
  font-size:17px !important;font-weight:800 !important;
  color:var(--s-accent) !important;
}

body.shop-body .shop-category-rail{
  grid-area:cats !important;
  display:flex !important;flex-wrap:wrap !important;gap:8px !important;
  margin:0 !important;padding:0 !important;overflow:visible !important;
}
body.shop-body .shop-category-btn{
  display:inline-flex;align-items:center;gap:7px;
  height:36px;padding:0 14px;
  border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.04);
  border:1px solid var(--s-line-soft);
  color:var(--s-dim);
  font-size:13.5px;font-weight:700;font-family:inherit;
  transition:color .16s ease,border-color .16s ease,background .16s ease;
}
body.shop-body .shop-category-btn:hover{color:var(--s-text);border-color:rgba(255,255,255,.18)}
body.shop-body .shop-category-btn.active{
  background:rgba(63,215,245,.12);
  border-color:rgba(63,215,245,.4);
  color:#bdeeff;
}
body.shop-body .shop-category-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:20px;height:19px;padding:0 6px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  font-size:11px;font-weight:800;color:inherit;
  opacity:.8;
}
body.shop-body .shop-category-btn.active .shop-category-count{background:rgba(63,215,245,.2)}

/* ---------- панель каталога ---------- */
body.shop-body .shop-catalog-panel{
  margin:0 !important;
  padding:22px !important;
  border-radius:20px !important;
  background:var(--s-panel) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
}
body.shop-body .shop-catalog-heading{
  display:flex !important;align-items:flex-end !important;justify-content:space-between !important;
  gap:16px !important;flex-wrap:wrap !important;
  margin:0 0 18px !important;padding:0 !important;border:0 !important;background:none !important;
}
body.shop-body .shop-catalog-label{
  display:block !important;
  font-size:11px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;margin-bottom:5px !important;
}
body.shop-body .shop-catalog-heading h2{
  margin:0 !important;
  font-size:24px !important;font-weight:800 !important;letter-spacing:-.02em !important;
  color:var(--s-text) !important;
}
body.shop-body .shop-catalog-count{
  font-size:13px !important;font-weight:700 !important;color:var(--s-dim) !important;
  background:none !important;border:0 !important;padding:0 !important;
}
body.shop-body .shop-catalog-empty{
  padding:44px 20px !important;text-align:center !important;
  color:var(--s-dim) !important;font-size:15px !important;
  border:1px dashed var(--s-line) !important;border-radius:var(--s-radius) !important;
}

/* ---------- сетка товаров ---------- */
body.shop-body .shop-category-grid,
body.shop-body #shop-page-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(228px,1fr)) !important;
  gap:14px !important;
  margin:0 !important;padding:0 !important;
}

/* ---------- карточка товара ---------- */
body.shop-body .shop-item{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:0;
  padding:14px;
  border-radius:var(--s-radius);
  background:rgba(255,255,255,.04);
  border:1px solid var(--s-line-soft);
  box-shadow:none;
  overflow:hidden;
  transition:border-color .18s ease,background .18s ease;
}
body.shop-body .shop-item:hover{
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.07);
  transform:none;
}
body.shop-body .shop-item::before,
body.shop-body .shop-item::after{content:none}

body.shop-body .shop-item-badge{
  position:absolute;top:12px;right:12px;z-index:2;
  padding:4px 9px !important;
  border-radius:999px !important;
  background:rgba(63,215,245,.14) !important;
  border:1px solid rgba(63,215,245,.28) !important;
  color:#9ce8fb !important;
  font-size:9.5px !important;font-weight:800 !important;
  letter-spacing:.1em !important;text-transform:uppercase !important;
  box-shadow:none !important;
}

body.shop-body .shop-item-preview{
  display:grid;
  place-items:center;
  height:126px;
  margin:0 0 13px;
  padding:10px;
  border-radius:12px;
  background:rgba(0,0,0,.3);
  border:1px solid var(--s-line-soft);
  overflow:hidden;
}

body.shop-body .shop-item-info{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  padding:0;
}
body.shop-body .shop-item-title{
  margin:0 0 5px;
  font-size:14.5px;
  font-weight:700;
  line-height:1.3;
  color:var(--s-text);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:38px;
}
body.shop-body .shop-item-desc{
  margin:0 0 14px;
  font-size:12.5px;
  line-height:1.4;
  color:var(--s-dim);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:35px;
}

/* ---------- цена и кнопки ---------- */
body.shop-body .shop-item-footer{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:11px;
  margin-top:auto;
  padding:0;
  border:0;
  background:none;
}
body.shop-body .shop-item-price{
  display:inline-flex;
  align-items:center;
  gap:6px;
  align-self:flex-start;
  padding:5px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--s-line-soft);
}
body.shop-body .shop-price-icon{font-size:12px;line-height:1;filter:none}
body.shop-body .shop-price-value{
  font-size:14px;font-weight:800;color:var(--s-text);letter-spacing:-.01em;
}
body.shop-body .shop-item-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  width:100%;
  margin:0;
}
body.shop-body .shop-try-btn,
body.shop-body .shop-buy-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:38px;
  padding:0 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  font-family:inherit;
  letter-spacing:0;
  text-transform:none;
  transition:background .16s ease,border-color .16s ease,opacity .16s ease;
}
body.shop-body .shop-try-btn{
  background:rgba(255,255,255,.05);
  border:1px solid var(--s-line);
  color:var(--s-text);
  box-shadow:none;
}
body.shop-body .shop-try-btn:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.2)}
body.shop-body .shop-buy-btn{
  background:var(--s-grad);
  border:1px solid transparent;
  color:#04070f;
  font-weight:800;
  box-shadow:none;
}
body.shop-body .shop-buy-btn:hover{opacity:.9}
body.shop-body .shop-buy-btn:disabled,
body.shop-body .shop-buy-btn.purchased{
  background:rgba(94,230,171,.12) !important;
  border-color:rgba(94,230,171,.3) !important;
  color:#5ee6ab !important;
  cursor:default !important;
  opacity:1 !important;
}

/* ---------- пагинация ---------- */
body.shop-body .shop-pagination{
  display:flex !important;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:7px;
  margin:26px 0 0 !important;
  padding:0 !important;
  border:0 !important;background:none !important;
}
body.shop-body .shop-pagination button,
body.shop-body .shop-pagination .shop-page-btn{
  min-width:38px;height:38px;padding:0 12px;
  border-radius:10px;cursor:pointer;
  background:rgba(255,255,255,.04);
  border:1px solid var(--s-line-soft);
  color:var(--s-dim);
  font-size:13.5px;font-weight:700;font-family:inherit;
  transition:color .16s ease,border-color .16s ease,background .16s ease;
}
body.shop-body .shop-pagination button:hover:not(:disabled){color:var(--s-text);border-color:rgba(255,255,255,.2)}
body.shop-body .shop-pagination button.active,
body.shop-body .shop-pagination button[aria-current="page"]{
  background:rgba(63,215,245,.14);
  border-color:rgba(63,215,245,.42);
  color:#bdeeff;
}
body.shop-body .shop-pagination button:disabled{opacity:.4;cursor:default}
body.shop-body .shop-pagination-dots{color:var(--s-dim);padding:0 4px;font-weight:700}

/* ---------- скины за достижения ---------- */
body.shop-body .achievement-skins{
  margin:0 !important;padding:20px !important;
  border-radius:var(--s-radius) !important;
  background:var(--s-panel) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
}
body.shop-body .achievement-skins .shop-eyebrow{
  display:block !important;margin:0 0 4px !important;
  font-size:11px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;background:none !important;border:0 !important;padding:0 !important;
}
body.shop-body .achievement-skins h2{
  margin:0 !important;font-size:20px !important;font-weight:800 !important;
  letter-spacing:-.02em !important;color:var(--s-text) !important;
}
body.shop-body .achievement-skins .shop-section-note{
  margin:6px 0 0 !important;font-size:13px !important;color:var(--s-dim) !important;
}
body.shop-body .achievement-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr)) !important;
  gap:12px !important;margin-top:18px !important;
}
body.shop-body .achievement-card{
  display:flex !important;flex-direction:column !important;gap:8px !important;
  padding:16px !important;
  border-radius:13px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
}
body.shop-body .achievement-card h3{
  margin:0 !important;font-size:15px !important;font-weight:700 !important;color:var(--s-text) !important;
}
body.shop-body .achievement-card p{
  margin:0 !important;font-size:12.5px !important;line-height:1.4 !important;color:var(--s-dim) !important;
}
body.shop-body .achievement-progress{
  height:5px !important;border-radius:999px !important;
  background:rgba(255,255,255,.08) !important;overflow:hidden !important;margin:4px 0 2px !important;
}
body.shop-body .achievement-progress span{
  display:block !important;height:100% !important;border-radius:999px !important;
  background:var(--s-grad) !important;
}
body.shop-body .shop-mini-btn{
  height:36px !important;padding:0 16px !important;
  border-radius:10px !important;cursor:pointer !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line) !important;
  color:var(--s-text) !important;
  font-size:13px !important;font-weight:700 !important;font-family:inherit !important;
  align-self:flex-start !important;
}
body.shop-body .shop-mini-btn:hover{background:rgba(255,255,255,.1) !important}

/* ---------- заголовки внутри сетки ---------- */
body.shop-body .shop-grid-heading{
  grid-column:1 / -1 !important;
  margin:8px 0 2px !important;
  font-size:12px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;background:none !important;border:0 !important;padding:0 !important;
}

/* ---------- модалки: кейс и примерка ---------- */
body.shop-body .shop-case-modal,
body.shop-body .shop-try-modal{padding:20px !important}
body.shop-body .shop-case-modal-backdrop,
body.shop-body .shop-try-backdrop{background:rgba(2,4,10,.8) !important;backdrop-filter:blur(8px) !important}
body.shop-body .shop-case-dialog,
body.shop-body .shop-try-dialog{
  border-radius:20px !important;
  background:linear-gradient(180deg,rgba(16,22,38,.98),rgba(8,11,20,.99)) !important;
  border:1px solid rgba(255,255,255,.1) !important;
  box-shadow:0 34px 80px rgba(0,0,0,.6) !important;
}
body.shop-body .shop-case-dialog h2,
body.shop-body .shop-try-dialog h2{
  font-weight:800 !important;letter-spacing:-.02em !important;color:var(--s-text) !important;
}
body.shop-body .shop-try-close,
body.shop-body .shop-case-close{
  width:36px !important;height:36px !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
  color:var(--s-dim) !important;cursor:pointer !important;
}
body.shop-body .shop-try-close:hover,
body.shop-body .shop-case-close:hover{background:rgba(255,255,255,.1) !important;color:var(--s-text) !important}

/* ---------- адаптив ---------- */
@media (max-width:820px){
  body.shop-body .shop-page{padding:18px 14px 92px !important}
  body.shop-body .shop-toolbar-compact{padding:14px !important}
  body.shop-body .shop-search{max-width:none !important}
  body.shop-body .shop-case-widget{
    grid-template-columns:auto 1fr !important;
    grid-template-areas:"art copy" "btn btn" !important;
    row-gap:14px !important;
  }
  body.shop-body .shop-case-art{grid-area:art !important}
  body.shop-body .shop-case-copy{grid-area:copy !important}
  body.shop-body .shop-case-action{grid-area:btn !important;width:100% !important}
}
@media (max-width:560px){
  body.shop-body .shop-toolbar-compact{
    grid-template-columns:1fr !important;
    grid-template-areas:"search" "balance" "cats" !important;
  }
  body.shop-body .shop-balance-inline{justify-content:space-between !important}
  body.shop-body .shop-category-grid,
  body.shop-body #shop-page-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important}
  body.shop-body .shop-item{padding:11px}
  body.shop-body .shop-item-preview{height:104px;margin-bottom:11px}
  body.shop-body .shop-item-actions{grid-template-columns:1fr;gap:6px}
  body.shop-body .shop-item-title{font-size:13.5px;min-height:35px}
  body.shop-body .shop-item-desc{font-size:12px;min-height:33px}}

/* ---------- уточнения модалок ---------- */
body.shop-body .shop-try-dialog{max-width:860px !important;width:100% !important}
body.shop-body .shop-case-dialog{max-width:520px !important;width:100% !important}
body.shop-body .shop-try-info-card,
body.shop-body .shop-try-profile-card{
  background:rgba(255,255,255,.04) !important;
  border:1px solid var(--s-line-soft) !important;
  border-radius:14px !important;
  box-shadow:none !important;
}
body.shop-body .shop-try-label,
body.shop-body .shop-try-live-title{
  font-size:11px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;
  color:var(--s-dim) !important;
}
body.shop-body .shop-try-chips span,
body.shop-body .shop-try-chips > *{
  border-radius:999px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
  color:var(--s-dim) !important;
  font-size:12px !important;font-weight:600 !important;
}

/* ---------- перебиваем поздний высокоспецифичный блок shop.css ---------- */
html body.shop-body .shop-page .shop-hero-compact{
  margin:0 !important;padding:0 !important;background:none !important;border:0 !important;
}
html body.shop-body .shop-page .shop-case-widget{
  position:relative !important;
  display:grid !important;
  grid-template-columns:auto 1fr auto !important;
  align-items:center !important;
  gap:18px !important;
  padding:16px 18px !important;
  border-radius:var(--s-radius) !important;
  background:var(--s-panel) !important;
  border:1px solid var(--s-line-soft) !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
html body.shop-body .shop-page .shop-case-widget::before{
  content:"" !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:3px !important;
  background:var(--s-grad) !important;
}
html body.shop-body .shop-page .shop-case-art{
  width:72px !important;height:72px !important;min-width:72px !important;
  padding:0 !important;
  display:grid !important;place-items:center !important;
  border-radius:14px !important;
  border:1px solid var(--s-line-soft) !important;
  background:rgba(255,255,255,.05) !important;
  overflow:hidden !important;
}
html body.shop-body .shop-page .shop-case-art::before{display:none !important}
html body.shop-body .shop-page .shop-case-art img{
  width:168% !important;height:168% !important;max-width:none !important;
  padding:0 !important;
  object-fit:contain !important;
  mix-blend-mode:normal !important;
  transform:none !important;
}
html body.shop-body .shop-page .shop-case-copy{
  display:grid !important;gap:3px !important;min-width:0 !important;
}
html body.shop-body .shop-page .shop-case-kicker{
  margin:0 !important;font-size:11px !important;font-weight:800 !important;
  letter-spacing:.14em !important;text-transform:uppercase !important;color:var(--s-dim) !important;
}
html body.shop-body .shop-page .shop-case-title{
  margin:0 !important;font-size:18px !important;font-weight:800 !important;
  letter-spacing:-.01em !important;color:var(--s-text) !important;
}
html body.shop-body .shop-page .shop-case-meta{
  display:flex !important;flex-wrap:wrap !important;gap:6px 14px !important;
  font-size:13px !important;color:var(--s-dim) !important;
}
html body.shop-body .shop-page .shop-case-meta span{
  padding:0 !important;background:none !important;border:0 !important;
  font-size:13px !important;color:var(--s-dim) !important;
}
html body.shop-body .shop-page .shop-case-action{
  height:44px !important;padding:0 24px !important;
  border-radius:12px !important;border:0 !important;
  font-size:14.5px !important;font-weight:800 !important;
  color:#04070f !important;background:var(--s-grad) !important;
  box-shadow:none !important;
}

/* ---------- модалки: помещаем в экран целиком ---------- */
html body.shop-body .shop-try-modal,
html body.shop-body .shop-case-modal{
  position:fixed !important;
  inset:0 !important;
  z-index:1400 !important;
  display:none !important;
  align-items:center !important;
  justify-content:center !important;
  padding:76px 16px 90px !important;
  overflow:hidden !important;
}
html body.shop-body .shop-try-modal.open,
html body.shop-body .shop-try-modal.active,
html body.shop-body .shop-try-modal.show,
html body.shop-body .shop-case-modal.open,
html body.shop-body .shop-case-modal.active,
html body.shop-body .shop-case-modal.show{display:flex !important}

html body.shop-body .shop-try-dialog,
html body.shop-body .shop-case-dialog{
  position:relative !important;
  max-height:100% !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  margin:0 !important;
  padding:26px !important;
  scrollbar-width:thin !important;
}
html body.shop-body .shop-try-dialog::-webkit-scrollbar,
html body.shop-body .shop-case-dialog::-webkit-scrollbar{width:8px}
html body.shop-body .shop-try-dialog::-webkit-scrollbar-thumb,
html body.shop-body .shop-case-dialog::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:8px}

html body.shop-body .shop-try-head{
  position:relative !important;
  padding-right:52px !important;
  margin-bottom:18px !important;
}
html body.shop-body .shop-try-head h2{font-size:23px !important;line-height:1.2 !important}
html body.shop-body .shop-try-close,
html body.shop-body .shop-case-close{
  position:absolute !important;top:0 !important;right:0 !important;
  width:36px !important;height:36px !important;
}
html body.shop-body .shop-try-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
  gap:10px !important;
  margin-top:20px !important;
  padding:0 !important;
}
html body.shop-body .shop-try-actions button,
html body.shop-body .shop-try-actions a{
  height:44px !important;
  padding:0 22px !important;
  border-radius:11px !important;
  font-size:14px !important;font-weight:700 !important;
}

/* барабан кейса не должен обрезать награды */
html body.shop-body .shop-case-reel{
  margin:18px 0 !important;
  padding:0 !important;
  border-radius:13px !important;
  border:1px solid var(--s-line-soft) !important;
  background:rgba(0,0,0,.3) !important;
  overflow:hidden !important;
}
html body.shop-body .shop-case-reel-track{
  display:flex !important;
  align-items:stretch !important;
  gap:8px !important;
  padding:10px !important;
}
html body.shop-body .shop-case-reel-track > *{
  flex:0 0 auto !important;
  display:grid !important;
  place-items:center !important;
  min-width:132px !important;
  min-height:64px !important;
  padding:10px 12px !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
  color:var(--s-text) !important;
  font-size:12.5px !important;font-weight:700 !important;
  line-height:1.3 !important;text-align:center !important;
  white-space:normal !important;
}
html body.shop-body .shop-case-reel-pointer{
  z-index:2 !important;
  background:var(--s-accent) !important;
  box-shadow:0 0 12px rgba(63,215,245,.6) !important;
}
html body.shop-body .shop-case-modal-art{
  width:84px !important;height:84px !important;
  margin:0 auto 12px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  display:grid !important;place-items:center !important;
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--s-line-soft) !important;
}
html body.shop-body .shop-case-modal-art img{
  width:168% !important;height:168% !important;max-width:none !important;
  object-fit:contain !important;mix-blend-mode:normal !important;
}
html body.shop-body .shop-case-modal-copy{text-align:center !important}
html body.shop-body #shop-case-open,
html body.shop-body .shop-case-open-btn{
  width:100% !important;height:48px !important;
  border-radius:12px !important;border:0 !important;
  background:var(--s-grad) !important;
  color:#04070f !important;
  font-size:15px !important;font-weight:800 !important;
  box-shadow:none !important;
}

/* ---------- телефон: компактнее, больше места контенту ---------- */
@media (max-width:760px){
  body.shop-body .shop-page{padding:14px 12px 86px !important}
  body.shop-body .shop-shell{gap:14px !important}

  /* кейс одной строкой */
  html body.shop-body .shop-page .shop-case-widget{
    grid-template-columns:auto 1fr auto !important;
    gap:12px !important;
    padding:12px !important;
  }
  html body.shop-body .shop-page .shop-case-art{
    width:52px !important;height:52px !important;min-width:52px !important;
    border-radius:12px !important;
  }
  html body.shop-body .shop-page .shop-case-title{font-size:15.5px !important}
  html body.shop-body .shop-page .shop-case-kicker{font-size:10px !important}
  html body.shop-body .shop-page .shop-case-meta{
    gap:4px 10px !important;font-size:11.5px !important;
  }
  html body.shop-body .shop-page .shop-case-action{
    height:38px !important;padding:0 16px !important;font-size:13px !important;
    width:auto !important;
  }

  /* поиск и баланс в одну строку */
  body.shop-body .shop-toolbar-compact{
    grid-template-columns:1fr auto !important;
    grid-template-areas:"search balance" "cats cats" !important;
    gap:10px !important;padding:12px !important;
  }
  body.shop-body .shop-search input{height:40px !important;font-size:14px !important}
  body.shop-body .shop-balance-inline{height:40px !important;padding:0 12px !important}
  body.shop-body .shop-balance-label{display:none !important}
  body.shop-body .shop-balance-value{font-size:15px !important}

  /* категории — одной прокручиваемой строкой */
  body.shop-body .shop-category-rail{
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
    -webkit-overflow-scrolling:touch !important;
    padding-bottom:2px !important;
  }
  body.shop-body .shop-category-rail::-webkit-scrollbar{display:none}
  body.shop-body .shop-category-btn{flex:0 0 auto !important;height:34px !important;font-size:13px !important}


  /* сбрасываем раскладку из блока 820px, кнопка остаётся в строке */
  html body.shop-body .shop-page .shop-case-widget{
    grid-template-areas:none !important;
    row-gap:12px !important;
  }
  html body.shop-body .shop-page .shop-case-art,
  html body.shop-body .shop-page .shop-case-copy,
  html body.shop-body .shop-page .shop-case-action{grid-area:auto !important}
  /* баланс по содержимому, а не на пол-экрана */
  body.shop-body .shop-balance-inline{width:auto !important;min-width:0 !important;justify-content:center !important}
  body.shop-body .shop-catalog-panel{padding:14px !important;border-radius:16px !important}
  body.shop-body .shop-catalog-heading{margin-bottom:14px !important}
  body.shop-body .shop-catalog-heading h2{font-size:20px !important}
}

html body.shop-body .shop-case-open-btn:disabled{
  background:rgba(255,255,255,.06) !important;
  color:var(--s-dim) !important;
  cursor:default !important;
}

/* ---------- примерка: помещается без прокрутки ---------- */
html body.shop-body .shop-try-dialog{
  padding:20px !important;
  scrollbar-width:none !important;
}
html body.shop-body .shop-try-dialog::-webkit-scrollbar{width:0 !important;height:0 !important;display:none !important}
html body.shop-body .shop-try-head{margin-bottom:14px !important}
html body.shop-body .shop-try-head h2{font-size:20px !important;margin:2px 0 4px !important}
html body.shop-body .shop-try-head p,
html body.shop-body .shop-try-subtitle{font-size:13px !important;margin:0 !important}
html body.shop-body .shop-try-content{gap:14px !important}
html body.shop-body .shop-try-profile-card,
html body.shop-body .shop-try-info-card{padding:14px !important}
html body.shop-body .shop-try-avatar{
  width:112px !important;height:112px !important;
  min-width:112px !important;min-height:112px !important;
  flex:0 0 112px !important;
}
html body.shop-body .shop-try-profile-main{gap:14px !important;margin-bottom:12px !important}
html body.shop-body .shop-try-nick{font-size:26px !important;margin:0 !important}
html body.shop-body .shop-try-status{margin-bottom:10px !important}
html body.shop-body .shop-try-swipe-preview{padding:12px 14px !important}
html body.shop-body .shop-try-actions{margin-top:14px !important}
html body.shop-body .shop-try-info-card h3,
html body.shop-body #shop-try-item-name{font-size:18px !important;margin:4px 0 6px !important}



/* =========================================================
   Примерка: помещается в любое окно, без прокрутки
   ========================================================= */
@media (min-width:641px){
html body.shop-body .shop-try-profile-card{
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}
html body.shop-body .shop-try-profile-card::before{display:none !important}
/* демо-блок «в карточке поиска» съедал высоту — он не нужен */
html body.shop-body .shop-try-swipe-preview,
html body.shop-body .shop-try-live-demo,
html body.shop-body #shop-try-live-demo,
html body.shop-body .shop-try-live-title{display:none !important}
html body.shop-body .shop-try-avatar{
  width:96px !important;height:96px !important;
  min-width:96px !important;min-height:96px !important;
  flex:0 0 96px !important;
}
html body.shop-body .shop-try-nick{font-size:23px !important}
html body.shop-body .shop-try-profile-main{margin-bottom:0 !important}
html body.shop-body .shop-try-dialog{padding:18px !important}
html body.shop-body .shop-try-content{align-items:start !important}
/* низкие окна — ещё компактнее */
}
@media (min-width:641px) and (max-height:760px){
  html body.shop-body .shop-try-modal{padding:66px 14px 74px !important}
  html body.shop-body .shop-try-avatar{
    width:80px !important;height:80px !important;
    min-width:80px !important;min-height:80px !important;flex:0 0 80px !important;
  }
  html body.shop-body .shop-try-head h2{font-size:18px !important}
  html body.shop-body .shop-try-head p,
  html body.shop-body .shop-try-subtitle{display:none !important}
  html body.shop-body .shop-try-profile-card,
  html body.shop-body .shop-try-info-card{padding:12px !important}
}

/* блок «в карточке поиска» не нужен нигде */
html body.shop-body .shop-try-swipe-preview,
html body.shop-body .shop-try-live-demo,
html body.shop-body #shop-try-live-demo,
html body.shop-body .shop-try-live-title{display:none !important}

/* телефон: карточки внутри примерки не должны сжиматься меньше содержимого */
@media (max-width:640px){
  html body.shop-body .shop-try-content > *{
    align-self:start !important;
    min-height:0 !important;
  }
  html body.shop-body .shop-try-profile-card{
    display:flex !important;
    flex-direction:column !important;
    height:auto !important;
    min-height:fit-content !important;
    flex:0 0 auto !important;
    overflow:visible !important;
  }
  html body.shop-body .shop-try-info-card{
    height:auto !important;
    min-height:fit-content !important;
    flex:0 0 auto !important;
  }
  html body.shop-body .shop-try-profile-main{
    margin-top:12px !important;
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    padding:0 !important;
  }
  html body.shop-body .shop-try-avatar{
    width:88px !important;height:88px !important;
    min-width:88px !important;min-height:88px !important;
    flex:0 0 88px !important;
  }
  html body.shop-body .shop-try-identity{min-width:0 !important;flex:1 1 auto !important}
  html body.shop-body .shop-try-nick{font-size:20px !important;line-height:1.2 !important}
}

/* телефон: содержимое примерки — строго колонка, без наложений */
@media (max-width:640px){
  html body.shop-body .shop-try-content{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:10px !important;
    grid-template-columns:none !important;
    grid-template-rows:none !important;
    grid-template-areas:none !important;
    overflow-y:auto !important;
    scrollbar-width:none !important;
  }
  html body.shop-body .shop-try-content::-webkit-scrollbar{width:0 !important;display:none !important}
  html body.shop-body .shop-try-content > *{
    grid-area:auto !important;
    grid-column:auto !important;
    grid-row:auto !important;
    position:static !important;
    width:100% !important;
  }
  html body.shop-body .shop-try-info{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    width:100% !important;
  }
}

/* телефон: плотнее, чтобы помещалось без прокрутки */
@media (max-width:640px){
  html body.shop-body .shop-try-status{display:none !important}
  html body.shop-body .shop-try-profile-card{padding:12px !important}
  html body.shop-body .shop-try-profile-main{margin-top:0 !important;gap:11px !important}
  html body.shop-body .shop-try-avatar{
    width:70px !important;height:70px !important;
    min-width:70px !important;min-height:70px !important;
    flex:0 0 70px !important;
  }
  html body.shop-body .shop-try-nick{font-size:18px !important}
  html body.shop-body #shop-try-meta{font-size:12.5px !important;margin:3px 0 6px !important}
  html body.shop-body .shop-try-chips{gap:6px !important}
  html body.shop-body .shop-try-chips > *{font-size:11.5px !important;padding:4px 10px !important}
  html body.shop-body .shop-try-info-card{padding:12px !important}
  html body.shop-body #shop-try-item-name{font-size:15.5px !important;margin:3px 0 5px !important}
  html body.shop-body .shop-try-info-card p{font-size:12.5px !important;margin-bottom:8px !important}
  html body.shop-body .shop-try-head{padding-bottom:8px !important}
  html body.shop-body .shop-try-head h2{font-size:17px !important}
}
