/* =========================================================
   CAREYOU VIP REWARDS — giao diện đen & vàng gold (khớp thẻ in)
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #0A0908;
  --bg-2: #14110E;
  --ink: #F3EADB;
  --ink-soft: #BFB19B;
  --ink-faint: #85796A;
  --line: rgba(217, 184, 120, .16);
  --line-strong: rgba(217, 184, 120, .32);
  --gold: #D9B878;
  --gold-hi: #F6E3B4;
  --gold-lo: #A8834A;
  --grad-gold: linear-gradient(135deg, #F6E3B4 0%, #D9B878 38%, #A8834A 70%, #E9CF94 100%);
  --grad-text: linear-gradient(100deg, #C9A462 0%, #F6E3B4 30%, #D9B878 55%, #F3DCA6 75%, #B8914F 100%);
  --on-gold: #1B140B;
  --surface: rgba(255, 246, 228, .045);
  --surface-2: rgba(255, 246, 228, .07);
  --ok: #9CC9A8;
  --warn: #F0B35A;
  --muted: #8E8478;
  --shadow-md: 0 18px 40px -16px rgba(0, 0, 0, .8);
  --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;
  --f-card: "Josefin Sans", "Century Gothic", "Futura", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--f-body); color: var(--ink); background: var(--bg);
  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; }
.gold-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nền ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 70% at 50% -10%, #241B12 0%, var(--bg) 55%, #070605 100%); }
.bg__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .28; animation: drift 20s ease-in-out infinite alternate; }
.bg__glow--1 { width: 380px; height: 380px; left: -160px; top: -100px; background: #B88A45; }
.bg__glow--2 { width: 320px; height: 320px; right: -170px; top: 38%; background: #8C6431; animation-delay: -7s; }
.bg__glow--3 { width: 280px; height: 280px; left: 15%; bottom: -150px; background: #A57E44; animation-delay: -13s; opacity: .2; }
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.12); } }
.bg__sparkles span {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, #FFF6DD 0%, #D9B878 50%, transparent 72%);
  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: .85; transform: translateY(-26px) scale(1); } }

/* ---------- Bố cục ---------- */
.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 ---------- */
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; }
.logo-full, .logo-icon {
  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: 92px; aspect-ratio: 480 / 623;
  background: linear-gradient(110deg, #B8914F 0%, #D9B878 38%, #FFF3D1 48%, #D9B878 58%, #B8914F 100%);
  background-size: 300% 100%; background-position: 100% 0;
  animation: logoShine 6s 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: 36px; aspect-ratio: 360 / 326; background: var(--grad-gold); }
.brand__txt { display: flex; flex-direction: column; gap: 2px; }
.wordmark { font-family: var(--f-card); font-weight: 400; letter-spacing: .26em; font-size: 15px; color: var(--gold-hi); }
.wordmark-sub { font-family: var(--f-card); font-size: 8px; letter-spacing: .5em; color: var(--ink-faint); }
.brand--small { flex-direction: row; align-items: center; gap: 9px; padding: 0; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 6px 0 4px; }
.script { font-family: var(--f-script); font-weight: 400; margin: 0; line-height: 1; }
.hero__script { font-size: 50px; padding: 0 10px 6px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 6px; }
.hero__title {
  margin: 2px 0 10px; font-family: var(--f-card); font-weight: 600; font-size: 21px; letter-spacing: .16em;
  background: var(--grad-text); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 7s linear infinite;
}
@keyframes textShine { to { background-position: 200% center; } }
.hero__sub { margin: 0 auto; max-width: 320px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* =========================================================
   THẺ VIP (xoay 3D) — dọc 54 × 86 mm
   ========================================================= */
.spin-stage {
  --w: clamp(170px, 46vw, 205px);
  position: relative; width: var(--w); aspect-ratio: 54 / 86; margin: 14px auto 8px;
  perspective: 1100px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.spin-stage--member { --w: clamp(200px, 58vw, 240px); margin-top: 18px; }
.spin-stage.is-dragging { cursor: grabbing; }
.vcard { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.vcard__face {
  position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 6.2% / 3.9%; background: #070707;
  box-shadow: 0 0 0 1px rgba(217, 184, 120, .22), 0 30px 50px -18px rgba(0,0,0,.95), 0 0 60px -20px rgba(217, 184, 120, .35);
}
.vcard__face--back { transform: rotateY(180deg); }
.vcard__face img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
/* Ánh ép kim lướt theo góc xoay */
.vcard__face::after {
  content: ""; position: absolute; inset: -40%; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 244, 214, .26) 48%, rgba(255,255,255,.08) 52%, transparent 60%);
  transform: translateX(calc(var(--sheen, 0) * 1%)); mix-blend-mode: screen;
}
/* Mặt sau: dựng lại giống thẻ in, điền tên + mã KH */
.vback {
  position: absolute; inset: 0; padding: 20% 12% 0 14%; text-align: left;
  font-family: var(--f-card); color: #F4EFE6; font-size: calc(var(--w) / 18.5);
}
.vback__label { font-size: 1.12em; font-weight: 400; letter-spacing: .03em; line-height: 1.1; }
.vback__sub { font-size: .72em; font-weight: 300; margin-top: .25em; letter-spacing: .02em; }
.vback__box {
  margin: .7em 0 1.45em; height: 2.15em; background: #FDF5E8; color: #1C150D;
  display: flex; align-items: center; padding: 0 .6em; font-weight: 600; font-size: .95em; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vback__box--id { letter-spacing: .32em; font-size: 1.05em; }
.vback__info { font-size: .7em; font-weight: 300; line-height: 1.45; letter-spacing: .03em; margin-bottom: 1.1em; }
.vback__info b { display: block; font-size: 1.55em; font-weight: 400; line-height: 1.15; margin-bottom: .1em; }

/* ---------- Kính mờ tối ---------- */
.glass {
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md); border-radius: var(--radius);
}

/* ---------- Form ---------- */
.lookup { margin-top: 20px; padding: 22px 20px 18px; display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field__label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.field__wrap { position: relative; }
.field__input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .35);
  font-size: 17px; font-weight: 500; letter-spacing: .03em; outline: none; color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.field__input::placeholder { color: #5E554A; font-weight: 400; }
.field__input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 184, 120, .14); }
.field__input.is-error { border-color: #D9705A; animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.field__input--secret { padding-right: 56px; }
.field__input--secret.is-hidden { -webkit-text-security: disc; text-security: disc; letter-spacing: .25em; }
.field__input--secret.is-hidden::placeholder { letter-spacing: .03em; }
.field__hint { font-size: 12.5px; color: var(--ink-faint); }
.field__hint b { color: var(--gold); font-weight: 500; }
.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); background: rgba(217, 184, 120, .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; }
.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); }

