/* Rain Aurora VPN — Mini App UI 2.0 (built from the "Rain Aurora UI 2.0" design canvas). */
@font-face { font-family: "Be Vietnam Pro"; src: url("./fonts/BeVietnamPro-Regular.woff") format("woff"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("./fonts/BeVietnamPro-Bold.woff") format("woff"); font-weight: 600 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070D1F;
  --surface: #0F1A33;
  --surface-2: #101C38;
  --surface-3: #13244A;
  --field: #0B1530;
  --selected: #11234A;
  --line: rgba(148, 180, 255, .16);
  --line-2: rgba(148, 180, 255, .24);
  --text: #EEF4FF;
  --text-2: #C9D6F2;
  --muted: #AFC0E4;
  --dim: #8E9CBC;
  --cyan: #22D3FF;
  --cyan-2: #7DE8FF;
  --blue: #2D7BFF;
  --violet: #9B5CFF;
  --mint: #3DFFC5;
  --mint-2: #7DFFD9;
  --amber: #FFB020;
  --amber-2: #FFCF70;
  --red: #FF5C7A;
  --red-2: #FF9DB0;
  --pink: #FF7AC6;
  --ink: #04122A;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 18px;
  --r-sm: 14px;
  /* Telegram fullscreen: device safe area + Telegram's own Close / ⌄ ··· controls (Bot API 8.0 CSS vars). */
  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  font-family: "Be Vietnam Pro", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico.sm { width: 16px; height: 16px; }
.emo { width: 34px; height: 34px; flex: 0 0 auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.glow { position: fixed; z-index: 0; border-radius: 50%; pointer-events: none; }
.glow-a { left: -120px; top: -160px; width: 520px; height: 420px; background: radial-gradient(closest-side, rgba(45,123,255,.35), rgba(45,123,255,0)); }
.glow-b { right: -160px; top: 120px; width: 420px; height: 420px; background: radial-gradient(closest-side, rgba(155,92,255,.22), rgba(155,92,255,0)); }

.shell { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(96px + var(--safe-bottom)); }
.shell.no-tabs { padding-bottom: calc(24px + var(--safe-bottom)); }
.shell.has-dock { padding-bottom: calc(120px + var(--safe-bottom)); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-top)) 16px 10px; background: linear-gradient(to bottom, rgba(7,13,31,.96) 70%, rgba(7,13,31,0)); }
.top-logo { width: 36px; height: 36px; flex: 0 0 auto; }
.top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-title strong { font-size: 16px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top.sub .top-title strong { font-size: 22px; }
.top-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.top-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.top-status small { color: var(--amber-2); font-weight: 700; font-size: 12px; }
.top-extra:empty { display: none; }
.top-extra img { width: 40px; height: 40px; display: block; }
.icon-btn { position: relative; width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.badge { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; }

.main { position: relative; padding: 0 16px; }
.view { display: flex; flex-direction: column; gap: 14px; animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom)); width: min(calc(100% - 24px), 536px); height: 66px; display: flex; justify-content: space-around; align-items: center; border-radius: 24px; background: rgba(15,26,51,.94); border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0,0,0,.4); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tab { min-width: 64px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--dim); font-size: 11px; font-weight: 600; }
.tab .ico { width: 22px; height: 22px; }
.tab.on { color: var(--cyan); }

/* ---------- dock (sticky action bar above everything) ---------- */
.dock { position: fixed; z-index: 41; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom)); width: min(calc(100% - 24px), 536px); }
.dock:empty { display: none; }
.sumbar { padding: 14px; border-radius: 24px; background: rgba(15,26,51,.97); border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0,0,0,.45); display: flex; align-items: center; gap: 12px; }
.sumbar-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sumbar-copy small { font-size: 12px; color: var(--muted); }
.sumbar-copy strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sumbar-copy em { font-style: normal; font-size: 12px; color: var(--dim); }

