@font-face {
  font-family: "Joker Rubik";
  src: url("assets/fonts/skinrave-c9f6ebf08ddd616b.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300 900;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0102, U+0131, U+0152-0153, U+02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+2215;
}

@font-face {
  font-family: "Joker Rubik";
  src: url("assets/fonts/skinrave-21445b8bd0ec5702.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300 900;
  unicode-range: U+0020, U+0041, U+00A0, U+00C1, U+0102, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Joker Unna";
  src: url("assets/fonts/skinrave-a9ea9ad630487a2c.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Joker Unna";
  src: url("assets/fonts/skinrave-0255eb7af02910bd.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --main-bg: #f0f2f5;
  --panel: #ffffff;
  --panel-soft: #f8f9fb;
  --panel-strong: #edeef2;
  --line: #e0e2e8;
  --accent-red: #d4213d;
  --accent-red-hover: #b81c34;
  --accent-red-light: #fce8ec;
  --accent-green: #1a9e5c;
  --accent-green-hover: #158a4f;
  --accent-green-light: #e6f7ef;
  --text: #1a1a2e;
  --text-white: #ffffff;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --warning-bg: #fef9e7;
  --warning-line: #f0c840;
  --warning-text: #92700c;
  --radius: 12px;
  --radius-sm: 8px;
  --spacing: 0.25rem;
  --text-xs: 0.75rem;
  --text-xs--line-height: 1.33333;
  --text-lg: 1.125rem;
  --text-lg--line-height: 1.55556;
  --font-weight-bold: 700;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
  --shadow-elevated: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
  outline: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--main-bg);
  color: var(--text);
  font-family: "Joker Rubik", Rubik, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background:
    linear-gradient(165deg, #ffffff 0%, #f0f2f5 40%, #e8edf4 100%);
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  background-color: transparent;
  border-radius: 0;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

.uppercase {
  text-transform: uppercase;
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.checkout-shell {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  min-height: 100dvh;
  padding: 24px 16px 40px;
}

.checkout-content {
  width: min(100%, 480px);
  min-width: 0;
  max-width: 100%;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0 4px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.brand-mark svg {
  display: block;
  height: 40px;
  flex: 0 0 auto;
}

.brand-logo text {
  fill: var(--accent-red);
}

.invoice-pill {
  flex: 0 0 auto;
  border: 1px solid var(--accent-red);
  border-radius: 20px;
  background: var(--accent-red-light);
  color: var(--accent-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 10px 16px;
  text-transform: uppercase;
}

.gift-card {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}

.gift-card > * {
  min-width: 0;
}

.app-header,
.app-network,
.appPaymentBox {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.app-header {
  padding: 24px 20px;
}

.app-header-subtitle {
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-red) 0%, #e84464 50%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin-top: 20px;
}

.amount-field {
  display: block;
  min-width: 0;
}

.amount-label,
.app-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.amount-control {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 12px 14px 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.amount-control:focus-within {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(212, 33, 61, 0.1);
}

.amount-control--readonly {
  border-color: var(--line);
  background: var(--accent-green-light);
}

.amount-input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: "Joker Rubik", Rubik, Arial, sans-serif;
  font-size: clamp(22px, 6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.amount-control--readonly .amount-input {
  color: var(--accent-green);
}

.amount-input::placeholder {
  color: #c0c4cc;
}

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

.amount-token {
  flex: 0 0 auto;
  color: var(--accent-red);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  padding-bottom: 4px;
}

.amount-control--readonly .amount-token {
  color: var(--accent-green);
}

.app-header-note {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid #d1e7dd;
  border-radius: 20px;
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  padding: 8px 14px;
}

.app-header-note span:last-child {
  min-width: 0;
}

.info-dot,
.warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.appPaymentBox {
  padding: 16px;
}

.appQrPanel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 4px 0 6px;
  text-align: center;
}

.qr-shell {
  width: 260px;
  max-width: 100%;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.appQrCode {
  display: block;
  width: 236px;
  height: 236px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
}

.appQrCode--disabled {
  opacity: 0.55;
}

.payment-summary {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 12px 14px;
  text-align: left;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.summary-row strong,
.summary-value {
  flex: 1 1 auto;
  justify-content: flex-end;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.appWarningPanel {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 12px;
  text-align: left;
}

.appWarningPanel span:last-child {
  min-width: 0;
}

.address-warning {
  margin-top: 12px;
  border: 1px solid #f5c2c7;
  border-radius: var(--radius-sm);
  background: #fce8ec;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  padding: 10px 12px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 700;
  padding: 14px 18px;
  text-transform: uppercase;
  box-shadow: var(--shadow-elevated);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .checkout-shell {
    padding: 14px 12px 24px;
  }

  .brand-mark {
    font-size: 22px;
  }

  .invoice-pill {
    font-size: 10px;
    padding: 8px 12px;
  }

  .app-header {
    padding: 18px 16px;
  }

  .app-header-subtitle {
    font-size: clamp(24px, 9vw, 34px);
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}
