:root {
  --px-brand: var(--brand, #16335f);
  --px-brand-soft: var(--brand-soft, #eef3fb);
  --px-ring: var(--brand-ring, rgba(22, 51, 95, 0.14));
  --px-line: var(--line, #e2e8f0);
  --px-line-strong: #cbd5e1;
  --px-danger: #dc2626;
  --px-danger-soft: #fef2f2;
  --px-danger-line: #fecaca;
  --px-ok: #16a34a;
  --px-surface: #ffffff;
  --px-slot: #f8fafc;
  --px-ink: #0f172a;
  --px-muted: #64748b;
}
html.dark, html[data-theme="dark"] {
  --px-brand-soft: #17243d;
  --px-ring: rgba(122, 178, 255, 0.25);
  --px-line: #263151;
  --px-line-strong: #3a4a73;
  --px-danger: #f87171;
  --px-danger-soft: #321414;
  --px-danger-line: #6a2525;
  --px-ok: #4ade80;
  --px-surface: #131b2c;
  --px-slot: #0f1626;
  --px-ink: #e5ecf6;
  --px-muted: #94a3b8;
}

.cs { position: relative; width: 100%; max-width: 100%; margin-inline: auto; -webkit-tap-highlight-color: transparent; }
.cs-slots { position: relative; display: flex; justify-content: center; gap: var(--cs-gap, 10px); }
.cs-slot {
  position: relative; flex: 1 1 0; min-width: 0; max-width: var(--cs-w, 54px);
  aspect-ratio: 54 / 62; display: flex; align-items: center; justify-content: center;
  background: var(--px-slot); border: 1.5px solid var(--px-line); border-radius: 16px;
  color: var(--px-ink); font-size: 24px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: background-color .18s ease, border-color .18s ease;
}
.cs-slot.is-filled { background: var(--px-surface); border-color: #9db3d4; }
html.dark .cs-slot.is-filled, html[data-theme="dark"] .cs-slot.is-filled { border-color: #3a4a73; }
.cs-char { display: block; will-change: transform, opacity; }
.cs-masked .cs-slot.is-filled .cs-char { width: 14px; height: 14px; border-radius: 50%; background: var(--px-brand); font-size: 0; }
html.dark .cs-masked .cs-slot.is-filled .cs-char, html[data-theme="dark"] .cs-masked .cs-slot.is-filled .cs-char { background: #9fc4f5; }

.cs-ring {
  position: absolute; left: 0; top: 0; height: 100%; width: 0; pointer-events: none;
  border: 1.5px solid var(--px-brand); border-radius: 16px; box-shadow: 0 0 0 4px var(--px-ring);
  opacity: 0; transform: translateX(0);
  transition: transform .34s cubic-bezier(.34, 1.5, .5, 1), width .34s cubic-bezier(.34, 1.5, .5, 1), opacity .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cs.is-focus .cs-ring { opacity: 1; }
.cs-ring.is-instant { transition: none !important; }

.cs-caret {
  position: absolute; width: 2px; height: 26px; border-radius: 2px; background: var(--px-brand);
  opacity: 0; pointer-events: none;
}
.cs.is-focus .cs-slot.is-active:not(.is-filled) .cs-caret { opacity: 1; animation: cs-blink 1.05s steps(1) infinite; }
@keyframes cs-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.cs.cs-error .cs-slot { border-color: var(--px-danger); background: var(--px-danger-soft); }
.cs.cs-error .cs-ring { border-color: var(--px-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .16); }
.cs.cs-error .cs-masked .cs-char, .cs.cs-error.cs-masked .cs-slot.is-filled .cs-char { background: var(--px-danger); }
.cs.cs-ok .cs-slot { border-color: var(--px-ok); }

.cs .cs-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0 !important; border-radius: 0; outline: none !important; box-shadow: none !important;
  background: transparent !important; color: transparent !important; -webkit-text-fill-color: transparent;
  caret-color: transparent; appearance: none; -webkit-appearance: none;
  letter-spacing: 0; text-align: center; cursor: text;
}
.cs .cs-input::selection { background: transparent; }
.cs .cs-input:disabled { cursor: not-allowed; }
.cs.is-disabled { opacity: .55; }

@media (prefers-reduced-motion: reduce) {
  .cs-ring { transition: none; }
  .cs-caret { animation: none !important; }
}

.pxm-root {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center;
  padding: 14px; box-sizing: border-box;
}
@media (min-width: 640px) { .pxm-root { align-items: center; } }
.pxm-bg { position: absolute; inset: 0; background: rgba(8, 15, 32, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.pxm-root.is-in .pxm-bg { opacity: 1; }
.pxm-card {
  position: relative; width: 100%; max-width: 440px; box-sizing: border-box;
  background: var(--px-surface); color: var(--px-ink);
  border: 1.5px solid var(--px-line-strong); border-radius: 28px;
  padding: 10px 22px 22px; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 24px 60px -14px rgba(8, 15, 32, .5);
  font-family: inherit; outline: none; will-change: transform;
}
.pxm-grip { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--px-line-strong); margin: 0 auto 20px; }
.pxm-ring {
  width: 132px; height: 132px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--px-slot); border: 1.5px solid var(--px-line-strong);
  display: flex; align-items: center; justify-content: center;
}
.pxm-face { width: 100px; height: 100px; overflow: visible; display: block; }
.pxm-sway { transform-box: view-box; transform-origin: 60px 104px; animation: pxm-sway 2.8s ease-in-out infinite; }
.pxm-drop { transform-box: fill-box; transform-origin: 50% 0; animation: pxm-drip 2.8s cubic-bezier(.45, 0, .7, 1) infinite; }
@keyframes pxm-sway {
  0%, 100% { transform: translateX(-3px) rotate(-6deg); }
  50% { transform: translateX(3px) rotate(6deg); }
}
@keyframes pxm-drip {
  0% { opacity: 0; transform: translateY(-2px) scale(.35); }
  14% { opacity: 1; transform: translateY(0) scale(1); }
  45% { opacity: 1; transform: translateY(3px) scale(1, 1.12); }
  100% { opacity: 0; transform: translateY(46px) scale(.8, 1.25); }
}
.pxm-title { margin: 0 0 8px; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--px-ink); }
.pxm-msg { margin: 0; font-size: 15px; line-height: 1.55; color: var(--px-muted); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pxm-btn {
  width: 100%; margin-top: 24px; height: 54px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--px-brand); color: #fff; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .02em;
  transition: transform .12s ease, background-color .15s ease;
}
html.dark .pxm-btn, html[data-theme="dark"] .pxm-btn { background: #3b6bc7; }
.pxm-btn:active { transform: scale(.98); }
.pxm-btn:focus-visible { outline: 3px solid var(--px-ring); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .pxm-bg { transition: none; }
  .pxm-sway, .pxm-drop { animation: none; }
  .pxm-drop { opacity: 1; }
}

.amount-field {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; height: 76px; margin: 0 auto;
  padding: 0 20px; box-sizing: border-box; cursor: text;
  background: var(--px-surface); border: 1.5px solid var(--px-line-strong); border-radius: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.amount-field:focus-within { border-color: var(--px-brand); box-shadow: 0 0 0 4px var(--px-ring); }
.amount-field.is-invalid { border-color: var(--px-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.amount-cur { font-size: 28px; font-weight: 600; color: var(--px-muted); line-height: 1; }
.amount-field .amount-input {
  flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; margin: 0; text-align: left;
  border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; border-radius: 0;
  font-size: 32px !important; font-weight: 650; color: var(--px-ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.amount-field .amount-input::-webkit-outer-spin-button, .amount-field .amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-field .amount-input::placeholder { color: #b6c0cf; }

.action-tile-label, [data-fit] {
  white-space: nowrap !important;
  display: block; width: 100%; max-width: 100% !important;
  overflow: visible; text-align: center;
}
.action-tile-label[data-fit-floor] { text-overflow: ellipsis; overflow: hidden; }

.pxm-count[hidden] { display: none; }

.px-flash { animation: px-flash 1.3s ease-out; }
@keyframes px-flash {
  0%, 35% { border-color: var(--px-danger) !important; box-shadow: 0 0 0 4px rgba(220, 38, 38, .16) !important; }
  100% { }
}

.net-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 40px;
  background: var(--px-brand-soft); color: var(--px-brand); font-weight: 700; font-size: 12px; letter-spacing: .02em; border-radius: inherit; }

.spinner-text, .loader-text { display: none !important; }

.a2c-rate-label:empty::before { content: ""; display: block; width: 62px; height: 10px; border-radius: 6px; margin-top: 4px;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f7fb 50%, #e8edf5 75%); background-size: 200% 100%; animation: px-skel 1.2s linear infinite; }
@keyframes px-skel { to { background-position: -200% 0; } }

:root { --px-page: #f9fafb; }
html.dark { --px-page: #0a0f1a; }

.tone-blue    { --tx-bg: #e6eefc; --tx-fg: #2457c5; }
.tone-green   { --tx-bg: #e3f6ea; --tx-fg: #15803d; }
.tone-emerald { --tx-bg: #def7ee; --tx-fg: #047857; }
.tone-amber   { --tx-bg: #fdf0d3; --tx-fg: #a16207; }
.tone-violet  { --tx-bg: #efe8fd; --tx-fg: #6d3fd1; }
.tone-indigo  { --tx-bg: #e7e9fc; --tx-fg: #4349c9; }
.tone-pink    { --tx-bg: #fce7f1; --tx-fg: #be2a70; }
.tone-red     { --tx-bg: #fde8e8; --tx-fg: #c62828; }
.tone-slate   { --tx-bg: #eaeef4; --tx-fg: #536079; }
html.dark .tone-blue    { --tx-bg: #14274a; --tx-fg: #8ab4ff; }
html.dark .tone-green   { --tx-bg: #11301d; --tx-fg: #6fdc96; }
html.dark .tone-emerald { --tx-bg: #0f3128; --tx-fg: #5fdcb4; }
html.dark .tone-amber   { --tx-bg: #38290c; --tx-fg: #f2c561; }
html.dark .tone-violet  { --tx-bg: #271a47; --tx-fg: #b79bff; }
html.dark .tone-indigo  { --tx-bg: #1a1f4a; --tx-fg: #9aa2ff; }
html.dark .tone-pink    { --tx-bg: #3a1428; --tx-fg: #ff8fc0; }
html.dark .tone-red     { --tx-bg: #3a1616; --tx-fg: #ff8d8d; }
html.dark .tone-slate   { --tx-bg: #1b2538; --tx-fg: #a3b1c9; }

.tx-page { max-width: 640px; margin: 0 auto; padding-bottom: 24px; }
.tx-page svg { display: block; }
.tx-card { background: var(--px-surface); border: 1.5px solid var(--px-line); border-radius: 22px; overflow: hidden; }
.tx-pad { padding: 6px 18px; margin-bottom: 14px; }

.tx-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--tx-bg); color: var(--tx-fg); }
.tx-ico svg { width: 22px; height: 22px; }
.tx-ico.big { width: 64px; height: 64px; border-radius: 20px; } .tx-ico.big svg { width: 30px; height: 30px; }
.tx-ico.huge { width: 72px; height: 72px; border-radius: 24px; } .tx-ico.huge svg { width: 34px; height: 34px; }

.tx-top { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; }
.tx-top h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--px-ink); }
.tx-top p { margin: 2px 0 0; font-size: 13px; color: var(--px-muted); }
.tx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tx-chips::-webkit-scrollbar { display: none; }
.tx-chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--px-line-strong); background: var(--px-surface); color: var(--px-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.tx-chip:hover { border-color: var(--px-brand); color: var(--px-brand); }
.tx-chip.is-active { background: var(--px-brand); border-color: var(--px-brand); color: #fff; }
html.dark .tx-chip.is-active { background: #3b6bc7; border-color: #3b6bc7; }
.tx-group { margin-bottom: 18px; }
.tx-group-title { margin: 0 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--px-muted); }
.tx-list .tx-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; border-bottom: 1px solid var(--px-line); text-align: left; font: inherit; cursor: pointer; transition: background-color .12s; }
.tx-list .tx-row:last-child { border-bottom: 0; }
.tx-list .tx-row:hover, .tx-list .tx-row:focus-visible { background: var(--px-slot); outline: none; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tx-title { font-size: 15px; font-weight: 650; color: var(--px-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--px-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; flex: 0 0 auto; }
.tx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.tx-meta { display: flex; align-items: center; gap: 8px; }
.tx-time { font-size: 11.5px; color: var(--px-muted); }
.tx-amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--px-ink); }
.tx-amt.in { color: var(--px-ok); }
.tx-amt.big { font-size: 38px; letter-spacing: -.02em; line-height: 1.1; }

.tx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.tx-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tx-pill.ok { background: #e3f6ea; color: #15803d; } .tx-pill.wait { background: #fdf0d3; color: #a16207; } .tx-pill.bad { background: #fde8e8; color: #c62828; }
html.dark .tx-pill.ok { background: #11301d; color: #6fdc96; } html.dark .tx-pill.wait { background: #38290c; color: #f2c561; } html.dark .tx-pill.bad { background: #3a1616; color: #ff8d8d; }
.tx-pill.wait i { animation: tx-pulse 1.4s ease-in-out infinite; }
@keyframes tx-pulse { 50% { opacity: .25; } }

.tx-empty { padding: 44px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tx-empty h3 { margin: 12px 0 0; font-size: 18px; font-weight: 700; color: var(--px-ink); }
.tx-empty p { margin: 0 0 14px; font-size: 14px; color: var(--px-muted); }

.tx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; transition: background-color .15s, border-color .15s; }
.tx-btn svg { width: 17px; height: 17px; }
.tx-btn.primary { width: 100%; background: var(--px-brand); color: #fff; }
html.dark .tx-btn.primary { background: #3b6bc7; }
.tx-btn.edge { background: var(--px-surface); color: var(--px-ink); border-color: var(--px-line-strong); }
.tx-btn.edge:hover { border-color: var(--px-brand); }
.tx-btn.edge.done { border-color: var(--px-ok); color: var(--px-ok); }
.tx-btn.soft { height: 40px; padding: 0 18px; background: var(--px-brand-soft); color: var(--px-brand); }
html.dark .tx-btn.soft { color: #9fc4f5; }
.tx-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.tx-actions .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tx-hero { text-align: center; padding: 26px 16px 22px; margin-bottom: 14px; border-radius: 26px; border: 1.5px solid var(--px-line); background: linear-gradient(180deg, var(--tx-bg) 0%, var(--px-surface) 85%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tx-hero-type { margin: 6px 0 0; font-size: 15px; font-weight: 650; color: var(--px-muted); }
.tx-hero-date { margin: 2px 0 0; font-size: 13px; color: var(--px-muted); }
.tx-kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--px-line); font-size: 14px; }
.tx-kv .k { color: var(--px-muted); flex: 0 0 auto; }
.tx-kv .v { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--px-ink); text-align: right; overflow-wrap: anywhere; }
.tx-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.tx-save { color: var(--px-ok); }
.tx-copy { flex: 0 0 auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--px-line-strong); border-radius: 9px; background: var(--px-surface); color: var(--px-muted); cursor: pointer; }
.tx-copy svg { width: 14px; height: 14px; }
.tx-copy.done { border-color: var(--px-ok); color: var(--px-ok); }
.tx-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 12px; }
.tx-total span { font-size: 14px; font-weight: 650; color: var(--px-muted); }
.tx-total strong { font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--px-ink); font-variant-numeric: tabular-nums; }
.tx-tear { position: relative; height: 0; margin: 6px -18px; border-top: 2px dashed var(--px-line-strong); }
.tx-tear::before, .tx-tear::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--px-page); border: 1.5px solid var(--px-line); }
.tx-tear::before { left: -11px; clip-path: inset(0 0 0 50%); } .tx-tear::after { right: -11px; clip-path: inset(0 50% 0 0); }

.tx-steps { list-style: none; display: flex; margin: 0; padding: 16px 0 14px; }
.tx-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; font-size: 12px; font-weight: 600; color: var(--px-muted); }
.tx-steps li + li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--px-line-strong); }
.tx-steps li.done + li::before, .tx-steps li.active::before { background: var(--px-ok); }
.tx-steps li.fail::before { background: var(--px-danger); }
.tx-steps .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--px-line-strong); background: var(--px-surface); display: flex; align-items: center; justify-content: center; }
.tx-steps .tick { width: 13px; height: 13px; stroke-width: 3; color: #fff; }
.tx-steps li.done .dot { background: var(--px-ok); border-color: var(--px-ok); }
.tx-steps li.active .dot { border-color: #d49a14; animation: tx-ring 1.6s ease-out infinite; }
.tx-steps li.fail .dot { border-color: var(--px-danger); background: var(--px-danger-soft); }
.tx-steps li.done, .tx-steps li.active { color: var(--px-ink); }
@keyframes tx-ring { 0% { box-shadow: 0 0 0 0 rgba(212, 154, 20, .45); } 100% { box-shadow: 0 0 0 9px rgba(212, 154, 20, 0); } }

.tx-success { text-align: center; padding: 10px 0 22px; }
.tx-success h2 { margin: 14px 0 4px; font-size: 22px; font-weight: 700; color: var(--px-ink); }
.tx-success-amt { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--px-ink); font-variant-numeric: tabular-nums; }
.tx-check-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto; }
.tx-check { width: 92px; height: 92px; }
.tx-check .rg { fill: #e3f6ea; stroke: #16a34a; stroke-width: 3; stroke-dasharray: 214; stroke-dashoffset: 214; animation: tx-draw .55s ease-out .05s forwards; transform-origin: center; }
.tx-check .tick { fill: none; stroke: #16a34a; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 52; stroke-dashoffset: 52; animation: tx-draw .35s ease-out .5s forwards; }
html.dark .tx-check .rg { fill: #11301d; }
@keyframes tx-draw { to { stroke-dashoffset: 0; } }
.tx-check-wrap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #16a34a; opacity: 0; animation: tx-pop .8s ease-out .55s; }
@keyframes tx-pop { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
.tx-burst { position: absolute; inset: 0; pointer-events: none; }
.tx-burst i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 2px; background: var(--c); opacity: 0; animation: tx-burst .9s cubic-bezier(.2, .8, .3, 1) calc(.5s + var(--d)) forwards; }
@keyframes tx-burst { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(240deg) scale(1); } }
.tx-ticket { background: var(--px-surface); border: 1.5px solid var(--px-line); border-radius: 24px; padding: 18px 18px 6px; }
.tx-ticket-head { display: flex; align-items: center; gap: 12px; }
.tx-ticket .tx-sub { white-space: normal; }

@media (prefers-reduced-motion: reduce) {
  .tx-check .rg, .tx-check .tick { animation: none; stroke-dashoffset: 0; }
  .tx-check-wrap::after, .tx-burst i, .tx-pill.wait i, .tx-steps li.active .dot { animation: none; }
  .tx-burst { display: none; }
}