/* ---------- buttons ---------- */
.btn { min-height: 50px; padding: 0 18px; border-radius: 16px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.btn.sm { min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.btn.lg { min-height: 54px; border-radius: 18px; font-size: 16px; }
.btn.block { width: 100%; }
.btn-primary { background: var(--cyan); color: var(--ink); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-pink { background: var(--pink); color: #2A0820; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); font-weight: 700; }
.btn-outline { background: transparent; border-color: rgba(34,211,255,.45); color: var(--text); font-weight: 700; }
.btn-danger { background: transparent; border-color: rgba(255,92,122,.45); color: var(--red-2); font-weight: 700; }
.btn-soft { background: #1B2D57; color: var(--text); font-weight: 700; }
.linkish { min-height: 44px; padding: 8px 16px; border: 0; background: none; color: var(--cyan); font-size: 14px; font-weight: 700; align-self: center; }
.row-btns { display: flex; gap: 10px; }
.row-btns > .btn { flex: 1; }
.row-btns > .btn.fit { flex: 0 0 auto; }

/* ---------- pills / chips ---------- */
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(34,211,255,.16); color: var(--cyan-2); }
.pill.mint { background: rgba(61,255,197,.14); color: var(--mint-2); }
.pill.amber { background: rgba(255,176,32,.16); color: var(--amber-2); }
.pill.red { background: rgba(255,92,122,.16); color: var(--red-2); }
.pill.grey { background: rgba(148,180,255,.14); color: var(--text-2); }
.pill.violet { background: rgba(155,92,255,.2); color: #CDB4FF; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.seg button.on { background: #1B2D57; color: var(--text); font-weight: 700; }
.pick { display: flex; gap: 8px; }
.pick button { flex: 1; min-height: 44px; border-radius: 14px; border: 1px solid rgba(148,180,255,.18); background: var(--surface); color: var(--text-2); font-size: 15px; font-weight: 700; }
.pick button.on { background: var(--cyan); color: var(--ink); border-color: var(--cyan); }
.pick.compact button { min-height: 42px; border-radius: 12px; background: var(--field); font-size: 14px; }
.pick.compact button.on { background: var(--cyan); color: var(--ink); border-color: var(--cyan); }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- surfaces ---------- */
.card { position: relative; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); padding: 14px; }
.card.pad-lg { padding: 18px; }
.card h2 { font-size: 16px; font-weight: 800; }
.card .hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; }
.section-title h2 { font-size: 17px; font-weight: 800; }
.section-title p { font-size: 12px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.tight { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

/* hero (home + others) */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 18px; background: linear-gradient(160deg, #13244A 0%, #0D1834 60%, #0B1530 100%); border: 1px solid var(--hero-line, rgba(61,255,197,.28)); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.hero::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, var(--hero-glow, rgba(45,123,255,.45)), rgba(0,0,0,0)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; gap: 6px; align-items: flex-start; }
.hero-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hero-copy > span { font-size: 14px; color: var(--muted); }
.hero-copy h1 { font-size: 24px; line-height: 1.2; font-weight: 800; text-wrap: balance; }
.hero-mascot { width: 132px; height: 132px; margin: -14px -14px -10px 0; flex: 0 0 auto; }
.hero p.body { margin: 10px 0 14px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.usage { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.usage-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.usage-head b { color: var(--text); }
.bar { height: 8px; border-radius: 99px; background: rgba(148,180,255,.14); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--bar, var(--mint)); }
.hero .row-btns .btn:first-child { flex: 1; }
.hero .row-btns .btn:last-child:not(:first-child) { flex: 0 0 auto; }

.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; padding: 14px 4px 12px; border-radius: 20px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); font-size: 12px; font-weight: 600; text-align: center; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 20px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); text-align: left; min-width: 0; }
.tile > span { font-size: 12px; color: var(--muted); }
.tile > b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile > small { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.mint { border-color: rgba(61,255,197,.3); }
.tile.mint > b { color: var(--mint-2); }
.tile.amber { border-color: rgba(255,176,32,.4); }
.tile.amber > b { color: var(--amber-2); }
.stat { padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat small { font-size: 12px; color: var(--muted); }
.stat b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.mint { border-color: rgba(61,255,197,.3); } .stat.mint b { color: var(--mint-2); }
.stat.amber { border-color: rgba(255,176,32,.4); } .stat.amber b { color: var(--amber-2); }

.banner { display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; border-radius: var(--r-lg); border: 1px solid rgba(155,92,255,.35); background: linear-gradient(100deg, rgba(155,92,255,.28), rgba(34,211,255,.12)); text-align: left; width: 100%; color: var(--text); }
.banner .mascot { width: 66px; height: 66px; }
.banner .emo { width: 44px; height: 44px; margin: 10px; }
.banner-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner-copy strong { font-size: 15px; }
.banner-copy small { font-size: 12px; color: var(--text-2); }
.banner.amber { border-color: rgba(255,176,32,.4); background: linear-gradient(100deg, rgba(255,176,32,.22), rgba(45,123,255,.1)); }
.banner.seller { border-color: rgba(255,176,32,.35); background: linear-gradient(100deg, rgba(255,176,32,.16), rgba(155,92,255,.14)); }
.banner.bypass { border-color: rgba(155,92,255,.35); background: linear-gradient(110deg, rgba(45,123,255,.22), rgba(155,92,255,.16)); padding: 12px 14px; }
.banner.bypass .emo { margin: 0; width: 36px; height: 36px; }

/* list rows */
.list { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); overflow: hidden; }
.lrow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px; border: 0; border-top: 1px solid rgba(148,180,255,.08); background: transparent; text-align: left; width: 100%; color: var(--text); }
.lrow:first-child { border-top: 0; }
.lrow .emo { width: 30px; height: 30px; }
.lrow-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(34,211,255,.1); color: var(--cyan-2); flex: 0 0 auto; }
.lrow-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lrow-copy strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-copy small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-copy small.wrap { white-space: normal; line-height: 1.45; }
.lrow > b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.lrow > .chev { color: var(--dim); }

/* plans */
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-radius: 20px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.opt.on { border: 2px solid var(--cyan); background: var(--selected); padding: 13px 15px; }
.radio { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 2px solid rgba(148,180,255,.35); display: grid; place-items: center; }
.radio i { width: 10px; height: 10px; border-radius: 50%; }
.opt.on .radio { border-color: var(--cyan); }
.opt.on .radio i { background: var(--cyan); }
.opt-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-copy strong { font-size: 16px; }
.opt-copy small { font-size: 12px; color: var(--muted); }
.opt-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.opt-price strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.opt-price small { font-size: 12px; color: var(--dim); }
.opt-price .save { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(61,255,197,.16); color: var(--mint-2); }
.bypass-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-xl); border: 1px solid rgba(155,92,255,.35); background: linear-gradient(140deg, rgba(45,123,255,.22), rgba(155,92,255,.18)); }
.bypass-head { display: flex; gap: 12px; align-items: center; }
.bypass-head .emo { width: 56px; height: 56px; }
.bypass-head strong { font-size: 18px; }
.bypass-head p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }

