@font-face {
  font-family: 'codeforclient';
  src: url('codeforclient.ttf') format('truetype');
}

:root {
  --p: #C62828;
  --p-c: rgba(198, 40, 40, .14);
  --on-p: #fff;
  --surf: #FFFFFF;
  --surf-v: #FDF5F5;
  --surf-c: #FDF0F0;
  --on-s: #1A1A1A;
  --on-sv: #4A4A4A;
  --out: #B33A3A;
  --out-v: #E0B0B0;
  --err: #BA1A1A;
  --err-c: #FFDAD6;
  --on-ec: #410002;
  --ok: #2E7D32;
  --ok-c: #C8E6C9;
  --r-s: 16px;
  --r-m: 22px;
  --r-l: 28px;
  --r-xl: 36px;
  --r-f: 100px;
  --font-d: 'Unbounded', sans-serif;
  --font-b: 'Inter', sans-serif;
  --ease: 180ms cubic-bezier(.2, 0, 0, 1);
  --spring: 440ms cubic-bezier(.34, 1.56, .64, 1);
  --decel: 380ms cubic-bezier(0, 0, .2, 1);
  --ios-sheet: 420ms cubic-bezier(.32, .72, 0, 1);
  --spring-enter: 560ms cubic-bezier(.05, .7, .1, 1);
  --spring-exit: 250ms cubic-bezier(.3, 0, .8, .15);
  --spring-overshoot: 500ms cubic-bezier(.34, 1.4, .64, 1);
  --emphasized: 500ms cubic-bezier(.2, 0, 0, 1);
  --emphasized-dec: 400ms cubic-bezier(.05, .7, .1, 1);
  --emphasized-acc: 200ms cubic-bezier(.3, 0, .8, .15);
  --standard: 300ms cubic-bezier(.2, 0, 0, 1);
  --standard-dec: 250ms cubic-bezier(0, 0, 0, 1);
  --radius-full: 9999px;
  --glass-bg: rgba(253, 245, 245, .39);
  --glass-border: rgba(255, 255, 255, .38);
  --border-subtle: color-mix(in srgb, var(--out-v) 45%, transparent);
  --blur-val: saturate(1.8) blur(28px);
  --auth-bg: #FFFFFF;
  --auth-text: #000000;
  --auth-label: #6C6F78;
  --auth-border: #E5E5EA;
  --auth-border-focus: #C62828;
  --auth-placeholder: #AEAEB2;
  --auth-btn-bg: #C62828;
  --auth-btn-text: #fff;
  --auth-reg-btn-border: #C62828;
  --auth-reg-btn-text: #C62828;
  --auth-reg-btn-hover: rgba(198, 40, 40, 0.05);
  --auth-surface: rgba(0, 0, 0, 0.05);
  --auth-surface-hover: rgba(0, 0, 0, 0.10);
}

body.dark {
  --surf: #0F0F0F;
  --surf-v: #1A1010;
  --surf-c: #1A1010;
  --on-s: #F0E0E0;
  --on-sv: #B09090;
  --out: #D06060;
  --out-v: #3A2525;
  --p-c: rgba(198, 40, 40, .22);
  --glass-bg: rgba(32, 18, 18, .72);
  --glass-border: rgba(255, 255, 255, .08);
  --border-subtle: rgba(255, 255, 255, .09);
  --auth-bg: #0F0F0F;
  --auth-text: #F0E0E0;
  --auth-label: #8a8a8a;
  --auth-border: #2a2a2a;
  --auth-border-focus: #C62828;
  --auth-placeholder: #555;
  --auth-btn-bg: #C62828;
  --auth-btn-text: #fff;
  --auth-reg-btn-border: #C62828;
  --auth-reg-btn-text: #EF9A9A;
  --auth-reg-btn-hover: rgba(198, 40, 40, 0.12);
  --auth-surface: rgba(255, 255, 255, 0.07);
  --auth-surface-hover: rgba(255, 255, 255, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-b);
  background: var(--surf);
  color: var(--on-s);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color .3s var(--decel), color .3s var(--decel);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  padding: 0 !important;
  margin: 0 !important;
}

button,
a,
[onclick] {
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  -webkit-user-select: text !important;
  user-select: text !important;
}

input {
  font-size: 16px !important;
}

*:focus,
*:focus-visible {
  outline: none;
}

* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}

.screen {
  display: none;
  min-height: 100dvh;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

#page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  z-index: 9999;
  transition: opacity 0.35s ease;
  animation: splashFadeIn 0.6s ease forwards;
}

body.dark #page-loader {
  background: #0F0F0F;
}

.loader-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 18px;
  position: absolute;
  top: 32px;
  left: 24px;
  animation: logoFadeIn 0.5s ease 0.1s both;
  z-index: 2;
}

.loader-ad-box {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 132px;
  background: #E8E8E8;
  border-radius: 32px;
  overflow: hidden;
  width: calc(100% - 48px);
  animation: expandBox 0.6s ease 0.15s forwards;
}

body.dark .loader-ad-box {
  background: #2a2a2a;
}

.loader-ad-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  opacity: 0;
  animation: imageFadeIn 0.3s ease 0.5s forwards;
}

.loader-spinner-gif {
  width: 48px;
  height: 48px;
  object-fit: contain;
  position: absolute;
  bottom: 32px;
  left: 24px;
  animation: spinnerFadeIn 0.5s ease 0.2s both, rotateGif 2s linear infinite;
  z-index: 2;
}

.loader-version {
  font-family: var(--font-b, 'Inter', monospace);
  font-size: 11px;
  color: rgba(0, 0, 0, 0.35);
  position: absolute;
  bottom: 38px;
  right: 24px;
  letter-spacing: 0.3px;
  animation: versionFadeIn 0.5s ease 0.3s both;
  z-index: 2;
}

body.dark .loader-version {
  color: rgba(255, 255, 255, 0.35);
}

@keyframes splashFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spinnerFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes versionFadeIn {
  0% {
    opacity: 0;
    transform: translateX(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes rotateGif {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes expandBox {
  0% {
    width: 0;
  }
  100% {
    width: calc(100% - 48px);
  }
}

@keyframes imageFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* АНИМАЦИЯ ЛОГОТИПА - ПРАВИЛЬНАЯ ВЕРСИЯ */
.loader-logo {
  transition: all 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
  position: fixed !important;
  top: 32px;
  left: 24px;
  width: 60px;
  height: 60px;
  object-fit: contain;
  z-index: 10000;
}

.loader-logo.animate-to-floating {
  width: 30px !important;
  height: 30px !important;
  top: max(15px, env(safe-area-inset-top, 10px)) !important;
  left: max(16px, env(safe-area-inset-left, 12px)) !important;
  border-radius: 50% !important;
  z-index: 100 !important;
}

/* Floating logo стили */
.floating-logo {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 10px));
  left: max(12px, env(safe-area-inset-left, 12px));
  width: 42px;
  height: 42px;
  border-radius: 100px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur-val);
  backdrop-filter: var(--blur-val);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.floating-logo.visible {
  opacity: 1;
}

.floating-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 100px;
  display: block;
}

#screen-auth-mobile,
#screen-auth-register {
  background: var(--auth-bg);
  transition: background-color .3s var(--decel);
}

