@font-face {
  font-family: "Magnit Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./public/assets/fonts/MagnitSans-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Magnit Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./public/assets/fonts/MagnitSans-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Magnit Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./public/assets/fonts/MagnitSans-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Magnit Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./public/assets/fonts/MagnitSans-ExtraBold.woff2") format("woff2");
}

:root {
  --bottom-sheet-height: 240px;
  color: #3b3a3a;
  background: #e9e9e8;
  font-family: "Magnit Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e9e9e8;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 360px;
  height: 800px;
  overflow: hidden;
  border-radius: 28px;
  background: #f5f5f4;
  color: #3b3a3a;
  isolation: isolate;
}

.top-navigation {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 76px;
  background: #fff;
}

.status-bar {
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px 4px;
  line-height: 0;
}

.status-time {
  font-family: Roboto, "Magnit Sans", Arial, sans-serif;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.14px;
}

.status-indicators {
  display: flex;
  height: 17px;
  align-items: flex-start;
  gap: 0;
}

.status-icon {
  display: block;
  flex: 0 0 auto;
  height: 17px;
}

.status-icon--wifi,
.status-icon--signal {
  width: 17px;
}

.status-icon--battery {
  width: 8px;
  height: 15px;
  margin-top: 1px;
  margin-left: 5px;
}

.top-bar {
  display: grid;
  width: 100%;
  height: 44px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
}

.top-bar h1 {
  overflow: hidden;
  margin: 0;
  color: #3b3a3a;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar__side {
  height: 44px;
}

.top-bar__side--left {
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 4px;
}

