/* =====================================================================
   CS2RENT — мобильная версия. Файл подключается только на экранах до 860px
   (<link media="(max-width: 860px)">), поэтому версия для ПК его не видит.
   Общие правила + .pg-home (главная) + .pg-profile (профиль).
   ===================================================================== */
:root{
  --mtop: 56px;                                   /* высота шапки */
  --mnav: 62px;                                   /* высота нижней панели */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --mnav-full: calc(var(--mnav) + var(--safe-b));
}
html{ -webkit-tap-highlight-color:transparent; -webkit-text-size-adjust:100%; }
html.m-lock, html.m-lock body{ overflow:hidden; }
body{ padding-bottom:var(--mnav-full); }
/* iOS увеличивает страницу, если шрифт поля меньше 16px */
input, select, textarea{ font-size:16px !important; }

/* ---------- Нижняя панель ---------- */
.mnav{
  display:flex; position:fixed; left:0; right:0; bottom:0; z-index:95;
  height:var(--mnav-full); padding:0 4px var(--safe-b);
  background:rgba(21,22,26,.94); backdrop-filter:blur(16px) saturate(1.4); -webkit-backdrop-filter:blur(16px) saturate(1.4);
  border-top:1px solid #2a2d33; box-shadow:0 -8px 24px #0006;
}
.mnav-i{
  flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  color:#848a93; font:600 10.5px/1 'Inter',system-ui,sans-serif; letter-spacing:.1px;
  background:none; border:0; padding:6px 0 0; position:relative; cursor:pointer; text-decoration:none;
  transition:color .15s;
}
.mnav-i svg{ width:23px; height:23px; transition:transform .2s cubic-bezier(.2,.9,.3,1.3); }
.mnav-i:active svg{ transform:scale(.86); }
.mnav-i.on{ color:#ff8a33; }
.mnav-i.on::before{
  content:''; position:absolute; top:0; left:50%; width:28px; height:3px; margin-left:-14px;
  border-radius:0 0 3px 3px; background:#ff7a1a; box-shadow:0 0 12px #ff7a1a;
}
.mnav-ava{ width:24px; height:24px; border-radius:50%; background:#2b2e34 center/cover; border:1.5px solid #3a3e46; }
.mnav-i.on .mnav-ava{ border-color:#ff7a1a; }
.mnav-b{
  position:absolute; top:4px; left:calc(50% + 6px); min-width:17px; height:17px; padding:0 4px; border-radius:9px;
  background:#ff7a1a; color:#1a0e04; font:800 10.5px/17px 'Inter',sans-serif; text-align:center; display:none;
  box-shadow:0 0 0 2px #15161a;
}
.mnav-b.show{ display:block; }
.mnav.m-maint [data-k="cart"], .mnav.m-maint [data-k="chat"]{ display:none; }

/* ---------- Окна снизу (шторки) ---------- */
@keyframes m-up{ from{ transform:translateY(100%); } to{ transform:none; } }
@keyframes m-fade{ from{ opacity:0; } to{ opacity:1; } }
.modal-overlay{ align-items:flex-end !important; padding:0 !important; animation:m-fade .2s ease both; }
.modal-overlay .modal-box{
  width:100% !important; max-width:none !important; max-height:calc(100vh - 28px) !important; max-height:calc(100dvh - 28px) !important;
  border-radius:22px 22px 0 0 !important; border-left:0; border-right:0; border-bottom:0 !important;
  padding:26px 16px calc(16px + var(--safe-b)) !important; position:relative;
  animation:m-up .32s cubic-bezier(.2,.9,.25,1) both; overscroll-behavior:contain;
  box-shadow:0 -20px 50px #000a;
}
.modal-overlay .modal-box::before{
  content:''; position:absolute; top:9px; left:50%; width:42px; height:5px; margin-left:-21px; border-radius:3px; background:#3c4048;
}
.modal-overlay .modal-box.m-drag{ transition:none; animation:none; }
.modal-overlay .modal-box h3{ font-size:16px; margin-bottom:12px; padding-right:4px; }
.modal-overlay .modal-actions{
  position:sticky; bottom:calc(-16px - var(--safe-b)); z-index:3;
  margin:16px -16px calc(-16px - var(--safe-b)); padding:12px 16px calc(12px + var(--safe-b));
  background:linear-gradient(180deg,#1c1e22f0,#1c1e22 35%); border-top:1px solid #2c2f35;
}
.modal-overlay .modal-actions .btn{ padding:14px 10px; font-size:14.5px; border-radius:12px; }
.modal-overlay .modal-box > .btn{ width:100%; padding:14px; }

/* оформленные окна (ui.js) тоже снизу */
.ui-ov{ align-items:flex-end !important; padding:0 !important; }
.ui-dlg{
  width:100% !important; border-radius:22px 22px 0 0 !important; border-bottom:0 !important;
  padding:24px 18px calc(18px + var(--safe-b)) !important; animation:m-up .3s cubic-bezier(.2,.9,.25,1) both !important;
}
.ui-dlg::before{ height:5px !important; width:42px !important; top:9px !important; left:50% !important; margin-left:-21px; border-radius:3px; background:#3c4048 !important; }
.ui-dact{ flex-direction:column-reverse; }
.ui-btn{ padding:14px 16px !important; font-size:15px !important; border-radius:13px !important; }
html .ui-toasts{ top:auto !important; bottom:calc(var(--mnav-full) + 10px) !important; left:12px !important; right:12px !important; width:auto !important; transform:none !important; }

/* колокольчик: список под шапкой на всю ширину */
html #bellDropdown{
  position:fixed !important; top:calc(var(--mtop) + 6px) !important; left:10px !important; right:10px !important;
  width:auto !important; max-width:none !important; max-height:calc(100vh - var(--mtop) - var(--mnav-full) - 20px) !important; max-height:calc(100dvh - var(--mtop) - var(--mnav-full) - 20px) !important;
  border-radius:16px; box-shadow:0 24px 60px #000c;
}

/* чат поддержки: на весь экран, кнопка чата — в нижней панели */
.cw-fab{ display:none !important; }
.cw-panel{
  position:fixed !important; top:0 !important; right:0 !important; bottom:0 !important; left:0 !important; inset:0 !important; width:auto !important; height:100vh !important; height:100dvh !important; max-width:none !important;
  max-height:none !important; border-radius:0 !important; border:0 !important; z-index:130 !important;
}
.cw-panel.open{ animation:m-up .3s cubic-bezier(.2,.9,.25,1) both; }
.cw-head{ padding:12px 14px !important; padding-top:max(12px, env(safe-area-inset-top)) !important; }
.cw-x{ font-size:28px !important; width:40px; height:40px; }
.cw-form{ padding-bottom:calc(10px + var(--safe-b)) !important; }
.cw-form button{ min-width:52px; }
.cw-opt{ padding:12px 14px !important; }

/* плашка cookie — над нижней панелью */
.consent-bar{ bottom:var(--mnav-full) !important; padding:10px 14px !important; gap:10px !important; border-radius:16px 16px 0 0; }
.consent-bar p{ font-size:11.5px !important; min-width:0 !important; line-height:1.45; }
.consent-bar .btn{ width:100%; padding:11px !important; }

/* ===================== ГЛАВНАЯ ===================== */
.pg-home .topbar{
  height:var(--mtop) !important; min-height:var(--mtop) !important; padding:0 12px !important; gap:8px !important;
  flex-wrap:nowrap !important; background:rgba(23,24,27,.92) !important; backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
}
.pg-home .logo-wide{ display:none !important; }
.pg-home .logo-badge{ display:block !important; height:34px !important; width:34px !important; }
.pg-home .primary-nav, .pg-home .menu-toggle, .pg-home .mobile-nav, .pg-home #cartBtn, .pg-home #avatar, .pg-home #adminLink{ display:none !important; }
.pg-home .topbar-right{ gap:8px !important; }
.pg-home .balance-pill{ padding:4px 4px 4px 11px !important; gap:7px !important; font-size:13.5px !important; }
.pg-home .balance-item svg{ display:none; }
.pg-home .topup-btn{ width:28px !important; height:28px !important; }
.pg-home .icon-btn{ width:36px !important; height:36px !important; }
.pg-home #loginBtn{ padding:9px 13px !important; font-size:13px !important; border-radius:10px; }

.pg-home main{ padding:10px 14px 26px !important; }
.pg-home .banner{ margin:2px 0 0; border-radius:16px; }
.pg-home .hero{ display:block !important; padding:16px 2px 20px !important; margin-bottom:16px !important; }
.pg-home .hero-visual{ display:none !important; }
.pg-home .hero .hero-badge{ margin-bottom:12px !important; font-size:11px; }
.pg-home .hero h1{ font-size:25px !important; line-height:1.18; max-width:none; }
.pg-home .hero p{ font-size:14px; margin-top:10px; line-height:1.55; }
.pg-home .hero-actions{ margin-top:16px; gap:8px; flex-wrap:nowrap; }
.pg-home .hero-actions .btn{ flex:1; padding:13px 8px; font-size:13.5px; border-radius:12px; white-space:nowrap; }
.pg-home .hero-stats{ margin-top:16px; gap:8px; flex-wrap:nowrap; }
.pg-home .hero-stats div{ flex:1; min-width:0; background:var(--bg-panel); border:1px solid var(--border); border-radius:12px; padding:10px; }
.pg-home .hero-stats div b{ font-size:15px !important; }
.pg-home .hero-stats div span{ display:block; font-size:10.5px; line-height:1.3; margin-top:2px; }

/* каталог */
.pg-home .section-head{ margin-bottom:12px; gap:10px; }
.pg-home .section-head h2{ font-size:18px; }
.pg-home .search-wrap{ flex:1 1 100%; min-width:0; max-width:none; padding:11px 13px; border-radius:12px; }
.pg-home .filter-chips{
  flex-wrap:nowrap; overflow-x:auto; margin:0 -14px 14px; padding:0 14px 2px; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.pg-home .filter-chips::-webkit-scrollbar{ display:none; }
.pg-home .chip{ flex:0 0 auto; padding:9px 15px; }
.pg-home .catalog{ grid-template-columns:repeat(2, minmax(0, 1fr)) !important; gap:10px; margin-bottom:26px; }
.pg-home .item-card{ position:relative; border-radius:14px; }
.pg-home .item-card:hover{ transform:none; }
.pg-home .item-thumb{ aspect-ratio:4/3; }
.pg-home .item-thumb img{ width:84%; height:84%; }
.pg-home .item-tag{ top:7px; left:7px; font-size:9px; padding:3px 6px; }
.pg-home .view3d-btn{ top:auto; bottom:9px; right:7px; }
.pg-home .item-body{ padding:9px 10px 10px; gap:6px; }
.pg-home .item-name{ font-size:13px; }
.pg-home .item-skin{ font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pg-home .wear-row{ gap:6px; }
.pg-home .wear-label{ font-size:9.5px; }
.pg-home .market-row{ font-size:10.5px; gap:4px; margin-top:0; white-space:nowrap; overflow:hidden; }
.pg-home .market-row svg{ display:none; }
.pg-home .price b{ font-size:14px; }
.pg-home .price span{ font-size:10px; }
.pg-home .price-row{ gap:8px; padding-top:2px; }
/* «＋ в корзину» — круглая кнопка в углу картинки */
.pg-home .card-actions .cart-add{
  position:absolute; top:7px; right:7px; z-index:3; width:34px; height:34px; border-radius:50%;
  background:rgba(0,0,0,.62); border:1px solid #ffffff26; color:#fff; font-size:17px; line-height:1;
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.pg-home .card-actions .cart-add:hover{ transform:none; }
.pg-home .card-actions .cart-add.in{ background:#ff7a1a; border-color:#ff7a1a; color:#1a0e04; }
.pg-home .rent-btn{ padding:11px 6px; font-size:13px; border-radius:11px; box-shadow:0 4px 12px #ff7a1a33, inset 0 1px 0 #ffffff55; }
.pg-home .rent-btn:hover, .pg-home .item-card:hover .rent-btn{ transform:none; box-shadow:0 4px 12px #ff7a1a33, inset 0 1px 0 #ffffff55; }
.pg-home .rent-btn.busy-btn{ font-size:12px; box-shadow:none; }
.pg-home .busy-line{ font-size:10.5px; }
.pg-home .request-bar{ flex-direction:column; align-items:stretch; text-align:center; gap:10px; padding:14px; }
.pg-home .request-bar .btn{ padding:12px !important; }

/* как это работает — карточки листаются вбок */
.pg-home .steps{
  display:grid; grid-template-columns:none !important; grid-auto-flow:column; grid-auto-columns:78%;
  overflow-x:auto; scroll-snap-type:x mandatory; gap:10px; margin:0 -14px; padding:0 14px 6px; scrollbar-width:none;
}
.pg-home .steps::-webkit-scrollbar{ display:none; }
.pg-home .step-card{ scroll-snap-align:start; padding:16px; }
.pg-home .trust-strip{ flex-direction:column; align-items:stretch; gap:14px; padding:16px; margin-top:20px; }
.pg-home .trust-item{ min-width:0; }
.pg-home .about{ margin-top:26px; font-size:13.5px; }
.pg-home .banner-wall{ margin:24px 0 6px; }
.pg-home .support-box{ flex-direction:row !important; align-items:center !important; gap:14px; padding:16px; }
.pg-home .support-logo{ width:56px !important; height:56px !important; }
.pg-home .support-text p{ font-size:13.5px; }
.pg-home footer{ padding:22px 16px 26px; flex-direction:column; align-items:flex-start; font-size:11.5px; }
.pg-home footer .foot-links{ gap:10px 16px; }
.pg-home footer .foot-links a{ padding:4px 0; }

/* окно аренды в шторке */
.pg-home .rent-hero{ aspect-ratio:auto; height:150px; margin-bottom:12px; border-radius:14px; }
.pg-home .rent-meta{ gap:6px; }
.pg-home .days-picker{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.pg-home .day-btn{ min-width:0; padding:11px 0; border-radius:10px; font-size:14px; }
.pg-home .mode-picker{ grid-template-columns:1fr !important; gap:8px; }
.pg-home .mode-btn{ padding:12px 14px; border-radius:12px; }
.pg-home .mode-warn label{ font-size:12.5px; }
.pg-home .rent-total{ margin-top:14px; }
.pg-home .window-note{ font-size:12px; }
.pg-home #topupQuick{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.pg-home #topupQuick .day-btn{ padding:12px 0; }
.pg-home .promo-row .btn{ padding:10px 14px; }
.pg-home .cart-row{ padding:10px; }

/* ===================== ПРОФИЛЬ ===================== */
.pg-profile .topbar{ height:var(--mtop); padding:0 12px; gap:8px; background:rgba(26,28,32,.92); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.pg-profile .logo .wide{ display:none; }
.pg-profile .logo .badge{ display:block; height:34px; }
.pg-profile .topnav, .pg-profile #topAvatar{ display:none !important; }
.pg-profile .pill{ padding:4px 4px 4px 11px; font-size:13.5px; }
.pg-profile .pill button{ width:28px; height:28px; }
.pg-profile .icon-btn{ width:36px; height:36px; }
.pg-profile main{ padding:12px 12px 24px; }
.pg-profile .banner{ font-size:13px; padding:10px 12px; margin-bottom:12px; }
.pg-profile .hero{ grid-template-columns:auto 1fr; gap:12px; padding:14px; border-radius:18px; }
.pg-profile .hero .big-ava{ width:54px; height:54px; }
.pg-profile .hero h1{ font-size:17px; margin-bottom:2px; }
.pg-profile .hero .meta{ font-size:12px; gap:2px 10px; }
.pg-profile .balance-box{
  grid-column:1 / -1; text-align:left; border-top:1px solid var(--border); padding-top:12px;
  display:grid; grid-template-columns:1fr; gap:0;
}
.pg-profile .balance-box .val{ font-size:26px; margin:2px 0 12px; }
.pg-profile .balance-box .acts{ display:grid; grid-template-columns:1fr 1fr; gap:8px; justify-content:stretch; }
.pg-profile .balance-box .acts .btn{ padding:13px 8px; border-radius:12px; font-size:14px; }
.pg-profile .balance-box .acts a[href="/#catalog"]{ display:none; }
.pg-profile .balance-box .acts .faint{ grid-column:1 / -1; }
.pg-profile .stats{ grid-template-columns:repeat(2, 1fr); gap:8px; margin:10px 0 12px; }
.pg-profile .stat{ padding:11px 12px; border-radius:12px; }
.pg-profile .stat b{ font-size:16px; }
.pg-profile .stat span{ font-size:11.5px; line-height:1.35; display:block; }
.pg-profile .tabs{
  position:sticky; top:var(--mtop); z-index:15; margin:0 -12px 14px; padding:0 6px;
  background:rgba(22,23,26,.95); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); scrollbar-width:none;
}
.pg-profile .tabs::-webkit-scrollbar{ display:none; }
/* справа ещё есть вкладки — край затухает, чтобы было видно, что ряд листается */
.pg-profile .tabs.m-more{ -webkit-mask-image:linear-gradient(90deg,#000 82%,transparent); mask-image:linear-gradient(90deg,#000 82%,transparent); }
.pg-profile .tab{ padding:13px 10px; font-size:13.5px; }
.pg-profile .rent-card{ grid-template-columns:68px 1fr; gap:12px; padding:12px; border-radius:14px; }
.pg-profile .thumb{ width:68px; height:52px; }
.pg-profile .rc-title{ font-size:14px; }
.pg-profile .rc-meta, .pg-profile .rc-time{ font-size:12.5px; }
.pg-profile .rc-side{ grid-column:1 / -1; flex-direction:row; justify-content:space-between; align-items:center; }
.pg-profile .rc-side .btn{ padding:10px 14px; border-radius:10px; }
.pg-profile .card{ padding:15px; border-radius:14px; }
.pg-profile .grid2{ grid-template-columns:1fr; gap:12px; }
.pg-profile .earn{ grid-template-columns:repeat(3, 1fr); gap:6px; }
.pg-profile .earn div{ padding:9px 10px; }
.pg-profile .earn b{ font-size:15px; }
.pg-profile .btn{ padding:12px 14px; border-radius:11px; }
.pg-profile .empty{ padding:26px 16px; }
/* таблицы → карточки (подписи колонок подставляет mobile.js) */
.pg-profile .table-wrap{ background:none; border:0; border-radius:0; overflow:visible; }
.pg-profile .table-wrap table, .pg-profile .table-wrap tbody, .pg-profile .table-wrap tr, .pg-profile .table-wrap td{ display:block; width:100%; }
.pg-profile .table-wrap thead{ display:none; }
.pg-profile .table-wrap tr{ background:var(--bg-panel); border:1px solid var(--border); border-radius:12px; padding:10px 12px; margin-bottom:8px; }
.pg-profile .card .table-wrap tr{ background:var(--bg-elevated); }
.pg-profile .table-wrap td{ border:0; padding:4px 0; display:flex; justify-content:space-between; align-items:baseline; gap:12px; text-align:right; font-size:13.5px; }
.pg-profile .table-wrap td::before{ content:attr(data-label); color:var(--text-faint); font-size:12px; text-align:left; flex-shrink:0; }
.pg-profile .table-wrap td:first-child{ display:block; text-align:left; font-size:14px; padding-bottom:6px; margin-bottom:4px; border-bottom:1px solid #2a2d33; }
.pg-profile .table-wrap td:first-child::before{ display:none; }
.pg-profile .table-wrap td .faint{ display:block; }
.pg-profile .sub-item .top{ flex-wrap:wrap; }

/* меньше движения — если так настроен телефон */
@media (prefers-reduced-motion:reduce){
  .modal-overlay .modal-box, .ui-dlg{ animation:none !important; }
}