/* payment */
.screen { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; }
.screen-glow { position: absolute; left: 50%; top: 60px; width: 460px; height: 460px; margin-left: -230px; border-radius: 50%; background: radial-gradient(closest-side, var(--screen-glow, rgba(45,123,255,.22)), rgba(0,0,0,0)); pointer-events: none; }
.screen-glow.mint { --screen-glow: rgba(61,255,197,.24); }
.screen-top { position: relative; display: flex; align-items: center; gap: 8px; padding: calc(14px + var(--safe-top)) 12px 4px; }
.screen-top h1 { font-size: 22px; font-weight: 800; flex: 1; }
.screen-body { position: relative; flex: 1; display: flex; flex-direction: column; padding: 8px 16px calc(18px + var(--safe-bottom)); gap: 12px; max-width: 560px; width: 100%; margin: 0 auto; }
.screen-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.summary { padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(148,180,255,.14); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary strong { font-size: 15px; }
.summary small { font-size: 12px; color: var(--muted); }
.summary .amt { align-items: flex-end; }
.summary .amt strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.summary .amt small { color: var(--dim); }
.summary .amt s { font-size: 12px; color: var(--dim); }
.method { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.method.on { border: 2px solid var(--cyan); padding: 12px 13px; background: var(--selected); }
.method .emo { width: 36px; height: 36px; }
.method-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.method-copy strong { font-size: 15px; }
.method-copy small { font-size: 12px; color: var(--muted); }
.method > b { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.field { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid rgba(148,180,255,.45); background: var(--field); color: var(--text); padding: 0 14px; font-size: 15px; font-weight: 500; }
textarea.field { min-height: 140px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.field::placeholder { color: var(--dim); }
.field-row { display: flex; gap: 8px; }
.field-row .field { flex: 1; }
.field-hint { font-size: 12px; color: var(--dim); }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.center p { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 320px; }
.center h2 { font-size: 28px; font-weight: 800; text-wrap: balance; }
.center strong.title { font-size: 18px; }
.qr { padding: 14px; border-radius: 24px; background: #fff; display: grid; place-items: center; }
.qr img { width: 196px; height: 196px; display: block; image-rendering: pixelated; }
.qr.big { padding: 16px; border-radius: 28px; box-shadow: 0 0 0 6px rgba(61,255,197,.25), 0 24px 60px rgba(0,0,0,.45); }
.qr.big img { width: 210px; height: 210px; }
.countdown { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.kv { width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(148,180,255,.14); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.kv > span { color: var(--muted); }
.kv > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kv strong { overflow-wrap: anywhere; text-align: right; }
.copy-btn { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--cyan-2); display: grid; place-items: center; }
.mono { font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--field); padding: 12px; border-radius: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mono.wrap { white-space: normal; overflow-wrap: anywhere; }
.mascot-slot { width: 150px; height: 150px; margin: -6px 0 -14px; }
.mascot-slot.xl { width: 230px; height: 230px; margin-bottom: -14px; }
.mascot-slot.lg { width: 170px; height: 170px; margin: 0 0 -16px; }
.mascot-slot.md { width: 110px; height: 110px; margin: -6px 0 -10px; }
.notice { padding: 12px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; background: rgba(34,211,255,.08); border: 1px solid rgba(34,211,255,.22); color: var(--text-2); }
.notice.warn { background: rgba(255,176,32,.1); border-color: rgba(255,176,32,.35); color: var(--amber-2); }
.notice.bad { background: rgba(255,92,122,.1); border-color: rgba(255,92,122,.35); color: var(--red-2); }

/* sheet */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3,6,15,.6); }
.sheet { position: fixed; z-index: 55; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 560px); max-height: 92vh; overflow-y: auto; border-radius: 32px 32px 0 0; background: #0D1834; border-top: 1px solid rgba(148,180,255,.2); padding: 10px 18px calc(22px + var(--safe-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: sheet-in .24s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet-in { from { transform: translate(-50%, 24px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-grip { display: block; width: 44px; height: 5px; margin: 0 auto 6px; border-radius: 9px; background: rgba(148,180,255,.3); }
.sheet-x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; }
#sheetContent { display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.sheet-head .mascot { width: 84px; height: 84px; margin: -10px -6px -10px -10px; }
.sheet-head h2 { font-size: 21px; font-weight: 800; }
.sheet-head span { font-size: 13px; color: var(--muted); }
.sheet-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); }
.steps li > b { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: rgba(34,211,255,.16); color: var(--cyan-2); display: grid; place-items: center; font-size: 13px; }
.steps li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li strong { font-size: 14px; }
.steps li small { font-size: 12px; color: var(--muted); }
.steps select { border: 1px solid rgba(34,211,255,.4); border-radius: 12px; background: transparent; color: var(--text); min-height: 38px; padding: 0 8px; font-size: 13px; font-weight: 700; }
details.qr-more { border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); padding: 12px 14px; }
details.qr-more summary { cursor: pointer; font-size: 14px; font-weight: 700; min-height: 24px; }
details.qr-more .qr { margin: 12px auto 0; width: max-content; }
details.qr-more .qr img { width: 160px; height: 160px; }
.privacy { font-size: 12px; color: var(--dim); text-align: center; }

