/* ===== Yono Rewards — dark navy + gold "premium" theme (matches the reference rewards app) =====
   Single dark look by design (a Telegram mini app with its own colours), so no light/dark switch. */
:root {
  --bg0: #0a0e1a;
  --bg1: #0c1120;
  --bar: #0b1020;
  --card: radial-gradient(130% 120% at 100% 0%, #2c3860 0%, #1a2342 50%, #131a30 100%);
  --card-bd: #c99a4580;
  --sheet: linear-gradient(180deg, #1c2541, #10162a);
  --tx: #ece1c6;
  --tx-2: #a39b8a;
  --tx-3: #7f7868;
  --cream: #f3e4bf;
  --gold: #f0d793;
  --gold-2: #e3c27a;
  --gold-3: #c99a45;
  --gold-4: #a87a2c;
  --gl: linear-gradient(135deg, #f0d793, #c99a45 55%, #a87a2c);
  --on-gold: #1c2233;
  --ok: #4fd08a;
  --red: #ff7a6b;
  --amb: #f2c14e;
  --line: #e3c27a24;
  --in: #0b101dcc;
  --fd: "Roboto Condensed", "DIN Alternate", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --fb: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --radius: 18px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg0); }
html, body { margin: 0; min-height: 100%; }
body {
  font: 400 14.5px/1.45 var(--fb);
  color: var(--tx);
  background:
    radial-gradient(90% 45% at 85% -5%, #e3c27a1c 0%, transparent 60%),
    radial-gradient(80% 50% at 0% 30%, #3b3f8a22 0%, transparent 65%),
    radial-gradient(100% 60% at 50% 110%, #1e2a5a33 0%, transparent 70%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 55%, #080b15 100%);
  background-attachment: fixed;
  overscroll-behavior: none;
}
/* slow ambient gold glow drifting behind everything */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(14vmax 14vmax at 18% 28%, #e3c27a2e, #e3c27a00 70%),
              radial-gradient(10vmax 10vmax at 82% 18%, #f0d79326, #f0d79300 70%),
              radial-gradient(16vmax 16vmax at 70% 78%, #c99a4522, #c99a4500 70%);
  animation: amb 18s ease-in-out infinite alternate;
}
@keyframes amb { to { transform: translate3d(3%, -4%, 0) scale(1.04); } }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
input, select { font: inherit; color: inherit; }
img { display: block; }
svg { flex: 0 0 auto; }
[hidden] { display: none !important; }
.app { max-width: 520px; margin: 0 auto; min-height: 100%; position: relative; }

/* ---- the running light: a diagonal sheen sweeping across cards and buttons ---- */
.shn { position: relative; overflow: hidden; isolation: isolate; }
.shn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: linear-gradient(100deg, #fff0 30%, #ffffff6b 50%, #fff0 70%);
  transform: translateX(-130%);
  animation: shn 4.6s ease-in-out infinite; animation-delay: var(--shd, 0s); animation-play-state: paused;
}
.shn.on::after { animation-play-state: running; }
.card.shn::after { background: linear-gradient(100deg, #fff0 30%, #ffc98a40 50%, #fff0 70%); animation-duration: 5s; }
.btn.shn::after { background: linear-gradient(100deg, #fff0 35%, #ffffffb8 50%, #fff0 65%); animation-duration: 2.6s; }
.balance.shn::after { background: linear-gradient(100deg, #fff0 35%, #ffffff33 50%, #fff0 65%); animation-duration: 6s; }
@keyframes shn { 0%, 62% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

/* ---- gold corner ornaments on the key cards ---- */
.orn::before {
  content: ""; position: absolute; inset: 6px; pointer-events: none; border-radius: 12px; z-index: 1; opacity: .9;
  background:
    linear-gradient(var(--gold-3), var(--gold-3)) top left / 14px 1.5px, linear-gradient(var(--gold-3), var(--gold-3)) top left / 1.5px 14px,
    linear-gradient(var(--gold-3), var(--gold-3)) top right / 14px 1.5px, linear-gradient(var(--gold-3), var(--gold-3)) top right / 1.5px 14px,
    linear-gradient(var(--gold-3), var(--gold-3)) bottom left / 14px 1.5px, linear-gradient(var(--gold-3), var(--gold-3)) bottom left / 1.5px 14px,
    linear-gradient(var(--gold-3), var(--gold-3)) bottom right / 14px 1.5px, linear-gradient(var(--gold-3), var(--gold-3)) bottom right / 1.5px 14px;
  background-repeat: no-repeat;
}

/* ---- gold coin icon (used in headers, rows, nav) ---- */
.cic, .ic {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #fff3cf 0%, #e3c27a 45%, #b8893a 100%);
  color: var(--on-gold);
  box-shadow: inset 0 -2px 0 #8a622099, inset 0 1px 0 #fff9, 0 2px 6px #c99a4555;
}
.cic svg, .ic svg { width: 58%; height: 58%; stroke-width: 2.4; }
.cic.xs { width: 16px; height: 16px; box-shadow: inset 0 -1px 0 #8a622099, inset 0 1px 0 #fff9; }
.cic.sm { width: 20px; height: 20px; }
.cic.lg { width: 34px; height: 34px; }
.ic.gold { background: radial-gradient(circle at 35% 28%, #fff3cf 0%, #f2c14e 45%, #b8893a 100%); }
.ic.tg { background: radial-gradient(circle at 35% 28%, #fff3cf 0%, #e3c27a 45%, #b8893a 100%); }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: #0b1020e6; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid #e3c27a40; box-shadow: 0 6px 18px #0008;
}
.top .cic { width: 32px; height: 32px; }
.top-title { flex: 1; min-width: 0; font: 700 16px/1.05 var(--fd); color: var(--cream); letter-spacing: .3px; overflow: hidden; }
.top-title span { display: inline-block; white-space: nowrap; } /* màn hẹp: "Yono Earn" / "Real Money" hai dòng */
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 16px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip-points { background: var(--gl); color: var(--on-gold); font-family: var(--fd); font-size: 14px; box-shadow: 0 2px 10px #c99a4555, inset 0 1px 0 #fff8; }
.chip-points .cic { width: 18px; height: 18px; margin-left: -4px; background: radial-gradient(circle at 35% 28%, #fffaf0, #e8c977 50%, #9c7429); }
.chip-lang { background: #ffffff10; color: var(--cream); border: 1px solid #e3c27a55; }
.chip-lang .cic { width: 16px; height: 16px; margin-left: -3px; }
.dev-banner { background: #2a1f08; color: var(--amb); text-align: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-bottom: 1px solid #f2c14e33; }

/* ---- page ---- */
.view { padding: 12px 12px calc(var(--tabs-h) + var(--safe-b) + 22px); min-height: calc(100vh - 54px); }
.view > * + * { margin-top: 12px; }
.loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #e3c27a22; border-top-color: var(--gold-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  display: block; width: 100%; position: relative; background: var(--card); color: var(--tx);
  border: 1px solid var(--card-bd); border-radius: var(--radius); padding: 14px;
  box-shadow: inset 0 1px 0 #ffffff17, inset 0 0 36px #e3c27a0d, 0 10px 26px #00000066;
}
.card.center { text-align: center; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; position: relative; z-index: 3; }
.card-h h2 { margin: 0; font-size: 16px; font-weight: 700; flex: 1; line-height: 1.25; color: var(--cream); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: #4fd08a1f; color: var(--ok); border: 1px solid #4fd08a55; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.gold { background: var(--gl); color: var(--on-gold); border-color: #f0d793; box-shadow: inset 0 1px 0 #fff8; }
.badge.grey { background: #ffffff14; color: #bdb6a6; border-color: transparent; }
.badge .cic.xs { margin-left: -4px; }
.sub { color: var(--tx-2); font-size: 13px; margin: 0; position: relative; z-index: 3; }
.sub.center, .center { text-align: center; }
.muted { color: var(--tx-3); }
.mt { margin-top: 12px; }
.mt-s { margin-top: 8px; }
.hint { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tx-3); margin: 6px 2px 0; }
.hint.center { justify-content: center; }
.hint svg { width: 13px; height: 13px; }
.hint.ok { color: var(--ok); font-weight: 600; }
.section-t { display: flex; align-items: center; gap: 7px; margin: 18px 2px 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--gold-2); }
.section-t::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #c99a4599, #c99a4500); }
.section-t.nc { text-transform: none; letter-spacing: .2px; font-size: 13px; }
.section-t .yt-mini { width: 18px; height: 13px; border-radius: 4px; background: #ff0000; display: grid; place-items: center; color: #fff; }
.section-t .yt-mini svg { width: 7px; height: 7px; }
.back { display: inline-flex; font-weight: 700; color: var(--gold); padding: 2px 2px; font-size: 14.5px; }
.link-btn { display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 600; color: var(--tx-2); font-size: 13px; padding: 8px 2px 0; position: relative; z-index: 3; }
.link-btn svg { width: 15px; height: 15px; color: var(--ok); }
.link-btn.center { width: 100%; }
.link-btn.right { margin-left: auto; padding: 4px 0 10px; color: var(--gold); }
.catall { display: block; width: 100%; text-align: center; padding: 11px 0 1px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--gold); position: relative; z-index: 3; }
.link-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 0; font-weight: 600; border-top: 1px solid var(--line); color: var(--tx); }
.link-row svg { width: 17px; height: 17px; color: var(--gold-2); }
.chev { margin-left: auto; color: var(--tx-3); display: grid; transition: transform .2s; }
.chev svg { width: 17px; height: 17px; }
.chev.open { transform: rotate(90deg); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx-2); }
.btn-row { display: flex; gap: 8px; margin-top: 10px; position: relative; z-index: 3; }
.btn-row .btn { flex: 1; }
.btn-row .icon-only { flex: 0 0 50px; padding: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 46px; padding: 0 18px; border-radius: 14px;
  font-weight: 700; font-size: 15px; text-align: center; letter-spacing: .3px; user-select: none; white-space: nowrap; position: relative; z-index: 3;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { cursor: default; }
.btn-block { display: flex; width: 100%; }
.btn-gold, .btn-green {
  background: var(--gl); color: var(--on-gold); border: 1px solid #f0d793;
  box-shadow: inset 0 1px 0 #fff8, 0 6px 18px #c99a4566; text-shadow: 0 1px 0 #fff6;
}
.btn-soft, .btn-out { background: #ffffff0a; color: var(--gold); border: 1.5px solid var(--gold-3); }
.btn-done, .btn[disabled].btn-gold, .btn[disabled].btn-green { background: #3a4057; color: #b9b6ad; border: 1.5px solid #8f8a7e66; box-shadow: none; text-shadow: none; }
.btn-done .cic, .btn-done .ok-dot { width: 18px; height: 18px; }
.ok-dot { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b8f7d0, #2fb36a 60%, #1b7d48); display: inline-grid; place-items: center; color: #fff; }
.ok-dot svg { width: 11px; height: 11px; stroke-width: 3.5; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn svg { width: 17px; height: 17px; }
.btn .cic { width: 20px; height: 20px; }

/* ---- forms ---- */
.fl { display: block; margin: 10px 2px 4px; font-size: 12.5px; font-weight: 600; color: var(--tx-2); }
.in, .phone-in, .pw-in, .otp-in input, .field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid #c99a4555; background: var(--in); color: #f3e9d2;
  font-size: 15.5px; font-weight: 600; outline: none;
}
.in:focus, .otp-in input:focus, .field input:focus, .phone-in:focus-within, .pw-in:focus-within { border-color: var(--gold-2); box-shadow: 0 0 0 3px #e3c27a26; }
.in::placeholder, input::placeholder { color: #7f7868; }
select.in { appearance: auto; }
.phone-in, .pw-in { display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; }
.phone-in span { font-weight: 700; color: var(--gold); padding-right: 8px; border-right: 1px solid #c99a4555; }
.phone-in input, .pw-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 15.5px; font-weight: 600; letter-spacing: .5px; color: #f3e9d2; }
.eye { width: 44px; height: 100%; display: grid; place-items: center; color: #c9b98f; }
.eye svg { width: 19px; height: 19px; }
.otp-in { display: flex; gap: 8px; }
.otp-in input { flex: 1; min-width: 0; letter-spacing: 6px; text-align: center; }
.otp-in .btn { height: 46px; min-width: 96px; }
.otp-in .btn.nudge { animation: nudge .5s ease-in-out 3; }
@keyframes nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-4px) scale(1.06); } 75% { transform: translateX(4px) scale(1.06); } }
.field { display: flex; gap: 8px; margin-top: 10px; position: relative; z-index: 3; }
.field input { flex: 1; min-width: 0; }

/* ---- auth ---- */
body.auth-mode .top, body.auth-mode .tabs, body.auth-mode .dev-banner { display: none !important; }
body.auth-mode .view { padding-bottom: 30px; min-height: 100vh; }
.auth { position: relative; padding-top: 18px; }
.auth > * + * { margin-top: 10px; }
.auth-lang { position: absolute; right: 0; top: 0; }
.auth-logo { width: 100px; height: 100px; margin: 6px auto 0; border-radius: 50%; box-shadow: 0 0 0 3px #e3c27aaa, 0 0 30px #e3c27a44, 0 10px 24px #0009; }
.auth h1 { margin: 12px 0 0; text-align: center; font: 700 28px/1.1 var(--fd); color: var(--cream); letter-spacing: .5px; }
.auth h1 span { background: linear-gradient(180deg, #fff3cf, #e3c27a 60%, #b8893a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card { padding: 16px; }
.auth-seg { margin-bottom: 6px; }
.auth-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #ffffff0a; border: 1px solid var(--line); color: var(--tx-2); font-size: 12.5px; }
.auth-note img { width: 38px; height: 38px; }
.ts-box { min-height: 66px; display: flex; justify-content: center; position: relative; z-index: 3; }
.kv .cic.xs { margin-right: 6px; vertical-align: -3px; }

/* ---- daily check-in ---- */
.info-btn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--on-gold);
  background: radial-gradient(circle at 35% 28%, #fff3cf, #e3c27a 45%, #b8893a); box-shadow: inset 0 -1px 0 #8a622099; }
.info-btn svg { width: 14px; height: 14px; stroke-width: 2.6; }
.card-h .info-btn, .b-top .info-btn { flex: none; position: relative; z-index: 4; cursor: pointer; }
.info-btn:active { transform: scale(.9); }
.info-box { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; padding: 9px 11px; border-radius: 12px; background: #f2c14e14; border: 1px solid #f2c14e55; color: var(--tx); font-size: 12.5px; position: relative; z-index: 3; }
.info-box svg { width: 15px; height: 15px; margin-top: 2px; color: var(--amb); }
.streak { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tx-2); position: relative; z-index: 3; }
.streak .cic { width: 15px; height: 15px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0 12px; position: relative; z-index: 3; }
.day { border-radius: 10px; padding: 7px 0 6px; text-align: center; background: #ffffff0a; border: 1px solid #e3c27a2e; }
.day small { display: block; font-size: 10.5px; color: var(--tx-2); line-height: 1.2; }
.day b { display: block; font-size: 13.5px; font-weight: 700; color: var(--gold); line-height: 1.35; font-family: var(--fd); }
.day.done { background: #4fd08a1a; border-color: #4fd08a66; }
.day.done small, .day.done b { color: var(--ok); }
.day.today:not(.done) { background: #e3c27a1f; border-color: var(--gold-2); box-shadow: 0 0 0 3px #e3c27a26; }
.day.big:not(.done) { background: linear-gradient(180deg, #e3c27a33, #e3c27a14); }
.day.big b { color: #ffe7a8; }

/* ---- lucky draw entry ---- */
.draw-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(120deg, #1b2440, #2b375a 55%, #7a5a22); border: 1px solid #c99a4599; color: var(--cream);
  box-shadow: inset 0 1px 0 #ffffff1f, 0 10px 24px #141b2d40;
}
.draw-card::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, #fff0, #f3e4bf55, #fff0); transform: skewX(-18deg); animation: lsweep 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes lsweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.dc-ic { width: 46px; height: 46px; display: grid; place-items: center; position: relative; z-index: 3; }
.dc-ic .cic { width: 44px; height: 44px; }
.dc-txt { flex: 1; min-width: 0; position: relative; z-index: 3; }
.dc-txt b { display: block; font-size: 17px; font-weight: 700; color: var(--cream); line-height: 1.2; }
.dc-txt span { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--tx-2); }
.dc-txt .cic { width: 15px; height: 15px; }
.go-pill { position: relative; z-index: 3; background: var(--gl); color: var(--on-gold); font-weight: 800; border-radius: 20px; padding: 6px 13px; font-size: 13px; white-space: nowrap; box-shadow: 0 2px 8px #c99a4566; animation: brth 3.6s ease-in-out infinite; }
@keyframes brth { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }

/* ---- task rows ---- */
.progress { height: 7px; border-radius: 7px; background: #ffffff14; box-shadow: inset 0 1px 2px #0006; overflow: hidden; margin: 8px 0 4px; position: relative; z-index: 3; }
.progress > i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #2fb36a, #6ee7a8); transition: width .5s ease; }
.progress.gold > i { background: linear-gradient(90deg, #f2c14e, #ffe9a8); box-shadow: 0 0 8px #f2c14e88; }
.task { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); position: relative; z-index: 3; }
.task .t-ic { width: 38px; height: 38px; border-radius: 11px; background: #ffffff10; border: 1px solid #e3c27a33; display: grid; place-items: center; flex: 0 0 auto; position: relative; color: var(--on-gold); }
.task .t-ic::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff3cf, #e3c27a 45%, #b8893a); box-shadow: inset 0 -2px 0 #8a622099; }
.task .t-ic svg { width: 15px; height: 15px; position: relative; stroke-width: 2.4; }
.task .t-txt { flex: 1; min-width: 0; }
.task .t-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--tx); line-height: 1.3; }
.task .t-txt span { font-size: 12px; color: var(--tx-2); }
.task.done .t-txt b { color: var(--tx-3); }
.task .btn-sm.btn-soft, .task .btn-sm.btn-green { height: 30px; padding: 0 13px; }

/* ---- app / youtube rows (inside one card, like the reference) ---- */
.gcard { padding: 0 14px; overflow: hidden; }
.gcard .catall { margin: 0 -14px; padding: 12px 0; }
.app-card { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border-top: 1px solid var(--line); color: var(--tx); }
.app-card:first-child { border-top: 0; }
.app-card::before { content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #ff3d6e, #ff8a00, #ffd23f); box-shadow: 0 0 10px #ff6a2c99; animation: gedge 2.4s ease-in-out infinite; }
@keyframes gedge { 50% { opacity: .45; } }
.app-card.fin::before { display: none; }
.app-card img { width: 54px; height: 54px; border-radius: 14px; box-shadow: 0 3px 10px #0008; }
.ac-txt { flex: 1; min-width: 0; }
.ac-txt b { display: block; font-size: 15.5px; font-weight: 700; color: var(--cream); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-txt .desc { display: block; font-size: 12px; color: var(--tx-2); line-height: 1.35; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ribbon { position: absolute; top: 13px; right: -27px; z-index: 4; width: 92px; text-align: center; transform: rotate(38deg); font: 900 10px/1.6 var(--fd); letter-spacing: .6px; color: #fff;
  background: linear-gradient(90deg, #ff3b55, #c8102e); border-top: 1px solid #ffffff55; border-bottom: 1px solid #ffffff55; overflow: hidden;
  box-shadow: 0 2px 6px #0003, 0 0 10px #ff2d4a88; text-shadow: 0 1px 1px #0004; }
.ribbon::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, #ffffffcc 50%, transparent); transform: skewX(-20deg); animation: ribShine 2.8s ease-in-out infinite; }
@keyframes ribShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.gcard .ribbon { right: -41px; }
.demo-ic { filter: hue-rotate(160deg) saturate(1.2); }
.yt-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: #ff0000; color: #fff; flex: 0 0 auto; box-shadow: 0 3px 10px #0008; }
.yt-ic svg { width: 26px; height: 26px; }
.yt-ic.big { width: 58px; height: 58px; }
.game-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; position: relative; z-index: 3; }
.game-head img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 4px 12px #0009; flex: 0 0 auto; }
.game-head b { display: block; font-size: 17px; font-weight: 700; color: var(--cream); line-height: 1.2; }
.steps { list-style: none; margin: 10px 0; padding: 0; position: relative; z-index: 3; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.s-n { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--gl); color: var(--on-gold); font-weight: 900; font-size: 12.5px; }
.s-n svg { width: 13px; height: 13px; stroke-width: 3; }
.steps li.ok .s-n { background: radial-gradient(circle at 35% 30%, #b8f7d0, #2fb36a 60%, #1b7d48); color: #fff; }
.s-txt { flex: 1; font-size: 13.5px; line-height: 1.4; color: var(--tx); }
.s-txt em { font-style: normal; color: #ffb37a; font-weight: 700; white-space: nowrap; }
.steps li.ok .s-txt { color: var(--tx-3); }
.steps li.sub-row { margin: 2px 0 2px 34px; padding: 9px 10px; border-radius: 12px; background: #ffffff0a; font-size: 14px; }
.steps li.sub-row svg { width: 18px; height: 18px; color: var(--on-gold); background: var(--gold-2); border-radius: 50%; padding: 3px; }
.steps li.sub-row span { flex: 1; }
/* app sheet: the step a newbie row was tapped for */
.steps li.now:not(.ok) { margin: 0 -8px; padding: 8px; border-radius: 12px; background: #e3c27a14; box-shadow: inset 0 0 0 1px #e3c27a59; }
.sheet .app-sheet .sub { text-align: left; }
.app-sheet .steps { margin-bottom: 14px; }
.tiers { display: grid; gap: 6px; position: relative; z-index: 3; }
.tier { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 11px; background: #ffffff0a; border: 1px solid var(--line); font-size: 13.5px; }
.tier svg { width: 15px; height: 15px; color: var(--gold-2); }
.tier span { flex: 1; }
.tier b { color: var(--gold); }
.tier.paid { background: #4fd08a14; border-color: #4fd08a55; }
.tier.paid svg { color: var(--ok); }
.status-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 13.5px; position: relative; z-index: 3; }
.status-box svg { width: 17px; height: 17px; }
.status-box small { width: 100%; font-weight: 400; font-size: 12px; opacity: .8; word-break: break-all; }
.status-box.pending { background: #f2c14e22; color: var(--amb); }
.status-box.ok { background: #4fd08a22; color: var(--ok); }
.status-box.bad { background: #ff7a6b22; color: var(--red); }

/* ---- lucky draw center ---- */
.draw-head { overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #3a4770 0%, #1b2440 50%, #0f1424 100%); border-color: #c99a4588; }
.draw-head::after { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, #e3c27a00, #e3c27a26, #e3c27a00 30%); animation: spin 9s linear infinite; pointer-events: none; }
.draw-head > * { position: relative; z-index: 3; }
.draw-head h2 { margin: 0; font: 700 21px/1.2 var(--fd); color: var(--cream); letter-spacing: .3px; }
.dh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dh-stats div { padding: 9px 12px; border-radius: 14px; background: #ffffff10; border: 1px solid #ffffff1f; }
.dh-stats b { display: block; font: 700 22px/1.15 var(--fd); color: #fff; }
.dh-stats span { font-size: 12px; color: var(--tx-2); }
.dh-stats small { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 12px; color: var(--gold-2); }
.dh-stats small svg { width: 11px; height: 11px; }
.dg { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--radius); color: var(--cream);
  border: 1px solid #f3e4bf66; box-shadow: inset 0 1px 0 #ffffff33, 0 8px 22px #141b2d26; }
.dg + .dg { margin-top: 10px; }
.dg::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, #fff0, #ffffff40, #fff0); transform: skewX(-18deg); animation: lsweep 3.6s ease-in-out infinite; pointer-events: none; }
.dg-ic { width: 54px; height: 54px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 30px; line-height: 1;
  background: #ffffff14; border: 1px solid #e3c27a55; box-shadow: inset 0 0 12px #e3c27a22; }
.dg-txt { flex: 1; min-width: 0; }
.dg-txt b { display: block; font-size: 16px; font-weight: 700; color: var(--cream); }
.dg-txt span { display: block; font-size: 12.5px; color: #f3e4bfcc; line-height: 1.35; margin-top: 2px; }
.dg-badge { position: absolute; right: 10px; top: 9px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 10px; background: var(--gl); color: var(--on-gold); font-weight: 800; font-size: 11px; }
.dg-badge .cic { width: 13px; height: 13px; }
.dg .chev { color: #f3e4bf99; }
.c-red { background: linear-gradient(120deg, #1b2440 0%, #5e2430 100%); }
.c-blue { background: linear-gradient(120deg, #1b2440 0%, #2d4f7c 100%); }
.c-purple { background: linear-gradient(120deg, #1b2440 0%, #4a2f6e 100%); }
.c-amber { background: linear-gradient(120deg, #1b2440 0%, #7a5a22 100%); }
.c-green { background: linear-gradient(120deg, #1b2440 0%, #1d5e47 100%); }
.pg-t { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 2px; font: 700 20px/1.2 var(--fd); color: var(--cream); position: relative; z-index: 3; }
.pg-t .emo { font-size: 24px; }

/* ---- wheel ---- */
.wheel-box { position: relative; width: min(290px, 76vw); aspect-ratio: 1; margin: 22px auto 16px; z-index: 3; }
.wheel-box .rim { position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(from 0deg, #f0d793, #a87a2c, #f0d793, #a87a2c, #f0d793); box-shadow: 0 0 30px #e3c27a44, 0 10px 26px #0009; }
.wheel-box .bulbs { position: absolute; inset: -10px; }
.wheel-box .bulbs i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #fff8dc; box-shadow: 0 0 6px #fff3b0; animation: bulb 1.2s ease-in-out infinite; }
.wheel-box .bulbs i:nth-child(2n) { animation-delay: .6s; }
@keyframes bulb { 50% { opacity: .35; } }
.wheel-box svg.wheel { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.12, .7, .1, 1); }
.wheel-box .hub { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3cf, #e3c27a 50%, #a87a2c); border: 3px solid #fff3cf; display: grid; place-items: center; box-shadow: 0 3px 12px #0009; }
.wheel-box .hub img { width: 42px; height: 42px; border-radius: 50%; }
.wheel-box .pointer { position: absolute; left: 50%; top: -22px; width: 34px; height: 42px; margin-left: -17px; z-index: 2; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }

/* ---- scratch card ---- */
.scratch-box { position: relative; height: 170px; margin: 14px 0; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #2b375a, #1b2440); border: 1.5px dashed var(--gold-3); z-index: 3; }
.scratch-prize { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--tx-2); font-weight: 700; }
.scratch-prize img { width: 62px; height: 62px; }
.scratch-prize b { font: 700 36px/1 var(--fd); background: linear-gradient(180deg, #fff3cf, #e3c27a 60%, #b8893a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scratch-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.prize-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 12px; font-size: 12.5px; position: relative; z-index: 3; }

/* ---- chests ---- */
.chests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; position: relative; z-index: 3; }
.chest { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 16px; background: #ffffff0a; border: 1px solid #e3c27a33; text-align: center; }
.chest b { font-size: 14.5px; color: var(--cream); }
.chest span { font-size: 11.5px; color: var(--tx-2); margin-bottom: 6px; }
.chest .btn { width: 100%; padding: 0 4px; font-size: 12.5px; }
.chest-art { position: relative; width: 82px; height: 76px; margin-bottom: 4px; }
.chest-svg { width: 100%; height: 100%; overflow: visible; }
.chest-svg .c-lid { transform-box: view-box; transform-origin: 8px 30px; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.chest-svg .c-glow { opacity: 0; transform-box: view-box; transform-origin: 32px 26px; transition: opacity .3s; }
.chest.open .c-lid { transform: translate(0, -10px) rotate(-16deg); }
.chest.open .c-glow { opacity: .9; animation: glowpulse .9s ease-in-out infinite; }
.chest.shake .chest-art { animation: lshake .7s; }
.chest.gold { background: linear-gradient(180deg, #e3c27a26, #e3c27a0a); border-color: #e3c27a77; }
@keyframes lshake { 0%, 100% { transform: none; } 20% { transform: rotate(-7deg) scale(1.04); } 40% { transform: rotate(7deg) scale(1.06); } 60% { transform: rotate(-5deg) scale(1.08); } 80% { transform: rotate(4deg) scale(1.1); } }
@keyframes glowpulse { 50% { transform: scale(1.12); opacity: .6; } }
.burst-coin { position: absolute; left: 50%; top: 42%; width: 22px; height: 22px; margin: -11px; pointer-events: none; }
.burst-coin svg, .fly-coin svg { width: 100%; height: 100%; display: block; }
.chest-table { font-size: 12px; color: var(--tx-2); display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #ffffff0a; position: relative; z-index: 3; }
.chest-table b { color: var(--cream); }

/* ---- hunt / grand ---- */
.big-num { text-align: center; margin: 10px 0 8px; position: relative; z-index: 3; }
.big-num span { display: block; font-size: 12.5px; color: var(--tx-2); }
.big-num b { font: 700 44px/1.05 var(--fd); background: linear-gradient(180deg, #fff3cf, #e3c27a 60%, #b8893a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px #e3c27a40); }
.big-num small { font-size: 15px; font-weight: 700; color: var(--gold-2); margin-left: 4px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; text-align: center; position: relative; z-index: 3; }
.mini-stats div { padding: 8px; border-radius: 12px; background: #ffffff0a; border: 1px solid #e3c27a33; }
.mini-stats b { display: block; font: 700 20px/1.2 var(--fd); color: var(--gold); }
.mini-stats span { font-size: 11.5px; color: var(--tx-2); }
.buy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; z-index: 3; }
.buy-row .btn { padding: 0 4px; font-size: 12.5px; }
.rules { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #ffffff0a; font-size: 12px; color: var(--tx-2); position: relative; z-index: 3; }
.cd-box { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: #ffffff10; border: 1px solid #e3c27a55; color: var(--cream); font-weight: 700; width: max-content; margin: 0 auto 12px; font-size: 13px; position: relative; z-index: 3; }
.cd-box svg { width: 15px; height: 15px; color: var(--gold-2); }
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; z-index: 3; }
.place { text-align: center; padding: 8px 4px; border-radius: 14px; background: #ffffff0a; border: 1px solid #e3c27a33; }
.place b { display: block; font-size: 14px; color: var(--cream); }
.place span { display: block; font: 700 17px/1.3 var(--fd); color: var(--gold); }
.place small { font-size: 11px; color: var(--tx-3); }
.place.p1 { background: linear-gradient(180deg, #e3c27a33, #e3c27a14); border-color: var(--gold-3); }
.hunt, .grand { overflow: hidden; }

/* ---- invite ---- */
.invite-hero { padding: 14px; }
.invite-hero .card-h { margin-bottom: 10px; }
.linkbox { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--in); border: 1.5px dashed var(--gold-3); font: 500 13px/1.3 ui-monospace, Consolas, monospace; color: #f3e9d2; position: relative; z-index: 3; }
.bind-code { justify-content: space-between; margin: 10px 0 0; padding: 8px 8px 8px 16px; }
.bind-code b { font: 800 26px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 4px; color: var(--cream); }
.linkbox span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; position: relative; z-index: 3; }
.share button { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 10px; border-radius: 14px; font-size: 12px; font-weight: 600; color: var(--tx);
  background: linear-gradient(180deg, #ffffff12, #ffffff06); border: 1px solid #e3c27a33; box-shadow: inset 0 1px 0 #ffffff14; }
.share button::before { content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 2px; border-radius: 2px; background: var(--sc, #e3c27a); box-shadow: 0 0 12px var(--sc, #e3c27a); }
.share .s-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px #0007, inset 0 1px 0 #ffffff55; }
.share .s-ic svg { width: 21px; height: 21px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 10px 0; border-radius: 12px; background: #ffffff0a; border: 1px solid #e3c27a33; position: relative; z-index: 3; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font: 700 22px/1.2 var(--fd); color: var(--gold); }
.stats span { font-size: 11.5px; color: var(--tx-2); }
.next-mile { margin: 12px 0 2px; font-size: 13px; color: var(--tx); position: relative; z-index: 3; }
.next-mile b { color: #ffb37a; }
.mile { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); position: relative; z-index: 3; }
.mile .m-txt { flex: 1; font-size: 13.5px; color: var(--tx); }
.mile .m-bar { height: 5px; border-radius: 5px; background: #ffffff14; margin-top: 5px; overflow: hidden; }
.mile .m-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2c14e, #ffe9a8); border-radius: 5px; }
.mile .m-amt { display: inline-flex; align-items: center; gap: 5px; font: 700 14px var(--fd); color: var(--gold); }
.mile .m-amt .cic { width: 16px; height: 16px; }
.mile.claimed .m-amt { color: var(--ok); }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.howto div { padding: 10px 6px; border-radius: 14px; background: #ffffff0a; border: 1px solid var(--line); font-size: 12px; color: var(--tx-2); line-height: 1.35; }
.howto b { display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto 6px; border-radius: 50%; background: var(--gl); color: var(--on-gold); font-size: 13px; }
.promoter .card-h h2 { font-size: 15px; }
.friend { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); position: relative; z-index: 3; }
.friend .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- avatar ---- */
.avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; background: var(--gl); color: var(--on-gold); font-weight: 800; font-size: 17px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar svg { width: 55%; height: 55%; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- wallet ---- */
.balance { overflow: hidden; }
.balance .b-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.balance .b-l { font-size: 13px; color: var(--tx-2); }
.balance .b-acts { display: flex; align-items: center; gap: 8px; }
.b-refresh.spinning svg { animation: spin .7s linear infinite; }
.balance .brow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0; position: relative; z-index: 3; }
.balance .b-v { font: 700 40px/1.1 var(--fd); letter-spacing: .5px; background: linear-gradient(180deg, #fff3cf, #e3c27a 60%, #b8893a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px #e3c27a40); animation: brth 3.8s ease-in-out infinite; }
.balance .chip-w { flex-shrink: 0; padding: 5px 10px; height: auto; border-radius: 999px; font-size: 11px; font-weight: 700; background: linear-gradient(180deg, #fff6d8, #e3c27a 70%, #c9a24a); color: #3a2a0a; border: 1px solid #f0d793aa; box-shadow: 0 2px 10px #e3c27a55, inset 0 1px 0 #fff8; }
.balance .b-inr { font-size: 12.5px; color: var(--tx-2); position: relative; z-index: 3; }
.balance .b-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(212, 175, 55, .35); position: relative; z-index: 3; }
.balance .b-row div { min-width: 0; padding: 2px 6px; text-align: center; border-left: 1px solid rgba(212, 175, 55, .28); }
.balance .b-row div:first-child { border-left: 0; }
.balance .b-row small { display: block; font-size: 11px; line-height: 1.25; color: var(--tx-2); }
.balance .b-row small .cic { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
.balance .b-row b { display: block; font-size: 14px; margin-top: 2px; color: var(--cream); }
.lock-card .card-h h2 { font-size: 15px; }
.big-inr { font: 700 20px/1.2 var(--fd); color: var(--cream); }
.ways { list-style: none; margin: 0; padding: 0; position: relative; z-index: 3; }
.ways li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ways li:first-child { border-top: 0; }
.ways li b { color: var(--gold); white-space: nowrap; }
.hist { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); position: relative; z-index: 3; }
.hist .h-txt { flex: 1; min-width: 0; }
.hist .h-txt b { display: block; font-size: 13.5px; font-weight: 600; color: var(--tx); line-height: 1.3; }
.hist .h-txt span { font-size: 11.5px; color: var(--tx-3); }
.hist .amt { font: 700 15px var(--fd); color: #f0d793; }
.hist .amt.neg { color: var(--red); }
.lock-tag { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 700; color: var(--amb); background: #f2c14e22; border-radius: 6px; padding: 0 5px; }
.lock-tag svg { width: 11px; height: 11px; }
.pill { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.pill.pending, .pill.processing { background: #f2c14e22; color: var(--amb); }
.pill.approved { background: #4fd08a22; color: var(--ok); }
.pill.rejected { background: #ff7a6b22; color: var(--red); }
.empty { text-align: center; padding: 14px 0 6px; color: var(--tx-2); font-size: 13px; position: relative; z-index: 3; }
.empty img { width: 60px; margin: 0 auto 6px; opacity: .9; }
.empty svg { width: 30px; height: 30px; color: var(--gold-3); }

/* ---- me ---- */
.profile { display: flex; align-items: center; gap: 12px; }
.profile .avatar { width: 54px; height: 54px; font-size: 22px; box-shadow: 0 0 0 2px #e3c27a77; }
.profile b { display: block; font-size: 17px; font-weight: 700; color: var(--cream); line-height: 1.2; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; position: relative; z-index: 3; }
.kv span { color: var(--tx-2); }
.kv span b { display: block; color: var(--tx); font-weight: 600; }
.kv span small { display: block; font-size: 11.5px; color: var(--tx-3); }
.kv > b { font-weight: 700; color: var(--cream); }
.switch { position: relative; width: 46px; height: 27px; border-radius: 99px; background: #3a4057; transition: background .2s; flex: 0 0 auto; }
.switch i { position: absolute; left: 3px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
.switch.on { background: #2fb36a; }
.switch.on i { transform: translateX(19px); }
/* một dải, nút đang chọn là viên vàng trượt trong dải (góp ý 03/11) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #0b101d99; border: 1px solid #e3c27a33; position: relative; z-index: 3; }
.seg button { height: 36px; border-radius: 10px; font-weight: 700; text-align: center; background: transparent; color: var(--tx-2); border: 1px solid transparent; }
.seg button.on { background: var(--gl); color: var(--on-gold); box-shadow: 0 2px 8px #c99a4544, inset 0 1px 0 #fff8; }
.auth-seg button { border-color: transparent; }
details.faq { border-top: 1px solid var(--line); position: relative; z-index: 3; }
details.faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 0; font-weight: 600; cursor: pointer; color: var(--tx); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .cic { width: 18px; height: 18px; }
details.faq[open] summary .chev { transform: rotate(90deg); }
details.faq p { margin: 0 0 12px; color: var(--tx-2); font-size: 13px; }
.support { display: flex; align-items: center; gap: 12px; text-align: left; }
.support img { width: 50px; height: 45px; position: relative; z-index: 3; }
.support .s-t { flex: 1; position: relative; z-index: 3; }
.support .s-t b { display: block; font-size: 15px; color: var(--cream); }
.foot { text-align: center; color: var(--tx-3); font: 600 12px var(--fd); letter-spacing: .5px; padding: 6px 0; }

/* ---- bottom tabs ---- */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: 100%; max-width: 520px;
  height: calc(var(--tabs-h) + var(--safe-b)); padding: 6px 8px calc(6px + var(--safe-b)); /* đệm dưới = trên: viền nút đang chọn không chạm mép */
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: #0b1020f2; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid #e3c27a40; box-shadow: 0 -6px 20px #0009;
}
.tab { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; color: #8f8a7e; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.tab-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.tab-ic svg { width: 21px; height: 21px; }
.tab.on { color: var(--gold); background: linear-gradient(180deg, #e3c27a2e, #e3c27a12); border-color: #e3c27a55; box-shadow: inset 0 1px 0 #fff2; }
.tab.on .tab-ic { background: radial-gradient(circle at 35% 28%, #fff3cf, #e3c27a 45%, #b8893a); color: var(--on-gold); box-shadow: inset 0 -2px 0 #8a622099, 0 2px 8px #c99a4566; }
.tab.on .tab-ic svg { width: 15px; height: 15px; stroke-width: 2.4; }
.tab.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #fff0 30%, #ffffff40 50%, #fff0 70%); transform: translateX(-130%); animation: shn 5s ease-in-out infinite 1.2s; pointer-events: none; }

/* ---- sheet ---- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap.closing, .reward-pop.closing { pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: #0d1220a6; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: var(--sheet); color: var(--tx); border: 1px solid var(--gold-3); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 8px 16px calc(18px + var(--safe-b)); transform-origin: 50% 100%; }
.sheet-grip { width: 42px; height: 4px; border-radius: 4px; background: #e3c27a55; margin: 0 auto 10px; }
.sheet h3 { margin: 0 0 4px; font: 700 20px/1.2 var(--fd); text-align: center; color: var(--cream); }
.sheet .sub { text-align: center; }
.sheet-art { width: 80px; height: 72px; margin: 4px auto 6px; }
/* ---- rule sheets (the (i) buttons) ---- */
.rule-h { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 10px; }
.rule-h h3 { margin: 0; }
.rule-body { padding: 12px 14px; border-radius: 14px; background: #0b101d99; border: 1px solid var(--line); }
.rule-lead { margin: 0 0 8px; font-size: 13.5px; color: var(--cream); font-weight: 600; }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.rule-list li { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.45; color: var(--tx); }
.rule-list li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--gl); box-shadow: 0 0 6px #f0d79380; }
.rule-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.rule-rows > div:first-child { border-top: 0; padding-top: 2px; }
.rule-rows b { flex: none; font: 700 14.5px var(--fd); color: var(--gold); }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }

/* ---- toast + reward popup + flying coins ---- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 80; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px;
  background: #1c2541; color: #f3e9d2; border: 1px solid var(--gold-3); font-weight: 600; font-size: 14px; text-align: center; box-shadow: 0 8px 22px #000a; animation: up .2s ease; }
.toast.err { border-color: var(--red); color: #ffd3cc; }
body.auth-mode .toast { bottom: 24px; }
.reward-pop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: #0009; }
.reward-card { width: min(84vw, 300px); padding: 20px 16px 18px; border-radius: 24px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, #3a4770 0%, #1b2440 55%, #0f1424 100%); border: 1px solid var(--gold-3); box-shadow: 0 20px 60px #000a, 0 0 40px #e3c27a33; }
.reward-card img { width: 96px; height: 96px; margin: -58px auto 4px; filter: drop-shadow(0 6px 12px #000a); }
.reward-card b { display: block; font: 700 42px/1.1 var(--fd); background: linear-gradient(180deg, #fff3cf, #e3c27a 60%, #b8893a); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 18px #e3c27a44; }
.reward-card span { display: block; font-weight: 600; color: var(--tx); }
.reward-card .lock-tag { justify-content: center; margin: 6px auto 0; width: max-content; font-size: 12px; }
.chip-points.bump { animation: bump .22s ease-out; }
@keyframes bump { 50% { transform: scale(1.14); box-shadow: 0 0 0 5px #e3c27a55, 0 2px 10px #c99a4555; } }
.fly-coin { position: fixed; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; z-index: 95; pointer-events: none; will-change: transform; filter: drop-shadow(0 2px 4px #000a); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .shn::after, .draw-card::after, .dg::after, .ribbon::after, .tab.on::after, body::before, .draw-head::after { display: none; }
  .wheel-box svg.wheel { transition-duration: 1s; }
}

/* ---- floating Customer Support button (all main tabs) ---- */
.cs-fab { position: fixed; z-index: 40; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
  display: flex; flex-direction: column; align-items: center; gap: 1px; width: 54px; padding: 7px 0 5px; border-radius: 16px;
  background: var(--gl); color: var(--on-gold); box-shadow: 0 6px 18px #0009, inset 0 1px 0 #fff8; border: 0; cursor: pointer; }
.cs-fab svg { width: 24px; height: 24px; stroke-width: 2.2; }
.cs-fab b { font: 700 10.5px/1 var(--fd); letter-spacing: .2px; }
.cs-fab:active { transform: scale(.94); }
body.auth-mode .cs-fab { display: none; }

/* ---- page transitions (operator 01/11: the game's popup feel, js/core.js MOTION): the new page pops in, a still copy of
   the old one closes under it (or over it, going back) ---- */
.view-ghost { position: fixed; margin: 0; z-index: -1; pointer-events: none; }
.view-ghost.over { z-index: 10; }
.tab.on .tab-ic { animation: tabPop .34s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tabPop { from { transform: scale(.55); } }

/* ---- paged tables, filters ---- */
.spinner.sm { width: 22px; height: 22px; border-width: 2.5px; margin: 0 auto; }
.fchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; position: relative; z-index: 3; }
.fchips::-webkit-scrollbar { display: none; }
.fchips + .fchips { margin-top: 6px; }
.fchip { flex: none; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--tx-2);
  background: #ffffff0a; border: 1px solid #e3c27a33; }
.fchip.on { color: var(--on-gold); background: var(--gl); border-color: #f0d793; }
/* bảng bạn bè / thu nhập: dòng đếm + nút Filter, lọc nằm trong sheet */
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; position: relative; z-index: 3; font-size: 13px; font-weight: 600; color: var(--tx-2); }
.fbtn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--tx); background: #ffffff0a; border: 1px solid #e3c27a44; }
.fbtn svg { width: 15px; height: 15px; }
.fbtn.on { color: var(--gold); border-color: var(--gold-3); }
.fbtn b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; color: var(--on-gold); background: var(--gl); }
.empty .link-btn { display: inline-flex; color: var(--gold); padding-top: 6px; }
.empty-cta { text-align: center; padding: 18px 8px 4px; position: relative; z-index: 3; }
.empty-cta img { display: block; width: 84px; margin: 0 auto 8px; filter: drop-shadow(0 6px 12px #0008); }
.empty-cta b { display: block; font: 700 16px/1.25 var(--fd); color: var(--cream); }
.empty-cta p { margin: 4px auto 14px; max-width: 260px; font-size: 13px; line-height: 1.4; color: var(--tx-2); }
.empty-cta .btn { display: inline-flex; padding: 0 20px; }
.f-group { margin-top: 14px; }
.f-group small { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--tx-3); }
.fchips.wrap { flex-wrap: wrap; overflow: visible; margin-top: 0; }
.fchips.wrap .fchip { height: 32px; padding: 0 14px; font-size: 13px; }
.tbl { margin-top: 10px; position: relative; z-index: 3; }
.tbl .tr { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tbl .th { padding: 4px 0 6px; border-top: 0; font-size: 11px; font-weight: 700; color: var(--tx-3); text-transform: uppercase; letter-spacing: .4px; }
.tbl .th span:last-child, .tbl .td-st, .tbl .td-pts { text-align: right; justify-self: end; }
.tbl.t-wd .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.td-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.td-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--tx); }
.t-earn .td-name, .t-hist .td-name, .t-wd .td-name { flex-direction: column; align-items: flex-start; gap: 1px; }
.td-name small, .td-st small, .td-pts small { display: block; font-size: 11px; color: var(--tx-3); line-height: 1.3; }
.td-st small, .td-pts small { margin-top: 2px; }
.td-pts small.lock-tag { display: inline-flex; font-size: 10.5px; }
.td-time { font-size: 11.5px; color: var(--tx-2); }
.td-pts b { font: 700 14.5px var(--fd); color: #f0d793; }
.td-pts b.neg { color: var(--red); }
.pill.joined { background: #ffffff14; color: #bdb6a6; }
.pill.valid { background: #f2c14e22; color: var(--amb); }
.pill.effective { background: #4fd08a22; color: var(--ok); }
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; position: relative; z-index: 3; }
.pager button { min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9px; font: 700 13.5px var(--fd); color: var(--tx);
  background: #ffffff0a; border: 1px solid #e3c27a33; }
.pager button.on { color: var(--on-gold); background: var(--gl); border-color: #f0d793; }
.pager button[disabled] { opacity: .35; }
.pager .pg-gap { color: var(--tx-3); padding: 0 2px; }

/* ---- invite: earned row, Promoter perks ---- */
.earned { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; position: relative; z-index: 3; }
.earned div { padding: 7px 6px; border-radius: 11px; background: #ffffff08; border: 1px solid var(--line); text-align: center; }
.earned small { display: block; font-size: 11px; color: var(--tx-2); }
.earned b { display: block; font: 700 16px/1.25 var(--fd); color: var(--cream); }
.earned em { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--amb); }
.perks { list-style: none; margin: 10px 0 0; padding: 0; position: relative; z-index: 3; }
.perks li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--tx); }
.perks li span:not(.cic) { flex: 1; }
.perks .info-btn { flex: none; cursor: pointer; }
.ok-line { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; margin-top: 8px; }
.ok-line svg { width: 15px; height: 15px; }

/* ---- wallet: tappable Locked / On hold, withdraw + bank + PIN sheets ---- */
.balance .b-row button { min-width: 0; padding: 2px 6px; text-align: center; border-left: 1px solid rgba(212, 175, 55, .28); color: inherit; cursor: pointer; }
.balance .b-row button:active { opacity: .7; }
.balance .b-row b { display: flex; align-items: center; justify-content: center; gap: 3px; }
.b-more { display: inline-grid; color: var(--gold-2); font-style: normal; }
.b-more svg { width: 12px; height: 12px; }
.wd-sum { text-align: center; margin: 2px 0 10px; }
.wd-sum b { display: block; font: 800 30px/1.1 var(--fd); color: var(--gold); }
.wd-sum span { font-size: 12.5px; color: var(--tx-2); }
.bank-box { padding: 10px 12px; border-radius: 13px; background: #ffffff0a; border: 1px solid var(--line); }
.bank-box div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.bank-box small { color: var(--tx-2); font-size: 12.5px; }
.bank-box b { color: var(--cream); text-align: right; }
.bank-box .link-btn { padding-top: 6px; color: var(--gold); }
.pin-in, .code-in { text-align: center; font: 800 22px var(--fd); letter-spacing: 10px; }
.dev-hint { color: var(--amb); font-weight: 700; }
.kv > b { display: inline-flex; align-items: center; gap: 8px; }
.ok-txt { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.ok-txt svg { width: 14px; height: 14px; }
.me-actions { margin-top: 4px; }
.me-actions .btn { gap: 6px; }
.me-actions svg { width: 17px; height: 17px; }