#screen-auth-mobile.active,
#screen-auth-register.active {
  display: flex;
}

.auth-new-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) 20px 16px;
  width: 100%;
  flex-shrink: 0;
  gap: 8px;
}

.auth-new-back {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--auth-surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  position: relative;
  overflow: hidden;
  justify-self: start;
}

.auth-new-back:hover {
  background: var(--auth-surface-hover);
}

.auth-new-back svg {
  width: 20px;
  height: 20px;
  stroke: var(--auth-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke .3s;
  position: relative;
  z-index: 1;
}

.auth-new-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-new-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 9999px;
  background: var(--auth-surface);
  padding: 4px;
  display: block;
  transition: background .3s;
}

.auth-new-help {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 9999px;
  background: var(--auth-surface);
  border: none;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text);
  cursor: pointer;
  transition: background .2s, color .3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.auth-new-help:hover {
  background: var(--auth-surface-hover);
}

.auth-new-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 24px 0;
  overflow-y: auto;
}

.auth-new-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 28px;
  line-height: 1.2;
  color: var(--auth-text);
  margin-bottom: 28px;
  letter-spacing: -.5px;
  transition: color .3s;
}

.auth-new-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-new-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-new-label {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-label);
  letter-spacing: -.2px;
  transition: color .3s;
}

.auth-new-input-wrap {
  width: 100%;
  border-bottom: 1.5px solid var(--auth-border);
  transition: border-color .2s;
}

.auth-new-input-wrap:focus-within {
  border-bottom-color: var(--auth-border-focus);
}

.auth-new-input {
  width: 100%;
  padding: 12px 0 10px;
  font-family: var(--font-b);
  font-size: 18px;
  font-weight: 400;
  color: var(--auth-text);
  background: transparent;
  border: none;
  outline: none;
  transition: color .3s;
  -webkit-user-select: text !important;
  user-select: text !important;
}

.auth-new-input::placeholder {
  color: var(--auth-placeholder);
  font-weight: 400;
}

.auth-new-forgot {
  margin-top: 6px;
  text-align: left;
}

.auth-new-forgot-btn {
  background: transparent;
  border: none;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text);
  cursor: pointer;
  padding: 4px 0;
  border-radius: 9999px;
  transition: opacity .2s;
  text-decoration: none;
  display: inline-block;
  opacity: .6;
}

.auth-new-forgot-btn:hover {
  opacity: .4;
}

.auth-new-action {
  margin-top: auto;
  padding: 20px 24px max(34px, env(safe-area-inset-bottom, 34px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.auth-new-double {
  display: flex;
  gap: 12px;
}

.auth-new-primary-btn {
  flex: 1;
  padding: 16px 12px;
  border-radius: 9999px;
  font-family: var(--font-b);
  font-size: 17px;
  font-weight: 600;
  background: var(--auth-btn-bg);
  color: var(--auth-btn-text);
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s, opacity .2s;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-new-primary-btn:active {
  transform: scale(.98);
}

.auth-new-primary-btn:disabled {
  background: var(--auth-border);
  color: var(--auth-label);
  cursor: not-allowed;
  transform: none;
}

body.dark .auth-new-primary-btn:disabled {
  background: #2a2a2a;
  color: #555;
}

.auth-new-secondary-btn {
  flex: 1;
  padding: 16px 12px;
  border-radius: 9999px;
  font-family: var(--font-b);
  font-size: 17px;
  font-weight: 600;
  background: transparent;
  color: var(--auth-reg-btn-text);
  border: 1.5px solid var(--auth-reg-btn-border);
  cursor: pointer;
  transition: background .2s, transform .1s, color .3s, border-color .3s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-new-secondary-btn:active {
  transform: scale(.98);
}

.auth-new-secondary-btn:hover {
  background: var(--auth-reg-btn-hover);
}

.auth-new-msg-error {
  background: var(--err-c);
  color: var(--on-ec);
  padding: 11px 14px;
  border-radius: var(--r-m);
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
  display: none;
  animation: shake .35s cubic-bezier(.36, .07, .19, .97);
}

.auth-new-msg-error.show {
  display: block;
}

.auth-new-spinner {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: none;
}

.auth-new-spinner.show {
  display: inline-block;
}

#screen-auth-register .h-captcha {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

#screen-auth-desktop {
  background: var(--surf-v);
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100dvh;
}

.d-card {
  display: flex;
  width: 100%;
  max-width: 960px;
  border-radius: 44px;
  overflow: hidden;
  background: var(--surf);
  min-height: 560px;
  border: 1px solid var(--border-subtle);
}

.d-visual {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.d-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.d-visual-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, .15), transparent 60%);
}

.d-panel {
  width: 420px;
  flex-shrink: 0;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surf);
}

.auth-tab-bar {
  position: relative;
  display: flex;
  background: var(--surf-v);
  border-radius: 9999px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--out-v);
}

.auth-tab-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: var(--p);
  border-radius: 9999px;
  transition: all .2s cubic-bezier(.5, 0, 0, 1);
  width: 0;
}

.auth-tab-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--out);
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: color .2s ease;
  font-family: var(--font-b);
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
}

.auth-tab-btn.active {
  color: #fff;
}

.auth-tab-btn:not(.active):hover {
  color: var(--on-s);
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field input {
  width: 100%;
  padding: 18px 16px 6px;
  border: 1px solid var(--out-v);
  border-radius: var(--r-m);
  background: var(--surf);
  font-family: var(--font-b);
  color: var(--on-s);
  outline: none;
  -webkit-appearance: none;
  transition: border-color var(--ease);
}

.field input:focus {
  border-color: var(--p);
}

.field label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--out);
  pointer-events: none;
  background: var(--surf);
  padding: 0 2px;
  transition: all var(--ease);
}

.field input:focus~label,
.field input:not(:placeholder-shown)~label {
  top: 2px;
  transform: none;
  font-size: 11px;
  color: var(--p);
  font-weight: 500;
}

.field input:not(:focus):not(:placeholder-shown)~label {
  color: var(--out);
}

.btn-filled {
  width: 100%;
  padding: 0 24px;
  height: 46px;
  background: var(--p);
  color: var(--on-p);
  border: none;
  border-radius: var(--r-f);
  font-family: var(--font-b);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.btn-filled:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--p);
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .5px;
  cursor: pointer;
  padding: 10px 8px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.msg-error {
  background: var(--err-c);
  color: var(--on-ec);
  padding: 11px 14px;
  border-radius: var(--r-m);
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
  display: none;
  animation: shake .35s cubic-bezier(.36, .07, .19, .97);
}

