/* Кошелёк через Satqo (дизайн «Б»): крупный баланс в $, две кнопки, история; пополнение и вывод — отдельные экраны.
   Монета и сеть — компактные сегменты, выбранное — тёмная заливка; главный блок пополнения — карточка адреса;
   предупреждения — лаймовая плашка; главная кнопка — .confirm ядра. */
.wl-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin: -4px -8px 8px; }
.wl-top h2 { margin: 0; text-align: center; font: 800 18px/1.2 var(--body); letter-spacing: -.01em; }
.wl-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; padding: 0; }
.wl-icon-btn:hover { background: var(--paper); }
.wl-icon-btn svg { width: 22px; height: 22px; }
.wl-top .wl-icon-btn:last-child { grid-column: 3; }
/* «Назад» на главном экране не нужна, но держит место: заголовок остаётся по центру */
#wl-back[hidden] { display: inline-grid !important; visibility: hidden; }

/* Баланс */
.wl-bal { display: grid; justify-items: center; gap: 4px; padding: 18px 16px 20px; border-radius: 20px; background: var(--paper); text-align: center; }
.wl-bal-l { margin: 0; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.wl-bal-n { margin: 0; font: 800 44px/1.1 var(--body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wl-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 12px; }
.wl-act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--ink); font: 800 15px/1 var(--body); cursor: pointer; text-decoration: none; }
.wl-act:hover { border-color: var(--ink); color: var(--ink); }
.wl-act svg { width: 18px; height: 18px; flex: none; }
.wl-act-main { background: var(--lime); border-color: var(--lime); }
.wl-act-main:hover { background: #B7E443; border-color: #B7E443; }
.wl-guest { display: grid; gap: 10px; justify-items: center; margin: 10px 0 0; color: var(--ink-2); font-weight: 600; }
.wl-guest .wl-act { min-width: 160px; }
.wl-flash { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--yes); color: var(--yes-ink); font-weight: 700; font-size: 14px; }

/* История: значок направления, что и когда, сумма */
.wl-h { margin: 22px 0 6px; font: 800 16px/1.2 var(--body); }
.wl-hist { list-style: none; margin: 0; padding: 0; }
.wl-hist li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.wl-hist li:first-child { border-top: 0; }
.wl-dir { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.wl-dir svg { width: 18px; height: 18px; }
.wl-dir.in { background: var(--yes); color: var(--yes-ink); }
.wl-dir.out { background: var(--chip); color: var(--ink-3); }
.wl-hm { display: grid; gap: 2px; min-width: 0; }
.wl-hm b { font-weight: 700; font-size: 15px; }
.wl-hm small { color: var(--ink-2); font-size: 12.5px; overflow-wrap: anywhere; }
.wl-hm a { color: var(--ink-2); }
.wl-sum-v { font-weight: 800; font-size: 15px; white-space: nowrap; }
.wl-sum-v.plus { color: var(--yes-ink); }
.wl-hist .wl-empty { display: block; padding: 12px 0; color: var(--ink-2); border: 0; }

/* Пополнение и вывод. Ничего не меняет высоту при смене монеты или сети: сегменты одного размера, у карточки адреса,
   QR, адреса, предупреждения и строк статуса — постоянная высота; загрузка — заглушка того же размера и смена прозрачности. */
.wl-lead { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.wl-pick { display: grid; gap: 6px; }
.wl-lab { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.wl-pick .wl-seg + .wl-lab { margin-top: 6px; }
.wl-lab-f { display: block; margin: 14px 0 6px; color: var(--ink); font-size: 14px; }
.wl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); }
.wl-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; height: 40px; padding: 0 6px;
  border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.wl-seg-coin .wl-opt { flex-direction: row; gap: 7px; }
.wl-seg-net .wl-opt { height: 48px; }
.wl-opt b { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-opt-r { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.wl-opt-r b { font-size: 13.5px; }
.wl-opt small { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wl-opt .wl-ico { width: 20px; height: 20px; }
.wl-opt-net .wl-ico { width: 16px; height: 16px; }
.wl-opt:hover { background: rgba(255, 255, 255, .7); }
.wl-opt[aria-checked="true"] { background: var(--dark); color: #fff; }
.wl-opt[aria-checked="true"] small { color: var(--lime); }
.wl-opt[aria-disabled="true"] { cursor: not-allowed; color: var(--ink-2); background: none; }
.wl-opt[aria-disabled="true"] .wl-ico { opacity: .35; filter: grayscale(1); }
.wl-ico { width: 28px; height: 28px; flex: none; }

/* Карточка адреса: сеть и минимум, короткое предупреждение, QR, адрес группами по 4, копирование */
.wl-card { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--card-line); border-radius: 20px; background: var(--surface); }
.wl-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 24px; }
.wl-card-net { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; font-size: 15px; white-space: nowrap; }
.wl-card-net .wl-ico { width: 22px; height: 22px; }
.wl-card-net span { overflow: hidden; text-overflow: ellipsis; }
.wl-card-min { flex: none; padding: 3px 9px; border-radius: 8px; background: var(--dark); color: var(--lime); font-weight: 800; font-size: 13px; white-space: nowrap; }
.wl-only { display: flex; gap: 8px; align-items: center; height: 44px; margin: 0; padding: 0 12px; border-radius: 12px; background: var(--sun-bg);
  border: 1px solid var(--sun-line); color: var(--ink); font-weight: 700; font-size: 13px; line-height: 1.3; overflow: hidden; }
.wl-only svg { width: 18px; height: 18px; flex: none; }
.wl-only-wd { margin-top: 12px; }
.wl-qrbox { position: relative; justify-self: center; width: 168px; height: 168px; }
.wl-qr, .wl-skel-qr { position: absolute; inset: 0; }
.wl-qr .satqo-qr { display: block; width: 168px; height: 168px; border-radius: 14px; border: 1px solid var(--line); }
.wl-addrbox { position: relative; height: 44px; display: grid; place-items: center; }
.wl-addr-v { font: 600 14.5px/22px ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums;
  text-align: center; overflow-wrap: anywhere; letter-spacing: .01em; color: var(--ink); max-height: 44px; overflow: hidden; }
.wl-skel { display: block; border-radius: 14px; background: var(--chip); opacity: 0; }
.wl-skel-addr { position: absolute; inset: 0; display: grid; gap: 8px; align-content: center; justify-items: center; background: none; }
.wl-skel-addr i { display: block; width: 86%; height: 14px; border-radius: 7px; background: var(--chip); }
.wl-skel-addr i + i { width: 60%; }
.wl-qr, .wl-addr-v, .wl-skel { transition: opacity .15s ease; }
.wl-card.loading .wl-qr, .wl-card.loading .wl-addr-v { opacity: 0; }
.wl-card.loading .wl-skel { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .wl-qr, .wl-addr-v, .wl-skel { transition: none; } }
.wl-copy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 0; border-radius: 12px; background: var(--dark); color: #fff;
  font: 800 15px/1 var(--body); cursor: pointer; }
.wl-copy:hover:not(:disabled) { background: var(--ink-3); }
.wl-copy:disabled { background: var(--line); color: var(--ink-2); cursor: default; }
.wl-copy.done, .wl-copy.done:hover { background: var(--lime); color: var(--ink); }
.wl-copy svg { width: 17px; height: 17px; }
.wl-tag { margin: 0; color: var(--no-ink); font-weight: 700; font-size: 13.5px; }
.wl-wait { display: flex; align-items: center; justify-content: center; gap: 8px; height: 24px; margin: 12px 0 0; color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-align: center; }
.wl-wait.ok { color: var(--yes-ink); font-weight: 800; }
.wl-wait.err { color: var(--no-ink); font-weight: 700; }
.wl-wait svg { width: 18px; height: 18px; }
.wl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yes-mid); flex: none; }
@media (prefers-reduced-motion: no-preference) { .wl-dot { animation: wl-pulse 1.6s ease-in-out infinite; } @keyframes wl-pulse { 50% { opacity: .25; } } }
.wl-fee-note { margin: 2px 0 0; color: var(--ink-2); font-size: 12.5px; text-align: center; }