.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.check__box::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-gold); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked + .check__box { background: var(--grad-gold); border-color: transparent; }
.check input:checked + .check__box::after { opacity: 1; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(217,184,120,.3); }

.form-msg { margin: -2px 0 0; font-size: 13.5px; color: #F09A84; line-height: 1.5; }
.form-msg:empty { display: none; }
.form-msg a { color: var(--gold-hi); }

.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: .04em;
  transition: transform .2s var(--ease-out), box-shadow .25s, opacity .2s;
}
.btn--primary {
  color: var(--on-gold); background: var(--grad-gold); background-size: 180% 180%; overflow: hidden;
  box-shadow: 0 12px 28px -12px rgba(217, 184, 120, .7), inset 0 1px 0 rgba(255,255,255,.5);
  animation: gradMove 6s ease infinite;
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.55) 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%; } }
@keyframes sweep { 0%, 55% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
.btn:active { transform: scale(.97); }
.btn__spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(27,20,11,.3); border-top-color: var(--on-gold); display: none; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading { pointer-events: none; opacity: .9; }
@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); }
.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,.03); border: 1px dashed var(--line-strong); text-align: center; }
.demo-note b { color: var(--gold-hi); }
.foot { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 26px 0 4px; letter-spacing: .03em; }

/* =========================================================
   MÀN MỞ THẺ
   ========================================================= */
