:root {
  color-scheme: dark;
  --bg: #060B14;
  --navy: #0B1530;
  --surface: rgba(11, 21, 48, 0.82);
  --surface-strong: #0B1530;
  --surface-soft: rgba(245, 247, 251, 0.05);
  --line: rgba(245, 247, 251, 0.10);
  --line-strong: rgba(37, 99, 255, 0.30);
  --text: #F5F7FB;
  --muted: #A7B2CB;
  --muted-2: #69758F;
  --accent: #2563FF;
  --blue: #2563FF;
  --success: #22C55E;
  --violet: #5B7CFF;
  --amber: #ffc872;
  --red: #ff7182;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(37, 99, 255, 0.1), transparent 32rem),
    radial-gradient(circle at 105% 34%, rgba(82, 111, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #060B14 0%, #040811 100%);
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ambient { position: fixed; width: 320px; height: 320px; border-radius: 50%; filter: blur(90px); opacity: .08; pointer-events: none; }
.ambient-one { background: var(--accent); left: -220px; top: 25vh; }
.ambient-two { background: var(--violet); right: -240px; top: 58vh; }

.app-shell { width: min(100%, 620px); min-height: 100vh; margin: 0 auto; padding: 0 22px 118px; position: relative; }
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(6, 11, 20, .96) 68%, rgba(6, 11, 20, 0));
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.brand-mark { width: 34px; height: 34px; color: var(--accent); display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(37, 99, 255, .22)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand strong { display: block; font-size: 13px; line-height: 1; letter-spacing: .18em; }
.brand small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .34em; margin-top: 5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.network-pill, .live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; letter-spacing: .14em; font-weight: 800; color: #B8C2DB; border: 1px solid var(--line); border-radius: 999px; padding: 7px 9px; background: rgba(255,255,255,.025); }
.network-pill i, .live-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
#ton-connect tc-root > div > div > button { transform: scale(.82); transform-origin: right center; }

.demo-switcher { margin: 4px 0 18px; padding: 8px 8px 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid rgba(255, 200, 114, .18); background: rgba(255, 200, 114, .055); border-radius: 14px; }
.demo-switcher > span { color: var(--amber); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; font-weight: 800; }
.persona-tabs { display: flex; gap: 3px; background: rgba(0,0,0,.18); border-radius: 10px; padding: 3px; }
.persona-tabs button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 7px 9px; font-size: 10px; cursor: pointer; }
.persona-tabs button.active { background: rgba(255,255,255,.1); color: white; box-shadow: 0 3px 10px rgba(0,0,0,.18); }

.view { display: none; animation: viewIn .25s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero-copy { padding: 18px 2px 22px; }
.hero-copy h1 { margin: 12px 0 14px; font-size: clamp(33px, 9vw, 47px); line-height: 1.03; letter-spacing: -.045em; font-weight: 650; }
.hero-copy h1 em { color: var(--accent); font-style: normal; font-weight: 650; }
.hero-copy p, .page-heading p { max-width: 470px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.vault-card {
  position: relative;
  overflow: hidden;
  min-height: 255px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(37, 99, 255, .1), transparent 50%),
    linear-gradient(160deg, rgba(11, 21, 48, .98), rgba(11, 21, 48, .94));
  box-shadow: 0 20px 70px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.05);
}
.vault-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(90deg, black, transparent); pointer-events: none; }
.vault-topline { display: flex; justify-content: space-between; align-items: center; color: #C2CAE0; font-size: 11px; position: relative; z-index: 2; }
.live-chip { color: var(--accent); border-color: rgba(37,99,255,.15); background: rgba(37,99,255,.05); }
.vault-value { display: flex; align-items: baseline; gap: 6px; margin-top: 30px; position: relative; z-index: 2; }
.vault-value > span { color: var(--accent); font-size: 24px; font-weight: 600; }
.vault-value strong { font-size: clamp(44px, 14vw, 65px); line-height: 1; letter-spacing: -.055em; font-weight: 600; }
.vault-value small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.vault-rule { height: 1px; background: linear-gradient(90deg, rgba(37,99,255,.42), var(--line), transparent); margin: 27px 0 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 2; }
.stat-grid div { display: flex; flex-direction: column; gap: 4px; }
.stat-grid strong { font-size: 18px; font-weight: 620; }
.stat-grid span { color: var(--muted); font-size: 10px; }
.vault-orbit { position: absolute; width: 250px; height: 250px; right: -112px; top: -75px; border: 1px solid rgba(37,99,255,.12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(37,99,255,.025), 0 0 0 70px rgba(37,99,255,.018); }
.vault-orbit::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); left: 16px; top: 56px; box-shadow: 0 0 16px var(--accent); }

.primary-action { width: 100%; margin: 18px 0 20px; min-height: 72px; border: 0; border-radius: 20px; background: linear-gradient(105deg, #2563FF, #4F7BFF); color: #060B14; display: grid; grid-template-columns: 38px 1fr 24px; align-items: center; gap: 12px; padding: 12px 18px; text-align: left; cursor: pointer; box-shadow: 0 16px 40px rgba(37, 99, 255, .12); transition: transform .18s, box-shadow .18s; }
.primary-action:active { transform: scale(.986); }
.primary-action:hover { box-shadow: 0 18px 50px rgba(37,99,255,.19); }
.action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: rgba(6,11,20,.11); font-size: 23px; }
.primary-action strong { display: block; font-size: 14px; }
.primary-action small { display: block; color: rgba(6,11,20,.62); margin-top: 3px; font-size: 10px; }
.primary-action .arrow { font-size: 19px; }

.ecosystem-strip { margin: 0 0 30px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(37,99,255,.09), rgba(11,21,48,.72)); }
.ecosystem-strip h2 { margin: 7px 0 14px; font-size: 18px; letter-spacing: -.025em; }
.product-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.product-row article { min-width: 0; padding: 12px 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(245,247,251,.025); }
.product-row article.active { border-color: rgba(37,99,255,.34); background: rgba(37,99,255,.10); }
.product-row span, .product-row strong, .product-row small { display: block; }
.product-row span { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.product-row strong { margin-top: 8px; font-size: 11px; }
.product-row small { margin-top: 4px; color: var(--muted-2); font-size: 8px; }

.section-heading, .page-heading { margin: 0 2px 16px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.025em; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; padding: 8px 0; }
.page-heading { padding: 25px 0 19px; }
.page-heading h1 { margin: 10px 0 10px; font-size: 38px; letter-spacing: -.04em; }

.deal-list { display: grid; gap: 11px; }
.deal-list.spacious { gap: 13px; }
.deal-card { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.025)); border-radius: 19px; padding: 17px; cursor: pointer; transition: border-color .18s, transform .18s, background .18s; }
.deal-card:hover { border-color: rgba(37,99,255,.22); background: linear-gradient(135deg, rgba(37,99,255,.06), rgba(255,255,255,.025)); }
.deal-card:active { transform: scale(.99); }
.deal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.deal-card h3 { margin: 0 0 7px; font-size: 14px; font-weight: 620; letter-spacing: -.012em; }
.deal-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 9px; }
.deal-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.deal-amount { text-align: right; white-space: nowrap; }
.deal-amount strong { display: block; font-size: 16px; }
.deal-amount small { color: var(--muted); font-size: 8px; }
.status { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; padding: 6px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; }
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status.green { color: var(--success); background: rgba(34,197,94,.08); }
.status.blue { color: var(--blue); background: rgba(101,173,255,.05); }
.status.amber { color: var(--amber); background: rgba(255,200,114,.05); }
.status.red { color: var(--red); background: rgba(255,113,130,.05); }
.status.grey { color: #8C98B2; background: rgba(140,160,155,.05); }
.progress-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 16px; }
.progress-track span { height: 3px; border-radius: 999px; background: rgba(255,255,255,.07); }
.progress-track span.done { background: linear-gradient(90deg, var(--accent), #4F7BFF); box-shadow: 0 0 8px rgba(37,99,255,.14); }
.deal-card.attention::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--red); }
.skeleton-card { height: 130px; border-radius: 19px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.075), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { padding: 34px 22px; text-align: center; border: 1px dashed var(--line); border-radius: 20px; }
.empty-state span { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 14px; background: var(--surface-soft); color: var(--accent); font-size: 22px; }
.empty-state strong { display: block; font-size: 14px; }
.empty-state p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 7px 0 0; }

