:root {
  --bg: #fbf7f8; --paper: #fff; --ink: #22141a; --ink2: #5b4750; --muted: #998590; --line: #f1e5e9; --line2: #e7d6dc;
  --brand: #f0507a; --brand2: #ff8f5a; --brand-s: #fff0f4; --brand-d: #cf3760;
  --ok: #10a064; --ok-s: #e2f6ec; --warn: #b47600; --warn-s: #fff4d8; --bad: #d9434e; --bad-s: #fde7e9;
  --r: 24px;
  --sh: 0 1px 2px rgba(60, 20, 35, .04), 0 14px 34px -20px rgba(120, 30, 60, .30);
  --sh-lg: 0 2px 4px rgba(60, 20, 35, .04), 0 30px 60px -30px rgba(150, 30, 70, .45);
  --grad: linear-gradient(135deg, var(--brand), var(--brand2));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 "Be Vietnam Pro", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.has-nav { padding-bottom: 90px; }
a { color: var(--brand-d); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 13px; }
h1, h2, h3 { font-family: "Be Vietnam Pro", system-ui, sans-serif; font-weight: 800; letter-spacing: -.025em; }
.brand, .num { font-family: "Baloo 2", "Be Vietnam Pro", sans-serif; letter-spacing: -.015em; }
h1 { margin: 0; } h2 { font-size: 21px; margin: 0; line-height: 1.2; } h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- đầu trang ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(251, 247, 248, .78); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(120, 30, 60, .35); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 24px; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand img { width: 38px; height: 38px; transition: transform .3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }
.brand b { color: var(--brand); font-weight: 800; }
.nav { display: flex; gap: 2px; margin-left: 10px; background: rgba(255,255,255,.7); padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.nav button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink2); cursor: pointer; display: flex; align-items: center; gap: 7px; transition: background .15s, color .15s; }
.nav button .ico { width: 18px; height: 18px; }
.nav button:hover { color: var(--ink); }
.nav button.on { background: var(--ink); color: #fff; }
.who { margin-left: auto; position: relative; }
.avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; overflow: hidden; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-weight: 700; font-size: 15px;
  background: var(--grad); box-shadow: 0 0 0 3px #fff, var(--sh); }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.menu { position: absolute; right: 0; top: 50px; min-width: 220px; background: #fff; border-radius: 18px; box-shadow: var(--sh-lg), 0 0 0 1px var(--line); padding: 8px; animation: pop .15s; }
.menu .who-name { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who-name b { display: block; } .menu .who-name span { font-size: 12.5px; color: var(--muted); }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 11px; border: 0; background: none;
  text-decoration: none; color: var(--ink); font-size: 14px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg); }

