:root {
  --bg: #f2f3f7;
  --card: #ffffff;
  --soft: #e8eaef;
  --text: #111111;
  --muted: #8e8e93;
  --blue: #3478f6;
  --blue-soft: #e8f1ff;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, a { font-family: inherit; }
button { border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }

#app { min-height: 100vh; padding-bottom: calc(96px + var(--safe-b)); }
.wrap { width: min(430px, 100%); margin: 0 auto; padding: 12px 16px 0; }

.page-title {
  padding-top: calc(6px + var(--safe-t));
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.slider { margin-top: 14px; }
.slider-view {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s cubic-bezier(.22, .9, .3, 1);
  will-change: transform;
}
.slide {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex: 0 0 100%;
  width: 100%;
  padding: 0;
  min-height: 0;
  background: #fff;
  display: block;
  overflow: hidden;
}
.slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 724;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.slider-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d0d3db;
}
.slider-dots .dot.on {
  width: 18px;
  background: var(--blue);
}

.bank-card {
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1.7 / 1;
  color: #fff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
}
.bank-card img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.bank-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 42%,
    rgba(8, 22, 64, 0.18) 100%
  );
}
.bank-card .pad {
  position: relative; z-index: 1;
  height: 100%;
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.bank-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.bank-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 16, 48, 0.45);
}
.bank-logo small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.95;
  margin-top: 2px;
}
.bank-chip {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}
.bank-id,
.bank-bal {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 8px 12px;
}
.bank-id span,
.bank-bal span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 1;
  color: #fff;
}
.bank-id b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 16, 48, 0.35);
}
.bank-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.bank-bal strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 16, 48, 0.35);
}
.bank-mark {
  width: 46px; height: 30px;
  position: relative;
  flex: 0 0 46px;
}
.bank-mark i,
.bank-mark b {
  position: absolute; top: 3px;
  width: 24px; height: 24px; border-radius: 50%;
}
.bank-mark i { left: 0; background: rgba(255,255,255,.42); }
.bank-mark b { right: 0; background: rgba(186, 230, 253, .55); }