.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: 10px; cursor: pointer; white-space: nowrap; }
.filter-row button.active { color: #060B14; background: var(--accent); border-color: var(--accent); font-weight: 700; }

.safety-hero { display: grid; grid-template-columns: 64px 1fr; gap: 17px; align-items: center; padding: 22px; border: 1px solid var(--line-strong); border-radius: 23px; background: linear-gradient(135deg, rgba(37,99,255,.09), rgba(255,255,255,.025)); }
.q-visual { width: 60px; height: 60px; display: grid; place-items: center; border: 2px solid var(--accent); border-radius: 50%; color: var(--text); font-size: 27px; font-weight: 760; background: rgba(37,99,255,.10); box-shadow: 0 0 24px rgba(37,99,255,.12); }
.safety-hero strong { font-size: 16px; }
.safety-hero p, .safety-list p, .warning-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; font-size: 11px; }
.safety-list { margin-top: 14px; display: grid; gap: 9px; }
.safety-list article { display: grid; grid-template-columns: 31px 1fr; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); }
.safety-list article > span { color: var(--accent); font-size: 9px; letter-spacing: .12em; padding-top: 3px; }
.safety-list strong { font-size: 13px; }
.warning-card { display: grid; grid-template-columns: 31px 1fr; gap: 12px; margin-top: 14px; padding: 16px; border: 1px solid rgba(255,200,114,.2); border-radius: 17px; background: rgba(255,200,114,.05); }
.warning-card > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #241807; background: var(--amber); font-weight: 900; }
.warning-card p { margin: 0; }
.warning-card p strong { color: #ffd99a; }

.profile-card { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-soft); }
.avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #060B14; background: linear-gradient(135deg, var(--accent), var(--blue)); font-size: 20px; font-weight: 800; }
.profile-card strong, .profile-card span { display: block; }
.profile-card strong { font-size: 15px; }
.profile-card div > span { color: var(--muted); font-size: 10px; margin-top: 5px; }
.verified-badge { color: var(--accent); font-size: 8px; letter-spacing: .08em; padding: 6px 8px; border: 1px solid rgba(37,99,255,.2); border-radius: 999px; }
.settings-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.02); }
.settings-list button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 16px; text-align: left; cursor: pointer; }
.settings-list button:last-child { border-bottom: 0; }
.settings-list button > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--accent); }
.settings-list strong, .settings-list small { display: block; }
.settings-list strong { font-size: 12px; }
.settings-list small { color: var(--muted); margin-top: 4px; font-size: 9px; }
.settings-list b { color: var(--muted); font-size: 18px; }
.build-note { text-align: center; color: var(--muted-2); font-size: 9px; margin: 22px 0; }

