/* =========================================================
   CAREYOU BEAUTY — MEMBER CARD
   Phong cách: kem / hồng đào / cam ánh vàng, sang trọng
   ========================================================= */
:root {
  color-scheme: light;
  --cream: #FBF3EA;
  --cream-2: #F7E8DA;
  --peach: #F3D6BF;
  --blush: #EFC3AA;
  --ink: #3D2A1E;
  --ink-soft: #7C604D;
  --ink-faint: #A88E7B;
  --line: rgba(124, 96, 77, .16);
  --gold-1: #F9D58A;
  --gold-2: #EFA640;
  --gold-3: #D9792A;
  --grad-gold: linear-gradient(135deg, #F9D58A 0%, #F0AE4C 42%, #DE7D2B 100%);
  --grad-text: linear-gradient(100deg, #E9902F 0%, #F5B653 40%, #D7731F 70%, #F2A944 100%);
  --cocoa: #3A2417;
  --ok: #5E9C76;
  --warn: #E07A1F;
  --muted: #B3A296;
  --glass: rgba(255, 252, 248, .66);
  --glass-brd: rgba(255, 255, 255, .8);
  --shadow-sm: 0 2px 10px rgba(110, 66, 30, .08);
  --shadow-md: 0 14px 40px -12px rgba(120, 70, 30, .28);
  --shadow-card: 0 30px 60px -20px rgba(70, 38, 12, .45), 0 10px 20px -10px rgba(70, 38, 12, .25);
  --radius: 22px;
  --f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-script: "Great Vibes", "Segoe Script", cursive;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Nền ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #FFF8F1 0%, var(--cream) 45%, var(--cream-2) 100%); }
.bg__glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .7; animation: drift 18s ease-in-out infinite alternate; }
.bg__glow--1 { width: 420px; height: 420px; left: -140px; top: -120px; background: #FAD9B5; }
.bg__glow--2 { width: 360px; height: 360px; right: -160px; top: 30%; background: #F6CBB3; animation-delay: -6s; }
.bg__glow--3 { width: 300px; height: 300px; left: 10%; bottom: -140px; background: #FBE3B8; animation-delay: -12s; }
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.12); } }
.bg__sparkles span {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #F7C66E 45%, transparent 70%);
  opacity: 0; animation: twinkle var(--d, 6s) ease-in-out infinite; animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(.6); }
  50% { opacity: .9; transform: translateY(-24px) scale(1); }
}

/* ---------- Bố cục màn hình ---------- */
.screen {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px 28px;
  display: none;
}
.screen.is-active { display: block; animation: screenIn .7s var(--ease-out) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Logo / thương hiệu ---------- */
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 8px; }
.brand img { height: 64px; width: auto; }
.wordmark {
  font-family: var(--f-serif); font-weight: 600; letter-spacing: .32em; font-size: 22px; padding-left: .32em;
  background: var(--grad-text); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 6s linear infinite;
}
.wordmark-sub { font-size: 9.5px; letter-spacing: .55em; padding-left: .55em; color: var(--ink-soft); font-weight: 500; }
@keyframes textShine { to { background-position: 200% center; } }
.brand__txt { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand--small { flex-direction: row; align-items: center; gap: 8px; padding: 0; }
.brand--small .brand__txt { align-items: flex-start; }
.brand--small .wordmark { font-size: 15px; letter-spacing: .24em; padding-left: 0; background: none; color: var(--logo-brown); animation: none; }
.brand--small .wordmark-sub { font-size: 7.5px; letter-spacing: .5em; padding-left: 0; }

/* Logo thật (dạng mặt nạ): nền nâu thương hiệu + vệt ánh vàng lướt qua */
:root { --logo-brown: #6B4626; }
.logo-full, .logo-icon, .mc__logo, .back__mark {
  display: block; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
}
.logo-full {
  width: 112px; aspect-ratio: 480 / 623;
  background: linear-gradient(110deg, var(--logo-brown) 0%, var(--logo-brown) 40%, #E9A443 48%, #FCE3A6 50%, #E9A443 52%, var(--logo-brown) 60%, var(--logo-brown) 100%);
  background-size: 300% 100%; background-position: 100% 0;
  animation: logoShine 5.5s ease-in-out infinite 1s, logoIn 1.1s var(--ease-out) both;
}
@keyframes logoShine { 0%, 55% { background-position: 100% 0; } 90%, 100% { background-position: 0% 0; } }
@keyframes logoIn { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
.logo-icon { width: 40px; aspect-ratio: 360 / 326; background: var(--logo-brown); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 18px 0 6px; }
.script { font-family: var(--f-script); font-weight: 400; margin: 0; line-height: 1; }
.hero__script {
  font-size: 54px; color: var(--gold-3); margin-top: 4px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 10px 6px;
}
.hero__title {
  margin: 2px 0 10px; font-family: var(--f-body); font-weight: 700; font-size: 25px; letter-spacing: .06em;
  background: var(--grad-text); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 7s linear infinite;
}
.hero__sub { margin: 0 auto; max-width: 320px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* Chồng thẻ nhỏ lơ lửng */
.card-stack { position: relative; height: 170px; margin: 8px auto 6px; width: 260px; perspective: 900px; }
.mini-card {
  position: absolute; left: 50%; top: 50%; width: 200px; height: 126px; margin: -63px 0 0 -100px;
  border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 12px 14px;
  font-family: var(--f-serif); font-size: 11px; letter-spacing: .3em; font-weight: 600;
  animation: floaty 6s ease-in-out infinite;
}
.mini-card::before { content: "CAREYOU"; position: absolute; left: 14px; top: 12px; font-size: 10px; letter-spacing: .3em; opacity: .85; }
.mini-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.65) 45%, transparent 60%);
  transform: translateX(-120%); animation: sweep 4.5s ease-in-out infinite;
}
.mini-card--silver { background: linear-gradient(135deg, #F7F8FA, #C5CBD3 45%, #EEF0F3 65%, #A9B0BA); color: #4A505A;
  --r: -14deg; --x: -58px; --y: 10px; transform: translate(var(--x), var(--y)) rotate(var(--r)); animation-delay: -1s; }
.mini-card--gold { background: linear-gradient(135deg, #FCE6AE, #E6B354 40%, #F8DA92 60%, #C68529); color: #5A3510;
  --r: 0deg; --x: 0px; --y: -8px; transform: translate(var(--x), var(--y)) rotate(var(--r)); z-index: 2; }
.mini-card--platinum { background: linear-gradient(135deg, #3A3840, #232227 50%, #48464F); color: #E9E4EE;
  --r: 14deg; --x: 58px; --y: 12px; transform: translate(var(--x), var(--y)) rotate(var(--r)); animation-delay: -2.2s; z-index: 1; }
.mini-card--platinum::after { animation-delay: 1.2s; }
.mini-card--silver::after { animation-delay: .6s; }
@keyframes floaty {
  0%, 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  50% { transform: translate(var(--x), calc(var(--y) - 10px)) rotate(calc(var(--r) * 1.15)); }
}
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* ---------- Kính mờ ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-md); border-radius: var(--radius);
}

/* ---------- Form tra cứu ---------- */
.lookup { margin-top: 22px; padding: 22px 20px 18px; display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field__label { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.field__input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.85);
  font-size: 17px; font-weight: 500; letter-spacing: .02em; outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field__wrap { position: relative; }
.field__input--secret { padding-right: 56px; }
/* Che ngày sinh thành dấu chấm (không dùng ô mật khẩu để trình duyệt không hỏi "lưu mật khẩu") */
.field__input--secret.is-hidden { -webkit-text-security: disc; text-security: disc; letter-spacing: .18em; }
.field__input--secret.is-hidden::placeholder { letter-spacing: .02em; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-faint); transition: color .2s, background .2s;
}
.eye:hover, .eye:focus-visible { color: var(--gold-3); background: rgba(239, 166, 64, .1); outline: none; }
.eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: opacity .2s, transform .25s; }
/* Đang ẩn → hiện con mắt (bấm để xem); đang hiện → con mắt gạch chéo (bấm để ẩn) */
.eye .eye__off { opacity: 0; transform: scale(.7); }
.eye[aria-pressed="true"] .eye__off { opacity: 1; transform: none; }
.eye[aria-pressed="true"] .eye__open { opacity: 0; transform: scale(.7); }
.field__label small { font-size: 11px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink-faint); }
.field__hint { font-size: 12.5px; color: var(--ink-faint); margin-top: -1px; }
.field__hint b { color: var(--gold-3); font-weight: 600; letter-spacing: .04em; }
.field__input::placeholder { color: #C4B2A4; font-weight: 400; }
.field__input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(239, 166, 64, .18); background: #fff; }
.field__input.is-error { border-color: #D9634A; animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.form-msg { margin: -2px 0 0; min-height: 0; font-size: 13.5px; color: #C4533B; line-height: 1.45; }
.form-msg:empty { display: none; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 16px; letter-spacing: .03em;
  transition: transform .2s var(--ease-out), box-shadow .25s, opacity .2s;
}
.btn--primary {
  color: #fff; background: var(--grad-gold); background-size: 160% 160%;
  box-shadow: 0 12px 26px -10px rgba(217, 121, 42, .75), inset 0 1px 0 rgba(255,255,255,.45);
  overflow: hidden; animation: gradMove 6s ease infinite;
  text-shadow: 0 1px 2px rgba(150, 70, 10, .3);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%);
  transform: translateX(-110%); animation: sweep 3.8s ease-in-out infinite;
}
@keyframes gradMove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn:active { transform: scale(.97); }
.btn__spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; display: none; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading { pointer-events: none; opacity: .92; }
@keyframes spin { to { transform: rotate(360deg); } }
.help-link { text-align: center; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; padding: 4px; }
.help-link::after { content: " ›"; }
.help-link:hover { color: var(--gold-3); }
.demo-note { margin: 16px 4px 0; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.55;
  color: var(--ink-soft); background: rgba(255,255,255,.5); border: 1px dashed var(--blush); text-align: center; }
.foot { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 26px 0 4px; letter-spacing: .03em; }

/* =========================================================
   THẺ THÀNH VIÊN (dùng chung cho màn mở thẻ & trang thành viên)
   ========================================================= */
.member-card {
  --bg: linear-gradient(135deg, #FCE6AE, #E6B354 40%, #F8DA92 60%, #C68529);
  --fg: #4E2E0E; --fg-soft: rgba(78, 46, 14, .7); --emboss: rgba(255,255,255,.35);
  position: relative; width: 100%; aspect-ratio: 1.586; border-radius: 20px; overflow: hidden;
  background: var(--bg); color: var(--fg); box-shadow: var(--shadow-card);
  padding: 7% 7.5%; display: grid; grid-template-rows: auto 1fr auto; isolation: isolate;
  user-select: none; -webkit-user-select: none;
}
.member-card--silver {
  --bg: linear-gradient(135deg, #FAFBFC 0%, #CDD2D9 38%, #F1F3F5 58%, #AEB5BF 100%);
  --fg: #3A4049; --fg-soft: rgba(58, 64, 73, .7);
}
.member-card--gold {
  --bg: linear-gradient(135deg, #FDE9B5 0%, #E8B04C 36%, #FADB95 58%, #C27F25 100%);
  --fg: #4E2E0E; --fg-soft: rgba(78, 46, 14, .72);
}
.member-card--platinum {
  --bg: linear-gradient(135deg, #46444D 0%, #26252A 42%, #3B3941 70%, #1C1B1F 100%);
  --fg: #F1ECF4; --fg-soft: rgba(241, 236, 244, .7); --emboss: rgba(255,255,255,.08);
}
/* Hoa văn guilloche */
.member-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    repeating-radial-gradient(circle at 110% 120%, transparent 0 10px, var(--emboss) 10px 11px),
    repeating-radial-gradient(circle at -10% -20%, transparent 0 14px, var(--emboss) 14px 15px);
  mix-blend-mode: overlay;
}
.member-card--platinum::before { opacity: 1; mix-blend-mode: normal; }
/* Ánh kim lướt qua */
.member-card .shine {
  position: absolute; inset: -20%; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.1) 54%, transparent 62%);
  transform: translateX(-70%); animation: cardSweep 5.5s ease-in-out infinite 1.2s;
  mix-blend-mode: soft-light;
}
.member-card--platinum .shine {
  background: linear-gradient(115deg, transparent 36%, rgba(214,228,255,.35) 44%, rgba(246,214,240,.4) 50%, rgba(212,246,232,.3) 56%, transparent 64%);
  mix-blend-mode: screen;
}
@keyframes cardSweep { 0%, 45% { transform: translateX(-70%); } 80%, 100% { transform: translateX(70%); } }
/* Ánh sáng theo ngón tay */
.member-card .glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: var(--glare-o, 0);
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.55), transparent 48%);
  mix-blend-mode: overlay; transition: opacity .3s;
}
.mc__top { display: flex; justify-content: space-between; align-items: flex-start; }
.mc__brandrow { display: flex; align-items: center; gap: 8px; }
.mc__logo { width: clamp(24px, 8.5vw, 34px); aspect-ratio: 360 / 326; background: var(--fg); opacity: .9; }
.member-card--gold .mc__logo { background: linear-gradient(135deg, #6B4626, #4E2E0E); }
.member-card--platinum .mc__logo { background: linear-gradient(135deg, #DCE6FF, #F6DCF0 50%, #D8F4E8); }
.mc__brand { display: grid; gap: 2px; }
.mc__brand b { font-family: var(--f-serif); font-weight: 600; letter-spacing: .3em; font-size: clamp(12px, 4.2vw, 17px); }
.mc__brand small { font-size: clamp(6.5px, 2vw, 8.5px); letter-spacing: .45em; color: var(--fg-soft); font-weight: 500; }
.mc__tier { text-align: right; font-family: var(--f-serif); font-weight: 600; letter-spacing: .28em; font-size: clamp(10px, 3.3vw, 13px); }
.mc__tier small { display: block; font-family: var(--f-body); font-weight: 500; letter-spacing: .22em; font-size: clamp(6.5px, 2vw, 8px); color: var(--fg-soft); margin-top: 3px; }
.member-card--platinum .mc__tier span {
  background: linear-gradient(90deg, #DCE6FF, #F6DCF0, #D8F4E8, #DCE6FF); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: textShine 5s linear infinite;
}
.mc__mid { position: relative; display: flex; align-items: center; }
.mc__chip {
  width: 14%; aspect-ratio: 1.3; border-radius: 6px;
  background: linear-gradient(135deg, #F4DDA0, #C99B48 50%, #F1D594);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 20, .35);
  position: relative; overflow: hidden;
}
.mc__chip::before, .mc__chip::after { content: ""; position: absolute; background: rgba(110, 70, 15, .35); }
.mc__chip::before { left: 33%; right: 33%; top: 0; bottom: 0; border-left: 1px solid rgba(110,70,15,.35); border-right: 1px solid rgba(110,70,15,.35); background: none; }
.mc__chip::after { top: 50%; left: 0; right: 0; height: 1px; }
.member-card--silver .mc__chip { background: linear-gradient(135deg, #EEF0F3, #A8AFB9 50%, #E3E6EA); }
.mc__script {
  position: absolute; right: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--f-script); font-size: clamp(40px, 15vw, 64px); line-height: 1; opacity: .2; white-space: nowrap; pointer-events: none;
}
.mc__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.mc__name { font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: clamp(11px, 3.8vw, 15px);
  text-shadow: 0 1px 0 var(--emboss); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mc__phone { font-size: clamp(9.5px, 3vw, 12px); letter-spacing: .18em; color: var(--fg-soft); margin-top: 4px; font-variant-numeric: tabular-nums; }
.mc__since { font-size: clamp(6.5px, 2vw, 8px); letter-spacing: .3em; color: var(--fg-soft); white-space: nowrap; }

/* Mặt sau (màn mở thẻ) */
.member-card--back {
  --bg: radial-gradient(120% 120% at 30% 20%, #5A3824 0%, #3A2417 55%, #26170E 100%);
  --fg: #F3D18A; --emboss: rgba(243, 209, 138, .08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.member-card--back::before { opacity: 1; mix-blend-mode: normal; }
.member-card--back .back__logo { font-family: var(--f-serif); letter-spacing: .4em; padding-left: .4em; font-weight: 600; font-size: 22px;
  background: var(--grad-text); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: textShine 3s linear infinite; }
.member-card--back .back__sub { font-size: 8.5px; letter-spacing: .6em; padding-left: .6em; color: rgba(243, 209, 138, .7); }
.member-card--back .back__mark {
  width: 22%; aspect-ratio: 480 / 623;
  background: linear-gradient(110deg, #C98A3A 0%, #F3D18A 35%, #FFF1C9 50%, #F3D18A 65%, #C98A3A 100%);
  background-size: 250% 100%; animation: gradMove 3s ease-in-out infinite;
}
.member-card--back .back__sub { margin-top: 4px; }

/* =========================================================
   MÀN MỞ THẺ
   ========================================================= */
.reveal {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center;
  background: radial-gradient(90% 70% at 50% 45%, #FFF6EC 0%, #F6DDC7 100%);
}
.reveal.is-active { display: grid; animation: fadeIn .35s ease both; }
.reveal.is-leaving { animation: fadeOut .55s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.reveal__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reveal__stage { position: relative; width: min(84vw, 360px); text-align: center; perspective: 1400px; }
.flip { position: relative; width: 100%; aspect-ratio: 1.586; transform-style: preserve-3d; }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; }
.flip__back { transform: rotateY(180deg); }
.reveal.is-active .flip { animation: revealFlip 2.1s var(--ease-out) both; }
@keyframes revealFlip {
  0%   { opacity: 0; transform: translateY(80px) scale(.55) rotateY(180deg) rotateX(18deg); }
  22%  { opacity: 1; transform: translateY(0) scale(.92) rotateY(180deg) rotateX(0); }
  40%  { transform: translateY(-6px) scale(.96) rotateY(180deg); }
  78%  { transform: translateY(-4px) scale(1.06) rotateY(-10deg); }
  100% { transform: translateY(0) scale(1) rotateY(0); }
}
.reveal__hello, .reveal__tier { opacity: 0; margin: 0; }
.reveal__hello { font-family: var(--f-script); font-size: 42px; margin-top: 30px; color: var(--gold-3);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 8px 4px; }
.reveal__hello.is-long { font-size: 34px; line-height: 1.15; }
.reveal__tier { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin-top: 6px; }
.reveal.is-active .reveal__hello { animation: riseIn .8s var(--ease-out) 1.55s both; }
.reveal.is-active .reveal__tier { animation: riseIn .8s var(--ease-out) 1.8s both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal__skip {
  position: absolute; right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); border: 0; background: rgba(255,255,255,.55);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; color: var(--ink-soft); cursor: pointer;
}

/* =========================================================
   TRANG THÀNH VIÊN
   ========================================================= */
.screen--member { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; }
.topbar__out { border: 1px solid var(--line); background: rgba(255,255,255,.55); border-radius: 999px; padding: 8px 14px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.hello { text-align: center; margin-top: 22px; }
.hello__script { font-size: 40px; padding: 0 8px 4px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello__name { margin: 2px 0 0; font-family: var(--f-serif); font-weight: 600; font-size: 26px; letter-spacing: .01em; }

.card-wrap { margin-top: 20px; perspective: 1000px; }
.tilt { transform-style: preserve-3d; transition: transform .5s var(--ease-out); will-change: transform; touch-action: pan-y; }
.tilt.is-tracking { transition: transform .08s linear; }
.card-hint { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 14px 0 0; letter-spacing: .04em; }

.panel { margin-top: 22px; padding: 22px 20px 18px; text-align: center; }
.panel__eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.spend { margin: 6px 0 4px; font-family: var(--f-serif); font-weight: 700; font-size: clamp(34px, 10vw, 42px); line-height: 1.15;
  font-variant-numeric: tabular-nums; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spend small { font-size: .5em; margin-left: 4px; font-weight: 600; }
.progress { margin-top: 14px; text-align: left; }
.progress__track { height: 10px; border-radius: 99px; background: rgba(124, 96, 77, .12); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.progress__bar { height: 100%; width: 0; border-radius: inherit; background: var(--grad-gold); position: relative; transition: width 1.6s var(--ease-out); }
.progress__bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: barShine 2.4s ease-in-out infinite; }
@keyframes barShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress__labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.progress__text { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.progress__text b { color: var(--gold-3); }
.max-badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 16px; border-radius: 999px;
  background: linear-gradient(90deg, #2E2C33, #45434C); color: #F1ECF4; font-size: 13px; font-weight: 500; letter-spacing: .03em; }
.max-badge i { font-style: normal; background: linear-gradient(90deg, #DCE6FF, #F6DCF0, #D8F4E8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.updated { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-faint); }

.section { margin-top: 30px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 14px; }
.section__title { margin: 0; font-family: var(--f-serif); font-weight: 600; font-size: 21px; }
.section__count { font-size: 12.5px; color: var(--ink-faint); }

/* Liệu trình */
.treatments { display: grid; gap: 12px; }
.treat {
  display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center;
  padding: 14px 16px 14px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.ring { position: relative; width: 74px; height: 74px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(124, 96, 77, .12); stroke-width: 7; }
.ring__fg { fill: none; stroke: url(#ringGrad); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.5s var(--ease-out) .2s; }
.ring__txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring__txt b { font-family: var(--f-serif); font-size: 22px; font-weight: 700; display: block; }
.ring__txt small { font-size: 8.5px; color: var(--ink-faint); letter-spacing: .04em; display: block; margin-top: 4px; font-weight: 500; }
.treat__name { margin: 0; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.treat__meta { margin: 5px 0 0; font-size: 13px; color: var(--ink-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: rgba(94, 156, 118, .12); color: #3F7A57; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--warn { background: rgba(224, 122, 31, .13); color: #C1610F; }
.chip--warn::before { animation: pulse 1.4s ease-in-out infinite; }
.chip--expired { background: rgba(140, 125, 115, .14); color: #8A7B70; }
.chip--done { background: rgba(239, 166, 64, .16); color: #B2621A; }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .4; } }
.treat--done .ring__fg { stroke: #E8B04C; }
.treat--expired { opacity: .72; }
.treat--expired .ring__fg { stroke: #BDB0A6; }
.empty { padding: 26px 20px; text-align: center; border-radius: 18px; background: var(--glass); border: 1px dashed var(--blush); color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.empty .script { font-size: 30px; color: var(--gold-3); display: block; margin-bottom: 4px; }

/* Quyền lợi */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.5); border: 1px solid var(--glass-brd); margin-bottom: 12px; }
.tab { position: relative; border: 0; background: none; padding: 10px 6px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: color .25s, background .25s, box-shadow .25s; }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tab__dot { position: absolute; top: 5px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 3px rgba(239,166,64,.2); }
.benefits { padding: 18px 18px 8px; }
.benefits__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.benefits__title { margin: 0; font-family: var(--f-serif); font-size: 18px; font-weight: 600; }
.benefits__req { font-size: 12px; color: var(--ink-faint); }
.benefits__you { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--grad-gold); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.benefits ul { list-style: none; margin: 0; padding: 0; }
.benefits li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; animation: riseIn .5s var(--ease-out) both; }
.benefits li:first-child { border-top: 0; }
.benefits li::before { content: "✦"; color: var(--gold-2); flex: none; font-size: 13px; line-height: 1.6; }

/* Liên hệ */
.contact { padding: 18px 16px 8px; border-radius: var(--radius); background: rgba(255,255,255,.5); border: 1px solid var(--glass-brd); box-shadow: var(--shadow-sm); }
.contact--lookup { margin-top: 22px; }
.contact__title { margin: 0 4px 8px; font-family: var(--f-serif); font-weight: 600; font-size: 18px; color: var(--logo-brown); }
.contact__row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line);
  font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-decoration: none; }
#contactList .contact__row:first-child, #lookupContact .contact__row:first-child { border-top: 0; }
a.contact__row:active { background: rgba(239, 166, 64, .08); }
.contact__row b { color: var(--ink); font-weight: 600; }
.contact__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #FFF4E4, #F8E0C2); color: var(--gold-3); }
.contact__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.contact__row .contact__txt::after { content: " ›"; color: var(--ink-faint); }
.foot--member { margin-top: 22px; }

/* Thanh liên hệ cố định */
.cta {
  position: fixed; z-index: 20; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(calc(100% - 28px), 432px); display: flex; gap: 10px; padding: 8px; border-radius: 999px;
  background: rgba(255, 251, 246, .82); border: 1px solid var(--glass-brd); box-shadow: 0 16px 36px -14px rgba(90, 50, 20, .4);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: ctaIn .8s var(--ease-out) .4s both;
}
@keyframes ctaIn { from { opacity: 0; transform: translate(-50%, 30px); } }
.cta__btn { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 50%; background: #fff; color: var(--gold-3); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .2s; }
.cta__btn svg { width: 22px; height: 22px; }
.cta__btn--main { flex: 1; width: auto; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; font-weight: 600; font-size: 15px; background: var(--grad-gold); box-shadow: 0 10px 22px -10px rgba(217, 121, 42, .8); text-shadow: 0 1px 2px rgba(150, 70, 10, .3); }
.cta__btn:active { transform: scale(.95); }

/* Hiện dần khi cuộn */
.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal-up.in-view { opacity: 1; transform: none; }

/* Màn hình lớn */
@media (min-width: 760px) {
  .screen { padding-top: 40px; }
  .hero__script { font-size: 64px; }
  .hero__title { font-size: 30px; }
}

/* Giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal-up { opacity: 1; transform: none; }
}
