@font-face { font-family: Wallet; src: url(/fonts/DejaVuSans.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Wallet; src: url(/fonts/DejaVuSans-Bold.ttf); font-weight: 700; font-display: swap; }

:root {
    color-scheme: light;
    --bg: #f7f9fd;
    --card: #ffffff;
    --ink: #101c39;
    --muted: #77839a;
    --primary: #165dfa;
    --line: #e7ecf5;
    --up: #16856b;
    --down: #d95764;
    --info: #eaf1ff;
    --soft: #f2f5fb;
    font-family: Wallet, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: transparent; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }

.device {
    width: min(390px, 100%);
    height: 100dvh;
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sheet { flex: 1; overflow: auto; padding: 8px 24px 28px; }
.sheet > * { flex-shrink: 0; }

.logo { height: 36px; width: auto; }
.brand-row { display: flex; align-items: center; justify-content: space-between; }
.pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.hero { width: min(280px, 78%); display: block; margin: 28px auto 18px; }
.hero.small { width: 148px; margin-top: 12px; }
.setup-body { padding: 28px 24px 12px; }
.setup-body h1, .display {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 8px 0 10px;
}
.lead { color: var(--muted); font-size: 15px; line-height: 1.5; }
.coin-row { display: flex; gap: 10px; margin: 22px 0 8px; }
.dock { margin-top: auto; padding: 12px 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.device.is-setup { min-height: 100dvh; }
.device.is-setup .setup-body { flex: 1; overflow: auto; }
.fine { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; }

button.primary, a.primary, button.block {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
button.secondary, a.secondary, button.block.secondary {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    text-decoration: none;
}
button.ghost, button.primary.ghost { background: #e8eef8; color: #98a4b8; pointer-events: none; }
button .icon.end { margin-left: auto; }

.page-head, .top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
}
.page-head h1, .page-title h1 { font-size: 22px; font-weight: 700; }
.page-title { padding: 8px 0 12px; }
.page-title h1 { font-size: 32px; letter-spacing: -0.03em; }
button.back, button.round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    flex: none;
}
button.back .icon, button.round .icon { width: 18px; height: 18px; }
.icon { width: 22px; height: 22px; display: block; }
.grow { flex: 1; }

.wallet-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.wallet-head strong { display: block; font-size: 16px; }
.wallet-head small { color: var(--muted); font-size: 13px; }
.bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eaf1ff;
    display: grid;
    place-items: center;
    flex: none;
}
.bubble .icon { width: 20px; height: 20px; }

.balance-card {
    background: linear-gradient(165deg, #3b82f6 0%, #1d4ed8 42%, #1e3a8a 100%);
    color: #fff;
    border-radius: 24px;
    padding: 18px 18px 16px;
    margin-bottom: 22px;
    min-height: 168px;
}
.balance-top, .balance-tools { display: flex; align-items: center; justify-content: space-between; }
.balance-top { color: rgba(255,255,255,.82); font-size: 13px; font-weight: 700; }
.balance-card .total { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; margin: 8px 0 4px; }
.balance-card .soft { color: rgba(255,255,255,.78); font-size: 13px; }
button.eye { width: 36px; height: 36px; display: grid; place-items: center; }
button.eye .icon { width: 20px; height: 20px; filter: brightness(10); }
.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }
.flat { color: var(--muted); font-weight: 700; }
.balance-card .up { color: #b6f3d0; }
.balance-card .down { color: #ffd0cb; }

.actions { display: flex; justify-content: space-between; margin: 0 0 22px; }
.action { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(16, 28, 57, 0.04);
}
.action-icon .icon { width: 22px; height: 22px; filter: brightness(0) saturate(100%) invert(30%) sepia(85%) saturate(2466%) hue-rotate(214deg) brightness(98%) contrast(96%); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.section-head h2 { font-size: 20px; }
.text-btn { color: var(--primary); font-weight: 700; font-size: 14px; padding: 8px 0; }
.text-btn.danger { color: var(--down); }

.empty-hero { text-align: center; padding: 28px 8px 12px; }
.empty-hero .bubble { margin: 0 auto 16px; width: 72px; height: 72px; }
.empty-hero .bubble .icon { width: 28px; height: 28px; }
.empty-hero h2 { font-size: 22px; margin-bottom: 8px; }
.empty-hero p { color: var(--muted); line-height: 1.5; }

.addr-card > button, .addr-card > a { flex: none; width: auto; min-height: 36px; padding: 8px 10px; color: var(--primary); font-weight: 700; text-decoration: none; }
.addr-card > button .icon { width: 18px; height: 18px; }
.menu, .asset, .tx, .method {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    margin: 0 0 10px;
    border: 1px solid transparent;
    box-shadow: 0 8px 24px rgba(16, 28, 57, 0.04);
}
.menu span, .asset-name, .tx-main, .method span { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.menu strong, .asset-name strong, .tx-main strong { font-size: 15px; }
.muted, .menu small, .asset-name .muted, .tx-main .muted { color: var(--muted); font-size: 13px; font-weight: 400; }
.asset-values { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.asset-values strong, .tx .asset-values span { font-weight: 700; }
.chev { width: 16px; height: 16px; flex: none; opacity: 0.55; }

.coin { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.coin img { width: 40px; height: 40px; display: block; }
.coin.tiny, .coin.tiny img { width: 28px; height: 28px; }
.coin.big, .coin.big img { width: 64px; height: 64px; }
.coin.letter { border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; }

.search { position: relative; display: block; margin: 8px 0 12px; }
.search .icon { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; }
.search > button { position: absolute; right: 8px; top: 6px; width: 40px; height: 40px; display: grid; place-items: center; }
.search > button .icon { position: static; width: 18px; height: 18px; }
.search input, .field input, .field textarea, .plain {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 14px 16px;
    outline: none;
}
.search input { padding-left: 42px; }
.field { display: block; margin: 12px 0; font-size: 14px; font-weight: 700; }
.field input, .field textarea { margin-top: 8px; font-weight: 400; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 4px 0 12px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; font-weight: 700; margin: 8px 2px; }

.info-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--info);
    color: var(--primary);
    border-radius: 16px;
    padding: 14px;
    margin: 14px 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}
.info-box .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.warn, .error, .notice { border-radius: 16px; padding: 12px 14px; margin: 8px 0 12px; font-size: 14px; }
.warn { background: #fff6db; color: #8a5a00; }
.notice { background: var(--info); color: var(--primary); }
.error { background: #fdecee; color: var(--down); }

.tabs {
    display: flex;
    justify-content: space-around;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tab { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab .icon { width: 22px; height: 22px; }
.tab.on { color: var(--primary); }
.tab.on .icon { filter: brightness(0) saturate(100%) invert(30%) sepia(85%) saturate(2466%) hue-rotate(214deg) brightness(98%) contrast(96%); }
.tab.on .bubble-tab { background: #eaf1ff; border-radius: 14px; padding: 4px 12px; }

.pay-card, .facts, .qr-card, .card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(16, 28, 57, 0.04);
    margin: 8px 0 14px;
}
.pay-top { display: flex; align-items: center; gap: 12px; }
.pay-amount, .hero-amount .total {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.04em;
    padding: 0;
}
.amount-row { display: flex; align-items: flex-end; gap: 8px; margin: 6px 0; }
.amount-row .unit { color: var(--muted); font-size: 18px; font-weight: 700; padding-bottom: 6px; }
button.maks {
    margin-left: auto;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--soft);
    font-weight: 700;
}
.hero-amount { text-align: center; padding: 12px 0 8px; }
.hero-amount .total { font-size: 32px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts button.fact { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 20px; text-align: left; }
.facts button.fact strong { text-align: right; }
button.unit { min-height: 0; padding: 0 0 6px; }
.facts button.fact:last-child, .facts div:last-child { border-bottom: 0; }
.facts span { color: var(--muted); }
.facts strong { text-align: right; }
.pair { display: flex; gap: 10px; }
.pair button { flex: 1; }

.pin-screen { text-align: center; }
.pin-screen h1 { margin-top: 18px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c5cedd; }
.pin-dots span.on { background: var(--primary); border-color: var(--primary); }
.pinpad, .keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; margin: 12px 0 18px; }
.pinpad button, .keypad button {
    height: 58px;
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    background: transparent;
}
.center-logo { width: 56px; height: auto; margin: 36px auto 18px; display: block; }
button.icon-end { position: relative; }
button.icon-end .icon { position: absolute; right: 18px; width: 18px; height: 18px; }

.word-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.word-grid label, .word-grid li {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 64px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 13px;
}
.word-grid span, .word-grid li em { color: var(--muted); font-style: normal; font-size: 12px; }
.word-grid input { border: 0; padding: 2px 0 0; width: 100%; font-weight: 700; outline: none; }
.word-grid strong { font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; font-size: 14px; }

.addr-card small { word-break: break-all; font-family: Consolas, ui-monospace, monospace; }
.qr { width: 210px; height: 210px; display: block; margin: 8px auto; background: #fff; }
.speed { display: flex; gap: 8px; }
.speed button { flex: 1; min-height: 40px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; }
.speed button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.swap-stack { position: relative; }
.swap-mid {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    display: grid;
    place-items: center;
    margin: -18px auto;
    position: relative;
    z-index: 1;
    padding: 0;
}
.swap-mid .icon { width: 20px; height: 20px; filter: brightness(10); }
.day { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; margin: 14px 2px 8px; text-transform: uppercase; }
.info-box.bad { background: #fdecee; color: #b23b48; }
.bubble.bad { background: #fdecee; color: #d95764; }
.bubble.ok { background: #e7f6f1; color: #16856b; }
.bubble.pale { background: #eaf1ff; }
.wait { color: var(--primary); }
.field-label { font-weight: 700; margin: 16px 0 8px; }
.swap-line { display: flex; gap: 12px; align-items: center; font-size: 28px; }
.swap-arrow { display: block; margin: 8px 0 8px 8px; }
.pay-top { justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.amount-row { align-items: center; }
.amount-row .pay-amount { width: auto; }
.spark { width: 100%; height: 72px; display: block; }
.spark-card { background: #fff; border-radius: 16px; padding: 8px 8px 0; margin-bottom: 12px; }
.contact { display: flex; gap: 8px; align-items: center; }
.contact .menu { margin: 0; }
.contact .text-btn { width: auto; min-width: 44px; padding: 0 8px; }
#scan-video { width: 100%; border-radius: 16px; background: #000; }
.resources { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.resources span { background: #fff; border-radius: 999px; padding: 6px 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.end { text-align: center; color: var(--muted); margin: 8px 0 16px; }
.wallet-pick { display: flex; gap: 8px; overflow: auto; justify-content: center; margin-top: 8px; }
.wallet-pick button { min-height: 34px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; }
.wallet-pick button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
