*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

a:not(.link) {
  text-decoration: none;
}

a.link {
  color: var(--link-color);
}

body, h1, h2, h3, h4,
button, input, label {
  line-height: 1.4;
}

h1, h2,
h3, h4 {
  text-wrap: balance;
  font-weight: 500;
}

a {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

img,
picture {
  width: 100%;
  display: block;
}

input, button,
textarea, select {
  font: inherit;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
}

textarea {
  min-height: 7em;
  resize: none;
}

:target {
  scroll-margin-block: 5ex;
}

body {
  color: var(--app-text-color);
  background-color: var(--app-body-color);
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  font-variant-numeric: lining-nums;
  font-size: 14px;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color);
  border: 4px solid transparent;
  background-clip: content-box;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-hover-color);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-active-color);
}

::-webkit-scrollbar-corner {
  width: 0;
  height: 0;
}

b, strong {
  font-weight: 500;
}

html, body, .layout {
  min-height: 100vh;
}

.layout {
  background-color: var(--app-background-color);
  max-width: 512px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 520px) {
  .layout {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
  }
}

.header, .btn, .gateway-method-list__item {
  -webkit-user-select: none;
  user-select: none;
}

.footer {
  padding: 16px;
  text-align: center;
  color: var(--label-color);
  border-top: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  color: white;
  font-weight: 500;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--element-radius);
  background-color: var(--primary-color);
  cursor: pointer;
  transition: var(--transition-100);
  font-size: 16px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  gap: 4px;
}

.btn:hover {
  opacity: .9;
}

.btn:active {
  transform: scale(.96);
  opacity: .75;
}

.btn-flat {
  background-color: var(--primary-flat-color);
  color: var(--primary-color);
}

.btn-green {
  background-color: var(--green-color);
}

.btn-red {
  background-color: var(--red-color);
}

.btn-green.btn-flat {
  background-color: var(--green-flat-color);
  color: var(--green-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary.btn-flat {
  background-color: var(--secondary-flat-color);
  color: var(--secondary-color);
}

.btn-shine::after {
  border-radius: inherit;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: skewX(-20deg) translateX(-125%);
  background-image: linear-gradient(to right, transparent, rgba(255, 255, 255, .2), transparent);
  animation: shine 2s ease infinite;
  pointer-events: none;
}

.btn-group {
  display: flex;
  gap: var(--element-radius);
}

.btn-group.is-center {
  justify-content: center;
}

.btn.is-icon {
  width: 28px;
  height: 28px;
}

.scrollable {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  -webkit-user-select: none;
  user-select: none;
}

.scrollable__left,
.scrollable__right {
  padding: 6px
}

.scrollable__arrow {
  background-color: rgba(180, 180, 255, .1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #90b5ff;
  font-size: 25px;
  cursor: pointer;
  transition: all .1s ease-in-out;
  height: 100%;
}

.scrollable__arrow .icon {
  position: relative;
}

.scrollable__left .scrollable__arrow .icon {
  left: -1px;
}

.scrollable__right .scrollable__arrow .icon {
  left: 1px;
}

.scrollable__target {
  overflow-x: auto;
  scroll-behavior: smooth;
}

.scrollable__target::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.scrollable__arrow:hover {
  opacity: .75;
}

.scrollable__arrow:active {
  transform: scale(.95);
}

.scrollable__arrow:not(.is-active) {
  opacity: .5;
}

.tabs {
  /* background-color: var(--app-background-color); */
}

.tabs-list {
  display: flex;
}

.tabs-item {
  padding: 14px 18px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  color: var(--label-color);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s ease-in-out;
}

.tabs-item:hover {
  background-color: rgba(255, 255, 255, .02);
}

.tabs-item.is-active {
  color: var(--app-text-color);
}

.tabs-item::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 0;
  right: 6px;
  height: 3px;
  background-color: var(--accent-color);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  transition: all .15s ease-in-out;
}

.tabs-item:not(.is-active)::after {
  opacity: 0;
}

[data-tab-content]:not(.is-active) {
  display: none;
}

.tabs.scrollable {
  grid-template-columns: 46px 1fr 46px;
}

.tabs .scrollable__left {
  padding: 6px 6px 6px 12px;
}

.tabs .scrollable__right {
  padding: 6px 12px 6px 6px;
}

.header {
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--gold-color), var(--gold-dark-color));
  color: var(--gold-black-color);
  border-bottom-left-radius: var(--block-radius);
  border-bottom-right-radius: var(--block-radius);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--app-padding);
  height: 64px;
}

