.aaa-pay-root, .aaa-pay-root * { box-sizing: border-box; }
.aaa-pay-root {
  --pay-bg: #0c0d10;
  --pay-panel: #14161b;
  --pay-elev: #1a1d24;
  --pay-line: rgba(255, 255, 255, 0.1);
  --pay-line-strong: rgba(255, 255, 255, 0.18);
  --pay-text: #f5f6f7;
  --pay-muted: #9298a2;
  --pay-faint: #646a75;
  --pay-accent: #f5f5f7;
  --pay-accent-soft: rgba(245, 245, 247, 0.13);
  --pay-mint: #a9f3c4;
  --pay-font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --pay-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  position: fixed; inset: 0; z-index: 2147483000; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(3, 4, 6, 0.7); backdrop-filter: blur(16px);
  font-family: var(--pay-font); color: var(--pay-text);
}
.aaa-pay-root[data-open="true"] { display: flex; }
.aaa-pay-modal {
  width: min(500px, 100%); max-height: min(93vh, 1000px); overflow-y: auto;
  background: linear-gradient(165deg, rgba(245, 245, 247, 0.07), transparent 40%), var(--pay-bg);
  border: 1px solid var(--pay-line-strong); border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: aaaPayIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
@keyframes aaaPayIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.aaa-pay-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 23px 0; gap: 16px; }
.aaa-pay-brand { display: flex; align-items: center; gap: 9px; color: var(--pay-muted); font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; }
.aaa-pay-brand b { color: var(--pay-text); font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 13px; }
.aaa-pay-brand__coin { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50%; border: 1px solid rgba(245,245,247,.35); color: var(--pay-accent); font-weight: 700; font-size: 9px; letter-spacing: 0; }
.aaa-pay-close { border: 1px solid var(--pay-line); background: rgba(255,255,255,.035); color: var(--pay-muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.aaa-pay-close:hover { color: var(--pay-text); border-color: var(--pay-line-strong); }
.aaa-pay-body { padding: 24px 23px 25px; }
.aaa-pay-eyebrow { margin: 0 0 7px; color: var(--pay-accent); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.aaa-pay-title { margin: 0; font-size: 34px; line-height: 1; letter-spacing: -0.05em; font-weight: 500; }
.aaa-pay-sub { margin: 12px 0 20px; color: var(--pay-muted); font-size: 12.5px; line-height: 1.6; font-weight: 300; }
.aaa-pay-field { display: grid; gap: 6px; margin-bottom: 13px; }
.aaa-pay-field label { color: var(--pay-muted); font-size: 10.5px; }
.aaa-pay-field input {
  width: 100%; height: 47px; border: 1px solid var(--pay-line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.27); color: var(--pay-text); padding: 0 13px; font-size: 14px; outline: none;
  font-family: inherit; transition: border-color .18s ease;
}
.aaa-pay-field input:focus { border-color: rgba(245, 245, 247, 0.6); }
.aaa-pay-field input::placeholder { color: #575d67; }
.aaa-pay-amount { position: relative; }
.aaa-pay-amount input { padding-right: 58px; font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; height: 57px; }
.aaa-pay-amount span { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--pay-faint); font-size: 11px; }
.aaa-pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 17px 0 14px; }
.aaa-pay-method {
  display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 0 11px;
  border: 1px solid var(--pay-line); border-radius: 10px; background: rgba(255,255,255,.018);
  color: var(--pay-muted); cursor: pointer; font-size: 11.5px; text-align: left; transition: .16s ease;
}
.aaa-pay-method:hover:not(:disabled) { border-color: var(--pay-line-strong); color: var(--pay-text); }
.aaa-pay-method.is-active { border-color: rgba(245, 245, 247, 0.48); background: var(--pay-accent-soft); color: var(--pay-text); }
.aaa-pay-method:disabled { opacity: .38; cursor: not-allowed; }
.aaa-pay-method i { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 8px; color: #fff; flex: none; }
.aaa-pay-method i.card { background: #343943; color: #d9dde5; }
.aaa-pay-method i.usdt { background: #26a17b; }
.aaa-pay-method i.usdc { background: #2775ca; }
.aaa-pay-method i.aaa { background: var(--pay-accent); color: #1b1b1d; }
.aaa-pay-rate { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--pay-line); border-radius: 9px; color: var(--pay-faint); font-size: 10.5px; margin-bottom: 15px; }
.aaa-pay-rate b { color: var(--pay-text); font-weight: 500; font-size: 11.5px; }
.aaa-pay-rate em { font-style: normal; color: var(--pay-mint); background: rgba(169,243,196,.09); padding: 3px 6px; border-radius: 4px; font-size: 9px; }
.aaa-pay-submit { width: 100%; height: 48px; border: 0; border-radius: 999px; background: var(--pay-text); color: #0a0b0d; font-size: 13px; font-weight: 600; cursor: pointer; transition: .18s ease; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.aaa-pay-submit:hover { background: #fff; transform: translateY(-1px); }
.aaa-pay-submit:disabled { opacity: .5; cursor: wait; transform: none; }
.aaa-pay-note { margin: 12px 0 0; color: var(--pay-faint); font-size: 9.5px; line-height: 1.5; text-align: center; }
.aaa-pay-error { margin: 0 0 14px; padding: 10px 11px; border: 1px solid rgba(255,125,125,.27); border-radius: 8px; background: rgba(255,125,125,.07); color: #ffadad; font-size: 10.5px; line-height: 1.45; }
.aaa-pay-sandbox { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 12px; padding: 4px 7px; border: 1px solid rgba(245,245,247,.25); border-radius: 4px; color: var(--pay-accent); font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; }
.aaa-pay-hr { height: 1px; background: var(--pay-line); margin: 18px 0; }
.aaa-pay-progress { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.aaa-pay-progress span { height: 2px; flex: 1; background: rgba(255,255,255,.08); border-radius: 2px; }
.aaa-pay-progress span.is-on { background: var(--pay-accent); }
.aaa-pay-stage-title { margin: 0 0 7px; font-size: 26px; line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.aaa-pay-stage-title .aaa-pay-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--pay-accent); border-radius: 50%; animation: aaaPaySpin .7s linear infinite; flex: none; }
@keyframes aaaPaySpin { to { transform: rotate(360deg); } }
.aaa-pay-stage-sub { margin: 0 0 19px; color: var(--pay-muted); font-size: 11.5px; line-height: 1.6; }
.aaa-pay-detail { border: 1px solid var(--pay-line); border-radius: 12px; padding: 13px 14px; background: rgba(255,255,255,.018); display: grid; gap: 10px; }
.aaa-pay-detail__row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.aaa-pay-detail__row span { color: var(--pay-faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.aaa-pay-detail__row b { color: var(--pay-text); font-size: 10.5px; font-weight: 400; text-align: right; word-break: break-word; }
.aaa-pay-detail__row code { color: var(--pay-mint); font-family: var(--pay-mono); font-size: 9.5px; word-break: break-all; text-align: right; }
.aaa-pay-detail__row .aaa-pay-copy { border: 0; background: transparent; color: var(--pay-muted); text-decoration: underline; font-size: 9px; cursor: pointer; padding: 0 0 0 6px; }
.aaa-pay-detail__amount { color: var(--pay-text); font-size: 24px; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.aaa-pay-status { display: inline-flex; align-items: center; gap: 7px; color: var(--pay-accent); font-size: 10.5px; margin-bottom: 15px; }
.aaa-pay-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--pay-accent); animation: aaaPayPulse 1.4s ease-in-out infinite; }
@keyframes aaaPayPulse { 50% { opacity: .3; } }
.aaa-pay-actions { display: grid; gap: 8px; margin-top: 16px; }
.aaa-pay-action { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--pay-line-strong); color: var(--pay-text); background: transparent; font-size: 11.5px; cursor: pointer; text-decoration: none; gap: 6px; }
.aaa-pay-action:hover { background: rgba(255,255,255,.05); }
.aaa-pay-action--primary { background: var(--pay-text); color: #0a0b0d; border-color: var(--pay-text); font-weight: 600; }
.aaa-pay-success-icon { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(169,243,196,.1); color: var(--pay-mint); border: 1px solid rgba(169,243,196,.26); font-size: 20px; margin-bottom: 17px; }
.aaa-pay-wallet-line { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pay-line); color: var(--pay-faint); font-size: 9.5px; line-height: 1.5; text-align: center; }
.aaa-pay-wallet-line a { color: var(--pay-muted); text-decoration: underline; text-underline-offset: 2px; }
.aaa-pay-foot { padding: 0 23px 20px; display: flex; justify-content: center; gap: 15px; color: var(--pay-faint); font-size: 8.5px; flex-wrap: wrap; }
.aaa-pay-foot span { display: inline-flex; align-items: center; gap: 5px; }
.aaa-pay-foot i { width: 4px; height: 4px; border-radius: 50%; background: var(--pay-mint); }
@media (max-width: 540px) {
  .aaa-pay-root { padding: 0; align-items: flex-end; }
  .aaa-pay-modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; border-bottom: 0; animation: aaaPayUp .28s cubic-bezier(.2,.8,.2,1); }
  .aaa-pay-methods { grid-template-columns: 1fr 1fr; }
  .aaa-pay-body { padding: 20px 18px 22px; }
  .aaa-pay-head { padding: 18px 18px 0; }
  .aaa-pay-foot { padding-bottom: 24px; }
}
@keyframes aaaPayUp { from { transform: translateY(30px); } to { transform: none; } }

/* Standalone /pay/aaa page */
.aaa-pay-page { margin: 0; min-height: 100vh; background: #08090b; color: #f5f6f7; font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif; }
.aaa-pay-page__nav { max-width: 1180px; margin: 0 auto; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.aaa-pay-page__brand { display: inline-flex; align-items: flex-start; gap: 4px; font-size: 22px; letter-spacing: -0.06em; color: #f5f5f7; text-decoration: none; }
.aaa-pay-page__brand span { color: #f5f5f7; }
.aaa-pay-page__brand small { font-size: 9px; color: #f5f5f7; letter-spacing: .04em; margin-top: -2px; }
.aaa-pay-page__nav a:last-child { color: #9298a2; font-size: 12px; }
.aaa-pay-page__main { max-width: 1180px; margin: 0 auto; padding: 56px 26px 80px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.aaa-pay-page__eyebrow { color: #f5f5f7; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin: 0; }
.aaa-pay-page h1 { font-size: clamp(48px, 6vw, 84px); line-height: .94; letter-spacing: -0.055em; font-weight: 500; margin: 20px 0 23px; }
.aaa-pay-page h1 em { color: #9298a2; font-style: normal; }
.aaa-pay-page__lead { color: #9298a2; font-size: 16px; line-height: 1.65; font-weight: 300; max-width: 560px; margin: 0 0 30px; }
.aaa-pay-page__points { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; max-width: 560px; }
.aaa-pay-page__point { border-top: 1px solid rgba(255,255,255,.1); padding-top: 13px; }
.aaa-pay-page__point b { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.aaa-pay-page__point span { color: #737985; font-size: 11px; line-height: 1.5; }
.aaa-pay-page__panel { border: 1px solid rgba(255,255,255,.13); border-radius: 26px; padding: 21px; background: linear-gradient(160deg, rgba(245,245,247,.09), transparent 45%), #101216; box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.aaa-pay-page__panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.aaa-pay-page__panel-head span { color: #9298a2; font-size: 11px; }
.aaa-pay-page__panel-head b { font-size: 12px; font-weight: 500; }
.aaa-pay-page__embed { position: relative; }
.aaa-pay-page__embed .aaa-pay-root { position: static; display: block; background: transparent; padding: 0; backdrop-filter: none; }
.aaa-pay-page__embed .aaa-pay-modal { width: 100%; max-height: none; border: 0; background: transparent; box-shadow: none; animation: none; }
.aaa-pay-page__embed .aaa-pay-head { display: flex; padding: 0; margin-bottom: 12px; }
.aaa-pay-page__embed .aaa-pay-brand,
.aaa-pay-page__embed .aaa-pay-close { display: none; }
.aaa-pay-page__embed .aaa-pay-head__right { margin-left: auto; }
.aaa-pay-page__embed .aaa-pay-body { padding: 0; }
.aaa-pay-page__embed .aaa-pay-foot { padding: 0; justify-content: flex-start; margin-top: 14px; }
.aaa-pay-page__security { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.09); color: #606671; font-size: 9.5px; line-height: 1.5; }
.aaa-pay-page__security code { color: #9298a2; }
@media (max-width: 880px) {
  .aaa-pay-page__main { grid-template-columns: 1fr; gap: 35px; padding-top: 30px; }
  .aaa-pay-page h1 { font-size: clamp(45px, 13vw, 66px); }
  .aaa-pay-page__points { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .aaa-pay-page__main { padding: 22px 16px 50px; }
  .aaa-pay-page__nav { padding: 16px; }
  .aaa-pay-page__panel { padding: 15px; border-radius: 20px; }
  .aaa-pay-page__points { grid-template-columns: 1fr; }
}

/* Generic embedded mode (outside the marketing pay page wrapper) */
.aaa-pay-root[data-embedded="true"] {
  position: static; display: block; padding: 0; background: transparent; backdrop-filter: none;
}
.aaa-pay-root[data-embedded="true"] .aaa-pay-modal {
  width: 100%; max-height: none; border: 0; background: transparent; box-shadow: none; animation: none;
}
.aaa-pay-root[data-embedded="true"] .aaa-pay-head { display: flex; padding: 0; margin-bottom: 12px; }
.aaa-pay-root[data-embedded="true"] .aaa-pay-brand,
.aaa-pay-root[data-embedded="true"] .aaa-pay-close { display: none; }
.aaa-pay-root[data-embedded="true"] .aaa-pay-head__right { margin-left: auto; }
.aaa-pay-root[data-embedded="true"] .aaa-pay-body { padding: 0; }
.aaa-pay-root[data-embedded="true"] .aaa-pay-foot { padding: 0; justify-content: flex-start; margin-top: 14px; }

.aaa-pay-root[data-embedded="true"] .aaa-pay-modal { overflow: visible; }
.aaa-pay-root[data-embedded="true"] .aaa-pay-body { padding: 0 1px; }

.aaa-pay-action--primary:hover { background: #fff; color: #0a0b0d; }

[hidden] { display: none !important; }

/* Russian / RUB segment */
.aaa-pay-head__right { display: flex; align-items: center; gap: 9px; }
.aaa-pay-lang { display: inline-flex; border: 1px solid var(--pay-line); border-radius: 999px; padding: 2px; background: rgba(0,0,0,.2); }
.aaa-pay-lang button { border: 0; background: transparent; color: var(--pay-faint); font-size: 8.5px; padding: 4px 6px; border-radius: 999px; cursor: pointer; letter-spacing: .04em; }
.aaa-pay-lang button.is-active { background: var(--pay-text); color: #0a0b0d; }
.aaa-pay-method i.rub { background: #6b5cff; color: #fff; }
.aaa-pay-field__hint { display: block; color: var(--pay-faint); font-size: 9px; margin-top: 1px; }
.aaa-pay-estimate { color: var(--pay-mint); font-size: 10.5px; margin-top: 2px; }
.aaa-pay-output { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.aaa-pay-output > span { color: var(--pay-muted); font-size: 10.5px; }
.aaa-pay-output > div { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--pay-line); border-radius: 8px; background: rgba(0,0,0,.2); }
.aaa-pay-output button { border: 0; background: transparent; color: var(--pay-faint); font-size: 9px; padding: 5px 7px; border-radius: 5px; cursor: pointer; }
.aaa-pay-output button.is-active { background: var(--pay-accent-soft); color: var(--pay-accent); }

.aaa-pay-page__ru { margin-top: 20px; padding: 14px 16px; border: 1px solid rgba(107,92,255,.25); border-radius: 12px; background: rgba(107,92,255,.06); display: grid; gap: 4px; max-width: 560px; }
.aaa-pay-page__ru strong { color: #a99cff; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.aaa-pay-page__ru span { color: #8f8f95; font-size: 11.5px; line-height: 1.5; }
.aaa-pay-page__ru a { color: #f5f5f7; font-size: 11.5px; text-decoration: underline; text-underline-offset: 2px; }

.aaa-pay-claim-state { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(245,245,247,.25); border-radius: 9px; background: var(--pay-accent-soft); color: #e5e5ea; font-size: 10.5px; line-height: 1.45; }


/* Monochrome checkout polish */
.aaa-pay-method i.card,
.aaa-pay-method i.rub,
.aaa-pay-method i.usdt,
.aaa-pay-method i.usdc,
.aaa-pay-method i.aaa {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--pay-text);
}
.aaa-pay-method.is-active i.card,
.aaa-pay-method.is-active i.rub,
.aaa-pay-method.is-active i.usdt,
.aaa-pay-method.is-active i.usdc,
.aaa-pay-method.is-active i.aaa {
  background: var(--pay-text);
  border-color: var(--pay-text);
  color: #0a0b0d;
}
.aaa-pay-error {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.055);
  color: var(--pay-text);
}
.aaa-pay-rate em {
  color: var(--pay-text);
  background: rgba(255,255,255,.07);
}
.aaa-pay-detail__row code { color: #d1d1d6; }
.aaa-pay-success-icon {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  color: var(--pay-text);
}
.aaa-pay-foot i { background: #8e8e93; }
.aaa-pay-amount input::-webkit-outer-spin-button,
.aaa-pay-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.aaa-pay-amount input[type="number"] { -moz-appearance: textfield; appearance: textfield; }


/* Checkout method grid: 2-up, with AAA balance full-width only when RUB is present */
.aaa-pay-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aaa-pay-methods:has([data-aaa-method="rub"]) .aaa-pay-method[data-aaa-method="aaa"] { grid-column: 1 / -1; }
