:root {
  --bg-top: #eaf3ff;
  --bg-bottom: #ffffff;
  --ink: #0b1f33;
  --ink-soft: #3d5670;
  --muted: #6b839c;
  --accent: #0078ff;
  --accent-soft: rgba(0, 120, 255, 0.12);
  --ok: #17b26a;
  --gold: #c9962e;
  --gold-2: #e8b84b;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --gold-grad: linear-gradient(135deg, #f7d475, #dfa62f 55%, #c9962e);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  --glass-tint: rgba(0, 120, 255, 0.07);
  --shadow: 0 24px 60px -22px rgba(31, 68, 110, 0.28), 0 6px 20px -8px rgba(31, 68, 110, 0.14);
  --radius: 26px;
  --radius-sm: 16px;
  --mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
  --font: "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/Inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/Inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/Inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 70%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(140% 120% at 50% -10%, transparent 55%, rgba(0, 60, 140, 0.09) 100%);
}

/* ---------- aurora ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.62;
  animation: drift 26s ease-in-out infinite alternate;
}
.orb-a { width: 520px; height: 520px; left: -140px; top: -160px; background: radial-gradient(circle at 30% 30%, #7cc0ff, #2f9bff 60%, transparent 72%); }
.orb-b { width: 480px; height: 480px; right: -160px; bottom: -180px; background: radial-gradient(circle at 60% 40%, #b9ddff, #63b4ff 58%, transparent 72%); animation-delay: -9s; }
.orb-c { width: 320px; height: 320px; left: 38%; top: 46%; background: radial-gradient(circle at 50% 50%, #dbe9ff, #8fc4ff 55%, transparent 70%); animation-delay: -16s; opacity: 0.4; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -28px, 0) scale(1.08); }
}

.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.05;
}

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 32px 20px 60px; }

.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 48%, rgba(255, 255, 255, 0.62) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  backdrop-filter: blur(26px) saturate(1.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    var(--glass-hi),
    inset 0 0 0 1px var(--glass-tint),
    var(--shadow);
}

.card { padding: 28px; }

.hidden { display: none !important; }
.mono { font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; }
.muted { color: var(--muted); }
.msg { min-height: 18px; margin: 6px 0 12px; font-size: 13px; }
.msg.ok { color: #1d9b52; }
.msg.err { color: #e0453f; }
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.empty { font-size: 14px; }

/* ---------- auth ---------- */
.auth { display: flex; justify-content: center; align-items: flex-start; min-height: 82vh; padding-top: 9vh; }

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 32px;
  animation: rise 0.7s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.brand { text-align: center; margin-bottom: 22px; }