.header-title {
  display: flex;
  font-weight: 600;
  font-size: 22px;
  gap: 10px;
}

.header-title img {
  width: 32px;
  height: 32px;
}

.header-balance {
  color: white;
  display: flex;
  gap: 8px;
}

.header-balance__item {
  line-height: 1;
  background-color: var(--app-background-color);
  border-radius: var(--element-radius);
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-balance__title {
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, .75);
}

.header-balance__value {
  font-family: 'DM Sans', sans-serif;
}

.header-tabs {
  border-top: 1px solid rgba(0, 0, 0, .1);
  padding: 2px 0;
}

.header-tabs .tabs-item {
  color: var(--gold-black-color);
}

.header-tabs .tabs-item:active {
  background-color: rgba(0, 0, 0, .02);
}

.header-tabs .tabs-item::after {
  background-color: var(--gold-black-color);
}

.header-tabs .scrollable__arrow {
  background-color: var(--gold-flat-color);
  color: var(--gold-black-color);
}

.is-hidden {
  display: none;
}

.is-disabled {
  cursor: not-allowed;
  opacity: .5 !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field + .field {
  margin-top: 20px;
}

.field p {
  font-size: 18px;
}

.field-label, .section-label {
  text-transform: uppercase;
  color: var(--label-color);
  font-weight: 500;
}

.field-input {
  border: 1px solid var(--border-color);
  border-radius: var(--element-radius);
  background-color: var(--flat-color);
  font-size: 18px;
  font-weight: 500;
  padding: 11px 12px;
  outline: none;
  transition: var(--transition-300);
  color: var(--app-text-color);
  height: 46px;
  line-height: 1;
}

.field-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.field-amount {
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -1px;
}

.field-group {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.field-group .btn {
  padding: 0;
  height: 46px;
  font-size: 24px;
}

.field-stack {
  position: relative;
}

.field-stack .icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.field-stack .icon:first-child {
  left: 12px;
  font-size: 24px;
  color: var(--accent-color);
}

.field-stack .icon:last-child {
  font-size: 18px;
  right: 12px;
  color: var(--label-color);
}

.field-stack .field-input {
  width: 100%;
  padding-left: 44px;
}

.field-stack.is-textarea .icon {
  top: 11px;
  transform: none;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 0;
  text-transform: uppercase;
  color: var(--label-color);
  font-weight: 500;
}

.section {
  padding: var(--app-padding);
}

.section p + p {
  margin-top: 20px;
}

.section + .section {
  border-top: 1px solid var(--border-color);
}

.section-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-details p,
.section-details ul {
  line-height: 1.5;
}

.section-details ul li {
  list-style: inside;
}

.section-details p + p {
  margin-top: 0;
}

.section-label {
  margin-bottom: var(--app-padding);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: var(--app-padding);
}

.section-header:not(:last-child) {
  margin-bottom: var(--app-padding);
}

.section-header .section-label {
  margin-bottom: 0;
}

.section-header .btn {
  flex: 0 0 auto;
}

.calc {
  display: flex;
  gap: min(3vmin, 24px);
  align-items: center;
  justify-content: space-between;
  line-height: 1;
  --font-size: min(20px, calc(10px + 2vmin));
}

.calc-input input {
  text-align: center;
  padding: 4px;
  height: auto;
  font-size: var(--font-size);
}

.calc-symbol {
  font-size: var(--font-size);
  color: var(--accent-color);
  min-width: 0;
}

.calc-number {
  font-size: var(--font-size);
  padding: 6px 0;
}

.calc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  flex: 1 0 auto;
  min-width: 0;
}

.calc-input {
  flex: 0 1 auto; 
}

.calc-label {
  color: var(--label-color);
  text-align: center;
  line-height: 1.2;
}

.modal {
  background-color: rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: var(--app-padding);
  transition: var(--transition-300);
}

.modal-content {
  max-width: calc(512px - var(--app-padding) * 2);
  margin: 0 auto;
  background-color: var(--modal-background-color);
  border-radius: var(--block-radius);
  overflow-x: hidden;
  overflow-y: auto;
  transition: var(--transition-300);
  max-height: 100%;
}

.modal:not(.is-show) {
  opacity: 0;
  pointer-events: none;
}

.modal:not(.is-show) .modal-content {
  transform: scale(.95);
}

.modal-header, .modal-body, .modal-footer {
  padding: var(--app-padding);
}

.modal-header {
  display: grid;
  grid-template-columns: 1fr 32px;
  align-items: center;
  border-bottom: 1px solid var(--modal-border-color);
}

.modal-title {
  font-size: 20px;
  font-weight: 500;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--element-radius);
  background-color: var(--accent-flat-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: var(--accent-color);
  transition: var(--transition-100);
  cursor: pointer;
}

.modal-close:hover {
  opacity: .75;
}

.modal-close:active {
  transform: scale(.96);
  opacity: .5;
}

.modal-footer {
  border-top: 1px solid var(--modal-border-color);
  display: flex;
  justify-content: center;
  gap: var(--element-radius);
  background-color: var(--flat-color);
}

.modal-body p {
  margin-bottom: var(--app-padding);
}

.table {
  overflow-x: auto;
}

.table table {
  width: 100%;
  border-collapse: collapse;
}

.table .btn-group {
  gap: 6px;
  justify-content: center;
}

.table th, .table td {
  text-align: center;
  padding: 8px;
  font-size: 12px;
}

.table thead th {
  border-bottom: 2px solid var(--border-color);
}

.table tbody tr:not(:last-child) th, 
.table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

.table tbody th {
  border-right: 1px solid var(--border-color);
}

.modal .table {
  --border-color: rgba(255, 255, 255, .1);
  margin: calc(-1 * var(--app-padding));
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.features-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border-color);
  border-radius: var(--block-radius);
  padding: var(--block-radius);
}

