:root {
  --brand: #0f766e; --brand-2: #115e59; --bg: #f3f5f4; --card: #fff; --ink: #13201d; --muted: #66756f; --line: #e2e8e5;
  --ok: #15803d; --bad: #c0392b; --gold: #d4a017;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 6px 0 14px; } h2 { font-size: 17px; margin: 22px 0 10px; } h3 { margin: 0 0 4px; font-size: 16px; }
input, select { font: inherit; width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); margin-top: 5px; }
input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 13px 16px; background: var(--brand); color: #fff; cursor: pointer; width: 100%; }
.btn.light { background: #e8f1ef; color: var(--brand-2); }
.btn.sm { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; }
.link { color: var(--brand); font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; text-decoration: none; }
.err { color: var(--bad); min-height: 1.2em; font-size: 14px; }
.card { background: var(--card); border-radius: 16px; padding: 16px; border: 1px solid var(--line); }
.list > * + * { margin-top: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.hero { background: linear-gradient(160deg, var(--brand), var(--brand-2)); color: #fff; padding: 22px 16px 70px; }
.hero .wrap { padding: 0 0; }
.hello { font-size: 14px; opacity: .85; }
.hero h1 { color: #fff; margin: 2px 0 0; }
.mcard { margin: -56px auto 0; max-width: 528px; background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.12); position: relative; }
.mcard .tier { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; background: #eef6f4; color: var(--brand); }
.tier.Gold { background: #fcf3d9; color: #9a7208; } .tier.Platinum { background: #e9ecf3; color: #3d4b66; }
.pts { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 14px; text-align: center; }
.bc svg { width: 100%; height: 74px; }
.progress { height: 8px; background: #e8efec; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.quick a { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 4px; text-align: center; text-decoration: none; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.quick a span { display: block; font-size: 20px; color: var(--brand); margin-bottom: 4px; }

.promo { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.promo .band { padding: 16px; color: #fff; min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; }
.promo .band b { font-size: 18px; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.promo .body { padding: 12px 16px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.25); color: #fff; margin-bottom: 6px; width: fit-content; }
.tag.dark { background: #eef6f4; color: var(--brand); }

.reward { display: flex; gap: 14px; align-items: center; }
.reward .ic { width: 54px; height: 54px; border-radius: 14px; background: #eef6f4; color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.reward .grow { flex: 1; min-width: 0; }
.voucher { position: relative; border-left: 6px solid var(--brand); }
.voucher.used, .voucher.expired, .voucher.void { opacity: .55; border-left-color: #aab6b1; }
.code { font-family: Consolas, "Courier New", monospace; font-weight: 700; letter-spacing: .08em; }
.seg { display: flex; background: #e6ecea; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pos { color: var(--ok); font-weight: 700; } .neg { color: var(--bad); font-weight: 700; }
.store .map { display: block; width: 100%; height: 150px; border: 0; border-radius: 12px; margin-top: 10px; background: #e8efec; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
.tabs a { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); text-decoration: none; font-weight: 600; }
.tabs a span { display: block; font-size: 21px; line-height: 1.2; }
.tabs a.on { color: var(--brand); }

.auth { min-height: 100vh; background: linear-gradient(170deg, var(--brand), var(--brand-2) 55%, var(--bg) 55%); padding: 40px 16px; }
.auth .card { max-width: 420px; margin: 0 auto; padding: 24px; box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.auth .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 28px; margin-bottom: 12px; }
.auth-top { max-width: 420px; margin: 0 auto 18px; color: #fff; }
.auth-top h1 { color: #fff; margin: 0; font-size: 26px; }

.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; background: #13201d; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 60; font-size: 14px; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.msb { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.msb span { color: var(--muted); font-size: 13px; }
.msb.bad { background: #fdecea; border: 1px solid #f5c2bd; } .msb.bad b { color: var(--bad); }
.msb.warn { background: #fff6e0; border: 1px solid #f3dd9d; } .msb.warn b { color: #8a5a00; }
.msb.ok { background: #fff; border: 1px solid var(--line); }
.msb .btn { flex: none; }

.bday { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; border-radius: 16px; padding: 14px 16px; color: #fff;
  background: linear-gradient(135deg, #ec4899, #f59e0b); box-shadow: 0 10px 24px rgba(236,72,153,.25); }
.bday .cake { font-size: 34px; line-height: 1; }
.bday b { font-size: 16px; }

/* notifications */
.bell { position: relative; color: #fff; text-decoration: none; font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); flex: none; }
.bell i { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #ef4444; color: #fff; font-style: normal; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--brand); }
.nbanner { background: #eef6f4; border: 1px solid #cfe5e0; }
.notif { display: flex; gap: 12px; text-decoration: none; color: inherit; align-items: flex-start; }
.notif.unread { border-left: 4px solid var(--brand); background: #fbfefd; }
.notif .nic { font-size: 22px; line-height: 1.2; }
.tgl { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); font-size: 14px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
.tgl:last-child { border-bottom: 0; }
.tgl input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: #cfd8d5; position: relative; flex: none; margin: 0; padding: 0; border: 0; cursor: pointer; transition: background .15s; }
.tgl input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.tgl input:checked { background: var(--brand); } .tgl input:checked::after { left: 21px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: 15px; }
.step .num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }

/* lucky draw */
.ldhome { display: flex; gap: 12px; align-items: center; margin-top: 14px; border-radius: 16px; padding: 14px 16px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 10px 24px rgba(124,58,237,.25); }
.ldhome .ic { font-size: 30px; } .ldhome span { font-size: 13.5px; opacity: .95; } .ldhome .go { font-weight: 700; white-space: nowrap; }
.ldcamp { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 16px; }
.ldimg { width: calc(100% + 32px); margin: -16px -16px 12px; border-radius: 18px 18px 0 0; max-height: 180px; object-fit: cover; display: block; }
.ldphase { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7c3aed; background: #f3e8ff; padding: 2px 9px; border-radius: 99px; }
.ldstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ldstats div { background: #f6f3ff; border-radius: 12px; padding: 10px 6px; text-align: center; }
.ldstats b { display: block; font-size: 24px; color: #6d28d9; } .ldstats span { font-size: 12px; color: var(--muted); }
.ldsec { margin: 18px 0 8px; }
.ldprize { display: flex; gap: 12px; align-items: flex-start; }
.ldprize img, .ldprize .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: #f3e8ff; display: grid; place-items: center; font-size: 28px; }
.ldcat { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #7c3aed; }
.ldwinners { margin-top: 6px; font-size: 13px; background: #fffbeb; border-radius: 8px; padding: 6px 8px; }
.ldwon { margin-top: 12px; background: linear-gradient(135deg, #fef3c7, #fde68a); border-radius: 12px; padding: 12px; font-size: 14px; }
.ldticket { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ldticket:last-child { border-bottom: 0; }
.tno { font-family: Consolas, "Courier New", monospace; font-weight: 700; letter-spacing: .03em; }
.lden { font-size: 13px; color: #6d28d9; margin-top: 2px; }
.ldst { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.st-a { background: #eff6ff; color: #1d4ed8; } .st-e { background: #f3e8ff; color: #6d28d9; } .st-w { background: #fef3c7; color: #92400e; }
.st-n { background: #f1f5f9; color: #64748b; } .st-v { background: #fee2e2; color: #b91c1c; text-decoration: line-through; }
.ldall { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; }
.ldall input, .ldpick input { width: auto; margin: 0; }
.ldpick { max-height: 45vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.ldpick label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; margin: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 15px; }

.msb.legend { background: linear-gradient(135deg, #fff4d6, #f6d98a); border: 1px solid #e2b94a; color: #4a3500; }
.tag.legend { background: linear-gradient(135deg, #f6d365, #d4a017) !important; color: #3b2a00 !important; }
.mcard .tier.legend { background: linear-gradient(135deg, #f6d365, #d4a017); color: #3b2a00; }
/* v2.64 "open in your browser" bar (in-app browsers / QR scanner previews) */
.ext-bar { position: sticky; top: 0; z-index: 50; display: flex; gap: 10px; align-items: center; background: #1f2937; color: #fff; padding: 10px 12px; font-size: 13px; }
.ext-bar div { flex: 1; } .ext-bar span { opacity: .85; }
.ext-bar button { border: 0; border-radius: 10px; padding: 9px 12px; font: inherit; font-weight: 700; background: var(--brand, #0f766e); color: #fff; white-space: nowrap; }
.ext-bar a { color: #fff; text-decoration: none; opacity: .7; padding: 4px; }
/* v2.69: not-yet-activated members — pages blurred behind an "Activate" card */
.pl-zone { position: relative; min-height: 340px; margin-top: 14px; }
.pl-zone.page { margin-top: 0; }
.pl-blur { filter: blur(6px); opacity: .55; pointer-events: none; user-select: none; -webkit-user-select: none; }
.pl-lock { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: min(92%, 380px); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 18px; padding: 20px 18px; text-align: center; box-shadow: 0 14px 40px rgba(0,0,0,.16); z-index: 3; }
.pl-zone.page .pl-lock { position: fixed; top: 22%; }
.pl-lock h3 { font-size: 18px; color: var(--brand); margin: 4px 0 6px; }
.pl-lock p { font-size: 14px; margin: 0 0 14px; }
.pl-ic { font-size: 30px; }
/* v2.71 store photos */
.store.has-photos { padding-top: 0; overflow: hidden; }
.sphotos { position: relative; margin: 0 -16px 12px; }
.sphotos .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sphotos .track::-webkit-scrollbar { display: none; }
.sphotos img { flex: 0 0 100%; width: 100%; aspect-ratio: 16/10; object-fit: cover; scroll-snap-align: center; display: block; cursor: zoom-in; background: #e8efec; }
.sphotos .count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; pointer-events: none; }
.pviewer { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.pviewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pviewer button { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; }
/* v3.14 guest mode */
.gjoin h3 { font-size: 18px; margin: 2px 0 8px; }
.gjoin ul { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 7px; font-size: 14.5px; }
.glock { display: block; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 9%, #fff); color: var(--brand-2); text-decoration: none; font-size: 13.5px; }