.msg-error.show {
  display: block;
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(3px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

.gif-spinner {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: none;
}

.gif-spinner.show {
  display: inline-block;
}

#screen-formalities {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--surf);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

#screen-formalities.active {
  display: flex;
  animation: activityEnter 380ms cubic-bezier(.05, .7, .1, 1) both;
}

.formalities-container {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding: max(32px, env(safe-area-inset-top, 32px)) 20px max(32px, env(safe-area-inset-bottom, 32px));
  flex: 1;
  display: flex;
  flex-direction: column;
}

.formalities-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(28px, 7vw, 38px);
  color: var(--on-s);
  margin-bottom: 28px;
  line-height: 1.2;
  letter-spacing: -.5px;
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.doc-card {
  background: var(--p);
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  position: relative;
}

.doc-card-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: #fff;
  padding: 16px 14px 12px;
  flex: 1;
  line-height: 1.4;
  letter-spacing: .2px;
}

.doc-card-btn {
  background: #111;
  margin: 0 10px 10px;
  border-radius: 20px;
  padding: 12px;
  text-align: center;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: #fff;
  letter-spacing: .5px;
}

body.dark .doc-card-btn {
  background: #000;
}

.slider-hint {
  font-size: 12px;
  color: var(--on-sv);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: .3px;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 72px;
  background: var(--surf-v);
  border-radius: var(--r-f);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  margin-bottom: auto;
  border: 1.5px solid var(--out-v);
}

.slider-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--p-c);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--r-f);
}

.slider-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.slider-text {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--out);
  pointer-events: none;
  transition: opacity .2s;
}

.slider-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 64px;
  height: 64px;
  background: var(--p);
  border-radius: var(--r-f);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  will-change: transform;
}

.slider-thumb .material-icons {
  font-size: 28px;
  color: #fff;
}

.slider-container.completed .slider-text {
  opacity: 0;
}

.slider-container.completed .slider-thumb {
  background: #2E7D32;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--out);
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 16px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  margin-top: 16px;
}

#welcome-stories {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: #000;
  flex-direction: column;
}

#welcome-stories.open {
  display: flex;
}

.ws-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ws-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: max(80px, env(safe-area-inset-top, 80px)) 0 0;
}

.ws-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.ws-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  z-index: 0;
  pointer-events: none;
}

.ws-slide[data-slide="0"] .ws-bg {
  height: 70%;
  background-image: url('bpf1.png');
}

.ws-slide[data-slide="1"] .ws-bg {
  height: 65%;
  background-image: url('bpf2.png');
}

.ws-slide[data-slide="2"] .ws-bg {
  height: 60%;
  background-image: url('bpf3.png');
}

.ws-slide[data-slide="3"] .ws-bg {
  height: 65%;
  background-image: url('bpf4.png');
}

.ws-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .4) 100%);
}

.ws-content {
  position: relative;
  z-index: 1;
  padding: 0 28px;
  margin-bottom: auto;
}

.ws-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(32px, 8vw, 48px);
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}

.ws-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, .85);
  line-height: 1.5;
  max-width: 320px;
}

.ws-bars {
  position: absolute;
  bottom: max(100px, calc(env(safe-area-inset-bottom, 0px) + 100px));
  left: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
  pointer-events: none;
}

.ws-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, .25);
  border-radius: 2px;
  overflow: hidden;
}

.ws-bar-fill {
  height: 100%;
  width: 0;
  background: var(--p);
  border-radius: 2px;
}

.ws-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 20px 20px max(28px, env(safe-area-inset-bottom, 28px));
  position: relative;
  z-index: 2;
  background: transparent;
}

.ws-icon-btn {
  width: 56px;
  height: 56px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s ease;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.ws-icon-btn--red {
  background: rgba(198, 40, 40, .85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
}

.ws-icon-btn--red:hover {
  background: rgba(183, 28, 28, .9);
  transform: scale(1.02);
}

.ws-icon-btn--red:active {
  transform: scale(.96);
}

.ws-icon-btn--disabled {
  background: rgba(198, 40, 40, .35);
  color: rgba(255, 255, 255, .5);
  cursor: not-allowed;
  pointer-events: none;
}

.ws-next-btn {
  flex: 1;
  height: 56px;
  padding: 16px 24px;
  background: rgba(198, 40, 40, .85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 100px;
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid rgba(255, 255, 255, .15);
}

.ws-next-btn:hover {
  background: rgba(183, 28, 28, .9);
  transform: scale(1.01);
}

.ws-next-btn:active {
  transform: scale(.98);
}

.ws-taps {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
}

.ws-tap-left {
  flex: 0 0 35%;
  cursor: pointer;
}

.ws-tap-right {
  flex: 1;
  cursor: pointer;
}

@media (max-width: 480px) {
  .ws-controls {
    gap: 10px;
    padding: 16px 16px max(24px, env(safe-area-inset-bottom, 24px));
  }
  .ws-icon-btn {
    width: 52px;
    height: 52px;
    padding: 14px;
  }
  .ws-next-btn {
    height: 52px;
    font-size: 14px;
  }
  .ws-bars {
    left: 16px;
    right: 16px;
    gap: 6px;
    bottom: max(90px, calc(env(safe-area-inset-bottom, 0px) + 90px));
  }
  .ws-content {
    padding: 0 20px;
  }
}

#screen-cabinet-mobile {
  background: var(--surf);
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  min-height: 100dvh;
  position: relative;
}

.floating-actions {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 10px));
  right: max(12px, env(safe-area-inset-right, 12px));
  display: flex;
  gap: 6px;
  z-index: 100;
  align-items: center;
}

.floating-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur-val);
  backdrop-filter: var(--blur-val);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.floating-btn .material-icons {
  font-size: 22px;
  color: var(--on-sv);
  position: relative;
  z-index: 1;
}

body.dark .floating-btn .material-icons {
  color: var(--on-s);
}

.pnav-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--surf) 30%, transparent) 25%, color-mix(in srgb, var(--surf) 82%, transparent) 100%);
  padding: 8px 16px max(16px, env(safe-area-inset-bottom, 16px));
  pointer-events: none;
}

.pnav-wrap>* {
  pointer-events: auto;
}

.pnav {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: min(530px, 100vw - 24px);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur-val);
  backdrop-filter: var(--blur-val);
  border-radius: var(--radius-full);
  padding: 6px;
  border: 1px solid var(--glass-border);
}

body.dark .pnav {
  background: rgba(42, 20, 20, .52);
  border-color: rgba(255, 255, 255, .07);
}

.pnav-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  background: var(--p-c);
  border-radius: var(--radius-full);
  transition: left .35s cubic-bezier(.5, 0, 0, 1), width .22s cubic-bezier(.5, 0, 0, 1);
  pointer-events: none;
}