.features-item__icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
}

.features-item__icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color);
  border-radius: var(--element-radius);
  opacity: .2;
}

.features-item__icon .icon {
  color: var(--color);
}

.features-item__title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
}

.materials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.materials-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.materials-item__cover {
  border-radius: var(--element-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
}

.materials-item__cover > * {
  width: 100%;
  display: block;
  transition: all .2s ease-in-out;
  opacity: 0;
  height: 64px;
}

.materials-item__cover > *.loaded {
  opacity: 1;
  height: auto;
}

.materials-item__details {
  border: 1px solid var(--border-color);
  border-radius: var(--element-radius);
  font-size: 12px;
}

.materials-item__data {
  display: flex;
  justify-content: space-between;
  padding: var(--element-radius);
  gap: 8px;
}

.materials-item__data:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.materials-item__data > :first-child {
  color: var(--label-color);
  flex: 1 0 auto;
}

.materials-item__data > :last-child {
  text-align: right;
}

.materials-item__tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.materials-item__tags b {
  display: inline-block;
  padding: 6px;
  line-height: 1;
  font-size: 10px;
  background-color: var(--accent-flat-color);
  border-radius: var(--badge-radius);
}

.materials-item__actions .btn {
  width: 100%;
}

.list {
  list-style: inside;
}

.list li:not(:last-child) {
  margin-bottom: 6px;
}

p + .list {
  margin-top: 12px;
}

.list + p {
  margin-top: 20px;
}

@media (hover: none) {
  .scrollable {
    grid-template-columns: 1fr !important;
  }

  .scrollable__left,
  .scrollable__right {
    display: none;
  }

  .scrollable__target {
    padding: 0 calc(-6px + var(--app-padding));
  }

  .table::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

@media (max-width: 424px) {
  .features, .materials {
    grid-template-columns: 1fr;
  }
}