.reveal {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center;
  background: radial-gradient(80% 60% at 50% 42%, #2A2016 0%, #0A0908 70%);
}
.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; text-align: center; padding: 0 20px; }
.reveal__card { --w: clamp(190px, 54vw, 230px); position: relative; width: var(--w); aspect-ratio: 54 / 86; margin: 0 auto; perspective: 1300px; }
.reveal__card .vcard { transform: rotateY(180deg); }
.reveal.is-active .reveal__card .vcard { animation: revealFlip 2.3s var(--ease-out) both; }
@keyframes revealFlip {
  0%   { opacity: 0; transform: translateY(80px) scale(.55) rotateY(180deg) rotateX(16deg); }
  22%  { opacity: 1; transform: translateY(0) scale(.92) rotateY(180deg) rotateX(0); }
  42%  { transform: translateY(-6px) scale(.96) rotateY(180deg); }
  80%  { transform: translateY(-4px) scale(1.05) rotateY(-12deg); }
  100% { transform: translateY(0) scale(1) rotateY(0); }
}
.reveal__hello, .reveal__sub { opacity: 0; margin: 0; }
.reveal__hello { font-family: var(--f-script); font-size: 40px; margin-top: 26px; padding: 0 8px 4px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal__hello.is-long { font-size: 32px; line-height: 1.2; }
.reveal__sub { font-family: var(--f-card); font-size: 12px; letter-spacing: .28em; color: var(--ink-soft); margin-top: 8px; }
.reveal.is-active .reveal__hello { animation: riseIn .8s var(--ease-out) 1.6s both; }
.reveal.is-active .reveal__sub { animation: riseIn .8s var(--ease-out) 1.85s 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: 1px solid var(--line);
  background: rgba(255,255,255,.05); 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,.04); 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: 38px; padding: 0 8px 4px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello__name { margin: 4px 0 0; font-family: var(--f-serif); font-weight: 600; font-size: 25px; line-height: 1.3; color: var(--ink); }

.card-wrap { text-align: center; }
.card-hint { font-size: 11.5px; color: var(--ink-faint); margin: 16px 0 0; letter-spacing: .04em; }
.save-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(217, 184, 120, .08); color: var(--gold-hi);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s;
}
.save-btn:hover { background: rgba(217, 184, 120, .15); }
.save-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.panel { margin-top: 24px; padding: 24px 20px 18px; text-align: center; }
.panel__eyebrow { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.balance { margin: 8px 0 6px; font-family: var(--f-serif); font-weight: 700; font-size: clamp(36px, 11vw, 46px); line-height: 1.15;
  font-variant-numeric: tabular-nums; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.balance small { font-size: .5em; margin-left: 4px; font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line); }
.stat { padding: 14px 6px 4px; display: grid; gap: 5px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__label { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .03em; }
.stat__value { font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.earn { margin: 14px 0 0; padding: 11px 14px; border-radius: 14px; background: rgba(217, 184, 120, .08); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.earn b { color: var(--gold-hi); font-weight: 600; }
.updated { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-faint); }

/* Khối chi nhánh 2 */
.branch {
  position: relative; margin-top: 24px; padding: 22px 20px; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, #2A2016 0%, #15110C 55%, #0E0C0A 100%); border: 1px solid var(--line-strong);
}
.branch::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; aspect-ratio: 360 / 326; z-index: -1; opacity: .12;
  background: var(--grad-gold); -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat;
}
.branch__eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.branch__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(217,184,120,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(217,184,120,0); } 100% { box-shadow: 0 0 0 0 rgba(217,184,120,0); } }
.branch__title { margin: 10px 0 8px; font-family: var(--f-serif); font-size: 22px; font-weight: 600; line-height: 1.3; }
.branch__text { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.branch__btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--on-gold); background: var(--grad-gold); box-shadow: 0 10px 24px -12px rgba(217,184,120,.8); }
.branch__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.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; color: var(--ink); }
.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(--surface); border: 1px solid var(--line); }
.ring { position: relative; width: 74px; height: 74px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(217, 184, 120, .12); stroke-width: 6; }
.ring__fg { fill: none; stroke: url(#ringGrad); stroke-width: 6; 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; color: var(--gold-hi); }
.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: 15px; 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(156, 201, 168, .1); color: var(--ok); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--warn { background: rgba(240, 179, 90, .12); color: var(--warn); }
.chip--warn::before { animation: pulse 1.4s ease-in-out infinite; }
.chip--expired { background: rgba(142, 132, 120, .14); color: var(--muted); }
.chip--done { background: rgba(217, 184, 120, .12); color: var(--gold); }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .4; } }
.treat--expired { opacity: .65; }
.treat--expired .ring__fg { stroke: #6E655B; }
.empty { padding: 24px 20px; text-align: center; border-radius: 18px; background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.empty .script { font-size: 30px; display: block; margin-bottom: 6px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Thể lệ */
.rules { list-style: none; counter-reset: r; margin: 0; padding: 8px 18px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.rules li:first-child { border-top: 0; }
.rules li::before { content: counter(r, decimal-leading-zero); font-family: var(--f-serif); font-weight: 600; font-size: 15px; color: var(--gold); line-height: 1.5; }
/* Dòng ĐẶC BIỆT: khung vàng nổi bật */
.rules li.rules__special {
  counter-increment: none; grid-template-columns: 40px 1fr; align-items: center; margin: 6px -6px 10px; padding: 14px 14px;
  border: 1px solid var(--line-strong); border-radius: 16px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(246, 227, 180, .13), rgba(168, 131, 74, .06)); color: var(--ink);
}
.rules li.rules__special::before { content: none; }
.rules li.rules__special::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 240, 200, .14) 50%, transparent 65%);
  transform: translateX(-110%); animation: sweep 5s ease-in-out infinite 1s;
}
.rules__special p { margin: 0; }
.rules__special b { color: var(--gold-hi); font-weight: 700; letter-spacing: .04em; }
.rules__gift { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-gold); color: var(--on-gold); }
.rules__gift svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Liên hệ — cùng một cỡ & kiểu chữ */
.contact { padding: 18px 16px 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.contact--lookup { margin-top: 22px; }
.contact__title { margin: 0 4px 8px; font-family: var(--f-serif); font-weight: 600; font-size: 18px; color: var(--gold-hi); }
.contact__row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink-soft); text-decoration: none; }
.contact__list .contact__row:first-child { border-top: 0; }
a.contact__row:hover, a.contact__row:active { color: var(--ink); }
.contact__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(217, 184, 120, .1); color: var(--gold); }
.contact__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact__txt { flex: 1; }
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(20, 17, 14, .86); border: 1px solid var(--line-strong); box-shadow: 0 16px 36px -14px rgba(0,0,0,.9);
  -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: rgba(255,255,255,.06); color: var(--gold); text-decoration: none; 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: var(--on-gold); font-weight: 600; font-size: 15px; background: var(--grad-gold); }
.cta__btn:active { transform: scale(.95); }

/* Bảng hướng dẫn lưu thẻ */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); animation: fadeIn .25s ease both; }
.sheet__panel { position: relative; margin: 0 auto 14px; width: min(calc(100% - 24px), 440px); padding: 22px 20px 18px; background: #16130F; animation: sheetIn .45s var(--ease-out) both; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet__title { margin: 0 0 12px; font-family: var(--f-serif); font-size: 20px; color: var(--gold-hi); }
.sheet__body { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); }
.sheet__body ol { margin: 0; padding-left: 20px; }
.sheet__body li { margin: 6px 0; }
.sheet__body b { color: var(--ink); }
.sheet__ok { width: 100%; margin-top: 16px; }

/* 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; }

@media (min-width: 760px) {
  .screen { padding-top: 36px; }
  .hero__script { font-size: 58px; }
}
@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; }
}