/* Проверка вывода */
.wl-rows { margin: 4px 0 0; display: grid; }
.wl-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.wl-rows > div:first-child { border-top: 0; }
.wl-rows dt { color: var(--ink-2); }
.wl-rows dd { margin: 0; font-weight: 700; text-align: right; }
.wl-r-ico { display: inline-flex; align-items: center; gap: 6px; }
.wl-r-ico .wl-ico { width: 18px; height: 18px; }
.wl-r-addr { flex-direction: column; gap: 4px !important; }
.wl-r-addr dd { text-align: left; }
.wl-r-addr code { font: 600 14px/1.5 ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.wl-r-get dd { font-size: 17px; }
.wl [data-view="review"] .confirm { margin-top: 18px; }

/* Вывод: строки ошибки и итога держат место — текст в них не сдвигает форму */
.wl-input { display: block; width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px;
  font: 600 14.5px/1.3 ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: var(--surface); }
.wl-input::placeholder { font-family: var(--body); }
.wl-input:focus, .wl-amt:focus-within { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wl-input[aria-invalid="true"] { border-color: var(--no-solid); }
.wl-err { height: 20px; margin: 4px 0 0; color: var(--no-ink); font-weight: 700; font-size: 13px; line-height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wl-amt-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wl-amt-h .wl-lab-f { margin-top: 6px; }
.wl-avail { border: 0; background: none; padding: 4px 0; color: var(--ink-2); font: 700 13.5px/1.2 var(--body); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; min-height: 32px; }
.wl-avail:hover { color: var(--ink); }
.wl-amt { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 8px 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wl-amt > span { font: 800 22px/1 var(--body); color: var(--ink-2); }
.wl-amt input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 800 22px/1 var(--body); color: var(--ink); padding: 0; }
.wl-max { height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--chip); color: var(--ink); font: 800 14px/1 var(--body); cursor: pointer; }
.wl-max:hover { background: var(--line); }
.wl-sum { height: 20px; margin: 8px 0 14px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-sum.err { color: var(--no-ink); font-weight: 700; }
.wl .pay-msg:empty { display: none; }