/* ---------- nút ---------- */
.btn { appearance: none; border: 1px solid var(--line2); border-radius: 13px; padding: 11px 19px; font-weight: 600; font-size: 14px; cursor: pointer;
  background: linear-gradient(180deg, #fff, #fffafb); color: var(--ink); box-shadow: 0 2px 5px -3px rgba(54, 22, 35, .22), inset 0 1px 0 rgba(255,255,255,.9); text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: transform .25s var(--spring), box-shadow .2s, border-color .2s, background .2s, filter .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); border-color: #dfc4ce; box-shadow: 0 8px 16px -12px rgba(92, 25, 49, .42), inset 0 1px 0 rgba(255,255,255,.95); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: 0 2px 5px -3px rgba(54, 22, 35, .25); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn:focus-visible { outline: 3px solid rgba(240, 80, 122, .35); outline-offset: 2px; }
.btn-brand { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 8px 18px -11px var(--brand), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-brand:hover { border-color: transparent; filter: saturate(1.08) brightness(1.03); box-shadow: 0 13px 22px -12px var(--brand), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-dark { border-color: transparent; background: linear-gradient(135deg, #34232b, #21141a); color: #fff; box-shadow: 0 7px 15px -11px rgba(34,20,26,.7), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-white { background: #fff; color: var(--brand-d); box-shadow: 0 7px 16px -12px rgba(90,30,50,.32), inset 0 1px 0 #fff; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink2); }
.btn-ghost:hover { background: rgba(255,255,255,.8); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn .arr { transition: transform .2s; } .btn:hover .arr { transform: translateX(3px); }

/* ---------- thẻ ---------- */
.card { background: var(--paper); border: 1px solid rgba(231,214,220,.78); border-radius: 20px; padding: 22px; box-shadow: 0 2px 5px -4px rgba(55,20,34,.22), 0 14px 30px -24px rgba(120,30,60,.42), inset 0 1px 0 rgba(255,255,255,.9); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-h .sub { margin: 2px 0 0; }
.stack { display: grid; gap: 18px; padding: 24px 0 40px; }
.cols { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.hello h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
.hello p { margin: 4px 0 0; }
.hello-user { display: flex; align-items: center; gap: 14px; }
.referral-hero { padding: clamp(22px, 5vw, 40px); background: linear-gradient(135deg, #fff9ed, #fff); }
.referral-hero h1 { margin: 8px 0; }
.referral-link { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.referral-link input { min-width: 0; flex: 1; }
.referral-code { margin-top: 14px; color: var(--muted); }
.referral-home p { margin: 7px 0 12px; }
@media (max-width: 560px) { .referral-link { align-items: stretch; flex-direction: column; } }
.referral-page { gap: 16px; }
.referral-page .referral-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); gap: 26px; align-items: center; padding: clamp(22px, 4vw, 38px); overflow: hidden; background: radial-gradient(circle at 5% 0%, rgba(255,255,255,.7), transparent 34%), linear-gradient(125deg, #ffe9ef, #fff1e7 58%, #fff9ed); }
.referral-hero-copy { max-width: 650px; }
.referral-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--brand-d); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.referral-hero-copy h1 { max-width: 600px; margin: 12px 0 10px; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; }
.referral-hero-copy > p { max-width: 570px; margin: 0; color: var(--ink2); font-size: 15px; }
.referral-benefits { display: grid; gap: 8px; margin-top: 18px; }
.referral-benefits span { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; font-weight: 600; }
.referral-benefits .ico { width: 17px; height: 17px; color: var(--ok); }
.referral-share-card { min-width: 0; padding: 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,255,255,.83); box-shadow: 0 18px 36px -26px rgba(120,30,60,.45); backdrop-filter: blur(8px); }
.referral-share-top { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.referral-share-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-s); font-size: 23px; }
.referral-share-top b, .referral-share-top span { display: block; }
.referral-share-top b { font-size: 15px; }
.referral-share-top span { color: var(--muted); font-size: 12px; }
.referral-code-label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.referral-url-label { margin-top: 14px; }
.referral-page .referral-paste { min-width: 0; border-radius: 15px; }
.referral-page .referral-paste input { width: 100%; min-width: 0; color: var(--ink2); font-size: 13px; }
.referral-page .referral-code-paste input { color: var(--brand-d); font-weight: 800; letter-spacing: .12em; }
.referral-page .referral-url-paste input { font-size: 12px; }
.referral-page .referral-paste .btn { flex: none; white-space: nowrap; padding: 9px 12px; border-radius: 12px; font-size: 12px; }
.referral-share-hint { display: block; margin-top: 10px; color: var(--muted); font-size: 11.5px; text-align: center; }
.referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.referral-stat { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.referral-stat-icon { grid-row: 1 / 4; grid-column: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-s); color: var(--brand-d); }
.referral-stat.earned .referral-stat-icon { background: var(--ok-s); color: var(--ok); }
.referral-stat.waiting .referral-stat-icon { background: var(--warn-s); color: var(--warn); }
.referral-stat-label, .referral-stat-hint, .referral-stat-value { grid-column: 2; }
.referral-stat-label, .referral-stat-hint { color: var(--muted); font-size: 11.5px; }
.referral-stat-value { align-self: start; overflow-wrap: anywhere; font: 800 21px/1.25 "Baloo 2", "Be Vietnam Pro", sans-serif; }
.referral-claim { display: grid; grid-template-columns: 48px minmax(180px,1fr) minmax(260px,.9fr); gap: 16px; align-items: center; border-color: #f4d8e0; background: linear-gradient(110deg, #fff, #fff8fa); }
.referral-claim-mark, .referral-linked-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-s); color: var(--brand-d); }
.referral-claim-copy h2 { font-size: 18px; }
.referral-claim-copy p, .referral-linked p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.referral-claim-form { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; }
.referral-claim-paste input { text-transform: uppercase; letter-spacing: .08em; }
.referral-page .referral-claim-paste .btn-brand { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px var(--brand), inset 0 -2px 0 rgba(0,0,0,.08); }
.referral-page .referral-claim-paste .btn-brand:hover { box-shadow: 0 12px 22px -10px var(--brand), inset 0 -2px 0 rgba(0,0,0,.08); }
.referral-claim-form .err { grid-column: 1; }
.referral-linked { display: flex; align-items: center; gap: 14px; background: var(--ok-s); border-color: #cfeedd; }
.referral-linked-mark { flex: none; background: #fff; color: var(--ok); }
.referral-how, .referral-people-card { padding: 22px; }
.referral-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.referral-section-head h2 { margin-top: 4px; font-size: 20px; }
.referral-step-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.referral-step { min-width: 0; padding: 15px; border-radius: 16px; background: #fbf7f8; }
.referral-step > span { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 10px; background: #fff; color: var(--brand-d); font: 800 12px "Be Vietnam Pro", sans-serif; box-shadow: 0 0 0 1px var(--line); }
.referral-step b { font-size: 13px; }
.referral-step p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.referral-count { min-width: 32px; padding: 4px 10px; border-radius: 999px; background: var(--brand-s); color: var(--brand-d); font-size: 12px; font-weight: 800; text-align: center; }
.referral-people { display: grid; }
.referral-person { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.referral-person-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.referral-person-info b, .referral-person-info span, .referral-person-earned b, .referral-person-earned span { display: block; }
.referral-person-info b { font-size: 13px; }
.referral-person-info span, .referral-person-earned span { color: var(--muted); font-size: 11.5px; }
.referral-person-earned { text-align: right; }
.referral-person-earned b { color: var(--ok); font-size: 13px; }
.referral-empty { display: grid; justify-items: center; padding: 26px 12px 14px; color: var(--muted); text-align: center; }
.referral-empty-pig { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 10px; border-radius: 20px; background: var(--brand-s); }
.referral-empty-pig img { width: 38px; height: 38px; }
.referral-empty b { margin-bottom: 3px; color: var(--ink); }
.referral-empty span { max-width: 350px; font-size: 12px; }
.referral-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.referral-loading img { width: 32px; height: 32px; }
.referral-home p { margin: 7px 0 12px; }
@media (max-width: 760px) { .referral-page .referral-hero { grid-template-columns: 1fr; gap: 20px; } .referral-stats { grid-template-columns: 1fr; } .referral-stat { grid-template-columns: 40px 1fr; } .referral-claim { grid-template-columns: 42px 1fr; } .referral-claim-mark { width: 42px; height: 42px; } .referral-claim-form { grid-column: 1 / -1; } .referral-step-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 520px) { .referral-share-card { padding: 17px; } .referral-claim { grid-template-columns: 1fr; gap: 10px; } .referral-claim-form { grid-template-columns: 1fr; } .referral-claim-form .err { grid-column: auto; } .referral-how, .referral-people-card { padding: 18px 16px; } .referral-step-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .referral-step { padding: 12px; } .referral-person { grid-template-columns: 38px minmax(0,1fr); gap: 10px; } .referral-person-avatar { width: 36px; height: 36px; } .referral-person-earned { grid-column: 2; text-align: left; } }
.referral-prompt-sheet { z-index: 70; }
.referral-prompt-card { max-width: 430px; gap: 11px; padding: 28px; text-align: left; }
.referral-prompt-card .sheet-x { background: rgba(255,255,255,.85); }
.referral-prompt-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 2px; border-radius: 21px; background: var(--brand-s); }
.referral-prompt-mark img { width: 46px; height: 46px; }
.referral-prompt-card h2 { max-width: 340px; margin: 0; font-size: 25px; line-height: 1.2; }
.referral-prompt-copy { max-width: 350px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.referral-prompt-form { display: grid; gap: 9px; margin-top: 3px; }
.sheet-card.referral-prompt-card input { padding: 14px 16px; background: #fff; font-size: 16px; font-weight: 700; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.referral-prompt-form .btn { min-height: 47px; }
.referral-prompt-error { min-height: 0; margin: 0; }
.referral-prompt-foot { margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
@media (max-width: 520px) { .referral-prompt-card { padding: 25px 21px 21px; border-radius: 25px; } }
.hello-avatar { width: 56px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 50%;
  color: #fff; font-size: 20px; font-weight: 800; background: var(--grad); box-shadow: 0 5px 16px -9px #a83559, 0 0 0 1px var(--line); }
.hello-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 560px) { .hello-user { gap: 11px; } .hello-avatar { width: 46px; height: 46px; font-size: 17px; } }

/* ---------- ví heo ---------- */
.wallet { position: relative; overflow: hidden; border-radius: 26px; padding: 24px; color: #fff; isolation: isolate;
  background: radial-gradient(120% 140% at 100% 0%, #ffb56b 0%, transparent 55%), linear-gradient(135deg, #e63f6c 0%, #f0507a 45%, #ff8f5a 100%);
  box-shadow: 0 26px 50px -28px #e63f6c; }
.wallet::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.5px); background-size: 18px 18px; mask-image: linear-gradient(120deg, transparent 30%, #000); }
.wallet::after { content: ""; position: absolute; inset: auto -60px -100px auto; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.10); z-index: -1; }
.wallet .pig { position: absolute; right: 14px; top: 12px; width: 104px; filter: drop-shadow(0 12px 18px rgba(120, 20, 40, .3)); animation: bob 3.4s ease-in-out infinite; }
.wallet .label { font-size: 14px; opacity: .92; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.wallet .num { font-size: clamp(38px, 6vw, 50px); font-weight: 800; line-height: 1.05; margin: 4px 0 12px; text-shadow: 0 2px 12px rgba(120, 20, 40, .2); }
.wallet .num small { font-size: .5em; font-weight: 700; opacity: .85; margin-left: 4px; }
.meter { display: grid; gap: 6px; margin-bottom: 14px; max-width: 360px; font-size: 12.5px; opacity: .95; }
.meter .bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: inherit; background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.8); transition: width .8s cubic-bezier(.2,.9,.3,1); }
.wstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; z-index: 1; }
.wstat { background: rgba(255,255,255,.16); border-radius: 14px; padding: 9px 11px; backdrop-filter: blur(4px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.wstat span { display: block; font-size: 11.5px; opacity: .88; } .wstat b { font-size: 14.5px; white-space: nowrap; }
.wallet .actions { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 1; flex-wrap: wrap; }
.wallet .actions .btn { padding: 10px 16px; font-size: 14px; }
.wallet .btn-glass { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.38); }

/* ---------- dán link ---------- */
.card-paste { position: relative; overflow: hidden; }
.card-paste::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }
.paste { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 18px; padding: 7px 7px 7px 16px; border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s, background .2s; }
.paste:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-s); background: #fff; }
.paste .ico { color: var(--muted); }
.paste input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 11px 2px; font-size: 16px; }
.paste .btn { padding: 10px 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line2); }
.hint { display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.hint span { display: inline-flex; gap: 6px; align-items: center; } .hint .ico { width: 16px; height: 16px; color: var(--ok); }
.err { color: var(--bad); font-size: 14px; margin: 10px 2px 0; }
.err:empty { display: none; }
form .go { margin-top: 12px; padding: 15px 20px; font-size: 16px; border-radius: 16px; }

/* ---------- kết quả: sản phẩm ---------- */
.result { margin-top: 16px; border-radius: 20px; border: 1.5px solid var(--line); overflow: hidden; animation: pop .35s ease; background: #fff; }
.prod { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 16px; align-items: start; }
.prod .thumb { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; background: var(--bg); display: block; }
.prod .name { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.prod .price { font-weight: 700; font-size: 17px; margin-top: 6px; }
.feed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: linear-gradient(90deg, var(--ok-s), #f3fbf7); }
.feed > div:first-child { flex: 1 1 0; min-width: 0; }
.feed .t { font-size: 13px; color: #2d6b4c; }
.feed .v { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 26px; color: var(--ok); line-height: 1.05; }
.feed .v small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.feed img { width: 42px; flex: none; }
.feed-note { order: 3; flex: 0 0 100%; min-width: 0; margin-top: 0; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.linkbox { padding: 14px 16px 16px; display: grid; gap: 10px; }
.copyrow { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 6px 6px 6px 12px; }
.copyrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ink2); }
.sk { background: linear-gradient(90deg, #f3ecee 0%, #fbf7f8 50%, #f3ecee 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
.sk-line { height: 14px; margin: 6px 0; display: block; min-width: 80px; }

/* ---------- danh sách ---------- */
.list { display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; transition: background .15s; }
.row:hover { background: var(--bg); }
.row .thumb { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; background: var(--brand-s); display: grid; place-items: center; color: var(--brand); }
.row .t { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row .r { text-align: right; display: grid; gap: 4px; justify-items: end; }
.row .r > div { display: flex; gap: 4px; }
.row .amt { font-weight: 700; font-size: 15px; white-space: nowrap; }
.amt.plus { color: var(--ok); } .amt.zero { color: var(--muted); text-decoration: line-through; }
.st { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-pending, .st-requested { background: var(--warn-s); color: var(--warn); } .st-approved, .st-paid { background: var(--ok-s); color: var(--ok); }
.st-rejected { background: var(--bad-s); color: var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; display: grid; justify-items: center; gap: 8px; font-size: 14px; }
.empty img { width: 64px; opacity: .6; filter: grayscale(.3); }
.seg { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- mẹo ---------- */
.tips { display: grid; gap: 14px; }
.tip { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; font-size: 13.5px; color: var(--ink2); }
.tip i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-s); color: var(--brand); font-style: normal; }
.tip b { color: var(--ink); display: block; font-size: 14px; }

/* ---------- rút tiền ---------- */
label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 12px; }
.inp, label.f input, label.f select { width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 11px 13px; background: #fff; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.inp:focus, label.f input:focus, label.f select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-s); }
.bankcard { border-radius: 20px; padding: 20px; color: #fff; background: linear-gradient(135deg, #2b1d24, #55303f); margin-bottom: 16px; position: relative; overflow: hidden; aspect-ratio: 1.9; max-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; }
.bankcard::before { content: ""; position: absolute; left: 20px; top: 20px; width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #f5d38a, #c99a3e); }
.bankcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.07); }
.bankcard .b1 { font-size: 13px; opacity: .75; } .bankcard .b2 { font-family: "Baloo 2", sans-serif; font-size: 22px; letter-spacing: .08em; margin: 4px 0 2px; }
.bankcard .b3 { font-size: 13px; letter-spacing: .06em; opacity: .9; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.quick button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.quick button:hover { border-color: var(--brand); color: var(--brand-d); }

/* ---------- hồ sơ ---------- */
.profile-page { max-width: 760px; margin: 0 auto; }
.profile-card { padding: clamp(20px, 4vw, 32px); }
.profile-hero { display: flex; gap: 22px; align-items: center; padding: 20px; border-radius: 20px; margin-bottom: 26px;
  background: linear-gradient(115deg, #fff2f5, #fff7f0); border: 1px solid var(--line); }
.profile-avatar { width: 96px; height: 96px; flex: none; position: relative; display: grid; place-items: center; padding: 0; overflow: hidden;
  border: 4px solid #fff; border-radius: 50%; color: #fff; font-size: 34px; font-weight: 800; background: var(--grad); box-shadow: 0 10px 22px -12px #a83559; cursor: pointer; }
.profile-avatar > img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar > span { position: absolute; right: 0; bottom: 0; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.profile-avatar > span .ico { width: 16px; height: 16px; }
.profile-hero > div > b { display: block; font-size: 21px; line-height: 1.25; }
.profile-hero > div > span { color: var(--muted); font-size: 13px; }
.profile-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.profile-photo-actions .btn .ico { width: 16px; height: 16px; }
.profile-form { display: grid; }
.profile-form label.f { margin-bottom: 4px; }
.profile-hint { margin: 2px 0 18px; }
.profile-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.profile-details > div { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.profile-details span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.profile-details b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.profile-bank { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.profile-bank p { margin: 3px 0 0; }
@media (max-width: 560px) {
  .profile-hero { gap: 14px; padding: 15px; }
  .profile-avatar { width: 76px; height: 76px; font-size: 27px; }
  .profile-hero > div > b { font-size: 18px; }
  .profile-details { grid-template-columns: 1fr; gap: 8px; }
  .profile-actions .btn { width: 100%; }
}

/* ---------- khách: hero ---------- */
#view:has(.hero) { max-width: none; padding: 0; }
#view:has(.hero) > section { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 48px; position: relative; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -80px -20px 0; pointer-events: none;
  background: radial-gradient(42% 55% at 80% 42%, rgba(255, 176, 150, .32), transparent 70%), radial-gradient(36% 45% at 12% 8%, rgba(240, 80, 122, .12), transparent 70%); }
.badge { display: inline-flex; gap: 8px; align-items: center; background: #fff; border-radius: 999px; padding: 5px 14px 5px 5px; font-size: 13px; font-weight: 600; color: var(--ink2); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(120, 30, 60, .3); }
.badge i { background: var(--ok-s); color: var(--ok); border-radius: 999px; padding: 2px 9px; font-style: normal; font-size: 12px; white-space: nowrap; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.06; margin: 20px 0 18px; font-weight: 800; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; line-height: 1.6; color: var(--ink2); margin: 0 0 26px; max-width: 540px; }
.hero-paste { display: flex; align-items: center; gap: 10px; max-width: 560px; background: #fff; border-radius: 18px; padding: 8px 8px 8px 18px;
  box-shadow: 0 0 0 1.5px var(--line2), 0 22px 44px -26px rgba(150, 30, 70, .45); transition: box-shadow .2s; }
.hero-paste:focus-within { box-shadow: 0 0 0 2px var(--brand), 0 0 0 7px var(--brand-s), 0 22px 44px -26px rgba(150, 30, 70, .45); }
.hero-paste > .ico { color: var(--muted); }
.hero-paste input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; padding: 12px 0; }
.hero-paste .btn { padding: 13px 20px; border-radius: 13px; }
.hero-paste .sm { display: none; }
.hero-sub { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.hero-sub .plats { flex: 1; min-width: 0; }
.plats-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.hero-sub .plats { margin: 0; }
.checks { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--ink2); font-weight: 500; }
.checks span { display: inline-flex; align-items: center; gap: 7px; }
.checks .ico { width: 18px; height: 18px; color: #fff; background: var(--ok); border-radius: 50%; padding: 3px; stroke-width: 3; }

/* sàn: chip có "logo" chữ cái màu của sàn */
.plats { display: flex; flex-wrap: wrap; gap: 8px; }
.plat { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.plat.soon { color: var(--muted); background: transparent; }
.plat.soon .logo { filter: grayscale(1); opacity: .45; }
.plat small { font-size: 10.5px; font-weight: 700; color: var(--brand-d); background: var(--brand-s); padding: 1px 7px; border-radius: 999px; }
.logo { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: 12px; flex: none; }
.card-paste .plats { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line2); }

/* khung điện thoại minh hoạ */
.demo { position: relative; display: grid; place-items: center; padding: 10px 0 30px; }
.demo .glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #ffd3de 0%, #ffe6d6 45%, transparent 70%); }
.phone { position: relative; width: 292px; border-radius: 44px; padding: 11px; background: #1b1216; box-shadow: var(--sh-lg), 0 0 0 2px #3a2830, inset 0 0 0 2px #000; transform: rotate(-2.5deg); }
.phone .notch { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 99px; background: #000; z-index: 2; }
.scr { border-radius: 34px; background: var(--bg); padding: 46px 14px 18px; display: grid; gap: 10px; overflow: hidden; }
.mini-top { display: flex; align-items: center; gap: 6px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 17px; }
.mini-top img { width: 24px; } .mini-top b { color: var(--brand); }
.mini-paste { display: flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-s); border-radius: 13px; padding: 9px 10px; font-size: 12px; color: var(--ink2); overflow: hidden; white-space: nowrap; }
.mini-paste .ico { width: 15px; height: 15px; color: var(--muted); }
.typing { overflow: hidden; display: inline-block; border-right: 2px solid var(--brand); animation: type 3.2s steps(28) infinite, caret .7s step-end infinite; }
.mini-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--sh); animation: rise 3.2s ease infinite; }
.mini-card .prod { grid-template-columns: 58px 1fr; gap: 10px; padding: 10px; }
.mini-card .ph { width: 58px; height: 58px; border-radius: 12px; background: linear-gradient(135deg, #ffe7d6, #ffd0dc); display: grid; place-items: center; color: var(--brand-d); }
.mini-card .ph .ico { width: 28px; height: 28px; }
.mini-card .name { font-size: 12.5px; } .mini-card .price { font-size: 14px; margin-top: 3px; }
.mini-card .feed { padding: 9px 12px; } .mini-card .feed .t { font-size: 11px; } .mini-card .feed .v { font-size: 21px; } .mini-card .feed img { width: 30px; }
.mini-btn { display: flex; justify-content: center; align-items: center; gap: 6px; background: var(--grad); color: #fff; font-weight: 600; font-size: 13px; padding: 11px; border-radius: 13px; box-shadow: 0 10px 20px -12px var(--brand); }
.mini-btn .ico { width: 15px; height: 15px; }
.chip { position: absolute; background: #fff; border-radius: 14px; padding: 9px 13px; font-size: 13px; font-weight: 600; box-shadow: var(--sh-lg), 0 0 0 1px var(--line); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip-b { right: 0; bottom: 26%; animation: bob 4s ease-in-out .6s infinite; }
.chip-b .ico { width: 18px; height: 18px; color: #fff; background: var(--ok); border-radius: 50%; padding: 3px; stroke-width: 3; }
.demo .pig2 { position: absolute; width: 96px; right: 6%; bottom: -6px; animation: bob 3.4s ease-in-out infinite; filter: drop-shadow(0 12px 16px rgba(120,20,40,.25)); }

/* dải cam kết */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 24px; }
.strip-i { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 0 0 1px var(--line); }
.strip-i .e { width: 48px; height: 48px; display: grid; place-items: center; background: var(--brand-s); color: var(--brand-d); border-radius: 14px; flex: none; }
.strip-i .e .ico { width: 24px; height: 24px; }
.strip-i b { display: block; font-size: 15px; } .strip-i span:not(.e) { font-size: 13.5px; color: var(--muted); }

/* các mục */
.sec { padding-top: 64px; padding-bottom: 8px; }
.sec-h { text-align: center; margin: 0 auto 30px; max-width: 620px; }
.sec-h h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.sec-h p { margin: 10px 0 0; font-size: 16px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-d); margin-bottom: 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 0 0 1px var(--line); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line2), var(--sh-lg); }
.step-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.step .n { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px var(--brand); }
.step .idx { font-size: 13px; font-weight: 700; color: var(--brand-d); background: var(--brand-s); border-radius: 999px; padding: 4px 10px; letter-spacing: .04em; }
.step h3 { font-size: 19px; font-weight: 700; }
.step p { margin: 0; color: var(--ink2); font-size: 14.5px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; }
.flow::before { content: ""; position: absolute; left: 12%; right: 12%; top: 31px; height: 2px; background: repeating-linear-gradient(90deg, var(--line2) 0 8px, transparent 8px 15px); }
.flow li { display: grid; justify-items: center; text-align: center; gap: 4px; position: relative; }
.flow .dot { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff; color: var(--brand-d); box-shadow: 0 0 0 1px var(--line), 0 0 0 8px var(--bg); margin-bottom: 10px; }
.flow .dot .ico { width: 26px; height: 26px; }
.flow .dot img { width: 40px; }
.flow li:last-child .dot { background: var(--brand-s); box-shadow: 0 0 0 1.5px #f8c3d1, 0 0 0 8px var(--bg); }
.flow b { font-size: 15.5px; } .flow span:not(.dot) { font-size: 13.5px; color: var(--muted); max-width: 190px; }
.stores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.store { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: start; }
.store-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.store-h .logo { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
.store-h b { font-size: 16px; }
.store .st { justify-self: start; margin-top: 2px; }
.store p { margin: 0; color: var(--ink2); font-size: 14px; }
.store.soon { background: transparent; box-shadow: 0 0 0 1px var(--line), inset 0 0 0 1px transparent; border: 1.5px dashed var(--line2); }
.store.soon .logo { filter: grayscale(1); opacity: .5; } .store.soon b { color: var(--ink2); }
.faq { display: grid; gap: 10px; max-width: 780px; margin: 0 auto; }
.faq details { background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.faq details[open] { box-shadow: 0 0 0 1.5px #f6c2d0, var(--sh); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-s); color: var(--brand-d); display: grid; place-items: center; font-weight: 700; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--ink2); font-size: 14.5px; }
.band { margin-top: 64px; margin-bottom: 40px; display: flex; align-items: center; gap: 24px; color: #fff; border-radius: 30px; padding: 32px 36px !important; position: relative; overflow: hidden;
  background: radial-gradient(100% 140% at 100% 0%, #ffb56b 0%, transparent 55%), linear-gradient(135deg, #e63f6c, #f0507a 50%, #ff8f5a); box-shadow: 0 30px 60px -30px #e63f6c; }
.band img { width: 88px; flex: none; animation: bob 3.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(120,20,40,.3)); }
.band h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; } .band p { margin: 4px 0 0; opacity: .92; }
.band .btn { margin-left: auto; }

/* đầu trang của khách: liên kết tới các mục */
.nav a { padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink2); text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { color: var(--ink); background: #fff; }

/* ---------- chân trang ---------- */
.foot { color: var(--muted); font-size: 13.5px; padding: 40px 20px 36px; border-top: 1px solid var(--line); margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; text-align: left; }
.foot-brand .brand { font-size: 22px; } .foot-brand .brand img { width: 32px; height: 32px; }
.foot-brand p { margin: 10px 0 0; max-width: 320px; line-height: 1.6; }
.foot h4 { margin: 4px 0 10px; color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--ink2); text-decoration: none; } .foot ul a:hover { color: var(--brand-d); }
.foot-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.foot-note a { color: var(--ink2); }
body.has-nav .foot { padding-bottom: 110px; }

/* ---------- chân trang, thông báo ---------- */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 14px; font-size: 14px; opacity: 0; transition: .25s; z-index: 70; pointer-events: none; box-shadow: var(--sh); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { background: var(--bad); }
.coin { position: fixed; z-index: 70; font-size: 26px; pointer-events: none; animation: coin 1.2s ease-out forwards; }

/* thanh điều hướng dưới (điện thoại) */
.bnav { display: none; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; background: rgba(34, 20, 26, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 24px; padding: 6px; grid-template-columns: repeat(4, 1fr); box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); }
.bnav button { border: 0; background: none; color: rgba(255,255,255,.6); display: grid; justify-items: center; gap: 2px; padding: 8px 4px; font-size: 11px; font-weight: 600; border-radius: 18px; cursor: pointer; }
.bnav button.on { color: #fff; background: rgba(255,255,255,.13); }
body:not(.has-nav) .bnav { display: none !important; }

/* ---------- đăng nhập ngay trên trang ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(34, 20, 26, .45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: grid; place-items: center; padding: 18px; animation: fade .15s; }
.sheet-card { position: relative; width: 100%; max-width: 390px; background: #fff; border-radius: 28px; padding: 30px 26px 24px; box-shadow: 0 30px 80px -20px rgba(80, 20, 40, .45);
  display: flex; flex-direction: column; gap: 12px; text-align: center; animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); overflow: hidden; }
.sheet-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 110px; z-index: 0; background: linear-gradient(180deg, var(--brand-s), transparent); }
.sheet-card > * { position: relative; }
.sheet-card h2 { font-size: 25px; }
.sheet-card p { margin: -4px 0 4px; }
.sheet-card form { text-align: left; display: grid; gap: 10px; }
.sheet-card input { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); }
.sheet-card input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-s); }
.sheet-pig { width: 64px; height: 64px; margin: 0 auto; animation: bob 3.4s ease-in-out infinite; }
.sheet-x { position: absolute !important; right: 12px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.8); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink2); z-index: 1; }
.btn-google { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--line2); gap: 10px; }
.btn-google img { width: 20px; height: 20px; }
.btn-google:hover { box-shadow: 0 0 0 1.5px #d7c1c9; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes shake { 20% { transform: rotate(-10deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.shake { animation: shake .5s !important; }
@keyframes coin { from { opacity: 1; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), -150px) scale(1.2); } }
@keyframes type { 0% { width: 0; } 45%, 100% { width: 100%; } }
@keyframes caret { 50% { border-color: transparent; } }
@keyframes rise { 0%, 40% { opacity: 0; transform: translateY(10px); } 55%, 100% { opacity: 1; transform: none; } }

.loading { padding: 60px 0; }
.stack.side { padding: 0; }
.stack > *, .cols > *, .prod > *, .row > * { min-width: 0; }
div.thumb { display: grid; place-items: center; color: var(--brand); background: var(--brand-s); }

@media (max-width: 900px) {
  .cols, .hero { grid-template-columns: 1fr; }
  .hero { gap: 26px; padding-top: 26px; text-align: left; }
  .steps, .strip { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 22px; } .flow::before { display: none; }
  .nav { display: none; }
  body.has-nav .bnav { display: grid; }
  .band { flex-direction: column; text-align: center; } .band .btn { margin: 0 auto; }
}
@media (max-width: 520px) {
  .wrap, #view:has(.hero) > section { padding-left: 14px; padding-right: 14px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 16px; }
  .hero .cta .btn { flex: 1; }
  .phone { width: 256px; }
  .chip { font-size: 12px; padding: 7px 10px; } .chip-a { left: -4px; } .chip-b { right: -4px; }
  .wallet { padding: 22px 18px; }
  .wallet .pig { width: 80px; right: 8px; top: 10px; }
  .wstat { padding: 8px 9px; } .wstat b { font-size: 13.5px; }
  .card { padding: 18px 16px; }
  .paste { padding: 5px 5px 5px 13px; }
  .prod { grid-template-columns: 76px 1fr; } .prod .thumb { width: 76px; height: 76px; }
  .prod > div:last-child { min-width: 0; overflow-wrap: anywhere; }
  .prod .name { display: block; overflow: visible; -webkit-line-clamp: unset; -webkit-box-orient: initial; overflow-wrap: anywhere; }
  .prod .meta { overflow-wrap: anywhere; }
  .copyrow { align-items: flex-start; }
  .copyrow code { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; word-break: break-word; }
  .copyrow .btn { flex: none; align-self: center; }
  .band { padding: 24px 20px !important; margin-left: 14px; margin-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
#view:has(.hero) > .band { max-width: 1060px; }
@media (max-width: 1100px) { #view:has(.hero) > .band { margin-left: 20px; margin-right: 20px; } }
@media (max-width: 520px) { #view:has(.hero) > .band { margin-left: 14px; margin-right: 14px; } }
.nav:empty { display: none; }
@keyframes rise { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
.home-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start;
  grid-template-areas: "paste wallet" "recent wallet" "recent tips"; grid-template-rows: auto auto 1fr; }
.home-grid > * { min-width: 0; }
.a-paste { grid-area: paste; } .a-wallet { grid-area: wallet; } .a-recent { grid-area: recent; } .a-tips { grid-area: tips; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; grid-template-areas: "paste" "wallet" "recent" "tips"; grid-template-rows: none; } }
.home-grid { grid-template-areas: "paste side" "recent side"; grid-template-rows: auto 1fr; }
.a-side { grid-area: side; }
@media (max-width: 900px) { .home-grid { grid-template-areas: "paste" "side" "recent"; grid-template-rows: none; } }
/* không bao giờ cho trang tràn ngang trên điện thoại (nền trang trí rộng hơn màn hình) */
html, body { overflow-x: clip; max-width: 100%; }
#view:has(.hero) { overflow-x: clip; }
.inapp { display: grid; gap: 6px; text-align: left; background: var(--warn-s); color: #6b4a00; border-radius: 16px; padding: 12px 14px; font-size: 13.5px; }
.inapp b { color: #4d3500; } .inapp .btn { justify-self: start; margin-top: 4px; }

.thumb.food { display: grid; place-items: center; font-size: 30px; background: var(--brand-s); }

/* trang điều khoản & chính sách */
.pol { max-width: 820px; padding-top: 24px; padding-bottom: 30px; }
.pol h1 { font-size: 34px; line-height: 1.15; margin-bottom: 6px; }
.pol > .card { margin-top: 16px; }
.pol h2 { margin-bottom: 10px; } .pol h3 { font-size: 16px; margin: 16px 0 6px; }
.pol p, .pol li { color: var(--ink2); } .pol li { margin: 6px 0; } .pol ol, .pol ul { padding-left: 22px; margin: 6px 0; }
.pol section { scroll-margin-top: 80px; }
.pol-toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.pol-toc a { text-decoration: none; font-weight: 600; padding: 4px 0; }
.top .pol-back { margin-left: auto; }
.sheet-terms { margin-top: 12px; text-align: center; }

/* màn hình hẹp: trang khách */
@media (min-width: 901px) { .hero::before { inset: -80px -12vw 0; } }
@media (max-width: 900px) {
  .hero { padding-top: 30px; gap: 20px; }
  .stores { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; }
  .sec { padding-top: 48px; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 36px; }
  .hero-paste { padding: 6px 6px 6px 14px; border-radius: 16px; }
  .hero-paste .btn { padding: 12px 14px; } .hero-paste .lg { display: none; } .hero-paste .sm { display: inline; }
  .hero-sub .plats-l { display: none; }
  .stores { grid-template-columns: 1fr; }
  .flow .dot { width: 56px; height: 56px; border-radius: 18px; }
  .band h2 { font-size: 25px; }
  .demo { display: none; }
}

/* ---------- tiền hoàn từ đâu ra: sơ đồ dòng tiền ---------- */
.mflow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; max-width: 980px; margin: 0 auto; }
.mf-node { background: #fff; border-radius: 22px; padding: 22px 18px; text-align: center; display: grid; justify-items: center; gap: 6px; box-shadow: 0 0 0 1px var(--line); }
.mf-node b { font-size: 16px; } .mf-node span { font-size: 13.5px; color: var(--muted); max-width: 220px; }
.mf-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 4px; background: var(--brand-s); color: var(--brand-d); }
.mf-ic .ico { width: 28px; height: 28px; }
.mf-node.shop .mf-ic { background: #fff1ec; color: #ee4d2d; }
.mf-node.pig { box-shadow: 0 0 0 1.5px #f6c2d0, 0 20px 40px -28px rgba(200, 40, 90, .5); }
.mf-node.pig .mf-ic { background: var(--grad); } .mf-ic img { width: 42px; }
.mf-arr { display: grid; justify-items: center; gap: 4px; min-width: 70px; }
.mf-arr span { font-size: 12px; font-weight: 600; color: var(--brand-d); background: var(--brand-s); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.mf-arr i { width: 100%; height: 2px; background: linear-gradient(90deg, #f6c2d0, var(--brand)); position: relative; }
.mf-arr i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--brand); border-right: 0; }
.mf-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px auto 0; font-size: 14.5px; color: var(--ink2); text-align: center; }
.mf-note .ico { color: var(--ok); }

/* ---------- dùng như nào: 4 bước có hình ---------- */
.hows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how { background: #fff; border-radius: 22px; padding: 12px 12px 18px; box-shadow: 0 0 0 1px var(--line); display: grid; gap: 14px; align-content: start; }
.how-t { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 0 6px; }
.how-n { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.how-t b { font-size: 16px; display: block; margin-top: 2px; } .how-t p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink2); }
.ill { height: 150px; border-radius: 16px; background: linear-gradient(160deg, #fff4f7, #fff0e8); display: grid; align-content: center; gap: 10px; padding: 14px; font-size: 12px; overflow: hidden; }
.ill .ico { width: 15px; height: 15px; }
.ill-prod { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 8px; box-shadow: var(--sh); }
.ill-prod i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #ffe5dc; color: #ee4d2d; flex: none; }
.ill-prod b { display: block; font-size: 12px; } .ill-prod span { color: #ee4d2d; font-weight: 700; }
.ill-share { background: #fff; border-radius: 12px; padding: 8px; box-shadow: var(--sh); }
.ill-share > span { font-size: 11px; color: var(--muted); font-weight: 600; }
.ill-opts { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.ill-opts em { font-style: normal; background: var(--bg); border-radius: 8px; padding: 4px 7px; font-size: 11px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.ill-opts em.on { background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 0 0 3px #f6c2d0; }
.ill-inp { display: flex; gap: 6px; align-items: center; background: #fff; border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-s); border-radius: 11px; padding: 9px 10px; color: var(--ink2); }
.ill-feed { display: flex; justify-content: space-between; align-items: center; background: var(--ok-s); border-radius: 11px; padding: 10px 12px; color: #2d6b4c; }
.ill-feed b { font-size: 20px; color: var(--ok); font-family: "Baloo 2", sans-serif; }
.ill-buy { justify-items: center; gap: 6px; }
.ill-btn { display: flex; gap: 6px; align-items: center; justify-content: center; width: 100%; background: var(--grad); color: #fff; font-weight: 700; font-size: 12.5px; padding: 10px; border-radius: 11px; box-shadow: 0 10px 18px -12px var(--brand); }
.ill-btn.shopee { background: #ee4d2d; box-shadow: 0 10px 18px -12px #ee4d2d; }
.ill-arrow { color: var(--brand); font-weight: 800; }
.ill-pig { justify-items: center; }
.ill-pig img { width: 58px; animation: bob 3.4s ease-in-out infinite; }
.ill-bar { width: 80%; height: 8px; border-radius: 9px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ill-bar i { display: block; width: 78%; height: 100%; background: var(--grad); }
.ill-pig > span { display: inline-flex; gap: 5px; align-items: center; font-weight: 600; color: var(--ink2); }

/* hộp "Cách dùng" */
.sheet-card.sheet-wide { max-width: 560px; max-height: calc(100vh - 36px); overflow-y: auto; text-align: left; }
.sheet-wide h2, .sheet-wide > p { text-align: center; }
.sheet-wide .hows { grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-wide .how { box-shadow: 0 0 0 1px var(--line); padding: 8px 8px 12px; gap: 10px; }
.sheet-wide .ill { height: 120px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand-d); font-weight: 600; cursor: pointer; font-size: inherit; }
.linkish:hover { text-decoration: underline; }
.empty b { color: var(--ink); } .empty span { max-width: 280px; }

@media (max-width: 900px) {
  .mflow { grid-template-columns: 1fr; gap: 6px; max-width: 420px; }
  .mf-arr { min-width: 0; height: 46px; grid-template-columns: auto; align-content: center; }
  .mf-arr i { width: 2px; height: 22px; background: linear-gradient(180deg, #f6c2d0, var(--brand)); order: 2; }
  .mf-arr i::after { right: -4px; top: auto; bottom: -3px; border: 5px solid transparent; border-top: 7px solid var(--brand); border-bottom: 0; }
  .mf-node { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 14px; padding: 16px; }
  .mf-node .mf-ic { grid-row: span 2; margin: 0; }
  .hows { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .hows { grid-template-columns: 1fr; }
  .how { grid-template-columns: 128px 1fr; align-items: center; padding: 10px; }
  .how .ill { height: 118px; padding: 8px; font-size: 10.5px; }
  .how-t { grid-template-columns: 1fr; padding: 0; gap: 6px; }
  .sheet-wide .hows { grid-template-columns: 1fr; }
  .mf-note { font-size: 13.5px; text-align: left; }
}
@media (max-width: 520px) {
  .how { grid-template-columns: 1fr; padding: 10px 10px 14px; }
  .how .ill { height: 112px; font-size: 11.5px; padding: 10px 14px; }
  .how-t { grid-template-columns: auto 1fr; gap: 10px; }
  .stores { grid-template-columns: 1fr 1fr; gap: 10px; }
  .store { padding: 14px; } .store p { font-size: 13px; } .store-h b { font-size: 15px; } .store-h .logo { width: 30px; height: 30px; font-size: 15px; }
}
@media (max-width: 520px) {
  .how .ill { height: auto; min-height: 100px; }
  .strip { gap: 8px; } .strip-i { padding: 12px 14px; } .strip-i .e { width: 40px; height: 40px; }
}

/* mua nhiều món cùng lúc */
.multi { margin: 18px 0; padding: 16px 18px; border: 1px solid var(--line2); border-radius: 18px; background: var(--brand-s); }
.multi h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.multi h3 svg { color: var(--brand-d); width: 20px; height: 20px; }
.multi ol { margin: 0 0 8px; padding-left: 22px; }
.multi li { margin: 4px 0; color: var(--ink2); }
.multi li b { color: var(--ink); }
.multi p { margin: 0; }
.sec .multi { max-width: 720px; margin: 24px auto 0; }

/* ================= hiệu ứng ================= */
:root { --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* hiện dần khi cuộn tới: trồi lên + bớt nhoè */
#view .rv { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0ms); }
#view .rv.in { opacity: 1; transform: none; filter: none; }
#view .flow.rv { opacity: 1; transform: none; filter: none; }

/* đầu trang: chữ tiêu đề trồi lên từng từ, phần còn lại theo sau */
.words .w { display: inline-block; animation: word .9s var(--ease) both; animation-delay: calc(var(--w) * 55ms + 80ms); }
.words em .w { animation-delay: calc(var(--w) * 55ms + 330ms); }
@keyframes word { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(8px); } }
.hero h1 em { position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: -.04em; height: .14em; border-radius: 99px; background: var(--grad); opacity: .28;
  transform: scaleX(0); transform-origin: left; animation: swoosh 1s var(--ease) .9s forwards; }
@keyframes swoosh { to { transform: scaleX(1); } }
.hero-txt > :not(h1) { animation: up .9s var(--ease) both; }
.hero-txt > .badge { animation-delay: 0s; } .hero-txt > .lead { animation-delay: .55s; } .hero-txt > .hero-paste { animation-delay: .65s; } .hero-txt > .hero-sub { animation-delay: .75s; }
.demo { animation: rise3d 1.2s var(--ease) .35s both; }
@keyframes up { from { opacity: 0; transform: translateY(20px); } }
@keyframes rise3d { from { opacity: 0; transform: translateY(40px) scale(.94); } }

/* nền đầu trang: hai quầng màu trôi rất chậm */
.hero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; border-radius: 50%; right: 2%; top: 4%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 143, 90, .22), transparent 62%); animation: drift 16s ease-in-out infinite; }
.hero::before { animation: drift2 20s ease-in-out infinite; }
@keyframes drift { 50% { transform: translate(-50px, 30px) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(24px, -16px); } }

/* ô dán link: thở nhẹ để mời dán, sáng lên khi bấm vào */
.hero-paste { animation: up .9s var(--ease) .65s both, breathe 3.2s ease-in-out 2s infinite; }
.hero-paste:focus-within { animation: none; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1.5px #f3b4c5, 0 0 0 8px rgba(240, 80, 122, .07), 0 22px 44px -26px rgba(150, 30, 70, .45); } }

/* khung điện thoại: nghiêng theo chuột, đồng xu vàng rơi vào heo, heo nảy khi nhận */
.phone { transition: transform .5s var(--ease); will-change: transform; }
.gcoin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; font-style: normal;
  background: radial-gradient(circle at 35% 30%, #fff6c9 0 12%, #ffd75e 30%, #f2a90f 70%, #c98100 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(150, 80, 0, .35), 0 3px 8px -2px rgba(160, 90, 0, .5); }
.gcoin::after { content: "đ"; display: grid; place-items: center; height: 100%; font: 800 11px/1 "Be Vietnam Pro", sans-serif; color: #a96a00; }
.demo .drop { position: absolute; right: calc(6% + 37px); bottom: 74px; opacity: 0; pointer-events: none; animation: drop 3.6s cubic-bezier(.55, 0, .85, .4) infinite; animation-delay: calc(var(--i) * 1.2s + 1.2s); }
@keyframes drop { 0% { opacity: 0; transform: translateY(-190px) rotateY(0); } 10% { opacity: 1; } 32% { opacity: 1; transform: translateY(0) rotateY(720deg) scale(1); } 38%, 100% { opacity: 0; transform: translateY(8px) rotateY(720deg) scale(.3); } }
.demo .pig2 { animation: gulp 1.2s ease-in-out 1.2s infinite; transform-origin: 50% 100%; }
@keyframes gulp { 0%, 30%, 100% { transform: none; } 36% { transform: scale(1.12, .9); } 46% { transform: scale(.95, 1.08) translateY(-6px); } 58% { transform: none; } }

/* nút: vệt sáng lướt khi rê chuột, gợn sóng khi bấm, nảy nhẹ */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--spring), box-shadow .25s, filter .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-brand::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); transform: translateX(-130%); }
.btn-brand:hover::after { animation: shine .9s var(--ease); }
@keyframes shine { to { transform: translateX(130%); } }
.ripple { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); transform: scale(0); animation: ripple .65s var(--ease) forwards; pointer-events: none; }
.btn:not(.btn-brand):not(.btn-glass) .ripple { background: radial-gradient(circle, rgba(240, 80, 122, .22), transparent 70%); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* thẻ: ánh sáng đi theo con trỏ + nổi lên */
.spot { position: relative; isolation: isolate; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 80, 122, .10), transparent 60%); }
.strip-i, .mf-node, .how, .store { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
@media (hover: hover) {
  .spot:hover::after { opacity: 1; }
  .strip-i:hover, .mf-node:hover, .how:hover, .store:not(.soon):hover { transform: translateY(-6px); box-shadow: 0 0 0 1px #f6c9d5, 0 28px 50px -28px rgba(200, 40, 90, .45); }
  .how:hover .ill { transform: scale(1.04); }
  .strip-i:hover .e, .mf-node:hover .mf-ic { transform: translateY(-2px) rotate(-6deg); }
}
.ill, .strip-i .e, .mf-ic { transition: transform .5s var(--spring); }
.wallet.spot::after { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .16), transparent 60%); }

/* sơ đồ dòng tiền: mũi tên là dòng chấm chảy */
.mf-arr i { background: repeating-linear-gradient(90deg, var(--brand) 0 6px, transparent 6px 11px) !important; background-size: 22px 2px !important; animation: flowx .9s linear infinite; }
@keyframes flowx { to { background-position: 22px 0; } }
@media (max-width: 900px) { .mf-arr i { background: repeating-linear-gradient(180deg, var(--brand) 0 6px, transparent 6px 11px) !important; background-size: 2px 22px !important; animation: flowy .9s linear infinite; } }
@keyframes flowy { to { background-position: 0 22px; } }

/* "khi nào tiền về": đường nối tô màu dần khi cuộn tới, các mốc bật lên lần lượt */
.flow::after { content: ""; position: absolute; left: 12%; right: 12%; top: 31px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) .2s; }
.flow.in::after, .flow:not(.rv)::after { transform: scaleX(1); }
.flow .dot { transition: transform .6s var(--spring), box-shadow .4s; }
.flow li:hover .dot { transform: translateY(-4px) scale(1.06); }
@media (max-width: 900px) { .flow::after { display: none; } }

/* ví: thanh tiến độ chạy từ 0 + ánh sáng, sao lấp lánh quanh heo */
.meter .bar i { animation: grow 1.4s var(--ease) .2s both; position: relative; overflow: hidden; }
.meter .bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); transform: translateX(-100%); animation: shine2 2.8s ease-in-out 1.6s infinite; }
@keyframes grow { from { width: 0; } }
@keyframes shine2 { to { transform: translateX(100%); } }
.wallet .label::after, .wallet .label::before { content: "✦"; position: absolute; color: #fff; pointer-events: none; animation: twinkle 2.6s ease-in-out infinite; }
.wallet .label::before { right: 118px; top: 22px; font-size: 12px; }
.wallet .label::after { right: 18px; top: 96px; font-size: 9px; animation-delay: 1.3s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: .9; transform: scale(1) rotate(90deg); } }
.wallet:hover .pig { animation: wiggle .7s var(--spring); }
@keyframes wiggle { 30% { transform: rotate(-9deg) scale(1.06); } 65% { transform: rotate(6deg) scale(1.06); } }

/* tiền heo vừa tính xong: bật lên + đồng xu bay */
.pop-in .v { animation: popnum .7s var(--spring); }
.pop-in img { animation: wiggle .8s var(--spring) .15s; }
@keyframes popnum { from { transform: scale(.5); opacity: 0; } }
.gcoin.fly { position: fixed; z-index: 70; pointer-events: none; animation: fly 1.3s var(--ease) forwards; }
@keyframes fly { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 55% { transform: translate(calc(var(--dx) * .8), var(--dy)) rotateY(var(--r)) scale(1.1); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 120px)) rotateY(var(--r)) scale(.8); } }

/* hỏi đáp: dấu + xoay mượt, câu trả lời trượt xuống */
.faq summary::after { transition: transform .4s var(--spring), background .2s; }
.faq details[open] p { animation: up .45s var(--ease); }
.faq summary:hover { color: var(--brand-d); }

/* lời mời cuối trang: nền chuyển màu chậm */
.band { background-size: 170% 170% !important; animation: bandmove 12s ease-in-out infinite; }
@keyframes bandmove { 50% { background-position: 100% 60%; } }

/* chuyển trang trong app */
#view > .stack { animation: fadeup .5s var(--ease); }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } }
.bnav button.on .ico, .nav button.on .ico { animation: hop .55s var(--spring); }
@keyframes hop { 40% { transform: translateY(-4px) scale(1.15); } }

/* hộp (đăng nhập, cách dùng, thông tin): nền mờ dần, hộp bật ra; đóng thì thu lại */
.sheet { animation: fade .25s ease; }
.sheet-card { animation: sheetin .5s var(--spring); }
@keyframes sheetin { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.sheet.out { animation: fade .2s ease reverse forwards; }
.sheet.out .sheet-card { animation: sheetin .2s ease reverse forwards; }

/* ---------- hộp thông tin (Heo Đất là gì / Cách dùng / Các sàn / Hỏi đáp) ---------- */
.sheet-card.sheet-info { max-width: 980px; width: 100%; max-height: min(88vh, 860px); padding: 0; gap: 0; text-align: left; display: flex; flex-direction: column; overflow: hidden; }
.sheet-info::before { height: 140px; }
.info-head { display: flex; align-items: center; gap: 12px; padding: 16px 64px 14px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); }
.info-head > img { width: 34px; height: 34px; flex: none; }
.info-tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.info-tabs::-webkit-scrollbar { display: none; }
.info-tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink2); cursor: pointer; white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s; }
.info-tabs button:hover { color: var(--ink); }
.info-tabs button.on { background: var(--ink); color: #fff; box-shadow: 0 6px 14px -8px rgba(34, 20, 26, .6); }
.sheet-info .sheet-x { top: 15px; right: 14px; background: var(--bg); }
.info-body { overflow-y: auto; padding: 8px 28px 28px; flex: 1; overscroll-behavior: contain; }
.info-body > .sec { padding: 28px 0 4px !important; max-width: none !important; }
.info-body .sec-h { margin-bottom: 22px; } .info-body .sec-h h2 { font-size: clamp(24px, 3vw, 30px); }
.info-body.swap > * { animation: up .55s var(--ease) both; }
.info-body.swap > :nth-child(2) { animation-delay: .1s; }
.info-body.swap .mf-node, .info-body.swap .how, .info-body.swap .store, .info-body.swap .flow li, .info-body.swap .faq details { animation: up .6s var(--ease) both; }
.info-body.swap :is(.mflow, .hows, .stores, .flow, .faq) > :nth-child(2) { animation-delay: .07s; }
.info-body.swap :is(.mflow, .hows, .stores, .flow, .faq) > :nth-child(3) { animation-delay: .14s; }
.info-body.swap :is(.mflow, .hows, .stores, .flow, .faq) > :nth-child(4) { animation-delay: .21s; }
.info-body.swap :is(.mflow, .hows, .stores, .flow, .faq) > :nth-child(n+5) { animation-delay: .28s; }
.info-body .flow::after { transform: scaleX(1); }
.info-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; }
@media (max-width: 900px) { .info-body .hows { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .sheet:has(.sheet-info) { padding: 0; align-items: end; }
  .sheet-card.sheet-info { max-height: 92vh; border-radius: 26px 26px 0 0; animation: sheetup .5s var(--ease); }
  @keyframes sheetup { from { transform: translateY(100%); } }
  .info-head { padding: 12px 56px 12px 14px; } .info-head > img { display: none; }
  .info-tabs button { padding: 7px 12px; font-size: 13px; }
  .info-body { padding: 4px 16px 20px; } .info-body .hows { grid-template-columns: 1fr; }
  .info-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); } .info-foot .muted { display: none; } .info-foot .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { #view .rv { opacity: 1 !important; transform: none !important; filter: none !important; } .demo .drop, .wallet .label::before, .wallet .label::after { display: none; } .flow::after { transform: scaleX(1); } }
/* tiêu đề tách từng từ: tô màu cho từng từ (background-clip không đi qua phần tử con bị biến hình) */
.hero h1.words em { background: none; color: inherit; -webkit-background-clip: border-box; background-clip: border-box; animation: none; }
.hero h1.words em .w { background: linear-gradient(90deg, #e63f6c, #ff8f5a); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.info-body .ill { height: auto; min-height: 178px; }

/* Hộp “Cách dùng”: giữ toàn bộ nội dung cuộn được trong viewport điện thoại. */
@media (max-width: 560px) {
  .sheet:has(.sheet-wide) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }
  .sheet-card.sheet-wide {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 0;
    padding: 28px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .sheet-wide h2 { padding-right: 24px; font-size: 22px; line-height: 1.2; }
  .sheet-wide > p { text-align: left; line-height: 1.5; }
  .sheet-wide .hows, .sheet-wide .how, .sheet-wide .how-t { min-width: 0; }
}

/* ================= dán link: đang làm → kết quả ================= */
.btn.busy { cursor: progress; opacity: 1 !important; filter: saturate(.9); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.working { margin-top: 16px; border-radius: 20px; padding: 18px 18px 0; background: linear-gradient(160deg, #fff7f9, #fff3ec); box-shadow: inset 0 0 0 1px var(--line);
  display: grid; grid-template-columns: 56px 1fr; gap: 6px 14px; align-items: center; overflow: hidden; animation: sheetin .45s var(--spring); }
.working > img { width: 56px; grid-row: span 1; animation: sniff 1.1s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes sniff { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg) translateY(-3px); } }
.working ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.working li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); opacity: .45; transition: opacity .3s, color .3s; }
.working li i { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--line2); position: relative; transition: background .3s, box-shadow .3s; }
.working li.on { opacity: 1; color: var(--ink); font-weight: 600; }
.working li.on i { box-shadow: inset 0 0 0 2px #f6c2d0; }
.working li.on i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--brand); animation: rot .7s linear infinite; }
.working li.ok { opacity: 1; color: var(--ink2); }
.working li.ok i { background: var(--ok); box-shadow: none; animation: tick .4s var(--spring); }
.working li.ok i::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes tick { from { transform: scale(.3); } }
.wbar { grid-column: 1 / -1; height: 3px; margin: 14px -18px 0; background: rgba(240, 80, 122, .12); overflow: hidden; }
.wbar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 3px; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.working.fin .wbar i { animation: none; width: 100%; transform: none; transition: width .3s; }
.working.fin > img { animation: wiggle .5s var(--spring); }

/* thẻ kết quả mở ra từ trên xuống, các phần hiện lần lượt */
.result.enter { animation: unfold .6s var(--ease) both; transform-origin: 50% 0; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px) scale(.97); clip-path: inset(0 0 100% 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
.result.enter > * { animation: up .55s var(--ease) both; }
.result.enter > :nth-child(1) { animation-delay: .12s; } .result.enter > :nth-child(2) { animation-delay: .22s; } .result.enter > :nth-child(3) { animation-delay: .32s; }
.result.enter .linkbox > .btn-brand::after { animation: shine 1s var(--ease) .9s; }
.prod.loaded .thumb { animation: imgin .6s var(--ease) both; }
.prod.loaded > div:last-child > * { animation: up .5s var(--ease) both; }
.prod.loaded > div:last-child > :nth-child(2) { animation-delay: .06s; } .prod.loaded > div:last-child > :nth-child(3) { animation-delay: .12s; }
@keyframes imgin { from { opacity: 0; transform: scale(.85); filter: blur(6px); } }
.feed { position: relative; overflow: hidden; }
.feed.pop-in::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .8) 50%, transparent 70%); transform: translateX(-100%); animation: shine2 1s var(--ease) .3s; }
.feed.pop-in .v { animation: popnum .7s var(--spring); text-shadow: 0 0 0 transparent; }
.feed img.eat { animation: eat .5s var(--spring); }
@keyframes eat { 0% { transform: none; } 35% { transform: scale(1.25, .85) rotate(-6deg); } 70% { transform: scale(.95, 1.1) translateY(-4px); } 100% { transform: none; } }
.gcoin.arc { position: fixed; z-index: 70; width: 20px; height: 20px; pointer-events: none; opacity: 0; animation: arc .75s cubic-bezier(.45, 0, .55, 1) forwards; }
@keyframes arc {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  15% { opacity: 1; transform: translate(calc(var(--tx) * .15), calc(var(--hy) * .7)) scale(1); }
  50% { transform: translate(calc(var(--tx) * .5), var(--hy)) scale(1.05) rotateY(360deg); }
  90% { opacity: 1; transform: translate(calc(var(--tx) * .95), calc(var(--ty) * .9)) scale(.7) rotateY(720deg); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.3); }
}

/* lỗi: ô dán rung nhẹ; đã chép: nút chuyển xanh */
.shakex { animation: shakex .45s ease; border-color: var(--bad) !important; }
@keyframes shakex { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.err:not(:empty) { animation: up .3s var(--ease); }
.btn.done { color: var(--ok); box-shadow: inset 0 0 0 1.5px #a8dcc0; }
.btn.done .ico { animation: tick .4s var(--spring); }
.linkbox { grid-template-columns: minmax(0, 1fr); } .linkbox > * { min-width: 0; }
