:root {
  --font-size-checkout: .875rem;
  --font-size-cart-title: 1.75rem;
  --font-size-cart-item: 1.125rem;
  --font-size-cart-qty: 1.5rem;
}
.checkout-page #view {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 8px;
  width: 100%;
  height: auto;
  padding: 10px;
  background: #8f8f8f;
  border: 3px outset #bcbcbc;
}
.checkout-page #view > * { position: static; transform: none; }
.checkout-page .page-heading { width: auto; font-size: 1.0625rem; text-align: center; }
.checkout-page .btn-back { position: relative !important; left: auto; top: auto; width: 85px; height: 44px; font-size: .9375rem; }
.checkout-page .btn-back .t { --bl: 29px; }
.checkout-page .checkout-scroll { grid-column: 1 / -1; width: auto; height: auto; overflow: visible; }
.checkout-page .checkout, .checkout-page .checkout-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  gap: 18px;
}
.checkout-page .group { padding: 8px 10px 12px; }
.checkout-page .group > legend { font-size: .9375rem; padding: 0 5px; }
.checkout-page .g-buyer { display: flex; flex-direction: column; gap: 4px; }
.checkout-page .field { padding-bottom: 6px; gap: 5px; }
.checkout-page .field-error {
  position: static;
  align-self: flex-start;
  padding: 2px 4px;
  white-space: normal;
  font-size: .5rem;
  line-height: 1.4;
}
.checkout-page .inp, .checkout-page .phone-country { min-height: 44px; height: auto; font-size: 1rem; }
.checkout-page .phone-country { padding: 0 6px; gap: 5px; }
.checkout-page .phone-code { min-width: 0; }
.checkout-page .phone-arrow { width: 20px; height: 20px; }
.checkout-page .flag { width: 22px; height: 16px; }
.checkout-page .dropdown { top: 100%; width: 100%; max-height: 40dvh; }
.checkout-page :is(.phone-option, .dropdown-option) { min-height: 44px; height: auto; padding: 8px; font-size: .875rem; }
.checkout-page .dlv-head { margin: 10px 0; }
.checkout-page :is(.dlv-head .choice, .pvz-addr, .pvz-empty) { font-size: .875rem; }
.checkout-page .map-frame { height: min(300px, 46dvh); }
.checkout-page .choice { gap: 8px; min-height: 44px; }
.checkout-page .box { width: 27px; height: 27px; }
.checkout-page .total-sum { font-size: 1.375rem; }
.checkout-page .co-submit { width: 200px; height: 64px; }
.checkout-page .co-submit .t { top: 12px; line-height: 20px; }
.checkout-page .nav { grid-column: 1 / -1; justify-content: center; flex-wrap: wrap; gap: 4px 12px; font-size: .875rem; }
.checkout-page .nav a { display: inline-flex; align-items: center; min-height: 44px; }
.checkout-page .msgbox { width: min(96vw, 430px); transform: translate(-50%, -50%); font-size: .875rem; padding: 12px; }
.checkout-page .msgbox-title, .checkout-page .msgbox-ok { font-size: 1rem; }
/* Из исходного холста 360 × 800: проём x=20…350, y=8…99,
   панель начинается на y=108. Шапка и стена используют одну ширину. */
html { overflow: auto; }
#page {
  position: relative; inset: auto; min-height: 100dvh; overflow: hidden;
  background: #011f0f url("../assets/bg/wall-mobile.png") center top / 100% auto repeat-y;
}
#bg {
  width: 100%; height: auto; aspect-ratio: 360 / 800;
  transform: none !important;
}
.bg-wall { width: 100%; height: auto; }
.bg-stars { left: 3%; top: 0; width: 95%; height: 13%; object-fit: cover; }
#wall-reflections, .panel, .torch { display: none; }
#stage {
  position: relative; width: 100%; height: auto; padding: 30% 7.8% 6%;
  transform: none !important;
}
.logo { left: 15%; top: 10.8vw; width: 70%; height: auto; }
.logo img { height: auto; }
.catalog-tabs {
  display: flex; align-items: center; gap: 3.2vw; padding: 2.4vw 4.3vw;
  background: #8f8f8f; border: 2px outset #bcbcbc; border-bottom: 0;
}
.catalog-tabs > a, .catalog-tabs .cart-button {
  position: static; display: inline-grid; place-items: center; width: auto; height: auto;
  min-height: 32px; padding: .36em .55em;
  font: normal .8125rem Arial, sans-serif;
  background: #8f8f8f; border: 2px outset #bbb;
}
.catalog-tabs > a:active, .catalog-tabs .cart-button:active, .catalog-tabs .cart-button.key-pressed {
  background: #8f8f8f; border-style: inset;
}
.cart-label { display: inline; }
.cart-button .cart-badge { display: none; }
#view, .checkout-page #view {
  position: relative; width: 100%; height: auto; min-height: 35vh;
  padding: .7vw 4.3vw 4vw; background: #8f8f8f;
  border: 2px outset #bcbcbc; border-top: 0;
}
#view[data-view="home"] {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3vw 4vw;
}
#view[data-view="home"] > .slot {
  position: relative; inset: auto !important; width: 100%; height: auto;
  aspect-ratio: 309 / 520; background-size: 100% 75%;
}
.slot-title { top: 2%; left: 3%; width: 94%; font-size: .75rem; }
.slot-photo { left: 5.5%; top: 15.8%; width: 88.7%; height: auto; aspect-ratio: 1; }
.price-tag { left: -9%; top: 49%; width: 46%; height: auto; }
.slot-buy { left: 14%; top: 81%; width: 72%; height: 17%; font-size: .875rem; }
.slot-buy .t, .product-buy .t, .btn-back .t { top: 50%; transform: translateY(-50%); }
#view .banner { position: static; width: 100%; height: auto; grid-column: 1/-1; }
#view .nav { position: static; transform: none; grid-column: 1/-1; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: .875rem; }
#view:not([data-view="home"]):not([data-view="checkout"]) { display: grid; gap: 12px; }
#view:not([data-view="home"]):not([data-view="checkout"]) > * { position: relative; inset: auto; transform: none; }
#view .btn-back, #view .product-buy { width: 100px; height: 44px; font-size: .9375rem; }
.product-card { width: min(100%, 350px); height: auto; aspect-ratio: 533/671; margin: auto; }
.product-card-title { left: 2%; top: 2%; width: 96%; font-size: .9375rem; }
.product-photo { left: 5.4%; top: 21%; width: 89%; height: auto; aspect-ratio: 1; }
.details { display: none; }
.details-list { white-space: normal; font-size: .9375rem; line-height: 1.4; }
.page-heading { font-size: 1.0625rem; white-space: normal; }
.scrollbox { width: 100%; height: auto; max-height: 65dvh; padding: 10px; }
.page-text, .page-text h2 { font-size: .9375rem; }
.channel .qr { width: 100%; height: auto; aspect-ratio: 1; }
.doc-tabs { flex-wrap: wrap; }
.doc-tab { font-size: .875rem; }