.holder {
  margin-top: 14px;
}
.holder .label {
  color: var(--muted);
  font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.holder .row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.holder strong {
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.plus-pill {
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.actions-2 {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.actions-2 .btn {
  padding: 13px 10px;
  font-size: 14px;
}
.actions-2 .btn svg { width: 18px; height: 18px; }
.tile {
  background: var(--card);
  border-radius: 22px;
  padding: 18px 12px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.tile .ico {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid; place-items: center;
}
.tile .ico svg { width: 22px; height: 22px; }
.tile span { font-size: 13px; font-weight: 600; }

.section { margin-top: 22px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.section-head h3 { font-size: 16px; font-weight: 700; }
.see { color: var(--muted); font-size: 13px; text-decoration: none; }

.scroll {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.cat-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cat-banner {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #3478f6;
  box-shadow: var(--shadow);
}
.cat-banner:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-radius: 18px;
}
.cat-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 724;
  object-fit: contain;
  object-position: center;
  background: #3478f6;
}
.cat-item { flex: 0 0 108px; text-align: center; }
.cat-item img, .cat-item .ph {
  width: 108px; height: 108px; border-radius: 50%;
  object-fit: contain; object-position: center;
  background: #fff;
  box-shadow: 0 6px 16px rgba(17,24,39,.07);
  margin: 0 auto;
  overflow: hidden;
}
.cat-item .ph { display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); }

.panel {
  background: #eceef3;
  border-radius: 24px;
  padding: 14px 10px 12px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard {
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: left;
}
.pcard .pic {
  aspect-ratio: 1;
  height: auto;
  background: #3478f6;
}
.pcard .pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.pcard .body { padding: 10px 11px 12px; }
.pcard .meta { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.pcard h4 { font-size: 13px; line-height: 1.25; min-height: 2.4em; }
.pcard .short {
  color: var(--muted); font-size: 11px; margin: 5px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .row {
  display: flex; justify-content: space-between; align-items: center;
}
.price { font-weight: 800; font-size: 13px; }
.buy {
  background: var(--blue); color: #fff;
  border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 700;
}

.search {
  margin-top: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 11px 12px;
  display: flex; gap: 8px; align-items: center;
  box-shadow: var(--shadow);
  color: var(--muted);
}
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 15px;
}

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  color: #3a3a3c;
}
.chip.on { background: var(--blue); color: #fff; }

.banner {
  margin-top: 18px;
  background: var(--blue);
  color: #fff;
  border-radius: 22px;
  padding: 16px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: var(--shadow);
}
.banner .ico {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,.16);
  display: grid; place-items: center; flex: 0 0 44px;
}
.banner b { display: block; font-size: 14px; }
.banner span { font-size: 12px; opacity: .86; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff;
  border-radius: 16px; padding: 14px 16px;
  font-weight: 700; font-size: 15px;
}
.btn.wide { width: 100%; }
.btn.ghost { background: var(--soft); color: var(--text); }
.btn:disabled { opacity: .45; }

.back {
  margin: calc(6px + var(--safe-t)) 0 10px;
  color: var(--muted); font-size: 14px; font-weight: 600;
}

.hero-prod {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-prod .pic { aspect-ratio: 1; height: auto; background: #3478f6; }
.hero-prod .pic img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.hero-prod .body { padding: 16px; }
.hero-prod h2 { font-size: 22px; letter-spacing: -.03em; }
.desc { margin-top: 12px; color: #3a3a3c; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.muted { color: var(--muted); font-size: 13px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.plan {
  background: var(--card);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  box-shadow: var(--shadow);
}
.plan.on { outline: 2px solid var(--blue); }
.plan b { display: block; font-size: 14px; }
.plan span { color: var(--muted); font-size: 12px; }

.list { display: grid; gap: 8px; }
.line {
  background: var(--card);
  border-radius: 18px;
  padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
}
.line .ico {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; flex: 0 0 36px;
}
.line .ico svg { width: 18px; height: 18px; }
.line h4 { font-size: 14px; }
.line .grow { flex: 1; }
.chev { color: var(--muted); }

.profile-head { text-align: center; padding-top: calc(10px + var(--safe-t)); }
.avatar {
  width: 84px; height: 84px; border-radius: 50%;
  margin: 0 auto 10px;
  background: var(--blue);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 28px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.id-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; overflow: hidden;
  font-size: 12px; font-weight: 700;
}
.id-badge .left { background: var(--blue); color: #fff; padding: 6px 8px; }
.id-badge .right { background: var(--soft); padding: 6px 10px; }
.settings {
  position: absolute; right: 16px; top: calc(12px + var(--safe-t));
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); display: grid; place-items: center;
  box-shadow: var(--shadow); color: var(--muted);
}

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mini {
  border-radius: 20px; padding: 14px;
  min-height: 96px;
  text-align: left;
}
.mini.plus {
  background: linear-gradient(135deg, #7a5cff, #3478f6);
  color: #fff;
}
.mini.plain { background: var(--soft); }
.mini label { font-size: 12px; opacity: .8; display: block; margin-bottom: 16px; }
.mini b { font-size: 16px; }

.balance {
  margin-top: 12px;
  background: var(--soft);
  border-radius: 20px;
  padding: 16px;
  text-align: left;
}
.balance label { color: var(--muted); font-size: 12px; }
.balance strong { display: block; font-size: 28px; margin-top: 4px; }

.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.actions { display: grid; gap: 8px; margin-top: 16px; }
.total { display: flex; justify-content: space-between; margin-top: 14px; font-weight: 800; }

.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  width: min(360px, calc(100% - 28px));
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(17,24,39,.12);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px;
}
.tab {
  text-align: center;
  color: #c7c7cc;
  text-decoration: none;
  font-size: 10px;
  padding: 6px 0 2px;
}
.tab.on { color: var(--blue); }
.tab svg { width: 22px; height: 22px; display: block; margin: 0 auto 2px; }

.toast {
  position: fixed; left: 50%; bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%);
  background: #1c1c1e; color: #fff;
  padding: 10px 14px; border-radius: 12px; font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.field span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input {
  border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 16px;
}

.pay-page #app { padding-bottom: 32px; }
.pay-page .list { margin-top: 8px; }

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.kpi {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi b { display: block; margin-top: 6px; font-size: 18px; letter-spacing: -0.03em; }

.wallet-addr {
  font-size: 13px;
  word-break: break-all;
  line-height: 1.35;
}