.brand-logo { width: 200px; height: auto; display: block; margin: 0 auto 12px; }
.brand-logo.small { width: 124px; height: auto; margin: 0; }
.brand-mark {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: grid; place-items: center;
  font-size: 26px; color: #fff;
  border-radius: 18px;
  background: linear-gradient(135deg, #7ec4ff, #0078ff);
  box-shadow: 0 14px 30px -10px rgba(0, 120, 255, 0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}
.brand-mark.small { width: 30px; height: 30px; font-size: 14px; border-radius: 10px; margin: 0; }
.brand-name { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name.small { font-size: 17px; font-weight: 600; }
.brand-tag { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- segmented ---------- */
.segmented {
  display: flex;
  position: relative;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  margin-bottom: 20px;
}
.seg-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.9));
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px -4px rgba(31, 68, 110, 0.28);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
  z-index: 0;
  pointer-events: none;
}
.seg-btn {
  flex: 1;
  position: relative; z-index: 1;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.25s ease;
}
.seg-btn.active {
  color: var(--accent);
}

.segmented.mode { margin: 0 0 6px; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; text-align: left; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field-label small { font-weight: 400; color: var(--muted); }
.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(0, 120, 255, 0.14);
  border-radius: var(--radius-sm);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 4px var(--accent-soft), 0 8px 20px -10px rgba(0, 110, 255, 0.4);
}
.input:disabled {
  opacity: 0.55;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  cursor: not-allowed;
}
.field.muted .field-label { color: var(--muted); opacity: 0.7; }
.field-row { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.field-row .field { flex: 1; margin-bottom: 0; }

/* ---------- multi-step login ---------- */
.login-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.step-dot {
  width: 26px; height: 4px; border-radius: 999px;
  background: rgba(0, 120, 255, 0.16);
  transition: background 0.25s ease, transform 0.25s ease;
}
.step-dot.reached { background: rgba(0, 120, 255, 0.35); }
.step-dot.active { background: linear-gradient(90deg, #218bff, #0061e0); transform: scaleX(1.15); box-shadow: 0 2px 8px rgba(0, 110, 255, 0.35); }
.auth-step { animation: stepIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
.auth-step.re-anim { animation: none; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.btn-primary.full { width: 100%; }

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #218bff, #0061e0);
  box-shadow: 0 12px 26px -10px rgba(0, 110, 255, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.icon-btn, .ghost-btn, .mint-btn { border: 0; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s cubic-bezier(.22,1,.36,1); }
.icon-btn:active, .ghost-btn:active, .mint-btn:active { transform: scale(0.96); }
.ghost-btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
}
.ghost-btn:hover { background: #fff; color: var(--accent); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 10px;
  background: rgba(0,120,255,0.1); color: var(--accent); font-size: 15px;
}
.icon-btn:hover { background: rgba(0,120,255,0.18); }
.mint-btn {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.mint-btn:hover { background: rgba(0,120,255,0.18); }

/* ---------- wallet ---------- */
.wallet { animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.25, 1) both; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-radius: 24px; margin-bottom: 22px; }
.topbar .whoami { font-size: 17px; }
.topbar .ghost-btn { font-size: 15px; padding: 11px 20px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.whoami { font-weight: 600; font-size: 14px; color: var(--ink-soft); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-bottom: 22px; }

.balance-card { position: relative; overflow: hidden; }
.balance-card::after {
  content: "";
  position: absolute; right: -60px; top: -80px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0,120,255,0.16), transparent 70%);
  pointer-events: none;
}
.balance-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.balance-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.balance-left { min-width: 0; }
.pill {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 999px;
}
.balance-value {
  font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: #0b2a4d;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  font-variant-numeric: tabular-nums;
}
.balance-value.pop { animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.balance-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.balance-card .address-row { flex: 1; min-width: 240px; max-width: 380px; }
.address-row { display: flex; align-items: stretch; gap: 8px; }
.address {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-soft);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
  padding: 10px 12px; border-radius: 12px;
  display: flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.address-row .icon-btn { height: auto; align-self: stretch; }

.piggy-section { margin-top: 22px; }
.piggy-addr-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 16px; }
.piggy-addr-row .address { flex: 1; }
.piggy-addr-row .icon-btn { height: auto; align-self: stretch; }

.card-title { font-size: 17px; font-weight: 650; margin-bottom: 16px; letter-spacing: -0.01em; }
.mode-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

.list { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }

.tx-row, .block-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 12px 14px;
  animation: rise 0.4s ease both;
}
.tx-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tx-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.tx-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx-amount.in { color: #16a05a; }
.tx-amount.out { color: var(--ink-soft); }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.tx-more {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--accent); padding: 2px 6px; border-radius: 8px;
  transition: background 0.15s ease;
}
.tx-more:hover { background: var(--accent-soft); }

.tag {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
}
.tag.open { color: var(--accent); background: var(--accent-soft); }
.tag.anon { color: #7048e8; background: rgba(112,72,232,0.12); }

.block-idx { font-weight: 700; color: var(--accent); font-size: 13px; }
.block-meta { font-size: 11.5px; color: var(--muted); }

.foot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; font-size: 12px; padding: 26px 0 6px; }

/* ---------- QR modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(233, 243, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  animation: fade 0.25s ease both;
}
:has(.modal-overlay:not(.hidden)) .orb { animation-play-state: paused; }
#qrModal { align-items: flex-start; }
#qrModal > .modal { margin-top: 9vh; }
#piggyDetailModal { align-items: flex-start; }
#piggyDetailModal > .modal { margin-top: 4vh; }
#wizardModal { flex-direction: column; }
.wiz-step-badge {
  flex: 0 0 auto; margin-right: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 120, 255, 0.18);
  border-radius: 999px; padding: 3px 9px;
}
.wiz-dots { display: flex; justify-content: center; margin-top: 18px; }
.wiz-dot-track { position: relative; display: flex; gap: 6px; }
.wiz-dot-indicator {
  position: absolute; top: 0; left: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(11, 31, 51, 0.25), 0 0 12px rgba(255, 255, 255, 0.95);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.wiz-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; opacity: 0.4;
  box-shadow: 0 0 0 1px rgba(11, 31, 51, 0.18);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.wiz-dot.done { opacity: 0.7; cursor: pointer; }
.wiz-dot.done:hover { opacity: 1; transform: scale(1.18); }
.wiz-dot.active { opacity: 0; cursor: default; }
.modal {
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.modal-head .icon-btn { background: rgba(255,255,255,0.7); color: var(--ink-soft); }
.current-nick {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.nick-success-msg {
  font-size: 15px; color: var(--ink-soft); text-align: center;
  margin: 6px 0 18px;
}
.modal.modal-sm { max-width: 400px; }
.tx-details { display: flex; flex-direction: column; gap: 10px; }
.tx-detail-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  font-size: 13.5px;
}
.tx-detail-row .k { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.tx-detail-row .v { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.tx-detail-row .v.mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.tx-detail-row .v.in { color: #16a05a; }
.tx-detail-row .v.out { color: var(--ink-soft); }

/* ---------- terminal ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .card-title { margin-bottom: 0; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal.modal-wide { max-width: 920px; }
.modal.modal-pay { max-width: 440px; }
.modal.modal-narrow { max-width: 440px; }

.term-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .term-layout { grid-template-columns: 1fr; } }
.term-h {
  font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin: 0 0 12px;
}
.term-col.form-col .field-row { align-items: flex-end; }
.term-col.form-col { display: flex; flex-direction: column; gap: 18px; }

.term-wrap { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.term-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.term-actions .ghost-btn { flex: 1 1 auto; font-size: 13px; }

.term-ticket {
  --tbg: #0b0e14;
  --tpanel: #121a26;
  --tline: #263448;
  --tmint: #4de6a0;
  --tamber: #ffc857;
  --tred: #ff6b6b;
  --tdim: #7f8ea3;
  --txt: #e8eef7;
  background: linear-gradient(160deg, #0b0e14 0%, #101623 100%);
  border: 1px solid #263448;
  border-radius: 18px;
  padding: 20px;
  color: var(--txt);
  font-family: var(--mono);
  overflow: hidden;
  position: relative;
}
.term-ticket::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 90% -10%, rgba(77,230,160,0.14), transparent 55%);
  pointer-events: none;
}
.term-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; position: relative; }
.term-brand { font-weight: 800; letter-spacing: 0.14em; font-size: 11px; color: var(--tmint); }
.term-brand b { color: var(--txt); }
.term-qr { background: #fff; border-radius: 10px; padding: 6px; flex: 0 0 auto; }
.term-title {
  font-size: 17px; font-weight: 700; margin-top: 16px; position: relative;
  overflow-wrap: anywhere;
}
.term-amount {
  font-size: 30px; font-weight: 800; margin-top: 4px; position: relative;
  color: var(--tamber);
  letter-spacing: -0.01em;
}
.term-amount small { font-size: 14px; font-weight: 600; color: var(--tdim); letter-spacing: 0.04em; }
.term-line { height: 1px; background: var(--tline); margin: 16px 0; position: relative; }
.term-rows { display: flex; flex-direction: column; gap: 8px; position: relative; }
.term-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.term-row .k { color: var(--tdim); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; flex: 0 0 auto; }
.term-row .v { text-align: right; font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.term-row .v.mono-tiny { font-size: 11px; word-break: break-all; }
.term-status-pending { color: var(--tamber); }
.term-status-paid { color: var(--tmint); }
.term-status-cancelled { color: var(--tred); }
.term-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--tline);
  display: flex; justify-content: space-between; gap: 10px; position: relative;
  font-size: 9.5px; letter-spacing: 0.12em; color: var(--tdim); text-transform: uppercase;
}
.term-check-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 14px;
  padding: 10px 12px;
}
.term-check-row .t { min-width: 0; }
.term-check-row .t-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-check-row .t-meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-check-row .t-amount { font-size: 13px; font-weight: 750; color: var(--ink-soft); flex: 0 0 auto; }
.term-check-row .t-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.term-check-row .t-btns .link-btn { font-size: 11.5px; padding: 2px 6px; }
.payment-btn { width: 100%; margin-top: 12px; }

.device-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 14px;
  padding: 10px 12px;
}
.device-row .d { min-width: 0; }
.device-row .d-name { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.device-row .d-meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row .d-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.device-row .link-btn { font-size: 11.5px; padding: 2px 6px; }
.self-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 999px;
}
.qr-frame.center { display: flex; justify-content: center; margin: 12px 0; }

.segmented.qr-seg { margin-bottom: 18px; }
.segmented.qr-seg .seg-btn.active { color: var(--accent); }
#receivePane, #sendPane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
#receivePane .address, #sendPane .address { flex: 0 0 auto; width: 100%; }
#sendPane .hint { margin-top: 0; }
.pick-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  max-width: 360px; margin: 4px auto 0;
}
.pick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 20px 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  font: inherit; cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.pick-tile:hover {
  border-color: rgba(0, 120, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 26px -12px rgba(0, 110, 255, 0.45);
}
.pick-tile:active { transform: translateY(0); }
.pick-ico {
  width: 50px; height: 50px; border-radius: 17px;
  display: grid; place-items: center;
  font-size: 24px;
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.pick-txt { font-size: 14px; font-weight: 700; color: var(--ink); }
.pick-sub { font-size: 11.5px; color: var(--muted); }
@media (max-width: 380px) {
  .pick-grid { grid-template-columns: 1fr; }
}

.pane { animation: rise 0.3s ease both; text-align: center; }
.center { text-align: center; }

.qr-frame {
  position: relative;
  width: min(70vw, 300px, 100%);
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 42px -18px rgba(31,68,110,0.4), inset 0 0 0 1px rgba(0,120,255,0.08);
}
.qr-frame canvas { width: 100%; height: auto; display: block; border-radius: 14px; }
.qr-badge {
  position: absolute; left: 18px; top: 18px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  color: #fff; background: linear-gradient(135deg, #218bff, #0061e0);
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 6px 14px -5px rgba(0,110,255,0.6);
  z-index: 2;
}
.share-corner {
  position: absolute; right: -10px; bottom: -10px;
  width: 40px; height: 40px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #218bff, #0061e0); color: #fff;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 22px -8px rgba(0,110,255,0.7);
  transition: transform 0.15s ease, filter 0.2s ease;
  z-index: 2;
}
.share-corner:hover { transform: translateY(-2px); filter: brightness(1.08); }
.share-corner:active { transform: translateY(0); }

.scanner { animation: rise 0.3s ease both; }
.scanner-view { position: relative; overflow: hidden; border-radius: 18px; background: #0b1f33; max-height: 340px; }
#scanVideo { width: 100%; display: block; object-fit: cover; min-height: 220px; }
.scan-grid {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0,160,255,0.85) 50%, transparent 52%);
  background-size: 100% 100%;
  animation: scan 2.4s ease-in-out infinite;
  mix-blend-mode: screen; opacity: 0.8; pointer-events: none;
}
@keyframes scan {
  0%, 100% { transform: translateY(-120%); }
  50% { transform: translateY(120%); }
}
.ghost-btn.full { width: 100%; margin-top: 12px; }

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(13, 28, 46, 0.86);
  color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 12px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.25, 1), transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
  z-index: 50;
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- animation ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0,120,255,0.25); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- policy / extras ---------- */
.policy-text { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 14px; font-size: 13px; color: var(--ink-soft);
  cursor: pointer; user-select: none;
}
.check-row input { margin-top: 2px; accent-color: var(--accent); }
.check-row a { color: var(--accent); }
.auth-extra { text-align: center; margin-top: 18px; }
.link-btn {
  border: 0; background: none; color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 6px 10px; border-radius: 999px; transition: background 0.2s ease;
}
.link-btn:hover { background: var(--accent-soft); }
.hint.warn { color: #b45309; background: rgba(245, 158, 11, 0.1); padding: 10px 12px; border-radius: 12px; }

/* ---------- seed wizard ---------- */
.modal.wizard { max-width: 640px; }
.kind-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.kind-card {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; text-align: left;
}
.kind-card:hover { border-color: rgba(0, 120, 255, 0.4); transform: translateY(-1px); }
.kind-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.15);
}
.kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.kind-card b { font-size: 15px; }
.kind-card small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.lang-picker { margin-bottom: 14px; }
.lang-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lan-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.lan-chip:has(input:checked) { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.lan-chip input { accent-color: var(--accent); }

.seed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.seed-copy-row { justify-content: center; margin: -4px 0 4px; }
.hint.small { font-size: 11px; margin-top: -4px; }
.word-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
}
.word-num { font-weight: 700; color: var(--accent); font-size: 12px; width: 26px; flex: 0 0 auto; }
.word-val { font-weight: 600; flex: 1; word-break: break-word; }
.word-lang { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.checks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.check-field { display: flex; align-items: center; gap: 10px; }
.check-field .input { flex: 1; transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; }
.check-num { font-weight: 700; color: var(--accent); font-size: 13px; min-width: 78px; }
.check-field.ok .check-num { color: var(--ok); }
.check-field.ok .input {
  border-color: var(--ok);
  background: linear-gradient(135deg, rgba(23, 178, 106, 0.2), rgba(23, 178, 106, 0.08));
  animation: okGlow 1.6s ease-in-out infinite;
}
.check-field.err .input { border-color: #e5484d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(229, 72, 77, 0.14); }

@keyframes okGlow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(23, 178, 106, 0.22), 0 0 16px rgba(23, 178, 106, 0.35); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(23, 178, 106, 0.14), 0 0 8px rgba(23, 178, 106, 0.18); }
}

.wiz-step { animation: stepIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
.wiz-step.wiz-re-anim { animation: none; }

.wiz-swap { animation: wizSwapIn 0.42s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes wizSwapIn {
  from { transform: translateX(72px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- piggy banks ---------- */
.piggy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.piggy-grid .empty { grid-column: 1/-1; }

.piggy-card {
  background: var(--glass-bg, rgba(255,255,255,.04));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: background .2s, border-color .25s, box-shadow .25s, transform .18s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column; gap: 10px;
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.piggy-card:hover { background: rgba(255,255,255,.07); border-color: var(--accent); box-shadow: 0 4px 20px rgba(38,111,255,.12); transform: translateY(-2px); }
.piggy-card:active { transform: translateY(0) scale(0.985); }

.piggy-card-top { display: flex; align-items: center; gap: 10px; }
.piggy-card-icon { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #eef5ff, #ffffff); display: grid; place-items: center; flex-shrink: 0; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(0,120,255,0.12); }
.piggy-card-icon .lg-ico { width: 22px; height: 22px; }
.piggy-card-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.piggy-card-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.piggy-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.piggy-card-balance { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.02em; line-height: 1.1; }
.piggy-card-sub { font-size: 12.5px; color: var(--ink-soft); }

.piggy-ring { display: block; flex: 0 0 auto; width: 52px; height: 52px; overflow: visible; }
.piggy-ring-bg { fill: none; stroke: var(--line); stroke-width: 4; }
.piggy-ring-fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .45s ease; }

.piggy-auto-pill { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent); background: rgba(38,111,255,.1); border-radius: 999px; padding: 2px 8px; }

/* piggy detail modal */
.piggy-detail-balance { text-align: center; margin: 10px 0 14px; }
.piggy-detail-amount { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.piggy-detail-sub { font-size: 13px; color: var(--ink-soft); }

.piggy-detail-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 16px; padding: 8px 0; overflow: visible; }
.piggy-detail-progress .piggy-ring { width: 92px; height: 92px; overflow: visible; }
.piggy-detail-progress .piggy-ring-bg { stroke-width: 7; }
.piggy-detail-progress .piggy-ring-fill { stroke-width: 7; }
.piggy-detail-pct { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.piggy-detail-progress .piggy-detail-goal { font-size: 12px; color: var(--ink-soft); }

.piggy-auto-info { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }
.piggy-auto-info:empty { display: none; }
.piggy-auto-info strong { color: var(--text); }

.piggy-actions { display: flex; flex-direction: column; gap: 8px; }
.piggy-actions .ghost-btn { text-align: left; }
.piggy-actions .danger { color: var(--danger); }

.piggy-empty { grid-column: 1/-1; }

@media (max-width: 560px) {
  .kind-options { grid-template-columns: 1fr; }
  .seed-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .auth { padding-top: 5vh; }
  .balance-value { font-size: 46px; }
}

/* ---------- main menu tabs ---------- */
.nav-tabs {
  display: flex; gap: 6px;
  padding: 8px; border-radius: 999px;
  margin-bottom: 18px; width: 100%; max-width: 620px;
  margin-left: auto; margin-right: auto;
  overflow-x: auto;
  position: relative;
}
.nav-indicator {
  position: absolute; top: 8px; bottom: 8px; left: 8px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
  box-shadow: 0 6px 16px rgba(38, 111, 255, 0.35);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
  z-index: 0;
}
.nav-tab {
  flex: 1; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px;
  background: transparent; border: none;
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative; z-index: 1;
}
.nav-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.5); }
.nav-tab.active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}
.pane-view { max-width: 620px; margin: 0 auto; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ghost-btn {
  padding: 12px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.ghost-btn.danger:hover { border-color: #ff4d4f; color: #ff4d4f; }

.qr-frame.small { width: 200px; height: 200px; margin: 10px auto; padding: 10px; }
.qr-frame.small canvas { width: 100% !important; height: 100% !important; display: block; }

.totp-manual { margin: 14px 0 6px; }
.totp-copy-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 12px;
  margin-bottom: 8px;
}
.totp-copy-label { font-size: 11px; font-weight: 650; color: var(--muted); width: 86px; flex: 0 0 auto; }
.totp-copy-val { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.totp-copy-btn { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; flex: 0 0 auto; }
.center { text-align: center; }
.msg.ok { color: #16a34a; }
.hint.warn { color: #d97706; }

/* ---------- settings list ---------- */
.settings-list { display: flex; flex-direction: column; gap: 12px; }
.setting-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 18px; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 20px;
  box-shadow: 0 6px 20px -12px rgba(20, 60, 120, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--ink);
}
.setting-row:hover { transform: translateY(-1px); border-color: rgba(0,120,255,0.35); box-shadow: 0 10px 26px -12px rgba(0,110,255,0.35); }
.setting-row:active { transform: translateY(0); }
.setting-emoji { font-size: 22px; width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; background: linear-gradient(135deg, #eef5ff, #ffffff); border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(0,120,255,0.12); }
.setting-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting-title { font-size: 15px; font-weight: 700; }
.setting-sub { font-size: 12px; color: var(--muted); }
.setting-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.setting-status { font-size: 11.5px; color: var(--muted); border: 1px solid rgba(0,120,255,0.22); background: rgba(0,120,255,0.07); padding: 3px 9px; border-radius: 999px; }
.setting-status.on { color: #15803d; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.1); font-weight: 650; }
.chev { font-size: 20px; color: rgba(0,60,140,0.35); line-height: 1; }

/* ---------- 25-е слово (gold passphrase) ---------- */
.kind-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.kind-item { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.kind-item .kind-card { width: 100%; }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.pp-row-label { font-size: 11px; font-weight: 650; color: var(--gold); letter-spacing: -0.01em; }
.pp-toggle { position: relative; display: inline-block; width: 34px; height: 20px; flex: 0 0 auto; cursor: pointer; }
.pp-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.pp-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(120, 140, 170, 0.4), rgba(120, 140, 170, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 2px rgba(60, 90, 130, 0.25);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.pp-track::before {
  content: ""; position: absolute; height: 14px; width: 14px; left: 2px; top: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #e8ecf2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pp-toggle input:checked + .pp-track {
  background: var(--gold-grad);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 2px 10px -1px rgba(212, 175, 55, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.65), inset 0 -1px 2px rgba(120, 84, 10, 0.35);
}
.pp-toggle input:checked + .pp-track::before { transform: translateX(14px); background: linear-gradient(135deg, #fff, #fdf3d8); box-shadow: 0 1px 3px rgba(90, 60, 5, 0.35), inset 0 1px 1px #fff; }
.pp-toggle:active .pp-track::before { transform: scale(0.9); }
.pp-toggle input:checked:active + .pp-track::before { transform: translateX(14px) scale(0.9); }
.pp-box {
  max-height: 0; opacity: 0; transform: translateY(-6px) scale(0.97);
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pp-box.open { max-height: 240px; opacity: 1; transform: translateY(0) scale(1); }
.pp-box-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--gold); margin-bottom: 6px; }
.pp-box-label .lg-ico { width: 13px; height: 13px; color: var(--gold); }
.pp-input { width: 100%; }
.input.gold, .pp-input {
  border-color: rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.95), rgba(255, 246, 215, 0.85));
  color: #7a5b10;
  box-shadow: inset 0 1px 2px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 4px rgba(212, 175, 55, 0.1);
}
.input.gold:focus, .pp-input:focus {
  border-color: rgba(212, 175, 55, 0.75);
  background: linear-gradient(135deg, rgba(255, 252, 240, 1), rgba(255, 248, 225, 0.92));
  box-shadow: inset 0 1px 2px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 4px rgba(212, 175, 55, 0.18);
}
.input.gold::placeholder { color: rgba(180, 140, 40, 0.55); }
.pp-show-hint {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.9), rgba(255, 244, 210, 0.7));
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 2px rgba(160, 120, 20, 0.12), 0 6px 18px -12px rgba(150, 110, 25, 0.4);
  color: #6b5210; font-size: 12.5px; line-height: 1.45; text-align: left;
}
.pp-show-hint .lg-ico { width: 16px; height: 16px; color: var(--gold); flex: 0 0 auto; }
.pp-read-row { display: flex; align-items: center; gap: 8px; }
.pp-read-row .input { flex: 1; min-width: 0; }
.pp-step-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.92), rgba(255, 244, 210, 0.72));
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 2px rgba(160, 120, 20, 0.14), 0 10px 24px -14px rgba(150, 110, 25, 0.45);
  margin-bottom: 12px;
}
.pp-step-label { flex: 1; font-weight: 700; color: var(--gold); font-size: 15px; }
.pp-step-box {
  max-height: 0; opacity: 0; transform: translateY(-6px) scale(0.97);
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pp-step-box.open { max-height: 200px; opacity: 1; transform: translateY(0) scale(1); }
.gold { color: var(--gold); }
.setting-emoji.gold {
  background: linear-gradient(135deg, #fff8dd, #f7e3a4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(212, 175, 55, 0.4), 0 8px 18px -10px rgba(160, 115, 20, 0.5);
}
.setting-emoji.gold .lg-ico { color: var(--gold); }
.setting-status.gold { color: #8a6a12; border-color: rgba(212, 175, 55, 0.4); background: rgba(212, 175, 55, 0.12); }
.setting-status.gold.on {
  color: #fff; border-color: transparent;
  background: var(--gold-grad);
  font-weight: 700;
  box-shadow: 0 2px 10px -2px rgba(212, 175, 55, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 2px rgba(120, 84, 10, 0.3);
}
.modal-title.gold { color: var(--gold); }

.confirm-modal { max-width: 380px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 16px; }
.confirm-actions .btn, .confirm-actions .ghost-btn { flex: 1; }
.confirm-actions .danger { color: var(--danger); }
.icon-btn.gold {
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.9), rgba(255, 244, 210, 0.7));
  color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.icon-btn.gold:hover { background: linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(255, 238, 190, 0.85)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(212, 175, 55, 0.5); }
.icon-btn.gold:active { transform: translateY(0) scale(0.96); }

/* iPhone-style switch */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(120, 140, 170, 0.35);
  border-radius: 999px; transition: background 0.25s ease;
}
.slider::before {
  content: ''; position: absolute; height: 22px; width: 22px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.switch input:checked + .slider { background: #34c759; }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: 0.5; cursor: default; }

.score-row {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  background: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.85);
  border-radius: 14px; margin-bottom: 10px;
}
.score-val { font-size: 15px; font-weight: 650; margin-left: auto; }

@media (max-width: 560px) {
  .nav-tabs { border-radius: 18px; }
  .nav-tab { font-size: 12.5px; padding: 10px 12px; }
}

.lg-ico { flex: 0 0 auto; display: block; }
.lg-ico.x { width: 14px; height: 14px; }
.lg-ico.md { width: 22px; height: 22px; }
.lg-ico.co { width: 16px; height: 16px; }
.lg-ico.sm { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }
.lg-ico.title { width: 19px; height: 19px; display: inline-block; vertical-align: -4px; }
.brand-mark .lg-ico { width: 28px; height: 28px; }
.brand-mark.small .lg-ico { width: 16px; height: 16px; }
.setting-emoji .lg-ico, .pick-ico .lg-ico { width: 24px; height: 24px; }
.setting-emoji .lg-ico { color: var(--accent); }

/* ---------- liquid glass refinements ----------
   Откат к прошлой версии: замени этот файл на style.liquid-glass.backup.css
   Линзовая кромка света, отражение цвета окружения, тинт акцента,
   мягкое свечение на hover — по скиллу liquid-glass-design. */
.ghost-btn, .score-row {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.46));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}
.ghost-btn:hover {
  border-color: rgba(0, 120, 255, 0.45);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 24px -12px rgba(0, 110, 255, 0.45);
}
.ghost-btn.danger:hover {
  border-color: #ff4d4f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 24px -12px rgba(255, 77, 79, 0.45);
}
.tx-row, .device-row, .term-check-row, .totp-copy-row, .word-chip, .lan-chip, .kind-card, .address {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}
.tx-row:hover, .device-row:hover, .word-chip:hover, .lan-chip:hover, .kind-card:hover, .term-check-row:hover, .totp-copy-row:hover {
  border-color: rgba(0, 120, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 20px -12px rgba(0, 110, 255, 0.35);
}
.kind-card:has(input:checked), .lan-chip:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(214, 235, 255, 0.95), rgba(214, 235, 255, 0.68));
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.setting-row {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 6px 20px -12px rgba(20, 60, 120, 0.25);
}
.setting-row:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 26px -12px rgba(0, 110, 255, 0.4);
}
.balance-card::before {
  content: "";
  position: absolute; left: -70px; bottom: -90px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255, 126, 0, 0.1), transparent 70%);
  pointer-events: none;
}
.switch input:checked + .slider {
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.14), 0 6px 14px -4px rgba(34, 197, 94, 0.55);
}

/* ---------- smooth spring transitions ----------
   Все переключатели и ползунки — плавные, с пружинным откликом как на iOS. */
.slider {
  transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.slider::before {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.switch input:checked + .slider::before {
  transform: translateX(18px) scale(1.06);
}
.seg-btn {
  transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.seg-btn:hover {
  color: var(--ink);
}
.nav-tab {
  transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.step-dot {
  transition: background 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-dot.active {
  transform: scaleX(1.2);
}
.score-row, .word-chip, .lan-chip, .kind-card, .tx-row, .device-row, .term-check-row, .totp-copy-row, .setting-row, .ghost-btn, .pick-tile {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}