.pnav-item {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 4px;
  border: none;
  background: transparent;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--out);
  border-radius: var(--radius-full);
  transition: color .25s cubic-bezier(.2, .9, .4, 1.1);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-b);
  overflow: hidden;
}

.pnav-item.pnav-active {
  color: var(--p);
}

.pnav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.pnav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .3px;
  color: inherit;
  font-family: var(--font-b);
  line-height: 1;
  transition: color .25s cubic-bezier(.2, .9, .4, 1.1), opacity .25s ease;
}

.pnav-item:not(.pnav-active) .pnav-label {
  color: var(--on-sv);
  opacity: .7;
}

body.dark .pnav-item:not(.pnav-active) .pnav-label {
  color: rgba(255, 255, 255, .7);
}

.pnav-item.pnav-active .pnav-label {
  color: var(--p);
  opacity: 1;
}

.nav-icon-img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) saturate(100%);
  opacity: .65;
  transition: filter .2s ease, opacity .2s ease;
}

body.dark .nav-icon-img {
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: .85;
}

.pnav-item.pnav-active .nav-icon-img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(94%) saturate(1842%) hue-rotate(341deg) brightness(88%) contrast(94%) !important;
  opacity: 1;
}

.floating-icon-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
  opacity: .7;
}

body.dark .floating-icon-img {
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: .85;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabEnter var(--emphasized-dec) both;
}

@keyframes tabEnter {
  from {
    opacity: 0;
    transform: translateX(16px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.content {
  padding: 0 16px;
}

.hd-greeting {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(24px, 7vw, 36px);
  color: var(--on-s);
  padding: 20px 0 16px;
  line-height: 1.2;
  letter-spacing: -.5px;
  animation: fadeUp .45s var(--decel) both;
}

.hd-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  animation: fadeUp .45s var(--decel) .05s both;
}

.hd-bonus-card {
  background: var(--p);
  border-radius: 44px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

.hd-bonus-card-label {
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: auto;
  line-height: 1.4;
}

.hd-bonus-num {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(36px, 10vw, 56px);
  color: #fff;
  line-height: 1;
  letter-spacing: -2px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.hd-bonus-unit {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 13px;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hd-bonus-code {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .5);
  position: relative;
  z-index: 1;
}

.hd-tiles-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hd-tile {
  border: none;
  border-radius: var(--r-f);
  padding: 18px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  text-align: left;
  flex: 1;
  min-height: 75px;
  position: relative;
  overflow: hidden;
}

.hd-tile-dark {
  background: #111;
}

body.dark .hd-tile-dark {
  background: #2a2a2a;
}

.hd-tile-pink {
  background-image: url('textureforcard.png');
  background-size: cover;
  background-position: center;
}

.hd-tile-text {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .2px;
  color: #fff;
  line-height: 1.4;
}

.hd-tile-video {
  position: relative;
  overflow: hidden;
  background: #111;
}

.hd-tile-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
}

body.dark .hd-tile-video {
  background: #2a2a2a;
}

.hd-tile-video .hd-tile-text {
  position: relative;
  z-index: 1;
}

.hd-chips-block {
  background: var(--p);
  border-radius: 44px;
  padding: 22px 20px 18px;
  margin-bottom: 19px;
  animation: fadeUp .45s var(--decel) .1s both;
  position: relative;
  overflow: hidden;
}

.hd-chips-header {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hd-chips-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: clamp(22px, 6vw, 32px);
  color: #fff;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.hd-chips-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
  line-height: 1.5;
  max-width: 280px;
}

.hd-chips-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hd-chip-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  transition: background var(--spring-overshoot), transform var(--spring-overshoot);
}

.hd-chip-dot.filled {
  background: #000;
  transform: scale(1.04);
}

.hd-chip-dot.empty {
  background: rgba(255, 255, 255, .3);
}

.hd-chips-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hd-chips-count-pill {
  background: #000;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 100px;
  letter-spacing: .3px;
}

.hd-chips-archive-link {
  border: none;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border-radius: 100px;
  padding: 8px 14px;
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.hd-chips-gift {
  background: rgba(0, 0, 0, .18);
  border-radius: 20px;
  padding: 12px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.hd-chips-gift .material-icons {
  font-size: 22px;
  flex-shrink: 0;
}

.sec-label {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--out);
  margin: 20px 0 10px;
}

/* QR карта - исправленный вариант */
.qr-card-wrap {
  display: flex;
  flex-direction: row;
  background: var(--p);
  border-radius: 48px;
  overflow: hidden;
  cursor: pointer;
  animation: cardReveal 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  animation-delay: 0.47s;
}

.qr-card-left {
  flex: 1;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--p);
}

.qr-canvas-wrap {
  background: #fff;
  padding: 10px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-canvas-wrap canvas,
.qr-canvas-wrap img {
  display: block;
  border-radius: 8px;
  width: 100%;
  height: auto;
}

.qr-card-right {
  flex: 1;
  padding: 20px 16px 20px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.qr-card-show-text {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: clamp(18px, 4.5vw, 26px);
  color: #fff;
  line-height: 1.25;
  letter-spacing: -.3px;
  margin-bottom: 12px;
}

.qr-card-number-wrap {
  margin-top: auto;
}

.qr-card-number-label {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .65);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.qr-code-label {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: clamp(22px, 6vw, 32px);
  letter-spacing: 4px;
  color: #fff;
  line-height: 1;
  word-break: break-all;
}

.promo-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  animation: fadeUp .35s var(--decel) .2s both;
}

.promo-scroll::-webkit-scrollbar {
  display: none;
}

.promo-card {
  flex: 0 0 240px;
  background: var(--surf);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--out-v);
  display: flex;
  flex-direction: column;
}

.promo-card-banner {
  height: 88px;
  background: linear-gradient(135deg, #7B1D1D 0%, var(--p) 50%, #8B0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-card-banner .material-icons {
  font-size: 36px;
  color: rgba(255, 255, 255, .9);
}

.promo-card-inner {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.promo-card-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: var(--on-s);
  margin-bottom: 6px;
  line-height: 1.4;
}

.promo-card-desc {
  font-size: 12px;
  color: var(--on-sv);
  line-height: 1.45;
  flex: 1;
}

.promo-card-until {
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--out);
  margin-top: 10px;
  font-family: var(--font-d);
  font-weight: 200;
}

.hist-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 0 4px;
}

.hist-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: .3px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hist-pill-dark {
  background: #111;
  color: #fff;
}

.hist-pill-dark span.pill-sub {
  color: var(--p);
}

body.dark .hist-pill-dark {
  background: #2a2a2a;
}

.hist-pill-outline {
  background: transparent;
  color: var(--on-s);
  border: 1.5px solid var(--out-v);
}

.hist-donut-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.hist-bonus-banner {
  background: var(--p);
  border-radius: 100px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.hist-heart-img {
  animation: heartbeat 1.4s cubic-bezier(.36, .07, .19, .97) infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .4));
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.18);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  56%,
  100% {
    transform: scale(1);
  }
}