.bottom-nav { position: fixed; z-index: 30; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 580px); height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 7px 8px; border: 1px solid rgba(255,255,255,.095); border-radius: 22px; background: rgba(6, 11, 20, .91); backdrop-filter: blur(24px); box-shadow: 0 18px 55px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04); }
.bottom-nav button { height: 56px; border: 0; border-radius: 15px; background: transparent; color: var(--muted-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.bottom-nav button span { font-size: 18px; line-height: 1; }
.bottom-nav button small { font-size: 8px; }
.bottom-nav button.active { color: var(--accent); background: rgba(37,99,255,.055); }
.bottom-nav .nav-create { width: 52px; height: 52px; justify-self: center; margin-top: -28px; color: #060B14; background: var(--accent); border: 5px solid #060B14; box-shadow: 0 8px 25px rgba(37,99,255,.22); }
.bottom-nav .nav-create span { font-size: 24px; }
.bottom-nav .nav-create small { display: none; }

.modal-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(2, 5, 12, .72); backdrop-filter: blur(8px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: fixed; z-index: 100; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 620px); max-height: min(91vh, 900px); overflow-y: auto; padding: 10px 22px max(28px, env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #0B1530, #060B14 70%); box-shadow: 0 -30px 90px rgba(0,0,0,.5); animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetUp { from { transform: translate(-50%, 35px); opacity: 0; } }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 17px; border-radius: 999px; background: rgba(255,255,255,.18); }
.sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.sheet h2 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.035em; }
.close-sheet { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; font-size: 23px; font-weight: 300; }
.sheet form, .compact-sheet { display: grid; gap: 14px; }
.sheet label { display: grid; gap: 8px; color: #C2CAE0; font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.sheet input, .sheet textarea, .sheet select { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: rgba(6, 11, 20, .58); color: var(--text); padding: 13px 14px; font-size: 12px; transition: border-color .16s, box-shadow .16s; }
.sheet select { color-scheme: dark; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; cursor: pointer; }
.sheet textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.sheet input::placeholder, .sheet textarea::placeholder { color: #5F6B86; }
.sheet input:focus, .sheet textarea:focus, .sheet select:focus { border-color: rgba(37,99,255,.5); box-shadow: 0 0 0 3px rgba(37,99,255,.06); outline: 0; }
.input-prefix, .input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(6,11,20,.58); overflow: hidden; }
.input-prefix span { padding-left: 14px; color: var(--accent); }
.input-prefix input, .input-suffix input { border: 0; background: transparent; border-radius: 0; }
.input-suffix span { padding-right: 13px; color: var(--muted); font-size: 9px; }
.field-pair { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.fee-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fee-preview > div { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.fee-preview span, .fee-preview strong { display: block; }
.fee-preview span { color: var(--muted); font-size: 9px; }
.fee-preview strong { margin-top: 5px; font-size: 12px; }
.terms-check { grid-template-columns: 18px 1fr !important; align-items: start; gap: 9px !important; color: var(--muted) !important; font-weight: 400 !important; line-height: 1.45; }
.terms-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.submit-button { width: 100%; min-height: 53px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 15px; padding: 0 18px; background: var(--accent); color: #060B14; font-weight: 750; font-size: 12px; cursor: pointer; }
.submit-button:disabled { opacity: .5; cursor: wait; }
.submit-button b { font-size: 18px; }
.submit-button.danger { background: var(--red); }
.secondary-button { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 11px; font-weight: 650; cursor: pointer; }
.secondary-button:hover { color: var(--text); border-color: rgba(255,255,255,.16); }

.detail-sheet { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.detail-amount-card { position: relative; overflow: hidden; padding: 19px; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(135deg, rgba(37,99,255,.085), rgba(255,255,255,.02)); }
.detail-amount-card > span { color: var(--muted); font-size: 9px; }
.detail-amount-card h3 { margin: 8px 0 15px; font-size: 32px; letter-spacing: -.04em; }
.detail-amount-card h3 small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.money-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.money-breakdown div { padding: 10px; border-radius: 11px; background: rgba(0,0,0,.14); }
.money-breakdown span, .money-breakdown strong { display: block; }
.money-breakdown span { color: var(--muted); font-size: 8px; }
.money-breakdown strong { margin-top: 4px; font-size: 11px; }
.detail-section { margin-top: 19px; }
.detail-section > h4 { margin: 0 0 10px; color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.terms-card { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.terms-card p { margin: 0; color: #B8C2DB; font-size: 11px; line-height: 1.58; white-space: pre-line; }
.term-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.term-meta div { padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.term-meta span, .term-meta strong { display: block; }
.term-meta span { color: var(--muted); font-size: 8px; }
.term-meta strong { margin-top: 5px; font-size: 10px; overflow-wrap: anywhere; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline-event { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; min-height: 57px; position: relative; }
.timeline-event::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 1px; background: var(--line); }
.timeline-event:last-child::before { display: none; }
.timeline-dot { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid rgba(37,99,255,.35); border-radius: 50%; background: #0B1530; color: var(--accent); font-size: 8px; z-index: 2; }
.timeline-event strong { display: block; font-size: 10px; margin-top: 1px; }
.timeline-event p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.timeline-event time { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.action-stack { display: grid; grid-template-columns: 1fr; gap: 8px; }
.deal-action { min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: rgba(255,255,255,.035); display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; }
.deal-action strong { font-size: 11px; }
.deal-action span { color: var(--muted); font-size: 14px; }
.deal-action.primary { color: #060B14; background: var(--accent); border-color: var(--accent); }
.deal-action.danger { color: var(--red); border-color: rgba(255,113,130,.22); background: rgba(255,113,130,.04); }
.final-state { padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.action-copy { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.action-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.share-result { padding: 15px; border: 1px solid rgba(37,99,255,.2); border-radius: 15px; background: rgba(37,99,255,.045); }
.share-result strong { font-size: 12px; }
.share-result p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.share-link { display: flex; gap: 8px; }
.share-link input { min-width: 0; }
.share-link button { border: 0; border-radius: 11px; background: var(--accent); color: #060B14; padding: 0 15px; font-weight: 700; font-size: 10px; cursor: pointer; }

.ramp-card { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(101,173,255,.2); border-radius: 17px; background: linear-gradient(135deg, rgba(101,173,255,.075), rgba(37,99,255,.035)); }
.ramp-card > div > span { display: block; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.ramp-card strong { display: block; margin-top: 6px; font-size: 13px; }
.ramp-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ramp-card button { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 12px; padding: 0 14px; background: var(--blue); color: #060B14; font-size: 10px; font-weight: 750; cursor: pointer; }
.ramp-card button b { font-size: 15px; }
.ramp-card > small { color: var(--muted-2); font-size: 8px; }
.ramp-content { display: grid; gap: 11px; }
.ramp-summary { padding: 17px; border: 1px solid var(--line-strong); border-radius: 17px; background: linear-gradient(135deg, rgba(37,99,255,.085), rgba(255,255,255,.02)); }
.ramp-summary > span, .ramp-wallet > span { display: block; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.ramp-summary > strong { display: block; margin-top: 7px; font-size: 23px; letter-spacing: -.03em; }
.ramp-summary > strong small { color: var(--muted); font-size: 9px; letter-spacing: 0; }
.ramp-summary p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ramp-route { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 5px; align-items: center; padding: 12px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.13); }
.ramp-route span { min-width: 0; color: #B8C2DB; font-size: 8px; line-height: 1.35; text-align: center; }
.ramp-route b { color: var(--accent); font-size: 11px; }
.ramp-wallet { position: relative; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.ramp-wallet strong { display: block; margin-top: 5px; padding-right: 92px; font-size: 10px; overflow-wrap: anywhere; }
.ramp-wallet button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 1px solid rgba(37,99,255,.2); border-radius: 9px; background: rgba(37,99,255,.07); color: var(--accent); padding: 7px 9px; font-size: 8px; font-weight: 700; cursor: pointer; }
.ramp-disclosure { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid rgba(255,200,114,.18); border-radius: 13px; background: rgba(255,200,114,.045); }
.ramp-disclosure > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--amber); color: #221606; font-weight: 900; }
.ramp-disclosure p { margin: 0; color: #c7b58f; font-size: 9px; line-height: 1.5; }
.provider-state { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.provider-state > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(101,173,255,.1); color: var(--blue); font-size: 12px; font-weight: 800; }
.provider-state.success { border-color: rgba(34,197,94,.24); background: rgba(34,197,94,.06); }
.provider-state.success > span { background: var(--success); color: #060B14; }
.provider-state strong { display: block; font-size: 12px; }
.provider-state p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.provider-checklist { padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.13); }
.provider-checklist p { margin: 0; color: #A7B2CB; font-size: 9px; line-height: 1.7; }

.toast-region { position: fixed; z-index: 200; left: 50%; bottom: max(94px, calc(env(safe-area-inset-bottom) + 94px)); transform: translateX(-50%); width: min(calc(100% - 32px), 500px); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(11,21,48,.96); box-shadow: var(--shadow); font-size: 10px; animation: toastIn .24s ease; }
.toast::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; background: var(--success); color: #060B14; font-weight: 900; }
.toast.error::before { content: "!"; background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

@media (max-width: 390px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .network-pill { display: none; }
  .field-pair { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 52px 1fr; }
  .verified-badge { grid-column: 2; width: max-content; }
  .sheet { padding-left: 17px; padding-right: 17px; }
}

@media (min-width: 760px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100vh - 36px); border: 1px solid var(--line); border-radius: 34px; background: rgba(6,11,20,.42); box-shadow: 0 35px 100px rgba(0,0,0,.32); }
  .topbar { top: 18px; border-radius: 34px 34px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

.local-amount-input { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.local-amount-input select, .local-amount-input input { width: 100%; }
.local-amount-input select { min-height: 48px; border: 1px solid var(--line); border-radius: 13px; background: rgba(6,11,20,.58); color: var(--text); padding: 0 10px; font: inherit; }
.conversion-preview { padding: 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(37,99,255,.055); }
.conversion-preview > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.conversion-preview span, .conversion-preview small { color: var(--muted); font-size: 9px; }
.conversion-preview strong { font-size: 13px; }
.conversion-preview small { display: block; margin-top: 6px; line-height: 1.5; }
.conversion-note { margin: -8px 0 14px; color: var(--muted); font-size: 10px; }
.fx-lock-note { display: block; margin-top: 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }
@media (max-width: 520px) { .local-amount-input { grid-template-columns: 104px 1fr; } }
