* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-sans);
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #EAF3FB 0%, #F3F8FC 58%, #E5F0F8 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.balance-app {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(28px + env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    calc(28px + env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
}

.balance-app--error {
  place-items: center;
}

.balance-app__noise,
.balance-app__glow {
  display: none;
}

.balance-shell,
.error-view {
  position: relative;
  z-index: 1;
}

.balance-shell {
  width: min(100%, 430px);
}

.card-stage {
  display: flex;
  justify-content: center;
}

.error-view {
  width: min(100%, 430px);
  padding: 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.error-view h1 {
  margin: 10px 0 0;
  font-size: 2rem;
  font-weight: 650;
  line-height: 1.1;
}

.error-view p {
  margin: 12px 0 0;
  color: var(--ink-700);
  line-height: 1.55;
}

.error-view__request {
  margin-top: 18px;
}

@media (min-width: 760px) {
  .balance-app {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

@media (max-width: 560px) {
  .balance-app {
    min-height: 100dvh;
    padding: 0;
    place-items: stretch;
  }

  .balance-shell,
  .card-stage,
  .balance-card {
    width: 100%;
  }

  .error-view {
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