.hist-bonus-banner-text {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 15px;
  color: #fff;
  letter-spacing: -.2px;
  line-height: 1.3;
}

.hist-section-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(22px, 5vw, 28px);
  color: var(--on-s);
  letter-spacing: -.5px;
  margin: 8px 0 12px;
  line-height: 1.2;
}

.txn-card {
  border-radius: 100px;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.txn-card.add {
  background: #d4f2b8;
}

.txn-card.redeem {
  background: #ffd6d6;
}

.txn-card.manual {
  background: color-mix(in srgb, var(--p-c) 60%, #fff);
}

body.dark .txn-card.add {
  background: rgba(100, 180, 60, .2);
}

body.dark .txn-card.redeem {
  background: rgba(198, 40, 40, .2);
}

body.dark .txn-card.manual {
  background: rgba(198, 40, 40, .15);
}

.txn-card-body {
  flex: 1;
  min-width: 0;
}

.txn-card-type {
  font-size: 11px;
  color: var(--out);
  margin-bottom: 2px;
  font-family: var(--font-d);
  font-weight: 200;
  letter-spacing: .3px;
}

.txn-card-comment {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-s);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-card-amount {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: -.5px;
  flex-shrink: 0;
}

.txn-card.add .txn-card-amount {
  color: #3a7a10;
}

.txn-card.redeem .txn-card-amount {
  color: var(--err);
}

.txn-card.manual .txn-card-amount {
  color: var(--p);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  color: var(--out);
  gap: 12px;
}

.empty-state .material-icons {
  font-size: 40px;
  opacity: .4;
}

.empty-state p {
  font-size: 14px;
  text-align: center;
}

.banket-banner {
  display: block;
  width: 100%;
  height: auto;
}

.banket-body {
  padding-top: 20px;
}

.banket-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--on-s);
  margin-bottom: 16px;
}

.banket-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.banket-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surf-v);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}

.banket-feature-icon .material-icons {
  font-size: 24px;
  color: var(--p);
}

.banket-feature-text h4 {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: var(--on-s);
  margin-bottom: 3px;
}

.banket-feature-text p {
  font-size: 12px;
  color: var(--on-sv);
  line-height: 1.4;
}

.delivery-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 100px;
  background: var(--surf-v);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.exchange-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.exchange-item {
  background: var(--surf-v);
  border: 1.5px solid var(--out-v);
  border-radius: var(--r-xl);
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.exchange-item-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 22px;
  margin-bottom: 6px;
  display: block;
}

.exchange-item-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 10px;
  color: var(--on-s);
  line-height: 1.3;
  margin-bottom: 3px;
}

.exchange-item-cost {
  font-size: 9px;
  color: var(--p);
  font-weight: 700;
}

.exchange-item-btn {
  width: 100%;
  height: 30px;
  background: var(--p);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 9px;
  cursor: pointer;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.exchange-item-btn:disabled {
  background: var(--out-v);
  color: var(--surf);
  cursor: not-allowed;
}

.exchange-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
  padding: 16px;
  background: #fff;
  border-radius: 70px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(4px) saturate(1.4);
  -webkit-backdrop-filter: blur(4px) saturate(1.4);
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity .25s var(--decel);
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--surf);
  border-radius: 44px 44px 0 0;
  padding: 8px 24px 32px;
  width: 100%;
  max-width: 500px;
  border-top: 1px solid var(--border-subtle);
  transform: translateY(100%);
  transition: transform var(--spring-enter);
  will-change: transform;
  max-height: 90dvh;
  overflow-y: auto;
}

body.dark .modal-content {
  background: #1a1010;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal:not(.show) .modal-content {
  transition: transform var(--spring-exit);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--out-v);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--on-s);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: .5px;
  position: relative;
  overflow: hidden;
}

.modal-btn.primary {
  background: var(--p);
  color: var(--on-p);
}

.modal-btn.secondary {
  background: var(--surf-v);
  color: var(--on-s);
}

.manage-modal-header {
  background: var(--p);
  border-radius: 32px;
  padding: 24px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.manage-modal-balance {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 52px;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 4px;
}

.manage-modal-balance-unit {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 12px;
}

.manage-modal-card-num {
  font-family: 'codeforclient', monospace;
  font-size: 22px;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, .5);
}

.manage-modal-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 15px;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 2px;
}

.manage-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.manage-action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 24px;
  background: var(--surf-v);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.manage-action-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-m);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.manage-action-tile-label {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 10px;
  color: var(--on-s);
  letter-spacing: .3px;
  text-align: center;
  line-height: 1.3;
}

.manage-qr-section {
  background: var(--p);
  border-radius: 28px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: default;
  margin-bottom: 4px;
}

.manage-qr-inner {
  background: #fff;
  padding: 8px;
  border-radius: 18px;
  display: inline-flex;
  flex-shrink: 0;
}

.info-row {
  margin-bottom: 16px;
}

.info-row-label {
  font-size: 12px;
  color: var(--out);
  margin-bottom: 4px;
}

.info-row-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--on-s);
}

#txn-detail-activity {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--surf);
  flex-direction: column;
  overflow-y: auto;
}

#txn-detail-activity.open {
  display: flex;
  animation: activityEnter var(--spring-enter) both;
}

.tda-body {
  flex: 1;
  padding: 20px 20px max(32px, env(safe-area-inset-bottom, 32px));
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.tda-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tda-card-pill {
  flex: 1;
  border-radius: 100px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tda-card-pill.add {
  background: #d4f2b8;
}

.tda-card-pill.redeem {
  background: #ffd6d6;
}

.tda-card-pill.manual {
  background: var(--p-c);
}

body.dark .tda-card-pill.add {
  background: rgba(100, 180, 60, .2);
}

body.dark .tda-card-pill.redeem {
  background: rgba(198, 40, 40, .2);
}

.tda-pill-text {
  flex: 1;
}

.tda-pill-type {
  font-size: 11px;
  color: var(--out);
  margin-bottom: 1px;
}

.tda-pill-comment {
  font-weight: 600;
  font-size: 14px;
  color: var(--on-s);
}

.tda-pill-amount {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 20px;
  flex-shrink: 0;
  letter-spacing: -.5px;
}

.tda-card-pill.add .tda-pill-amount {
  color: #3a7a10;
}

.tda-card-pill.redeem .tda-pill-amount {
  color: var(--err);
}

.tda-close-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surf-v);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--on-s);
  position: relative;
  overflow: hidden;
}