.payment-snackbar {
  display: flex;
  position: absolute;
  top: 48px;
  left: 50%;
  z-index: 7;
  width: 328px;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  transform: translate(-50%, -8px);
  border-radius: 12px;
  background: #4b4a49;
  box-shadow: 0 6px 10px rgba(56, 56, 56, 0.2);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.payment-snackbar[hidden] {
  display: none;
}

.payment-snackbar--visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.payment-snackbar__icon {
  display: block;
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.payment-snackbar__icon-background,
.payment-snackbar__icon-mark {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
}

.payment-snackbar__icon-background {
  width: 19.232px;
  height: 19px;
}

.payment-snackbar__icon-mark {
  width: 2.2px;
  height: 10.5px;
}

.payment-snackbar__content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.payment-snackbar__title,
.payment-snackbar__subtitle {
  width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-snackbar__title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
}

.payment-snackbar__subtitle {
  color: #bbbab9;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
}

.icon-button,
.info-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.back-button {
  width: 24px;
  height: 24px;
}

.back-button img {
  display: block;
  width: 24px;
  height: 24px;
}

.sections-scroll {
  position: absolute;
  inset: 76px 0 0;
  overflow: hidden auto;
  padding-bottom: var(--bottom-sheet-height);
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sections-scroll::-webkit-scrollbar {
  display: none;
}

.category-section {
  width: 100%;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
}

.category-section[hidden] {
  display: none;
}

.category-section--main {
  border-radius: 0 0 28px 28px;
}

.section-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.section-title {
  display: flex;
  width: 100%;
  height: 24px;
  min-height: 24px;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3b3a3a;
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
}

.section-title img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.zaryad-logo {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.category-list {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: grid;
  width: 100%;
  height: 44px;
  min-height: 44px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  transition: height 300ms cubic-bezier(0.22, 1, 0.36, 1),
    min-height 300ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
}

.category-row--gift-entering,
.category-row--gift-exiting {
  height: 0;
  min-height: 0;
  margin-top: -12px;
  opacity: 0;
  overflow: hidden;
}

.category-image {
  display: block;
  width: 44px;
  height: 44px;
  background: #f5f5f4;
  border-radius: 12px;
  object-fit: cover;
}

.category-image-swap {
  display: block;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f4;
}

.category-image-swap .category-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 260ms ease;
}

.category-image-swap .category-image-swap__image--active {
  opacity: 1;
}

.category-text {
  display: flex;
  min-width: 0;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
}

.category-text > span,
.category-text > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-text > small {
  color: #747372;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
}

.category-text--swap {
  display: block;
  position: relative;
}

.category-text > .category-text__state {
  display: flex;
}

.category-text__state {
  display: flex;
  position: absolute;
  inset: 0;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 240ms ease;
}

.category-text__state--active {
  opacity: 1;
}

.category-text__state > span,
.category-text__state > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-text__state > small {
  color: #747372;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
}

.category-text__state--premium .category-premium-logo {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.category-text__state--premium.category-text__state--active .category-premium-logo {
  opacity: 1;
  transform: translateX(0);
}

.category-text--premium-subscription {
  gap: 4px;
}

.category-premium-logo {
  display: block;
  width: 58px;
  height: 16px;
  object-fit: contain;
  object-position: left center;
}

.category-text--premium-gift {
  gap: 4px;
}

.category-text .category-badge {
  display: inline-flex;
  width: fit-content;
  height: 16px;
  align-items: center;
  padding: 1px 6px;
  overflow: visible;
  border-radius: 100px;
  background: linear-gradient(171deg, #373633 20%, #4d4c49 100%);
  color: #ffd69e;
  font-size: 11px;
  font-weight: 500;
  line-height: 12px;
  text-overflow: clip;
  white-space: nowrap;
}

.category-value {
  display: flex;
  min-width: 48px;
  height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: right;
  white-space: nowrap;
}

.category-value--with-old {
  gap: 0;
}

.category-old {
  display: inline-block;
  max-width: 36px;
  margin-right: 2px;
  overflow: hidden;
  color: #747372;
  font-size: 12px;
  line-height: 14px;
  text-decoration: line-through;
  text-align: right;
  white-space: nowrap;
  transition: max-width 240ms ease, margin-right 240ms ease, opacity 240ms ease, transform 240ms ease;
}

.category-value__old[hidden] {
  display: none;
}

.category-value__old--entering {
  max-width: 0;
  opacity: 0;
  transform: translateX(8px);
}

.category-value__old--exiting {
  max-width: 0;
  margin-right: 0;
  opacity: 0;
  transform: translateX(8px);
}

.category-value__current {
  display: inline-block;
  width: 36px;
  flex: 0 0 36px;
  text-align: right;
}

.info-button {
  width: 16px;
  height: 36px;
  margin-left: 8px;
}

.category-value--with-old .info-button {
  margin-left: 8px;
}

.info-button img {
  display: block;
  width: 16px;
  height: 16px;
}

.bottom-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -6px 30px rgba(56, 56, 56, 0.12);
  transition: height 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-content {
  display: flex;
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 4px;
}

.sheet-title {
  margin: 0;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
}

.sheet-title--changing {
  animation: sheet-copy-in 220ms ease-out both;
}

@keyframes sheet-copy-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.offers-carousel {
  display: flex;
  width: calc(100% + 32px);
  margin-inline: -16px;
  align-items: stretch;
  gap: 8px;
  padding-inline: 16px;
  overflow-x: overlay;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-gutter: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.offers-carousel::-webkit-scrollbar {
  display: none;
}

.offer-card {
  display: flex;
  width: 148px;
  min-width: 148px;
  height: 88px;
  min-height: 88px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 20px;
  background: #f5f5f4;
  color: #3b3a3a;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.offer-card--selected {
  border-color: #f8463a;
  background: #fff;
}

.offer-card[hidden] { display: none; }

.offer-card--disabled,
.offer-card--disabled:disabled {
  border-color: transparent;
  background: #f5f5f4;
  cursor: not-allowed;
  opacity: 1;
}

.offer-card--disabled .offer-card__text {
  color: #3b3a3a;
}

.offer-card--disabled .offer-logo--yandex {
  opacity: 1;
}

.offer-card--disabled .offer-logo--sbp {
  opacity: 1;
}

.offer-card__top {
  display: flex;
  width: 100%;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
}

.offer-logo {
  display: block;
  flex: 0 0 auto;
}

.offer-logo--pay {
  width: 72.64px;
  height: 24px;
}

.offer-logo--premium {
  width: 80px;
  height: 22px;
}

.offer-logo--sbp {
  width: 42px;
  height: 24px;
  transition: opacity 180ms ease;
}

.offer-logo--yandex {
  display: flex;
  width: 60px;
  height: 20px;
  align-items: center;
  transition: opacity 180ms ease;
}

.yandex-mark {
  display: block;
  width: 16.8px;
  height: 16.8px;
}

.yandex-text {
  display: block;
  width: 33px;
  height: 15px;
  margin-left: 4px;
}

.offer-logo--delivery {
  display: flex;
  width: 86.7px;
  height: 24px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5.5px 7.4px;
  overflow: hidden;
  border: 0.75px solid #fff;
  border-radius: 94px;
  background: radial-gradient(circle at 76% 10%, #ff989a 0, #ff7476 16%, #ff5053 31%, #ed3337 57%, #db171a 83%);
  color: #fff;
  font-size: 9.94px;
  font-weight: 700;
  line-height: 10.6px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.offer-logo--delivery img {
  display: block;
  width: 12.86px;
  height: 12.86px;
  flex: 0 0 12.86px;
}

.checkbox {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.checkbox img {
  display: block;
  width: 24px;
  height: 24px;
}

.checkbox--selected {
  display: grid;
  position: relative;
  width: 24px;
  height: 24px;
  place-items: center;
  background: transparent;
  animation: checkbox-fade-in 220ms ease-out both;
}

@keyframes checkbox-fade-in {
  0% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

.checkbox--selected::before {
  position: absolute;
  inset: 2px;
  border-radius: 4px;
  background: #eb1000;
  content: "";
}

.checkbox--selected img {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
}

.offer-card__text {
  display: block;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 4px 12px 12px;
  color: #3b3a3a;
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: -0.12px;
}

.button-section {
  width: 100%;
}

.button-section[hidden] {
  display: none;
}

.primary-button {
  display: flex;
  width: 100%;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(137.71deg, #fd7624 20.34%, #fd0a1c 57.6%);
  color: #f5f5f4;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.primary-button--changing {
  animation: primary-button-change 280ms ease-out both;
}

@keyframes primary-button-change {
  from {
    opacity: 0.7;
  }

  to {
    opacity: 1;
  }
}

.primary-button--solid {
  background: #eb1000;
}

.primary-button--premium {
  background: linear-gradient(171deg, #373633 20%, #4d4c49 100%);
  color: #ffd69e;
}

.primary-button--pending:disabled {
  background: #f0f0ef;
  color: #a4a3a2;
  cursor: default;
}

.primary-button__label {
  display: block;
  line-height: 20px;
}

.home-indicator {
  display: flex;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  background: #fff;
}

.home-indicator span {
  display: block;
  width: 72px;
  height: 2px;
  border-radius: 8px;
  background: #3b3a3a;
}

.cashback-view,
.category-selection-view {
  position: absolute;
  inset: 0;
}

.cashback-view[hidden],
.category-selection-view[hidden] {
  display: none;
}

.selection-scroll {
  position: absolute;
  inset: 76px 0 0;
  overflow: hidden auto;
  padding-bottom: 16px;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.selection-scroll::-webkit-scrollbar {
  display: none;
}

.selection-header {
  display: flex;
  width: 100%;
  height: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 16px;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
}

.selection-title-container {
  display: flex;
  width: 100%;
  height: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.selection-title {
  width: 100%;
  height: 24px;
  margin: 0;
  color: #3b3a3a;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
}

.selection-change-link {
  display: inline-flex;
  height: 20px;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #747372;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.selection-change-link__arrow {
  display: block;
  color: #747372;
  font-size: 24px;
  font-weight: 400;
  line-height: 18px;
}

.selection-filters {
  display: flex;
  width: 100%;
  height: auto;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  overflow: hidden;
}

.selection-filter {
  display: inline-flex;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 12px;
  border: 0;
  border-radius: 16px;
  background: #f5f5f4;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.selection-filter--active {
  background: #4b4a49;
  color: #fff;
}

.selection-filter img {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.selection-filter[data-filter="premium"] img {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.selection-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 16px 16px;
  background: #fff;
}

.selection-card {
  display: flex;
  position: relative;
  width: 100%;
  height: 132px;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 12px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f5f5f4;
  color: #3b3a3a;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.selection-card--locked {
  cursor: default;
}

.selection-filter:focus-visible,
.selection-save-button:focus-visible,
.selection-premium-button:focus-visible {
  outline: 2px solid #eb1000;
  outline-offset: 2px;
}

.selection-card:focus-visible {
  outline: none;
}

.selection-card__header {
  display: flex;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.selection-card__name-group {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.selection-card__name {
  display: block;
  min-width: 0;
  color: #3b3a3a;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
}

.selection-card__checkbox {
  display: grid;
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
}

.selection-card__checkbox img {
  display: block;
  width: 24px;
  height: 24px;
}

.selection-card--selected .selection-card__checkbox {
  background: transparent;
}

.selection-card--selected .selection-card__checkbox::before {
  position: absolute;
  inset: 2px;
  border-radius: 5px;
  background: #eb1000;
  content: "";
}

.selection-card--selected .selection-card__checkbox img {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
}

.selection-card__subtitle {
  display: block;
  color: #747372;
  font-size: 11px;
  font-weight: 500;
  line-height: 12px;
}

.selection-card__premium-badge {
  display: block;
  width: 58px;
  height: 16px;
  object-fit: contain;
  object-position: left center;
}

.selection-card__details {
  display: flex;
  position: relative;
  z-index: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.selection-card__format {
  display: flex;
  height: 16px;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: #3b3a3a;
  font-size: 11px;
  font-weight: 500;
  line-height: 12px;
  white-space: nowrap;
}

.selection-card__format img {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.selection-card__percent {
  display: flex;
  height: 24px;
  align-items: center;
  gap: 4px;
  color: #3b3a3a;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

.selection-card__percent img {
  display: block;
  width: 20px;
  height: 20px;
}

.selection-card__image {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 80px;
  height: 80px;
  object-fit: cover;
  pointer-events: none;
}

.category-selection-view.has-actions .selection-scroll {
  padding-bottom: 180px;
}

.category-selection-view.has-premium.has-actions .selection-scroll {
  padding-bottom: 124px;
}
.selection-filter[hidden] { display: none; }

.selection-actions {
  display: flex;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  height: auto;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -6px 30px rgba(56, 56, 56, 0.12);
}

.selection-actions[hidden] {
  display: none;
}

.selection-actions__content {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.selection-save-button,
.selection-premium-button {
  display: flex;
  width: 100%;
  height: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.selection-premium-button:disabled {
  cursor: default;
  opacity: 1;
}

.selection-save-button {
  flex-direction: column;
  gap: 0;
  padding: 7px 12px;
  background: #eb1000;
  color: #f5f5f4;
}

.selection-save-button:disabled {
  background: #f0f0ef;
  color: #a4a3a2;
  cursor: not-allowed;
}

.selection-save-button small {
  display: block;
  font-size: 11px;
  line-height: 12px;
}

.selection-premium-button {
  gap: 8px;
  padding: 12px 12px 12px 20px;
  background: #f0f0ef;
  color: #3b3a3a;
}

.selection-premium-button img {
  display: block;
  width: 80px;
  height: 22px;
  flex: 0 0 80px;
  object-fit: contain;
}

.selection-home-indicator {
  display: flex;
  width: 100%;
  height: 28px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  background: #fff;
}

.selection-home-indicator span {
  display: block;
  width: 72px;
  height: 2px;
  border-radius: 8px;
  background: #3b3a3a;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Магнит Пэй: прокручивается контент, панель оформления остаётся снизу. */
.app-shell--mpay .top-navigation { height: 88px; }
.app-shell--mpay .status-bar { height: 44px; }
.app-shell--mpay .top-bar h1 { visibility: hidden; }
.mpay-view { position: absolute; inset: 88px 0 0; }
.mpay-view[hidden] { display: none; }
.mpay-scroll { position: absolute; inset: 0; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: calc(var(--mpay-actions-height, 200px) + 4px); background: #f5f5f4; }
.mpay-scroll::-webkit-scrollbar { display: none; }
.mpay-hero { position: relative; height: 325px; overflow: hidden; border-radius: 0 0 20px 20px; background: linear-gradient(179deg,#fff 0%,#c6ebff 25%,#d8f1ff 100%); text-align: center; padding: 16px 16px 0; }
.mpay-hero h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; }
.mpay-hero p { margin: 8px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.mpay-hero__image { position: absolute; width: 291px; height: 249px; left: calc(50% - 111px); top: 108px; object-fit: contain; }
.mpay-section { margin-top: 4px; padding: 16px; border-radius: 28px; background: #fff; }
.mpay-section h2 { margin: 0; font-size: 18px; line-height: 22px; font-weight: 700; }
.mpay-details { display: flex; flex-direction: column; gap: 16px; }
.mpay-details h2 { margin-bottom: -4px; }
.mpay-field { position: relative; display: flex; flex-direction: column; justify-content: center; height: 48px; padding: 6px 12px; border-radius: 12px; background: #f5f5f4; }
.mpay-field > span { color: #747372; font-size: 11px; line-height: 12px; font-weight: 500; }
.mpay-field input { width: 100%; min-width: 0; border: 0; padding: 0; outline: none; background: transparent; color: #3b3a3a; font: 500 14px/20px 'Magnit Sans',sans-serif; }
.mpay-field:focus-within { outline: 2px solid #8ed7ff; }
.mpay-field--date { padding-right: 44px; }
.mpay-field--date img { position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; }
.mpay-field--disabled > span, .mpay-field input:disabled { color: #bbbab9; -webkit-text-fill-color: #bbbab9; opacity: 1; }
.mpay-benefits h2 { margin-bottom: 12px; }
.mpay-benefit { display: flex; align-items: flex-start; gap: 16px; }
.mpay-benefit__icon { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; margin-top: 12px; }
.mpay-benefit > div { flex: 1; min-width: 0; padding: 12px 0; }
.mpay-benefit p { margin: 0; font-size: 16px; line-height: 20px; font-weight: 500; }
.mpay-benefit small { display: block; margin-top: 4px; color: #747372; font-size: 14px; line-height: 16px; font-weight: 500; }
.mpay-chevron { width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.mpay-benefit .mpay-chevron { margin: 10px 0 0 -8px; }
.mpay-faq { display: flex; align-items: center; justify-content: space-between; }
.mpay-faq .mpay-chevron { opacity: .4; }
.mpay-actions { position: absolute; inset: auto 0 0; z-index: 2; padding: 16px 16px 0; border-radius: 28px 28px 0 0; background: linear-gradient(180deg,#c6ebff 0%,#d9f2ff 48%,#fff 100%); }
.mpay-subscription { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mpay-subscription > img { width: 40px; height: 40px; flex: 0 0 40px; }
.mpay-subscription > div { flex: 1; min-width: 0; }
.mpay-subscription p { margin: 0; font-size: 12px; line-height: 14px; font-weight: 500; }
.mpay-subscription small { display: block; margin-top: 4px; color: #747372; font-size: 11px; line-height: 12px; font-weight: 500; }
.mpay-switch { width: 50px; height: 32px; flex: 0 0 50px; border: 0; padding: 2px; border-radius: 32px; background: #4b4a49; cursor: pointer; }
.mpay-switch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(200deg,#ffcc87 35%,#ffbc60 64%,#ffcc87 87%); transform: translateX(18px); transition: transform 180ms ease; }
.mpay-switch[aria-checked="false"] { background: #bbbab9; }
.mpay-switch[aria-checked="false"] span { transform: translateX(0); background: #fff; }
.mpay-apply { width: 100%; background: linear-gradient(138deg,#fd7624 20%,#fd0a1c 58%); font-size: 16px; }
.mpay-consent { margin: 8px 0 0; font-size: 11px; line-height: 12px; color: #747372; font-weight: 500; }
.mpay-consent span { color: #016fce; }
.mpay-home-indicator { height: 20px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 7px; }
.mpay-home-indicator span { width: 72px; height: 2px; border-radius: 8px; background: #3b3a3a; }
@media (prefers-reduced-motion: reduce) { .mpay-switch span { transition: none; } }

.premium-overlay { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,0); transition: background-color 420ms ease; }
.premium-overlay--open { background-color: rgba(0,0,0,.6); }
.premium-overlay--closing { transition-duration: 320ms; }
.premium-overlay[hidden] { display: none; }
.premium-sheet { position: absolute; inset: auto 0 0; max-height: 100%; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 420ms cubic-bezier(.22,1,.36,1); }
.premium-overlay--open .premium-sheet { transform: translateY(0); }
.premium-overlay--closing .premium-sheet { transition: transform 320ms cubic-bezier(.4,0,.8,.2); }
.premium-sheet__handle { height: 20px; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; }
.premium-sheet__handle span { width: 44px; height: 4px; border-radius: 100px; background: #fff; }
.premium-sheet__surface { min-height: 0; display: flex; flex-direction: column; background: #fff; border-radius: 28px 28px 0 0; overflow: hidden; }
.premium-sheet__top { height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; }
.premium-sheet__close, .premium-sheet__close img { width: 32px; height: 32px; }
.premium-sheet__scroll { min-height: 0; height: 588px; flex: 0 1 588px; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 8px 16px 0; }
.premium-sheet__heading { text-align: center; padding-bottom: 12px; margin-bottom: 8px; }
.premium-sheet__heading h2 { font-size: 20px; line-height: 24px; font-weight: 700; margin: 0; }
.premium-sheet__heading p { font-size: 16px; line-height: 20px; font-weight: 500; margin: 4px 0 0; }
.premium-perks { display: flex; gap: 8px; margin-bottom: 16px; }
.premium-perk { flex: 1; min-width: 0; height: 158px; border-radius: 20px; background: #f5f5f4; padding: 12px 8px 16px; text-align: center; }
.premium-perk__image { position: relative; overflow: hidden; width: 70px; height: 66px; margin: 0 auto 4px; }
.premium-perk__image img { width: 70px; height: 66px; object-fit: cover; }
.premium-perk__image--cashback img { position: absolute; width: 118.8%; height: 126%; left: -9.4%; top: -13%; }
.premium-perk h3 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 700; }
.premium-perk p { margin: 4px 0 0; color: #747372; font-size: 14px; line-height: 16px; font-weight: 500; }
.premium-gifts h3 { font-size: 16px; line-height: 20px; margin: 0 0 12px; font-weight: 700; }
.premium-gift { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; line-height: 16px; font-weight: 500; }
.premium-gift > img { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: #f5f5f4; object-fit: cover; }
.premium-gift > span { flex: 1; min-width: 0; }
.premium-gift > div { white-space: nowrap; line-height: 20px; }
.premium-sheet__actions { padding: 12px 0; margin-top: 8px; }
.premium-trial { border: 0; width: 100%; height: 48px; border-radius: 12px; background: radial-gradient(ellipse at bottom right,#373633,#4d4c49); color: #ffd69e; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 7px 12px; cursor: pointer; font-weight: 500; }
.premium-trial span { font-size: 16px; line-height: 20px; }
.premium-trial small { font-size: 11px; line-height: 12px; }
.premium-sheet__actions p { margin: 8px 0 0; color: #747372; font-size: 12px; line-height: 14px; font-weight: 500; text-align: center; }
.premium-sheet__home { height: 28px; flex: 0 0 28px; display: flex; justify-content: center; padding: 18px 0 8px; }
.premium-sheet__home span { height: 2px; width: 72px; border-radius: 8px; background: #3b3a3a; }
@media (prefers-reduced-motion: reduce) { .premium-overlay, .premium-sheet { transition: none; } }

.prototype-settings { position: fixed; right: 20px; top: 24px; z-index: 40; }
.mpay-subscription[hidden], .selection-premium-button[hidden] { display: none; }
.prototype-settings__toggle { margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dededd; border-radius: 14px; background: #fff; color: #3b3a3a; cursor: pointer; box-shadow: 0 4px 16px #0000000c; }
.prototype-settings__toggle span { font-family: Arial,sans-serif; font-size: 28px; line-height: 1; }
.prototype-settings__panel { width: min(300px,calc(100vw - 32px)); margin-top: 12px; padding: 20px; background: #fff; border-radius: 20px; box-shadow: 0 10px 40px #00000020; animation: settings-enter 180ms ease-out; }
.prototype-settings__panel[hidden] { display: none; }
.prototype-settings__panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.prototype-settings__panel h2 { margin: 0; font-size: 16px; line-height: 20px; }
.prototype-settings__close { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.prototype-settings__close img { width: 28px; height: 28px; }
.prototype-settings__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; }
@keyframes settings-enter { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 720px) { .prototype-settings { right: 8px; top: 8px; } }
@media (prefers-reduced-motion: reduce) { .prototype-settings__panel { animation: none; } }

.prototype-mpay-settings { margin: 24px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid #e9e9e8; }
.prototype-mpay-settings legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 700; }
.prototype-mpay-settings label { clear: both; display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; line-height: 20px; cursor: pointer; }
.prototype-mpay-settings input { width: 18px; height: 18px; margin: 0; accent-color: #f52619; cursor: pointer; }


/* On a phone the browser supplies the device chrome; only app content remains. */
@media (max-width: 767px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  :root {
    --mobile-viewport-height: 100vh;
    --mobile-viewport-top: 0px;
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-nav-height: calc(44px + var(--mobile-safe-top));
  }
  @supports (height: 100dvh) {
    :root { --mobile-viewport-height: 100dvh; }
  }
  html, body { min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: #fff; }
  body { display: block; }
  .app-shell {
    position: fixed;
    top: var(--mobile-viewport-top);
    left: env(safe-area-inset-left, 0px);
    right: env(safe-area-inset-right, 0px);
    width: auto;
    height: var(--mobile-viewport-height);
    border-radius: 0;
  }
  .status-bar,
  .home-indicator,
  .selection-home-indicator,
  .mpay-home-indicator,
  .premium-sheet__home { display: none; }
  .top-navigation, .app-shell--mpay .top-navigation {
    height: var(--mobile-nav-height);
    padding-top: var(--mobile-safe-top);
  }
  .selection-scroll, .sections-scroll, .mpay-view { top: var(--mobile-nav-height); }
  .selection-scroll { padding-bottom: calc(16px + var(--mobile-safe-bottom)); }
  .category-selection-view.has-actions .selection-scroll,
  .category-selection-view.has-premium.has-actions .selection-scroll {
    padding-bottom: calc(var(--selection-actions-height, 136px) + 16px);
  }
  .selection-actions { padding-bottom: var(--mobile-safe-bottom); }
  .sheet-content {
    bottom: 0;
    padding-bottom: calc(12px + var(--mobile-safe-bottom));
    max-height: calc(var(--mobile-viewport-height) - var(--mobile-nav-height) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mpay-actions {
    padding-bottom: calc(12px + var(--mobile-safe-bottom));
    max-height: 55%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mpay-scroll { scroll-padding-top: 16px; scroll-padding-bottom: calc(var(--mpay-actions-height, 200px) + 16px); }
  .mpay-field input { font-size: 16px; }
  .premium-sheet { max-height: calc(100% - var(--mobile-nav-height)); }
  .premium-sheet__scroll { padding-bottom: calc(12px + var(--mobile-safe-bottom)); }
  .payment-snackbar { top: calc(var(--mobile-nav-height) + 8px); width: calc(100% - 32px); }
  .prototype-settings {
    top: calc(var(--mobile-viewport-top) + var(--mobile-safe-top));
    right: env(safe-area-inset-right, 0px);
  }
  .prototype-settings__toggle { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .prototype-settings__toggle span { font-size: 24px; }
  .prototype-settings__panel {
    width: min(300px, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px));
    max-height: calc(var(--mobile-viewport-height) - var(--mobile-nav-height) - var(--mobile-safe-bottom) - 16px);
    margin: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Compact confirmation shares the existing toast position and animation. */
.payment-snackbar--success { min-height: 48px; }
.payment-snackbar__success { display: block; width: 24px; height: 24px; flex: 0 0 24px; }
.payment-snackbar__icon[hidden],
.payment-snackbar__success[hidden],
.payment-snackbar__subtitle[hidden] { display: none; }