/* devices */
.dev-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(148,180,255,.08); }
.dev-row:first-of-type { border-top: 0; }
.dev-row .emo { width: 28px; height: 28px; }
.dev-row .lrow-copy strong { font-size: 13px; }
.mini-btn { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text-2); display: grid; place-items: center; }
.mini-btn.danger { border-color: rgba(255,92,122,.35); color: var(--red-2); }
.text-btn { border: 0; background: none; color: var(--red-2); font-size: 13px; font-weight: 700; min-height: 32px; }
.text-btn.cyan { color: var(--cyan); }

/* referral */
.ref-hero { display: flex; align-items: center; gap: 6px; }
.ref-hero .mascot { width: 150px; height: 150px; margin: -10px -14px -10px -16px; }
.ref-hero strong { font-size: 20px; line-height: 1.25; font-weight: 800; text-wrap: balance; }
.ref-hero span { font-size: 13px; color: var(--text-2); }
.gift-card { padding: 14px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 10px; border: 1px solid rgba(255,122,198,.35); background: linear-gradient(120deg, rgba(255,122,198,.2), rgba(155,92,255,.2)); }
.gift-card strong { font-size: 16px; }
.gift-card span { font-size: 13px; color: #E3DAFF; line-height: 1.5; }

/* seller */
.buyer { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(148,180,255,.14); color: var(--text); text-align: left; }
.ava { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.ava.active { background: rgba(61,255,197,.14); color: var(--mint-2); }
.ava.expiring { background: rgba(255,176,32,.16); color: var(--amber-2); }
.ava.expired { background: rgba(255,92,122,.14); color: var(--red-2); }
.ava.inactive { background: rgba(148,180,255,.12); color: var(--text-2); }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 14px; color: var(--dim); }
.search .field { padding-left: 42px; min-height: 46px; font-size: 14px; }
.footnote { font-size: 12px; color: var(--dim); text-align: center; padding: 4px 8px; line-height: 1.5; }
.radio-card { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(148,180,255,.16); font-size: 14px; }
.radio-card:has(input:checked) { background: var(--selected); border: 2px solid var(--cyan); padding: 12px 14px; }
.radio-card input { width: 18px; height: 18px; accent-color: var(--cyan); }
.price-out { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding-top: 4px; }
.price-out > span { display: flex; flex-direction: column; }
.price-out small { font-size: 12px; color: var(--muted); }
.price-out b { font-size: 20px; font-variant-numeric: tabular-nums; }
.price-out em { font-style: normal; font-size: 12px; color: var(--dim); }

/* notifications & misc */
.note { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); text-align: left; color: var(--text); }
.note.unread { border-color: rgba(34,211,255,.35); }
.note-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--dim); flex: 0 0 auto; }
.note.unread .note-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,255,.15); }
.note.success .note-dot { background: var(--mint); }
.note.danger .note-dot { background: var(--red); }
.note.warning .note-dot { background: var(--amber); }
.note-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.note-copy strong { font-size: 14px; }
.note-copy small { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.note-copy time { font-size: 11px; color: var(--dim); }
.empty { padding: 22px 16px; border-radius: 20px; background: var(--surface-2); border: 1px dashed rgba(148,180,255,.22); text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.faq { border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(148,180,255,.14); padding: 0 14px; }
.faq summary { min-height: 52px; display: flex; align-items: center; font-size: 14px; font-weight: 700; cursor: pointer; }
.faq p { padding-bottom: 14px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.legal h2 { font-size: 15px; margin: 14px 0 6px; }
.legal h2:first-child { margin-top: 0; }
.legal p { font-size: 13px; line-height: 1.65; color: var(--text-2); }
.select { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid rgba(148,180,255,.45); background: var(--field); color: var(--text); padding: 0 12px; font-size: 14px; font-weight: 600; }

/* toast + loading */
.toast { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-bottom)); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: #EEF4FF; color: #0B1630; font-size: 14px; font-weight: 600; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.loading { display: flex; flex-direction: column; gap: 14px; }
.sk { border-radius: var(--r-lg); background: linear-gradient(100deg, #0F1A33 30%, #16264A 50%, #0F1A33 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.sk-hero { height: 280px; border-radius: var(--r-xl); }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sk-qa { height: 84px; }
.sk-card { height: 110px; }
@keyframes shimmer { to { background-position: -300% 0; } }
.state { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.state h1 { font-size: 22px; }
.state p { color: var(--muted); font-size: 14px; max-width: 300px; }

@media (max-width: 360px) {
  .hero-mascot { width: 108px; height: 108px; }
  .hero-copy h1 { font-size: 21px; }
  .qa { font-size: 11px; }
  .grid4 { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* seller: "turn on Bypass too?" right after a plan activation */
.offer-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; width: 100%; margin: 14px 0 4px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid rgba(155,92,255,.45); background: linear-gradient(100deg, rgba(155,92,255,.28), rgba(34,211,255,.12)); text-align: left; color: var(--text); }
.offer-card .emo { width: 40px; height: 40px; flex: 0 0 auto; }
.offer-card .banner-copy { flex: 1; min-width: 0; }
.offer-card .banner-copy small { color: var(--muted); }
.offer-card .row-btns { flex: 1 0 100%; }

/* VND transfer screen: amount first, one main action, the rest folded away */
.pay-sum { width: 100%; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(160deg, #13244A, #0D1834); border: 1px solid rgba(34,211,255,.28); display: grid; gap: 4px; }
.pay-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-label { font-size: 13px; color: var(--muted); }
.pay-sum .pill { align-self: center; font-variant-numeric: tabular-nums; }
.pay-amount { font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pay-meta { font-size: 13px; color: var(--dim); }
.note-key { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.35); }
.note-key > span { font-size: 12px; color: var(--amber-2); font-weight: 650; }
.note-key .code-val { margin-left: auto; }
.code-val { font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; color: var(--text); overflow-wrap: anywhere; text-align: right; }
.copy-btn { width: 44px; height: 44px; }
.vnd-tab { width: 100%; display: grid; gap: 10px; }
.vnd-step { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bank-app { min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(34,211,255,.38); background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; font: inherit; cursor: pointer; }
.bank-app strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.bank-app small { font-size: 11px; color: var(--cyan-2); font-weight: 650; }
.bank-app:active, .bank-chip:active, .bank-primary:active { transform: scale(.98); }
.bank-more-cell { border-style: dashed; border-color: var(--line-2); background: transparent; }
.bank-more-cell small { color: var(--dim); }
.bank-hint { font-size: 12px; line-height: 1.45; color: var(--muted); }
.bank-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bank-chip { min-height: 44px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; text-align: center; cursor: pointer; }
.bank-chip strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.bank-primary { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border: 0; border-radius: 18px; background: var(--cyan); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.bank-primary span { display: grid; gap: 2px; }
.bank-primary strong { font-size: 17px; font-weight: 800; }
.bank-primary small { font-size: 12px; font-weight: 600; opacity: .8; }
.link-btn { align-self: center; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--cyan-2); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.link-btn.danger { color: var(--red-2); font-weight: 600; }
.vnd-tab .qr { justify-self: center; }
.vnd-hint { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.manual { width: 100%; border-radius: 16px; border: 1px solid rgba(148,180,255,.14); background: var(--surface-2); }
.manual-head { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.manual-head .ico { transition: transform .15s ease; }
.manual.open .manual-head .ico { transform: rotate(180deg); }
.manual-title { padding: 14px 14px 4px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.manual-rows { padding: 0 6px 6px 14px; }
.mrow { min-height: 48px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(148,180,255,.08); }
.mrow:first-child { border-top: 0; }
.mrow > span { font-size: 13px; color: var(--muted); }
.mrow > strong { margin-left: auto; font-size: 14px; }
.mrow > strong:last-child { margin-right: 8px; }
.pay-wait { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 6px; border-radius: var(--r-md); background: linear-gradient(110deg, rgba(45,123,255,.16), rgba(61,255,197,.08)); border: 1px solid rgba(125,232,255,.22); overflow: hidden; }
.pay-wait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(125,232,255,.12) 50%, transparent 70%); transform: translateX(-100%); animation: waitSheen 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes waitSheen { to { transform: translateX(100%); } }
.wait-mascot { width: 64px; height: 64px; flex: 0 0 auto; margin: -6px -4px; }
.wait-copy { display: grid; gap: 3px; min-width: 0; text-align: left; }
.wait-copy strong { font-size: 15px; font-weight: 800; color: var(--text); }
.wait-bar { display: flex; margin-top: 2px; height: 26px; }
.wait-bar > span { width: 26px; height: 26px; flex: 0 0 auto; display: block; }
.wait-bar svg, .wait-mascot svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (prefers-reduced-motion: reduce) { .pay-wait::after { animation: none; display: none; } .manual-head .ico { transition: none; } }
@media (max-width: 340px) { .bank-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pay-amount { font-size: 28px; } }

/* bank logos: logo image over a brand-coloured monogram (shown when the logo can't load) */
.bank-ico, .bank-ico-lg { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--bank, #1B2D57); color: #fff; font: 800 11px/1 inherit; letter-spacing: .02em; }
.bank-ico::before, .bank-ico-lg::before { content: attr(data-mono); }
.bank-ico img, .bank-ico-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.bank-ico-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 13px; box-shadow: 0 0 0 2px rgba(4,18,42,.12); }
.bank-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bank-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-app { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
.bank-primary { justify-content: flex-start; }
.bank-primary .ico { margin-left: auto; }
.bank-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px 4px; }
.bank-chip .bank-ico { width: 32px; height: 32px; }
.bank-chip strong { font-size: 12px; line-height: 1.2; }
.bank-ico.more { background: transparent; border: 1px dashed var(--line-2); color: var(--cyan-2); font-size: 12px; }
.bank-more-cell .bank-txt strong { white-space: normal; line-height: 1.25; }