.tda-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tda-action-btn {
  flex: 1;
  min-height: 58px;
  border-radius: var(--r-xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .2px;
  padding: 12px 16px;
  line-height: 1.3;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.tda-action-btn .material-icons {
  font-size: 22px;
  flex-shrink: 0;
}

.tda-dispute-btn {
  background: var(--p);
  color: #fff;
}

.tda-pdf-btn {
  background: #607d8b;
  color: #fff;
}

.tda-details-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(24px, 6vw, 32px);
  color: var(--on-s);
  letter-spacing: -.5px;
  line-height: 1.3;
  margin-bottom: 16px;
}

.tda-inline-tag {
  display: inline-flex;
  align-items: center;
  background: var(--on-s);
  color: var(--surf);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: inherit;
  font-family: var(--font-d);
  font-weight: 300;
  margin: 0 2px;
  vertical-align: middle;
}

.tda-response-block {
  background: var(--ok-c);
  border-radius: 24px;
  padding: 16px 18px;
  margin-top: 16px;
  display: none;
}

.tda-response-block.show {
  display: block;
}

.tda-response-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 12px;
  color: var(--ok);
  margin-bottom: 8px;
  letter-spacing: .5px;
}

.tda-response-text {
  font-size: 14px;
  color: var(--on-s);
  line-height: 1.5;
}

#dispute-activity,
#bonus-info-activity,
#filter-activity,
#overview-activity,
#profile-activity,
#settings-activity {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--surf);
  flex-direction: column;
}

#dispute-activity.open,
#bonus-info-activity.open,
#filter-activity.open,
#overview-activity.open,
#profile-activity.open,
#settings-activity.open {
  display: flex;
  animation: activityEnter var(--spring-enter) both;
}

#profile-activity {
  overflow-y: auto;
  z-index: 500;
}

#settings-activity {
  overflow-y: auto;
  z-index: 500;
}

.bia-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 28px;
  color: var(--on-s);
  letter-spacing: -.5px;
  margin-bottom: 8px;
}

.bia-sub {
  font-size: 14px;
  color: var(--on-sv);
  line-height: 1.6;
  margin-bottom: 24px;
}

.bia-percent-card {
  background: var(--p);
  border-radius: 44px;
  padding: 28px 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bia-percent-num {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 72px;
  color: #fff;
  line-height: 1;
  letter-spacing: -3px;
}

.bia-percent-label {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 15px;
  color: rgba(255, 255, 255, .8);
  letter-spacing: -.2px;
}

.bia-rule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surf-v);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
}

.bia-rule-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-l);
  background: var(--p-c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bia-rule-icon .material-icons {
  font-size: 22px;
  color: var(--p);
}

.bia-rule-text h4 {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: var(--on-s);
  margin-bottom: 3px;
}

.bia-rule-text p {
  font-size: 12px;
  color: var(--on-sv);
  line-height: 1.4;
}

.fa-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--surf-v);
  border-radius: 100px;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.fa-check-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--on-s);
}

.fa-check-sub {
  font-size: 12px;
  color: var(--out);
  margin-top: 2px;
}

.fa-toggle {
  width: 50px;
  height: 30px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .25s;
  position: relative;
}

.fa-toggle.on {
  background: var(--p);
}

.fa-toggle.off {
  background: var(--out-v);
}

.fa-toggle::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  transition: left .28s cubic-bezier(.34, 1.4, .64, 1);
}

.fa-toggle.on::after {
  left: 23px;
}

.fa-toggle.off::after {
  left: 3px;
}

.oa-canvas-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.oa-canvas-wrap canvas {
  max-width: 240px;
  max-height: 240px;
}

.oa-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oa-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--surf-v);
}

.oa-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.oa-legend-label {
  font-size: 14px;
  flex: 1;
}

.oa-legend-val {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 14px;
  color: var(--p);
}

.pa-header {
  padding: max(24px, env(safe-area-inset-top, 24px)) 20px 16px;
  background: transparent;
  position: relative;
}

.pa-greeting {
  text-align: center;
  padding: 20px 0 10px;
}

.pa-greeting-text {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--out);
  margin-bottom: 12px;
}

.pa-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pa-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 32px;
  color: var(--on-s);
  letter-spacing: -.5px;
  line-height: 1.2;
}

.pa-edit-name {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surf-v);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--out);
  position: relative;
  overflow: hidden;
}

.pa-edit-name .material-icons {
  font-size: 20px;
}

.pa-body {
  flex: 1;
  padding: 20px max(20px, env(safe-area-inset-right, 20px)) max(32px, env(safe-area-inset-bottom, 32px)) max(20px, env(safe-area-inset-left, 20px));
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.pa-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}

.pa-stat {
  background: var(--surf-v);
  border-radius: 100px;
  padding: 16px 12px;
  text-align: center;
}

.pa-stat-val {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 28px;
  color: var(--p);
  letter-spacing: -1px;
}

.pa-stat-label {
  font-family: var(--font-d);
  font-size: 10px;
  font-weight: 200;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--out);
  margin-top: 6px;
}

.pa-section-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--out);
  margin: 20px 0 12px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.ach-card {
  border-radius: 24px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--surf-v);
  border: 1px solid var(--out-v);
}

.ach-card.earned {
  background: var(--p);
  border-color: var(--p);
}

.ach-card.earned .ach-name,
.ach-card.earned .material-icons {
  color: #fff;
}

.ach-card.earned .ach-desc {
  color: rgba(255, 255, 255, .7);
}

.ach-card .material-icons {
  font-size: 28px;
  color: var(--out);
}

.ach-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 10px;
  color: var(--on-s);
}

.ach-desc {
  font-family: var(--font-b);
  font-size: 9px;
  color: var(--out);
}

.pa-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 32px;
}

.pa-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 60px;
  background: var(--surf-v);
  border: 1.5px solid var(--out-v);
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: .5px;
  color: var(--on-s);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pa-action-btn .material-icons {
  font-size: 18px;
}

.pa-action-danger {
  background: var(--err-c);
  border-color: var(--err);
  color: var(--err);
}

.pa-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  background: var(--surf-v);
  border: 1.5px solid var(--out-v);
  border-radius: 60px;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: .5px;
  color: var(--on-s);
  cursor: pointer;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.pa-info-btn .material-icons {
  font-size: 20px;
  color: var(--p);
}

.sa-body {
  flex: 1;
  padding: 20px max(20px, env(safe-area-inset-right, 20px)) max(32px, env(safe-area-inset-bottom, 32px)) max(20px, env(safe-area-inset-left, 20px));
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.sa-section {
  background: var(--surf-v);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 4px 20px;
  margin-bottom: 16px;
}

.sa-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--out-v);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sa-row:last-child {
  border-bottom: none;
}

.sa-row-left {
  flex: 1;
}

.sa-row-label {
  font-size: 15px;
  color: var(--on-s);
}

.sa-row-sub {
  font-size: 12px;
  color: var(--out);
  margin-top: 3px;
}

.sa-row-value {
  font-size: 14px;
  color: var(--p);
  font-family: var(--font-d);
  font-weight: 300;
}

.sa-section-label {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--out);
  margin: 20px 0 8px 4px;
}

.theme-pills {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}

.theme-pill {
  flex: 1;
  height: 44px;
  border: 1.5px solid var(--out-v);
  border-radius: var(--r-f);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 11px;
  color: var(--on-sv);
  position: relative;
  overflow: hidden;
}

.theme-pill.selected {
  background: var(--p);
  border-color: var(--p);
  color: #fff;
}

.theme-pill .material-icons {
  font-size: 17px;
}

#transfer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--surf);
  flex-direction: column;
  overflow-y: auto;
}

#transfer-overlay.open {
  display: flex;
  animation: activityEnter var(--spring-enter) both;
}

.transfer-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--out-v);
  flex-shrink: 0;
}

.transfer-title-txt {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 14px;
  color: var(--on-s);
  letter-spacing: .5px;
}

.transfer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px max(20px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.transfer-step {
  display: none;
  flex-direction: column;
  gap: 0;
}

.transfer-step.active {
  display: flex;
}

.transfer-my-card {
  background: linear-gradient(135deg, #7B1D1D 0%, #C62828 50%, #8B0000 100%);
  border-radius: var(--r-xl);
  padding: 20px 22px;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeUp .3s var(--decel) both;
}

.transfer-card-label {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: 10px;
}

.transfer-card-number {
  font-family: 'codeforclient', monospace;
  font-size: 36px;
  letter-spacing: 10px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.transfer-card-balance {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(26px, 6vw, 40px);
  letter-spacing: -1px;
  line-height: 1;
}

.transfer-card-balance-unit {
  font-size: 13px;
  opacity: .7;
  font-family: var(--font-d);
  font-weight: 200;
  margin-left: 4px;
}

.transfer-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--out);
}

.transfer-arrow-line {
  flex: 1;
  height: 1px;
  background: var(--out-v);
}

.transfer-arrow .material-icons {
  font-size: 22px;
  color: var(--p);
  animation: arrowPulse 1.5s ease infinite;
}

@keyframes arrowPulse {

  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(4px);
    opacity: .6;
  }
}

.transfer-recipient-card {
  background: var(--surf-v);
  border: 1px solid var(--out-v);
  border-radius: var(--r-xl);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  animation: fadeUp .3s var(--decel) both;
}

.transfer-recipient-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--p-c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.transfer-recipient-avatar .material-icons {
  font-size: 24px;
  color: var(--p);
}

.transfer-recipient-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 16px;
  color: var(--on-s);
}

.transfer-recipient-sub {
  font-size: 12px;
  color: var(--out);
  margin-top: 3px;
}

.transfer-amount-display {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: clamp(40px, 10vw, 64px);
  text-align: center;
  color: var(--on-s);
  padding: 16px 0 8px;
  letter-spacing: -2px;
  min-height: 72px;
  line-height: 1;
  border-bottom: 2px solid var(--out-v);
  margin-bottom: 8px;
}

.transfer-amount-unit {
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--out);
  margin-bottom: 20px;
}

.transfer-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.transfer-key {
  height: 64px;
  border: none;
  border-radius: 28px;
  background: var(--surf-v);
  font-size: 20px;
  font-family: var(--font-d);
  font-weight: 300;
  color: var(--on-s);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.transfer-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--out-v);
}

.transfer-confirm-row:last-child {
  border-bottom: none;
}

.transfer-confirm-label {
  font-size: 13px;
  color: var(--out);
}

.transfer-confirm-value {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 15px;
  color: var(--on-s);
}

.transfer-confirm-value.highlight {
  color: var(--p);
  font-size: 18px;
}

.transfer-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  text-align: center;
  gap: 16px;
}

.transfer-success-title {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 22px;
  color: var(--on-s);
  letter-spacing: -.5px;
}

#chips-archive-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--surf);
  flex-direction: column;
}

#chips-archive-overlay.open {
  display: flex;
  animation: slideUpFull .35s var(--ios-sheet) both;
}

@keyframes slideUpFull {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.archive-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: var(--surf);
  border-bottom: 1px solid var(--out-v);
  flex-shrink: 0;
}

.archive-back {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  border-radius: var(--r-f);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--on-sv);
  position: relative;
  overflow: hidden;
}

.archive-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 14px;
  color: var(--on-s);
}

.archive-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.archive-card {
  background: var(--surf);
  border: 1px solid var(--out-v);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  animation: fadeUp .3s var(--decel) both;
}

.archive-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-m);
  background: var(--ok-c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.archive-card-icon .material-icons {
  font-size: 22px;
  color: var(--ok);
}

.archive-card-body {
  flex: 1;
}

.archive-card-title {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 13px;
  color: var(--on-s);
}

.archive-card-date {
  font-size: 11px;
  color: var(--out);
  margin-top: 3px;
}

.archive-card-badge {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--r-f);
  background: var(--ok-c);
  color: var(--ok);
  flex-shrink: 0;
}

.exchange-confirm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surf-v);
  border-radius: var(--r-xl);
  margin-bottom: 16px;
}

.exchange-confirm-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  flex-shrink: 0;
  background: var(--surf);
}

.exchange-confirm-name {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 15px;
  color: var(--on-s);
  margin-bottom: 4px;
}

.exchange-confirm-cost {
  font-size: 13px;
  color: var(--p);
  font-weight: 600;
}

.exchange-confirm-warning {
  background: var(--p-c);
  border-radius: var(--r-m);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--on-s);
  line-height: 1.5;
}

.exchange-confirm-warning .material-icons {
  color: var(--p);
  font-size: 20px;
  flex-shrink: 0;
}

#screen-cabinet-desktop {
  background: var(--surf);
  overflow-x: hidden;
}

.desk-layout {
  display: flex;
  min-height: 100dvh;
}

.desk-sidebar {
  width: 72px;
  min-width: 72px;
  background: var(--glass-bg);
  backdrop-filter: var(--blur-val);
  -webkit-backdrop-filter: var(--blur-val);
  border-right: 1px solid var(--border-subtle);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  transition: width .35s cubic-bezier(.05, .7, .1, 1), min-width .35s cubic-bezier(.05, .7, .1, 1);
  z-index: 10;
  flex-shrink: 0;
}

.desk-sidebar:hover {
  width: 220px;
  min-width: 220px;
}

.desk-sidebar-logo {
  display: flex;
  align-items: center;
  height: 44px;
  border-radius: 18px;
  margin: 4px 0 12px 3px;
  flex-shrink: 0;
  overflow: hidden;
  gap: 12px;
}

.desk-sidebar-logo img {
  width: 30px;
  height: 30px;
  min-width: 30px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

.desk-sidebar-logo-name {
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--on-s);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s var(--emphasized-dec);
}

.desk-sidebar:hover .desk-sidebar-logo-name {
  opacity: 1;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: var(--r-l);
  cursor: pointer;
  color: var(--on-sv);
  font-family: var(--font-d);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: .5px;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: background var(--standard-dec), color var(--standard-dec);
  white-space: nowrap;
  min-height: 46px;
}

.side-item .side-sym {
  font-family: 'Material Symbols Rounded';
  font-size: 22px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: inherit;
  flex-shrink: 0;
  min-width: 22px;
  transition: font-variation-settings 300ms var(--emphasized-dec);
}

.side-item.active {
  background: var(--p-c);
  color: var(--p);
}

.side-item.active .side-sym {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.side-item:not(.active):hover {
  background: var(--surf-v);
}

.side-item-label {
  opacity: 0;
  overflow: hidden;
  max-width: 0;
  transition: opacity .25s var(--emphasized-dec), max-width .35s cubic-bezier(.05, .7, .1, 1);
}

.desk-sidebar:hover .side-item-label {
  opacity: 1;
  max-width: 160px;
}

.desk-sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--out-v);
}

.desk-action-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--r-m);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-sv);
  position: relative;
  overflow: hidden;
  transition: background var(--standard);
}

.desk-action-btn:hover {
  background: var(--surf-v);
}

.desk-action-btn .material-icons {
  font-size: 20px;
}

.desk-main {
  overflow-y: auto;
  padding: 0 32px;
  flex: 1;
}

.desk-content {
  max-width: 680px;
}

#tab-home-m {
  padding-top: 12px;
}

#tab-history-m,
#tab-banket-m,
#tab-delivery-m,
#tab-exchange-m {
  padding-top: 76px;
}

#tab-home-d,
#tab-history-d,
#tab-banket-d,
#tab-delivery-d,
#tab-exchange-d {
  padding-top: 24px;
}

.snackbar {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(24px) scale(.92);
  background: color-mix(in srgb, var(--on-s) 90%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--surf);
  padding: 12px 24px;
  border-radius: var(--r-f);
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 220ms var(--emphasized-acc), transform 380ms var(--spring-overshoot);
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

#screen-maintenance {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: linear-gradient(135deg, #C62828 0%, #8B0000 60%, #4A0000 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: #fff;
}

#screen-ban {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1010 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: #fff;
}

canvas#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  display: none;
}

#screen-pwa-guide {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
}

#ctx-menu {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--surf);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
}

#ctx-menu.show {
  display: block;
  animation: ctxIn 200ms var(--spring-exit) both;
}

@keyframes ctxIn {
  from {
    opacity: 0;
    transform: scale(.88) translateY(-6px);
    transform-origin: top left;
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-m);
  cursor: pointer;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-s);
  position: relative;
  overflow: hidden;
}

.ctx-item .material-icons {
  font-size: 18px;
  color: var(--out);
  flex-shrink: 0;
}

.ctx-divider {
  height: 1px;
  background: var(--out-v);
  margin: 4px 8px;
}

.custom-action-btn {
  width: 100%;
  display: block;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 0 16px 0;
  cursor: pointer;
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.custom-btn-img {
  width: 100%;
  height: auto;
  display: block;
}

.promo-banner {
  width: 100%;
  margin: 16px 0;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.promo-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.warning-banner {
  width: 100%;
  margin-top: 20px;
  display: block;
}

.warning-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.da-textarea {
  width: 100%;
  min-height: 140px;
  border: 1.5px solid var(--out-v);
  border-radius: var(--r-l);
  padding: 14px 16px;
  font-family: var(--font-b);
  font-size: 15px;
  color: var(--on-s);
  background: var(--surf);
  resize: none;
  outline: none;
  transition: border-color .2s;
  -webkit-user-select: text;
  user-select: text;
}

.da-textarea:focus {
  border-color: var(--p);
}

.da-ref {
  background: var(--surf-v);
  border-radius: 20px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--on-sv);
  border-left: 3px solid var(--p);
}

.floating-back-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surf-v);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.floating-back-btn .material-icons {
  font-size: 22px;
  color: var(--on-sv);
  position: relative;
  z-index: 1;
}

body.dark .floating-back-btn .material-icons {
  color: var(--on-s);
}

.modal-title-bubble {
  background: var(--surf-v);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 10px 20px;
  flex: 1;
}

.modal-title-text {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: 14px;
  color: var(--on-s);
  letter-spacing: .3px;
  display: block;
}

#ptr-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9001;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  transition: height .25s ease;
}

#ptr-indicator.visible {
  height: 64px;
}

#ptr-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surf-v);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  transition: transform .3s ease, opacity .2s ease;
  opacity: 0;
}

#ptr-indicator.visible #ptr-spinner {
  opacity: 1;
}

#ptr-spinner img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes activityEnter {
  from {
    transform: translateY(100%);
    opacity: .8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pnav-item md-ripple {
  display: none !important;
}

.floating-back-btn md-ripple {
  display: none !important;
}

.pnav-item.pnav-active .nav-icon-img {
  transition: filter 0s !important;
}
/* Fade out только для внутренних элементов сплешскрина (контейнер не трогаем) */
#page-loader.fade-out .loader-ad-box,
#page-loader.fade-out .loader-spinner-gif,
#page-loader.fade-out .loader-version {
  animation: elementsFadeOut 0.3s ease forwards;
}

/* Логотип НЕ fade out - оставляем для него только анимацию перемещения */
#page-loader.fade-out .loader-logo {
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@keyframes elementsFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
  }
}
/* Плавное появление кабинета */
#screen-cabinet-mobile {
  animation: cabinetFadeIn 0.4s ease forwards;
}

@keyframes cabinetFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Плавное появление floating кнопок */
.floating-actions {
  opacity: 0;
  animation: buttonsFadeIn 0.4s ease 0.3s forwards;
}

.floating-btn {
  opacity: 0;
  transform: scale(0.9);
  animation: buttonPopIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.floating-btn:nth-child(1) { animation-delay: 0.35s; }
.floating-btn:nth-child(2) { animation-delay: 0.4s; }
.floating-btn:nth-child(3) { animation-delay: 0.45s; }

@keyframes buttonsFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes buttonPopIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ============================================================
   КАРУСЕЛЬ БАННЕРОВ (как на medkomfort43.ru)
   ============================================================ */

.banner-carousel {
  width: 100%;
  padding: 0;
  margin: 0 0 12px 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  animation: fadeUp .45s var(--decel) .05s both;
}

.banner-track {
  display: flex;
  width: 300%; /* 3 слайда = 300% */
  transition: transform .7s cubic-bezier(.65, 0, .35, 1);
  cursor: grab;
}

.banner-track:active {
  cursor: grabbing;
}

.banner-slide {
  flex: 0 0 33.333%;
  width: 33.333%;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.banner-slide-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 44;
  object-fit: fill; /* растягивает на весь контейнер */
}

/* ===== ТОЧКИ ===== */
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 0 0;
  margin-bottom: 16px;
  animation: fadeUp .45s var(--decel) .08s both;
}

.banner-dot {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: rgba(198, 40, 40, .15);
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: opacity .2s ease;
}

.banner-dot:hover {
  opacity: 0.7;
}

.banner-dot-fill {
  position: absolute;
  inset: 0;
  background: var(--p);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
}