/* ============================================================
   CMPOS Member – site.css
   Mobile-first. Max-width phone shell on large screens.
   -webkit- prefixes for old Android / iOS WebViews.
   No :has(), no inset shorthand, aspect-ratio fallback.
   ============================================================ */

/* ── @font-face (self-hosted) ──────────────────────────────── */
/*@font-face {
  font-family: 'Noto Sans Thai';
  font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSansThai-Regular.ttf') format('ttf'),
       url('../fonts/NotoSansThai-Regular.ttf')  format('ttf');
}*/
/*@font-face {
  font-family: 'Noto Sans Thai';
  font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSansThai-Medium.ttf') format('ttf'),
       url('../fonts/NotoSansThai-Medium.ttf')  format('ttf');
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-weight: 600; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSansThai-SemiBold.ttf') format('ttf'),
       url('../fonts/NotoSansThai-SemiBold.ttf')  format('ttf');
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-weight: 700; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSansThai-Bold.ttf') format('ttf'),
       url('../fonts/NotoSansThai-Bold.ttf')  format('ttf');
}*/
/*@font-face {
  font-family: 'Noto Sans';
  font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSans-Regular.ttf') format('ttf'),
       url('../fonts/NotoSans-Regular.ttf')  format('ttf');
}*/
/*@font-face {
  font-family: 'Noto Sans';
  font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSans-Medium.ttf') format('ttf'),
       url('../fonts/NotoSans-Medium.ttf')  format('ttf');
}
@font-face {
  font-family: 'Noto Sans';
  font-weight: 600; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSans-SemiBold.ttf') format('ttf'),
       url('../fonts/NotoSans-SemiBold.ttf')  format('ttf');
}
@font-face {
  font-family: 'Noto Sans';
  font-weight: 700; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSans-Bold.ttf') format('ttf'),
       url('../fonts/NotoSans-Bold.ttf')  format('ttf');
}
@font-face {
  font-family: 'Noto Sans';
  font-weight: 800; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSans-ExtraBold.ttf') format('ttf'),
       url('../fonts/NotoSans-ExtraBold.ttf')  format('ttf');
}*/
@font-face {
  font-family: 'Kanit';
  font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/Kanit-Regular.ttf') format('truetype');
}

/* ── Design tokens — defined in custom-site.css ────────────── */

/* ── Reset ──────────────────────────────────────────────────── */
*, *:before, *:after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  /* Default: navy — matches auth screens so any gap is seamless */
  background: var(--navy);
}
/* Member pages override body to white so the member shell is seamless */
body.member-body { background: var(--home-bg); }
input, select, button, textarea { font-family: inherit; }

/* ════════════════════════════════════════════════════════════
   PHONE SHELL  —  centred column, max 480 px
   On mobile (≤ 480 px) it is invisible; on desktop it creates
   the "app in a phone frame" appearance.
   ════════════════════════════════════════════════════════════ */
.phone-shell {
  max-width: var(--shell-max);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 481px) {
  .phone-shell {
    /* Soft glow / edge visible against the dark backdrop */
    -webkit-box-shadow:
      0 0 0 1px rgba(255,255,255,.07),
      0 32px 96px -16px rgba(0,0,0,.55);
            box-shadow:
      0 0 0 1px rgba(255,255,255,.07),
      0 32px 96px -16px rgba(0,0,0,.55);
  }
}

/* ── Auth screen (navy bg, flex column) ────────────────────── */
.auth-screen {
  /*
   * Use both height AND min-height.
   * height:100vh gives flex children a concrete value to stretch against
   * (flex:1 only works with an explicit height, not min-height alone —
   * known bug in Chrome < 84 and all WebKit/old Android WebViews).
   * min-height ensures the screen never clips on very tall content.
   */
  height: 100vh!important;
  height: -webkit-fill-available;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: var(--navy);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  padding-top: env(safe-area-inset-top);
  /* bottom padding removed — .powered handles safe-area via padding-bottom */
}

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 14px 20px 6px;
  position: relative;
  z-index: 10;
}
.topbar-spacer { width: 36px; }
.iconbtn {
  width: 36px; height: 36px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  color: #fff; background: rgba(255,255,255,.1); border: none;
  border-radius: 10px; cursor: pointer; padding: 0;
  -webkit-transition: background .15s; transition: background .15s;
}
.iconbtn:hover { background: rgba(255,255,255,.18); }
.lang-pill {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff; font-size: 13px; font-weight: 500;
  cursor: pointer; background: rgba(255,255,255,.08);
  font-family: var(--font-family);
  text-decoration: none;
  -webkit-transition: background .15s; transition: background .15s;
}
.lang-pill:hover { background: rgba(255,255,255,.16); }

/* ── Logo image (login page) ─────────────────────────────────── */
.logo {
  display: block;
  width: 40vw;
  max-width: 170px;
  height: auto;
  margin: 0 auto;
}
.logo-tile {
  text-align: center;
}
/* 40 % of the viewport width on mobile; cap at 192 px on wider shells */
.logo-tile-img {
  display: block;
  width: 30vw;
  max-width: 150px;
  height: auto;
  margin: 0 auto;
}

/* ── Screen title ─────────────────────────────────────────────── */
.screen-title {
  color: #fff; text-align: center; font-size: 20px; font-weight: 700;
  margin: 10px 0 16px; font-family: var(--font-family);
}

/* ── Powered by footer ───────────────────────────────────────── */
.powered {
  /* margin-top: auto pushes this to the bottom of the auth-screen
     flex column regardless of how short the page content is */
  margin-top: auto;
  text-align: center; font-family: var(--font-family);
  font-size: 10.5px; letter-spacing: .04em;
  color: rgba(255,255,255,.55); padding: 0px;
  /* Safe area for devices with a home indicator */
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.powered strong { font-weight: 700; color: rgba(255,255,255,.72); }

/* ── Scrollable area ─────────────────────────────────────────── */
.page-scroll {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  /* Flex column so inner .center-col can expand and justify-content:center works */
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
}
.page-scroll::-webkit-scrollbar { width: 0; }

/* ── Center column ───────────────────────────────────────────── */
.center-col {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  
}
.center-col.top {
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
  padding-top: 50px;
}

/* ── White card ──────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: 24px; padding: 28px 22px;
  -webkit-box-shadow: 0 20px 48px -16px rgba(8,22,52,.38);
          box-shadow: 0 20px 48px -16px rgba(8,22,52,.38);
  width: 90%;
}

/* ── Card lead text ──────────────────────────────────────────── */
.card-lead {
  text-align: center; color: var(--ink); font-size: 22px;
  line-height: 1.75; margin: 0 0 20px; font-weight: 500;
}
.card-lead.sm { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.card-lead .hl {
  color: var(--maincolor); font-weight: 600;
  font-family: var(--font-family); letter-spacing: .02em;
}

/* ── Form field (Bootstrap-style with leading icon) ──────────── */
.field {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0 12px;
  height: 38px;
  margin-bottom: 12px;
  position: relative;
  -webkit-transition: border-color .15s ease-in-out;
          transition: border-color .15s ease-in-out;
}
    .field.disabled {
        background: var(--disabled);
    }
.field:focus-within {
  border-color: var(--maincolor);
}

.field svg {
  color: #6c757d;
  -ms-flex-negative: 0; flex-shrink: 0;
  margin-right: 10px;
}
.field input, .field select {
  border: none; background: none; outline: none;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  width: 100%; height: 100%;
  font-family: var(--font-family);
  font-size: 15px;
  color: #212529;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.field input::placeholder { color: #adb5bd; }
.field select { cursor: pointer; padding-right: 28px; }
.field select.unset { color: #adb5bd; }
.field-sel-wrap {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  position: relative;
}
.field-sel-wrap select { width: 100%; }

/* ── Bootstrap-style standalone select ──────────────────────── */
.form-select {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  font-family: var(--font-family);
  font-size: 15px;
  color: #212529;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  outline: none;
  -webkit-transition: border-color .15s ease-in-out;
          transition: border-color .15s ease-in-out;
  box-sizing: border-box;
}
.form-select:focus { border-color: var(--maincolor); }
.form-select.unset { color: #adb5bd; }
.form-select.mb-16 { margin-bottom: 16px; }
.field .chev {
  position: absolute; right: 10px;
  color: #6c757d; pointer-events: none;
  margin-right: 0;
}
.field.mb-0  { margin-bottom: 0; }
.field.mb-15 { margin-bottom: 15px; }
.field.mb-16 { margin-bottom: 16px; }

/* ── Birthday triple ─────────────────────────────────────────── */
.triple {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  margin-bottom: 12px;
  gap: 8px;
}
.bday-cell {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
}
.bday-sub {
  font-family: var(--font-family);
  font-size: 11px; font-weight: 600;
  color: var(--muted); letter-spacing: .03em;
  margin-bottom: 5px; padding-left: 2px;
}
/* Bootstrap-select style wrapper */
.bday-select-wrap {
  position: relative;
}
.bday-select-wrap select {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 32px 0 10px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  -webkit-transition: border-color .15s ease-in-out;
          transition: border-color .15s ease-in-out;
}
.bday-select-wrap select:focus {
  border-color: var(--maincolor);
}
.bday-select-wrap select:hover {
  border-color: #adb5bd;
}
.bday-chev {
  position: absolute;
  top: 50%; right: 10px;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  pointer-events: none;
  color: #6c757d;
}

/* ── Section label ───────────────────────────────────────────── */
.field-label {
  font-family: var(--font-family); font-weight: 700;
  font-size: 13px; color: var(--muted); letter-spacing: .04em;
  /*text-transform: uppercase;*/ 
  margin: 6px 0 8px;
}

/* ── Checkbox row ────────────────────────────────────────────── */
.check-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  cursor: pointer; font-size: 14px; color: var(--ink);
  font-family: var(--font-family); margin: 6px 0;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  min-height: 44px; /* touch target */
}
.check-row input[type="checkbox"] { display: none; }
.check-box {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--maincolor);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -ms-flex-negative: 0; flex-shrink: 0;
  -webkit-transition: background .12s, border-color .12s;
          transition: background .12s, border-color .12s;
  border: 1.5px solid var(--maincolor);
  margin-right: 12px;
}
.check-box svg { color: #fff; display: block; }
.check-row.unchecked .check-box { background: #fff; border-color: var(--field-line); }
.check-row.unchecked .check-box svg { opacity: 0; }

/* ── Primary button ──────────────────────────────────────────── */
.btn {
  display: block; width: 100%; height: 45px; border: none;
  border-radius: 14px; cursor: pointer;
  font-family: var(--font-family); font-size: 16px; font-weight: 600;
  color: #fff; background: var(--maincolor);
  -webkit-transition: background .15s, -webkit-transform .1s;
          transition: background .15s, transform .1s;
  margin-top: 16px; text-align: center; line-height: 45px; padding: 0;
}
.btn:hover  { background: var(--maincolor); }
.btn:active { -webkit-transform: translateY(1px); transform: translateY(1px); }
.btn:disabled, .btn.disabled {
  background: var(--disabled); color: #fff;
  cursor: default; -webkit-transform: none; transform: none;
}
.btn:disabled:hover, .btn.disabled:hover { background: var(--disabled); }

/* Secondary / decline action — same metrics as .btn, no fill */
.btn-ghost {
    display: block;
    width: 100%;
    height: 45px;
    background: #ffffff;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 8px;
    text-align: center;
    line-height: 45px;
    padding: 0;
    border: 1px solid #c3c3c3;
    border-radius: 14px;
}
.btn-ghost:active { -webkit-transform: translateY(1px); transform: translateY(1px); }

/* ── Validation / error ──────────────────────────────────────── */
.field-error { color: #d63031; font-size: 12px; margin: -8px 0 10px 4px; display: block; }
.alert-error {
  background: #fff3f3; border: 1px solid #f5c6c6;
  border-radius: 12px; color: #c0392b;
  font-size: 14px; padding: 14px 16px; margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Consent modal ───────────────────────────────────────────── */
.consent-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.50);
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  z-index: 300;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 20px;
}
.consent-modal-backdrop.open {
  display: -webkit-box; display: -ms-flexbox; display: flex;
}
.consent-modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 420px;
  max-height: 82vh;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-shadow: 0 24px 64px -16px rgba(0,0,0,.45);
          box-shadow: 0 24px 64px -16px rgba(0,0,0,.45);
  -webkit-animation: modalIn .22s ease; animation: modalIn .22s ease;
}
.consent-modal-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #f0f0f0;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.consent-modal-title {
  font-family: var(--font-family);
  font-size: 15px; font-weight: 700; color: var(--ink);
}
.consent-modal-close {
  width: 32px; height: 32px; border: none; background: var(--field-bg);
  border-radius: 8px; cursor: pointer; padding: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  color: var(--muted); -ms-flex-negative: 0; flex-shrink: 0;
  -webkit-transition: background .15s; transition: background .15s;
}
.consent-modal-close:hover { background: var(--field-line); }
.consent-modal-body {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 18px;
}
.consent-modal-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid #f0f0f0;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.consent-modal-cancel {
  display: block; width: 100%; height: 40px; border: none;
  border-radius: 10px; cursor: pointer; margin-top: 8px;
  font-family: var(--font-family); font-size: 14px; font-weight: 500;
  color: var(--ink-soft); background: var(--field-bg);
  -webkit-transition: background .15s; transition: background .15s;
}
.consent-modal-cancel:hover { background: var(--field-line); }

/* ── Language modal ──────────────────────────────────────────── */
.lang-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.lang-modal-backdrop.open {
  display: -webkit-box; display: -ms-flexbox; display: flex;
}
.lang-modal {
  background: #fff; border-radius: 20px;
  padding: 24px 20px;
  width: calc(100% - 48px); max-width: 360px;
  -webkit-animation: modalIn .22s ease; animation: modalIn .22s ease;
  -webkit-box-shadow: 0 20px 60px -12px rgba(0,0,0,.45);
          box-shadow: 0 20px 60px -12px rgba(0,0,0,.45);
}
@-webkit-keyframes modalIn {
  from { opacity: 0; -webkit-transform: scale(.93); transform: scale(.93); }
  to   { opacity: 1; -webkit-transform: scale(1);   transform: scale(1); }
}
@keyframes modalIn {
  from { opacity: 0; -webkit-transform: scale(.93); transform: scale(.93); }
  to   { opacity: 1; -webkit-transform: scale(1);   transform: scale(1); }
}
.lang-modal-title {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--muted); letter-spacing: .04em; margin-bottom: 14px;
  font-family: var(--font-family);
}
.lang-option {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  width: 100%; background: var(--field-bg); border: 1.5px solid var(--field-line);
  border-radius: 14px; padding: 0 16px; height: 52px; cursor: pointer;
  font-family: var(--font-family); font-size: 16px; color: var(--ink);
  margin-bottom: 10px;
  -webkit-transition: border-color .15s; transition: border-color .15s;
}
.lang-option:hover { border-color: var(--navy); }
.lang-flag { font-size: 20px; margin-right: 12px; }
.lang-name { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; text-align: left; font-weight: 500; }
.lang-check { color: var(--maincolor); -ms-flex-negative: 0; flex-shrink: 0; }
.lang-modal-cancel {
  display: block; width: 100%; height: 45px; border: none;
  border-radius: 14px; cursor: pointer; margin-top: 4px;
  font-family: var(--font-family); font-size: 15px; font-weight: 500;
  color: var(--ink-soft); background: var(--field-bg);
  -webkit-transition: background .15s; transition: background .15s;
}
.lang-modal-cancel:hover { background: var(--field-line); }

/* ════════════════════════════════════════════════════════════
   SPLASH
   ════════════════════════════════════════════════════════════ */
.splash-logo {
  -webkit-animation: floatLogo 3.5s ease-in-out infinite;
          animation: floatLogo 3.5s ease-in-out infinite;
}
@-webkit-keyframes floatLogo {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50%       { -webkit-transform: translateY(-8px); transform: translateY(-8px); }
}
@keyframes floatLogo {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50%       { -webkit-transform: translateY(-8px); transform: translateY(-8px); }
}
.splash-dots {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  margin-top: 32px;
}
.splash-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  -webkit-animation: pulse 1.2s infinite; animation: pulse 1.2s infinite;
  display: block; margin-right: 8px;
}
.splash-dots span:last-child { margin-right: 0; }
.splash-dots span:nth-child(2) { -webkit-animation-delay: .2s; animation-delay: .2s; }
.splash-dots span:nth-child(3) { -webkit-animation-delay: .4s; animation-delay: .4s; }
@-webkit-keyframes pulse {
  0%, 100% { opacity: .3; -webkit-transform: scale(.85); transform: scale(.85); }
  50%       { opacity: 1;  -webkit-transform: scale(1);   transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: .3; -webkit-transform: scale(.85); transform: scale(.85); }
  50%       { opacity: 1;  -webkit-transform: scale(1);   transform: scale(1); }
}

/* ════════════════════════════════════════════════════════════
   OTP
   ════════════════════════════════════════════════════════════ */
.otp-timer {
  text-align: center; font-family: var(--font-family);
  font-weight: 700; color: var(--maincolor); font-size: 20px;
  letter-spacing: .06em; margin: 8px 0 18px;
}
.otp-boxes {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin-bottom: 20px;
}
.otp-input {
  -webkit-box-flex: 1; -ms-flex: 1 1 46px; flex: 1 1 46px;
  max-width: 46px; min-width: 0;
  height: 46px; border-radius: 12px;
  border: 1.5px solid var(--field-line); background: var(--field-bg);
  text-align: center; font-size: 22px; font-weight: 700;
  color: var(--ink); font-family: var(--font-family);
  outline: none; margin-right: 6px;
  -webkit-transition: border .12s, -webkit-box-shadow .12s;
          transition: border .12s, box-shadow .12s;
  -webkit-appearance: none;
}
.otp-input:last-child { margin-right: 0; }
.otp-input:focus {
  border-color: var(--navy); background: #fff;
}
.otp-resend {
  text-align: center; font-size: 14px;
  color: var(--ink-soft); margin-bottom: 18px; line-height: 1.6;
}
.otp-resend button {
  color: var(--maincolor); font-weight: 600; cursor: pointer;
  background: none; border: none; font-size: 14px;
  font-family: var(--font-family); padding: 0;
  min-height: 44px; /* touch target */
}
.otp-resend button.is-locked,
.otp-resend button:disabled {
  color: var(--ink-soft); cursor: not-allowed; opacity: .55;
}

/* ════════════════════════════════════════════════════════════
   MEMBER SCREENS
   ════════════════════════════════════════════════════════════ */
.member-screen {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: var(--home-bg);
  /* Bottom padding for fixed nav: 64px height + 14px gap + extra */
  padding-bottom: 96px;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ── Home header ──────────────────────────────────────────── */
.home-header {
    background: -webkit-linear-gradient(160deg, #132E6A 0%, var(--navy-2) 100%);
    background: linear-gradient(160deg, #132E6A 0%, var(--navy-2) 100%);
    padding: 10px 20px 50px;
    border-radius: 0 0 28px 28px;
    position: relative;
}
    .home-header.mcard {
        padding: 10px 20px 16px!important;
    }
.home-toplogo {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  justify-content: flex-start;color: white;padding: 5px 0 5px 0;
}
.home-toplogo > span{    font-size: 20px;}
.home-toplogo .logo .cm  { font-size: 14px; border-width: 2px; padding: 2px 3px 1px; }
.home-toplogo .logo .pos { font-size: 14px; margin-left: 3px; }

/* ── Membership card ──────────────────────────────────────── */
.member-card {
  position: relative; z-index: 2;
  margin: -46px 10px 0;
  background: -webkit-linear-gradient(135deg, #1a1f2e 0%, #0d1117 100%);
  background:         linear-gradient(135deg, #1a1f2e 0%, #0d1117 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px; padding: 10px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-shadow: 0 20px 40px -12px rgba(0,0,0,.55);
          box-shadow: 0 20px 40px -12px rgba(0,0,0,.55);
}
    .member-card.mcard {
        margin: 0px 10px 0;
        background: none !important;
        background-color: transparent !important;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        border-bottom: 1px solid #c3c3c3;
        border-radius: 0px!important;
    }
.avatar-ph {
  width: 62px; height: 62px; border-radius: 31px;
  -ms-flex-negative: 0; flex-shrink: 0;
  background: #2a2f3e; border: 1.5px solid rgba(255,255,255,.08);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  overflow: hidden; margin-right: 14px;
}
.avatar-ph img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ph.mcard{border-radius: 31px!important;}
.member-meta { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; color: #fff; min-width: 0; }
.member-meta .name {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-meta .name.mcard{color:black!important;}
.member-meta .tier {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  font-family: var(--font-family); font-size: 11px;
  background: rgba(255,255,255,.12); border-radius: 6px;
  padding: 2px 8px; font-weight: 600; letter-spacing: .04em;
  margin-top: 4px; color: #e0e6f0; text-transform: uppercase;
}
.member-meta .pts {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  font-size: 13px; margin-top: 7px; color: #fff;
}
.member-meta .pts.mcard{color:black!important;}
.coin {
  width: 16px; height: 16px;
  background-image: url('/images/ic-point.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  font-size: 0; line-height: 0; color: transparent;
  margin-right: 6px;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.qr-tile {
  width: 58px; height: 58px; border-radius: 12px;
  background: #fff;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -ms-flex-negative: 0; flex-shrink: 0; cursor: pointer; color: #000;
  margin-left: 14px;
  -webkit-transition: opacity .15s; transition: opacity .15s;
}
.qr-tile:hover { opacity: .85; }

/* ── Promo / privilege grid ───────────────────────────────── */
.promo-grid {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  padding: 20px 16px 12px;
}
.promo-item {
  width: calc(50% - 6px); margin-bottom: 12px;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  -webkit-transition: -webkit-transform .15s, -webkit-box-shadow .15s;
          transition: transform .15s, box-shadow .15s;
  display: block; text-decoration: none;
  border: 1px solid #dde2e9;
  background: -webkit-repeating-linear-gradient(135deg, #dfe4ea 0 10px, #e7ebf0 10px 20px);
  background:         repeating-linear-gradient(135deg, #dfe4ea 0 10px, #e7ebf0 10px 20px);
  position: relative;
}
.promo-item:nth-child(odd)  { margin-right: 12px; }
.promo-item:nth-child(even) { margin-right: 0; }
@supports (display: grid) {
  .promo-grid {
    display: -ms-grid; display: grid;
    -ms-grid-columns: 1fr 12px 1fr; grid-template-columns: 1fr 1fr;
    gap: 12px; -ms-flex-wrap: initial; flex-wrap: initial;
  }
  .promo-item { width: auto; margin: 0 !important; }
}
/* aspect-ratio 1:1 — fallback for old WebViews */
.promo-item::before { content: ""; display: block; padding-top: 100%; }
@supports (aspect-ratio: 1 / 1) {
  .promo-item { aspect-ratio: 1 / 1; }
  .promo-item::before { display: none; }
}
.promo-item img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.promo-item:hover {
  -webkit-transform: translateY(-2px); transform: translateY(-2px);
  -webkit-box-shadow: 0 12px 24px -10px rgba(14,42,94,.3);
          box-shadow: 0 12px 24px -10px rgba(14,42,94,.3);
}

/* ── Section heading inside member screens ────────────────── */
.section-head {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 20px 16px 4px;
  font-size: 15px; font-weight: 700; color: var(--ink);
}
.section-head a { font-size: 13px; font-weight: 500; color: var(--maincolor); text-decoration: none; }

/* ── Home Slider ──────────────────────────────────────────── */
.home-slider {
  margin: 16px 0 0;
  padding: 0 12px;
  position: relative;
}
.slider-viewport {
  overflow: hidden;
  border-radius: 14px;
}
.slider-track {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: -webkit-transform .35s cubic-bezier(.4,0,.2,1);
          transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.slider-slide {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 100%;
          flex: 0 0 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  /* 4:1 aspect ratio fallback */
  padding-top: 25%;
}
@supports (aspect-ratio: 4/1) {
  .slider-slide { padding-top: 0; aspect-ratio: 4/1; }
}
/* anchor fills the slide; img fills the anchor */
.slider-slide a {
  position: absolute; top: 0; left: 0;
  display: block; width: 100%; height: 100%;
}
.slider-slide img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
@supports (aspect-ratio: 4/1) {
  .slider-slide a  { position: static; width: 100%; height: 100%; display: block; }
  .slider-slide img { position: static; width: 100%; height: 100%; object-fit: cover; }
}
.slider-dots {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}
.slider-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--field-line);
  -webkit-transition: background .2s, width .2s;
          transition: background .2s, width .2s;
  cursor: pointer;
}
.slider-dot.active {
  background: var(--navy);
  width: 18px;
  border-radius: 3px;
}

/* ── Brand filter chips (Home) ─────────────────────────────── */
.brand-filter {
  padding: 16px 12px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.brand-filter::-webkit-scrollbar { display: none; }
.brand-filter-track {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 10px;
}
.brand-chip {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  width: 68px; height: 68px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  background: #fff;
  border: 1.5px solid var(--field-line);
  border-radius: 16px;
  cursor: pointer;
  padding: 0px;
  -webkit-appearance: none; appearance: none;
  -webkit-transition: border-color .15s, box-shadow .15s;
          transition: border-color .15s, box-shadow .15s;
}
.brand-chip.active {
  border-color: var(--navy);
  -webkit-box-shadow: 0 0 0 1px var(--navy);
          box-shadow: 0 0 0 1px var(--navy);
}

/* Member/Privileges brand filter — wraps 5-per-row, responsive, instead
   of horizontal-scrolling. Scoped to #privBrandFilter only; any other
   .brand-filter keeps the original horizontal-scroll, fixed-size chips. */
#privBrandFilter { overflow-x: visible; }
#privBrandFilter .brand-filter-track {
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}
#privBrandFilter .brand-chip {
  -webkit-box-flex: 0; -ms-flex: 0 1 calc((100% - 40px) / 5); flex: 0 1 calc((100% - 40px) / 5);
  width: calc((100% - 40px) / 5);
  height: 64px; /* fallback for browsers without aspect-ratio support */
}
@supports (aspect-ratio: 1/1) {
  #privBrandFilter .brand-chip { height: auto; aspect-ratio: 1/1; }
}

/* Member/Home brand filter — sized so 5 chips fit per screen width
   (responsive), single row, horizontal scroll for any beyond that. */
#brandFilter .brand-chip {
  -webkit-box-flex: 0; -ms-flex: 0 0 calc((100% - 40px) / 5); flex: 0 0 calc((100% - 40px) / 5);
  width: calc((100% - 40px) / 5);
  height: 64px; /* fallback for browsers without aspect-ratio support */
}
@supports (aspect-ratio: 1/1) {
  #brandFilter .brand-chip { height: auto; aspect-ratio: 1/1; }
}
.brand-chip-icon {
  display: -ms-grid; display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 18px; height: 18px;
  margin-bottom: 4px;
}
.brand-chip-icon span {
  background: var(--navy);
  border-radius: 2px;
}
.brand-chip-label {
  font-size: 11px; font-weight: 600; color: var(--ink);
  text-align: center; line-height: 1.2;
  font-family: var(--font-family);
}
.brand-chip img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

/* ── Brand picker (Member/Brand) ───────────────────────────── */
.brand-header-title {
  font-size: 17px; font-weight: 700; color: var(--ink);
  text-align: center;
  font-family: var(--font-family);
  margin: 18px 16px 4px;
}
.brand-grid {
  display: -ms-grid; display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
  padding: 16px 35px 24px;
}
.brand-card {
  display: block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  -webkit-box-shadow: 0 6px 16px -8px rgba(8,22,52,.25);
          box-shadow: 0 6px 16px -8px rgba(8,22,52,.25);
  /* 1:1 fallback */
  padding-top: 100%;
}
@supports (aspect-ratio: 1/1) {
  .brand-card { padding-top: 0; aspect-ratio: 1/1; }
}
.brand-card img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
@supports (aspect-ratio: 1/1) {
  .brand-card img { position: static; width: 100%; height: 100%; }
}

/* ── Stories grid (2-col) ─────────────────────────────────── */
.stories-grid {
  display: -ms-grid; display: grid;
  -ms-grid-columns: 1fr 8px 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 12px 4px;
}
.story-item {
  display: block; border-radius: 14px; overflow: hidden;
  text-decoration: none; position: relative;
  background: var(--field-bg);
  /* 1:1 fallback */
  padding-top: 100%;
}
@supports (aspect-ratio: 1/1) {
  .story-item { padding-top: 0; aspect-ratio: 1/1; }
}
.story-item img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
  -webkit-transition: -webkit-transform .2s; transition: transform .2s;
}
@supports (aspect-ratio: 1/1) {
  .story-item img {
    position: static;
    width: 100%; height: 100%; display: block;
  }
}
.story-item:hover img { -webkit-transform: scale(1.03); transform: scale(1.03); }

/* ── Contact page ─────────────────────────────────────────── */
.contact-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.06);
          box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.contact-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 15px 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid #f3f4f6;
  -webkit-tap-highlight-color: transparent;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:active { background: #f9fafb; }
.contact-row--static { cursor: default; }
.contact-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,43,107,.08);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -ms-flex-negative: 0; flex-shrink: 0;
  margin-right: 14px;
  color: var(--navy);
}
.contact-info { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
.contact-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.contact-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* ── FAQ page ─────────────────────────────────────────────── */
.faq-list {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.06);
          box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.faq-question {
  width: 100%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 15px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
}
.faq-question:active { background: #f9fafb; }
.faq-chevron {
  -ms-flex-negative: 0; flex-shrink: 0;
  color: #9ca3af;
  -webkit-transition: -webkit-transform .25s ease;
          transition: transform .25s ease;
}
.faq-item.open .faq-chevron {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  -webkit-transition: max-height .3s ease;
          transition: max-height .3s ease;
}
.faq-answer p {
  margin: 0;
  padding: 0 16px 15px;
  border-top: 1px solid #f3f4f6;
  padding-top: 12px;
}

/* ── CMS content override ────────────────────────────────────
   Forces site typography to win over inline styles baked into
   CMS/API-authored HTML (FAQ answers, Terms/PDPA, content popups). */
.cms-html,
.cms-html *:not(svg):not(svg *) {
  font-family: var(--font-family) !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
  /*color: var(--ink-soft) !important;*/
}
.cms-html p { margin: 0 0 12px; }
.cms-html p:last-child { margin-bottom: 0; }

/* FAQ question keeps the bold heading look instead of body-copy grey */
.faq-question .cms-html,
.faq-question .cms-html *:not(svg):not(svg *) {
  font-weight: 600 !important;
  color: var(--ink) !important;
  line-height: 1.4 !important;
}

/* ── About page ───────────────────────────────────────────── */
.about-body {
  padding: 24px 20px 40px;
  background: #f3f4f6;
  min-height: 100%;
}
.about-logo-wrap {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin-bottom: 16px;
}
.about-logo {
  /*width: 80px; height: 80px;*/
  width:100%;
  border-radius: 18px;
  object-fit: contain;
  -webkit-box-shadow: 0 4px 16px rgba(0,0,0,.12);
          box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.about-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.06);
          box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.about-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}
.about-section-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0;
}
.about-version {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 24px;
}

/* ── Privilege Detail page ────────────────────────────────── */
/* ── sticky header: back ← | pts → ── */
.pvd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: var(--shell-max);
    margin: 0 auto;
    z-index: 50;
    height: 48px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    background: var(--maincolor);
    padding: 0 16px 0 8px;
}
.pvd-header .sd-back { color: #000; }
/* ── navy image block — margin-top clears the fixed header ── */
.pvd-top {
  background: var(--maincolor);
  padding-top:10px;
  border-radius: 0 0 24px 24px;
  margin-top: 48px;    /* exactly the fixed header height */
  padding-bottom: 20px;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.pvd-header-pts {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-family);
}
.pvd-header-pts .coin { width: 18px; height: 18px; font-size: 10px; }
/* row 2: 1:1 image 90% centred — extends 60px below navy block */
.pvd-img-wrap {
  position: relative;
  width: 90%;
  margin: 0 auto;
  padding-top: 90%;
  border-radius: 14px;
  overflow: hidden;
  -webkit-box-shadow: 0 8px 24px rgba(0,0,0,.18);
          box-shadow: 0 8px 24px rgba(0,0,0,.18);
  margin-bottom: -210px; /* overflow below navy block */
}
.pvd-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: fill;
  display: block;
}
/* scrollable content — padding-top makes room for overflowing image */
.pvd-body {
  overflow-y: auto;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
.pvd-content {
  padding: 226px 16px 8px; /* 210px image overflow + 16px gap */
}
.pvd-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 14px;
}
/* points pill */
.pvd-pts-btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 99px;
  padding: 7px 18px;
  margin-bottom: 14px;
  cursor: default;
}
.pvd-pts-btn .coin { width: 16px; height: 16px; font-size: 9px; }
.pvd-pts-btn--free { background: #e05c20; }
/* expiry */
.pvd-expiry {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
/* terms */
.pvd-terms-section {
  border-top: 1px solid #f3f4f6;
  padding-top: 16px;
}
.pvd-terms-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.pvd-terms-body {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.8;
}
.pvd-terms-body ul, .pvd-terms-body ol {
  margin: 0; padding-left: 18px;
}
.pvd-terms-body li { margin-bottom: 6px; }
/* fixed footer */
.pvd-footer {
  position: fixed;
  bottom: 0; left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f3f4f6;
  z-index: 40;
}
.pvd-redeem-btn {
  display: block;
  width: 100%;
  background: #e05c20;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border: none;
  border-radius: 99px;
  padding: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pvd-redeem-btn.disabled, .pvd-redeem-btn:disabled {
  background: var(--disabled);
  cursor: not-allowed;
}

/* ── Privileges page ──────────────────────────────────────── */
.priv-page {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  min-height: 100%;
  background: #f3f4f6;
}

/* header */
.priv-header {
  position: relative;
  overflow: hidden;
  background: -webkit-linear-gradient(160deg, #132E6A 0%, var(--navy-2) 100%);
  background:         linear-gradient(160deg, #132E6A 0%, var(--navy-2) 100%);
  padding: 18px 20px 40px;
  border-radius: 0 0 28px 28px;
}
.priv-header-blob {
  position: absolute;
  pointer-events: none;
}
.priv-header-blob--top {
    top: -40px;
    right: -35px;
    width: 120px;
    height: auto;
}
.priv-header-blob--bottom {
    bottom: -50px;
    left: -40px;
    width: 120px;
    height: auto;
}
.priv-header-title {
  position: relative; z-index: 1;
  color: #fff;
  text-align: center;
  font-size: 15px; font-weight: 700;
  font-family: var(--font-family);
  margin: 6px auto 0;
  max-width: 240px;
}

/* points pill — overlaps the bottom of the header, like .member-card */
.priv-points-pill {
  position: relative; z-index: 2;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 8px;
  width: -webkit-fit-content; width: -moz-fit-content; width: auto;
  background: #fff;
  border-radius: 999px;
  margin: -26px 10px 10px 10px;
  padding: 12px 26px;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--font-family);
  -webkit-box-shadow: 0 10px 24px -10px rgba(0,0,0,.4);
          box-shadow: 0 10px 24px -10px rgba(0,0,0,.4);
}
.coin--lg { width: 22px; height: 22px; }

/* tabs */
.priv-tabs {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 10px;
  padding: 20px 12px 0;
}
.priv-tab {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: horizontal; -webkit-box-direction: normal;
      -ms-flex-direction: row; flex-direction: row;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  background: #fff;
  border-radius: 14px;
  border: 2px solid transparent;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.06);
          box-shadow: 0 1px 4px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  -webkit-transition: color .2s, border-color .2s;
          transition: color .2s, border-color .2s;
}
.priv-tab.active {
  color: var(--navy);
  border-color: var(--navy);
  font-weight: 700;
}
.priv-tab svg { -ms-flex-negative: 0; flex-shrink: 0; }
.priv-tab-ico {
  width: 30px; height: 30px; border-radius: 50%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  border: 1.5px solid currentColor;
  -ms-flex-negative: 0; flex-shrink: 0;
}

/* content area */
.priv-content {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  padding: 14px 0 calc(80px + env(safe-area-inset-bottom, 0px));
}

/* privilege list */
.priv-list {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  gap: 10px;
  padding: 0 12px;
}

/* privilege card */
.priv-card {
  background: #fff;
  border-radius: 14px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
  overflow: hidden;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.07);
          box-shadow: 0 1px 4px rgba(0,0,0,.07);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  min-height: 96px;
}
.priv-card--static { cursor: default; }
.priv-card-img-wrap {
  position: relative;
  width: 110px;
  -ms-flex-negative: 0; flex-shrink: 0;
  background: #f3f4f6;
}
.priv-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: fill; display: block;
}
.priv-card-watermark {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 2;
  -webkit-transform: translate(-50%, -50%) rotate(0deg);
      -ms-transform: translate(-50%, -50%) rotate(0deg);
          transform: translate(-50%, -50%) rotate(0deg);
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.priv-card-body {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  padding: 12px 10px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: space-between;
  gap: 6px;
}
.priv-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.priv-card-desc {
    font-size: 11px!important;
    color: var(--muted)!important;
    font-weight: 400!important;
}
.priv-card-expiry {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.priv-card-expiry svg {
  -ms-flex-negative: 0; flex-shrink: 0;
  opacity: .7;
}
.priv-card-action {
  -ms-flex-negative: 0; flex-shrink: 0;
  width: 42px;
  background: #1b3a5c;
  color: #fff;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  /*writing-mode: vertical-rl;*/
  text-orientation: mixed;
}
.priv-card-btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -ms-flex-item-align: start; align-self: flex-start;
  gap: 4px;
  background: #e05c20;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 5px 14px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.priv-card-btn .coin {
  width: 14px; height: 14px; font-size: 8px;
}

/* skeleton */
@-webkit-keyframes privShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes privShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.priv-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  -webkit-animation: privShimmer 1.4s infinite linear;
          animation: privShimmer 1.4s infinite linear;
  border-radius: 6px;
}
.priv-card--skeleton { pointer-events: none; }
.priv-skeleton-img   { width: 110px; height: 100%; border-radius: 0; }
.priv-skeleton-line  { height: 13px; margin-bottom: 6px; width: 90%; }
.priv-skeleton-line--short { width: 55%; }
.priv-skeleton-action { width: 42px; border-radius: 0; -ms-flex-negative: 0; flex-shrink: 0; }

/* tab panels hidden by default; JS controls visibility */
.priv-panel { display: none; }
.priv-panel.active { display: block; }

/* empty state */
.priv-empty {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  color: #d1d5db;
  text-align: center;
}
.priv-empty p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* ── Privilege detail modal ───────────────────────────────── */
.pvd-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 300;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.pvd-modal-sheet {
  background: #fff;
  width: 100%;
  height: 100%;
  max-width: var(--shell-max);
  max-height: 100%;
  border-radius: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.pvd-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.pvd-header-pts {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 4px;
  font-size: 13px;
  /*color: var(--ink);*/
  font-weight: 600;
}
.pvd-top { -ms-flex-negative: 0; flex-shrink: 0; padding: 16px 16px 0; }
.pvd-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
}
.pvd-img { width: 100%; height: 100%; object-fit: fill; display: block; }
.pvd-body {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pvd-content { padding: 20px 16px; margin-top:200px;}
.pvd-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.3;
}
.pvd-pts-btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  background: #fff3ee;
  color: #e05c20;
  font-size: 13px;
  font-weight: 700;
  border-radius: 99px;
  padding: 6px 16px;
  border: 1.5px solid #e05c20;
  margin-bottom: 12px;
  cursor: default;
}
.pvd-pts-btn--free {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--ink);
}
.pvd-expiry {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.pvd-terms-section { margin-top: 8px; }
.pvd-terms-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.pvd-terms-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pvd-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f0f0f0;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.pvd-redeem-btn {
  width: 100%;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pvd-redeem-btn.disabled,
.pvd-redeem-btn:disabled { opacity: .4; cursor: not-allowed; }
.pvd-redeem-btn.loading  { opacity: .6; }
.pvd-result {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.95);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  z-index: 10;
}
.pvd-modal-box { text-align: center; padding: 32px 24px; }
.pvd-modal-icon { font-size: 48px; margin-bottom: 16px; }
.pvd-modal-icon--ok  { color: #16a34a; }
.pvd-modal-icon--err { color: #dc2626; }
.pvd-modal-msg { font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.pvd-modal-code {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .1em;
  margin-bottom: 20px;
}
.pvd-modal-close-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── redeem error popup ───────────────────────────────────── */
.pvd-err-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.45);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 24px;
}
.pvd-err-box {
  background: #fff;
  border-radius: 16px;
  text-align: center;
  padding: 32px 24px;
  width: 100%;
  max-width: 320px;
  -webkit-box-shadow: 0 10px 40px rgba(0,0,0,.2);
          box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.pvd-err-box .pvd-modal-msg { margin-bottom: 20px; }

/* ── redeem confirmation bottom sheet ─────────────────────── */
.pvd-confirm-backdrop {
  /* visibility+opacity so the sheet's transform transition fires on open */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.52);
  z-index: 600;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-transition: opacity .25s ease, visibility .25s ease;
          transition: opacity .25s ease, visibility .25s ease;
}
.pvd-confirm-backdrop.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.pvd-confirm-sheet {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: var(--shell-max);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  -webkit-transform: translateY(100%);
          transform: translateY(100%);
  -webkit-transition: -webkit-transform .38s cubic-bezier(.32,1.08,.56,1);
          transition: transform .38s cubic-bezier(.32,1.08,.56,1);
  -webkit-box-shadow: 0 -8px 32px -8px rgba(0,0,0,.22);
          box-shadow: 0 -8px 32px -8px rgba(0,0,0,.22);
}
.pvd-confirm-backdrop.open .pvd-confirm-sheet {
  -webkit-transform: translateY(0); transform: translateY(0);
}
.pvd-confirm-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--field-line);
  margin: 12px auto 0;
}
.pvd-confirm-head {
  font-size: 16px; font-weight: 800; color: var(--ink);
  text-align: center;
  padding: 16px 24px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.pvd-confirm-body { padding: 14px 24px 4px; }
.pvd-confirm-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  padding: 8px 0;
}
.pvd-confirm-row-label { color: var(--muted); }
.pvd-confirm-row-val { font-weight: 700; color: var(--ink); }
.pvd-confirm-actions {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 12px;
  padding: 14px 24px 4px;
}
.pvd-confirm-btn {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pvd-confirm-btn--cancel {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--field-line);
}
.pvd-confirm-btn--ok {
  background: var(--orange);
  color: #fff;
  border: none;
}

/* ── QR redemption modal ──────────────────────────────────── */
.qrm-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #f3f4f6;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  max-width: var(--shell-max);
  margin-left: auto; margin-right: auto;
  overflow: hidden;
}
.qrm-top {
  background: var(--navy);
  -ms-flex-negative: 0; flex-shrink: 0;
  padding: 0 0 24px;
}
.qrm-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 14px 12px 12px;
}
.qrm-back {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #fff; -ms-flex-negative: 0; flex-shrink: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.qrm-title {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.qrm-header-spacer { width: 30px; -ms-flex-negative: 0; flex-shrink: 0; }
.qrm-subtitle {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
  margin: 0 20px 16px;
}
.qrm-timer {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.qrm-timer svg { opacity: .8; }
.qrm-qr-card {
  background: #fff;
  border-radius: 16px;
  margin: 0 20px;
  padding: 20px 20px 14px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 12px;
}
#qrmCanvas img,
#qrmCanvas canvas { display: block; }
.qrm-id {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .05em;
}
.qrm-body {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  gap: 12px;
}
.qrm-coupon-card {
  background: #fff;
  border-radius: 14px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
  overflow: hidden;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.07);
          box-shadow: 0 1px 4px rgba(0,0,0,.07);
  min-height: 88px;
}
.qrm-coupon-img {
  width: 100px; -ms-flex-negative: 0; flex-shrink: 0;
  background: #f3f4f6;
}
.qrm-coupon-img img { width: 100%; height: 100%; object-fit: fill; display: block; }
.qrm-coupon-info {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  padding: 12px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  gap: 4px;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.qrm-coupon-name {
  font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.qrm-coupon-desc {
  font-size: 12px; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qrm-terms {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.07);
          box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.qrm-terms-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.qrm-terms-body  { font-size: 12px; color: var(--muted); line-height: 1.6; }
.qrm-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #f3f4f6;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.qrm-close-btn {
  width: 100%;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Settings page ────────────────────────────────────────── */
.settings-page {
  background: #f3f4f6;
  min-height: 100%;
}
.settings-header {
  padding: 28px 20px 16px;
}
.settings-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.settings-item {
  border-bottom: 1px solid #e5e7eb;
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 15px 16px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  width: 100%;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.settings-row:active { background: #f9fafb; }
.settings-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,43,107,.08);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -ms-flex-negative: 0; flex-shrink: 0;
  margin-right: 14px;
  color: var(--navy);
}
.settings-label {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.settings-chevron {
  color: #9ca3af;
  -ms-flex-negative: 0; flex-shrink: 0;
}
.settings-item--no-chevron .settings-chevron { display: none; }

/* ── Card page ────────────────────────────────────────────── */
.mem-action {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 8px;
  margin: 14px 16px 0;
}
.mem-action-btn {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 5px;
  background: #fff;
  border: 1.5px solid var(--maincolor);
  border-radius: 999px;
  padding: 10px 5px;
  color: var(--maincolor);
  font-size: 12px; font-weight: 600;
  font-family: var(--font-family);
  text-decoration: none;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-transition: background .15s; transition: background .15s;
}
.mem-action-btn:hover { background: var(--field-bg); }
.mem-action-ico {
  width: 20px; height: 20px; border-radius: 50%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  border: 1.5px solid var(--maincolor);
  color: var(--maincolor);
  -ms-flex-negative: 0; flex-shrink: 0;
}
.card-pts-section {
  background: #fff;
  border-radius: 16px;
  margin: 16px 16px 0;
  padding: 16px 16px 20px;
  -webkit-box-shadow: 0 2px 12px rgba(0,0,0,.07);
          box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.card-pts-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin-bottom: 10px;
}
.card-pts-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.card-pts-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-family);
}
.card-pts-link {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  margin-top: 4px;
}
.card-progress-bar-wrap {
  height: 8px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.card-progress-bar {
  height: 100%;
  background: #FF5E3E;
  border-radius: 99px;
  -webkit-transition: width .4s ease;
          transition: width .4s ease;
}
.card-progress-hint {
  font-size: 12px;
  color: var(--navy);
  text-align: center;
  margin: 0 0 14px;
  line-height: 1.6;
  white-space: pre-line;   /* honour the \n break in Card_ProgressHint* */
}
.card-priv-btn {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  margin-top: 16px;
}
/* the same control also renders as a <button> when it opens the benefits popup */
button.card-priv-btn {
  -webkit-appearance: none; appearance: none;
  width: 100%; padding: 0;
  border: 0; background: none;
  font-family: var(--font-family);
  cursor: pointer;
}

/* ── Member card flip ─────────────────────────────────────── */
.mc-flip-wrap {
  padding: 0 0 4px;
}
.card-pts-section .mc-flip-wrap {
  padding: 0 0 4px;
}
.mc-flip {
  position: relative;
  width: 100%;
  /* 16:9 aspect ratio */
  padding-top: 56.25%;
  -webkit-perspective: 1000px;
          perspective: 1000px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
}
.mc-face {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-transition: -webkit-transform 0.55s cubic-bezier(.4,0,.2,1);
          transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}
.mc-front {
  -webkit-transform: rotateY(0deg);
          transform: rotateY(0deg);
  background: #e5e7eb;
}
.mc-front img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.mc-back {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
  background: #fff;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 8px;
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
/* Card back artwork — fills the face, sits behind the QR plate */
.mc-back-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* White plate keeps the QR scannable on top of the dark card art */
.mc-qr-plate {
  position: relative;   /* stack above .mc-back-bg */
  z-index: 1;
  /* A definite height (the face is absolutely positioned, so 88% resolves) lets
     .mc-qr-img size itself with max-height:100% at any shell width */
  height: 88%;
  max-width: 84%;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  -webkit-box-shadow: 0 2px 10px rgba(0,0,0,.18);
          box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.mc-qr-timer-row {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.mc-qr-timer {
  font-family: var(--font-family);
  font-size: 13px; font-weight: 700; color: var(--maincolor);
  letter-spacing: .06em; line-height: 1;
}
.mc-qr-refresh {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-left: 8px; padding: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  border: 1px solid var(--field-line); border-radius: 50%;
  background: #fff; color: var(--maincolor); cursor: pointer;
}
.mc-qr-refresh:active { opacity: .6; }
.mc-qr-refresh[disabled] { opacity: .5; cursor: default; }
.mc-qr-refresh.spinning svg {
  -webkit-animation: qrSpin .7s linear infinite;
          animation: qrSpin .7s linear infinite;
}
.mc-qr-spinner {
  width: 36px; height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--navy);
  border-radius: 50%;
  -webkit-animation: spin .7s linear infinite;
          animation: spin .7s linear infinite;
}
.mc-qr-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;          /* allow the flex item to shrink beside the timer row */
  aspect-ratio: 1 / 1;    /* width tracks the shrunk height */
  object-fit: contain;    /* fallback for WebViews without aspect-ratio */
  display: block;
  border-radius: 4px;
}
.mc-qr-hint {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
}
/* flipped state */
.mc-flip.flipped .mc-front {
  -webkit-transform: rotateY(-180deg);
          transform: rotateY(-180deg);
}
.mc-flip.flipped .mc-back {
  -webkit-transform: rotateY(0deg);
          transform: rotateY(0deg);
}
.mc-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin: 6px 0 0;
}

/* ── QR bottom sheet ──────────────────────────────────────── */
.qr-sheet-backdrop {
  /* Use visibility+opacity so the sheet's transform transition fires on open */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.52);
  z-index: 500;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: flex-end; -ms-flex-align: flex-end; align-items: flex-end;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-transition: opacity .25s ease, visibility .25s ease;
          transition: opacity .25s ease, visibility .25s ease;
}
.qr-sheet-backdrop.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.qr-sheet {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: var(--shell-max);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  -webkit-transform: translateY(100%);
          transform: translateY(100%);
  -webkit-transition: -webkit-transform .38s cubic-bezier(.32,1.08,.56,1);
          transition: transform .38s cubic-bezier(.32,1.08,.56,1);
  -webkit-box-shadow: 0 -8px 32px -8px rgba(0,0,0,.22);
          box-shadow: 0 -8px 32px -8px rgba(0,0,0,.22);
}
.qr-sheet-backdrop.open .qr-sheet {
  -webkit-transform: translateY(0); transform: translateY(0);
}
.qr-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--field-line);
  margin: 12px auto 0;
}
.qr-sheet-body {
  padding: 20px 24px 16px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.qr-sheet-timer-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin-bottom: 14px;
}
.qr-sheet-timer {
  font-family: var(--font-family);
  font-size: 22px; font-weight: 700; color: var(--maincolor);
  letter-spacing: .06em; text-align: center;
}
.qr-sheet-refresh {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; margin-left: 10px; padding: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  border: 1px solid var(--field-line); border-radius: 50%;
  background: #fff; color: var(--maincolor); cursor: pointer;
  -webkit-transition: opacity .2s ease; transition: opacity .2s ease;
}
.qr-sheet-refresh:active { opacity: .6; }
.qr-sheet-refresh[disabled] { opacity: .5; cursor: default; }
.qr-sheet-refresh.spinning svg {
  -webkit-animation: qrSpin .7s linear infinite;
          animation: qrSpin .7s linear infinite;
}
.qr-sheet-hint {
  font-family: var(--font-family);
  font-size: 13px; color: var(--muted);
  text-align: center; line-height: 1.5; margin-bottom: 14px;
}
.qr-sheet-img-wrap {
  width: 200px; height: 200px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  background: var(--field-bg); border-radius: 16px;
  overflow: hidden; margin-bottom: 16px;
}
.qr-sheet-img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.qr-sheet-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--field-line);
  border-top-color: var(--navy);
  -webkit-animation: qrSpin .7s linear infinite;
          animation: qrSpin .7s linear infinite;
}
@-webkit-keyframes qrSpin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes qrSpin {
  to { transform: rotate(360deg); }
}
.qr-sheet-name {
  font-family: var(--font-family);
  font-size: 17px; font-weight: 700; color: var(--ink);
  text-align: center; margin-bottom: 4px;
}
.qr-sheet-tier {
  font-family: var(--font-family);
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  color: var(--muted); text-transform: uppercase; text-align: center;
}

/* ── Content modal ────────────────────────────────────────── */
.cm-backdrop {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.52);
  z-index: 400;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 24px 16px;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.cm-backdrop.open {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-animation: cmFadeIn .2s ease; animation: cmFadeIn .2s ease;
}
@-webkit-keyframes cmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cm-sheet {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 420px;
  max-height: calc(100vh - 48px);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-shadow: 0 24px 64px -16px rgba(0,0,0,.45);
          box-shadow: 0 24px 64px -16px rgba(0,0,0,.45);
  -webkit-animation: cmSlideUp .25s cubic-bezier(.32,1.1,.56,1);
          animation: cmSlideUp .25s cubic-bezier(.32,1.1,.56,1);
  overflow: hidden;
}
@-webkit-keyframes cmSlideUp {
  from { -webkit-transform: translateY(28px); transform: translateY(28px); opacity: .6; }
  to   { -webkit-transform: translateY(0);    transform: translateY(0);    opacity: 1; }
}
@keyframes cmSlideUp {
  from { transform: translateY(28px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cm-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--field-line);
  -ms-flex-negative: 0; flex-shrink: 0;
}
.cm-title {
  font-family: var(--font-family);
  font-size: 16px; font-weight: 700; color: var(--ink);
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  margin-right: 10px;
  line-height: 1.4;
}
.cm-close {
  width: 32px; height: 32px; border: none; background: var(--field-bg);
  border-radius: 8px; cursor: pointer; padding: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  color: var(--muted); -ms-flex-negative: 0; flex-shrink: 0;
  -webkit-transition: background .15s; transition: background .15s;
}
.cm-close:hover { background: var(--field-line); }
.cm-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  padding-bottom: 20px;
}
.cm-img {
  display: block; width: 100%;
  /*aspect-ratio: 16/9;*/
  object-fit: cover;
}
/* aspect-ratio fallback */
@supports not (aspect-ratio: 16/9) {
  .cm-img { height: 0; padding-top: 56.25%; position: relative; }
}
.cm-info {
  padding: 16px 16px 0;
}
/* ── Full-screen variant (member benefits popup) ──────────── */
.cm-backdrop.cm-full {
  padding: 0;
}
.cm-backdrop.cm-full .cm-sheet {
  width: 100%;
  max-width: var(--shell-max);
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}
.cm-backdrop.cm-full .cm-header {
  padding-top: max(16px, env(safe-area-inset-top));
}
.cm-backdrop.cm-full .cm-body {
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
/* one MBBNF row: image + title + info */
.cm-item + .cm-item {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--field-line);
}
.cm-item-title {
  padding: 16px 16px 0;
  font-family: var(--font-family);
  font-size: 15px; font-weight: 700; color: var(--ink);
  line-height: 1.4;
}
.cm-item-title + .cm-info {
  padding-top: 8px;
}

/* ── Tier-reached popup (member card) ─────────────────────── */
.tr-sheet {
  max-width: 340px;
  padding: 28px 24px 24px;
  text-align: center;
  overflow-y: auto;
}
.tr-title {
  font-family: var(--font-family);
  font-size: 22px; font-weight: 700; color: var(--ink);
  line-height: 1.4;
}
.tr-msg {
  font-family: var(--font-family);
  font-size: 15px; color: var(--ink-soft);
  line-height: 1.6;
  margin: 12px 0 14px;
}
.tr-sheet .check-row {
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  font-size: 13px;
  margin: 0;
}
.tr-sheet .check-box { margin-right: 8px; }

/* trigger cursor on slider slides and story items */
.js-content-trigger { cursor: pointer; }

/* ════════════════════════════════════════════════════════════
   SHOP LOCATION PAGE
   ════════════════════════════════════════════════════════════ */
/* override the generic member-screen padding so shop owns its own bg */
.member-screen--shop {
  padding-bottom: 0;
  background: var(--navy);
  /* lock member-screen to viewport so shop-screen can fill it */
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
}
.shop-screen {
  background: var(--navy);
  /* fill the locked member-screen and scroll only the list */
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  overflow: hidden;
  /* clear the fixed bottom nav at the bottom of the scroll area */
  padding-bottom: 0;
}

/* ── Header ───────────────────────────────────────────────── */
.shop-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 16px 16px 12px;
}
.shop-header-title {
  font-family: var(--font-family);
  font-size: 20px; font-weight: 700; color: #fff;
  margin: 0 10px;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-header-logo {
  width: 38px; height: 38px; border-radius: 8px; object-fit: contain;
}

/* ── Map ──────────────────────────────────────────────────── */
.shop-map-wrap {
  padding: 0 12px 12px;
}
.shop-map {
  width: 100%; height: 150px;
  border-radius: 16px; overflow: hidden;
  background: var(--field-bg);
}

/* ── Google Maps InfoWindow overrides ─────────────────────── */
/* hide the × close button */
.gm-ui-hover-effect { display: none !important; }
/* constrain bubble width to half the viewport */
.gm-style-iw-c  { max-width: 50vw !important; }
.gm-style-iw    { max-width: 50vw !important; }
.gm-style-iw-d  { max-width: 50vw !important; overflow: auto !important; }

/* ── Search ───────────────────────────────────────────────── */
.shop-search-wrap {
  padding: 0 12px 10px;
}
.shop-search-field {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  gap: 10px;
  color: var(--muted);
}
.shop-search-field svg { -ms-flex-negative: 0; flex-shrink: 0; }
.shop-search-field input {
  border: none; outline: none; background: none;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  font-family: var(--font-family);
  font-size: 15px; color: var(--ink);
  padding-left: 10px;
}
.shop-search-field input::placeholder { color: #adb5bd; }
/* hide native clear (x) button on search input */
.shop-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ── Region filter ────────────────────────────────────────── */
.shop-region-wrap {
  padding: 0 12px 10px;
}
.shop-region-field {
  position: relative;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  gap: 10px;
  color: var(--muted);
}
.shop-region-field > svg:first-child { -ms-flex-negative: 0; flex-shrink: 0; }
.shop-region-field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  border: none; outline: none; background: none;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  font-family: var(--font-family);
  font-size: 15px; color: var(--ink);
  padding-right: 20px;                  /* room for the caret */
  cursor: pointer;
  padding-left: 10px;
}
.shop-region-caret {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--muted);
}

/* ── Count ────────────────────────────────────────────────── */
.shop-count {
  padding: 2px 16px 10px;
  font-family: var(--font-family);
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,.75);
}

/* ── Shop list — scrollable area only ────────────────────── */
.shop-list {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-height: 0;                       /* required for flex overflow to work */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
  /* clear fixed bottom nav (64 px height + 14 px gap + safe-area) */
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  gap: 12px;
}

/* ── Shop card ────────────────────────────────────────────── */
.shop-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  -webkit-box-shadow: 0 4px 20px -8px rgba(0,0,0,.35);
          box-shadow: 0 4px 20px -8px rgba(0,0,0,.35);
  cursor: pointer;
  -webkit-transition: -webkit-transform .15s, -webkit-box-shadow .15s;
          transition: transform .15s, box-shadow .15s;
          min-height: 350px;
}
.shop-card:hover {
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
  -webkit-box-shadow: 0 8px 28px -8px rgba(0,0,0,.45);
          box-shadow: 0 8px 28px -8px rgba(0,0,0,.45);
}
.shop-card.hidden { display: none; }

/* image */
.shop-card-img-wrap {
  position: relative;
  width: 100%;
  height: 0; padding-top: 56.25%; /* 16:9 fallback */
  background: var(--field-bg);
  overflow: hidden;
}
@supports (aspect-ratio: 16/9) {
  .shop-card-img-wrap { height: auto; padding-top: 0; aspect-ratio: 16/9; }
}
.shop-card-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: block; object-fit: cover;
}
@supports (aspect-ratio: 16/9) {
  .shop-card-img { position: static; width: 100%; height: 100%; }
}

/* open/closed badge */
.shop-card-status {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-family);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  border-radius: 6px; padding: 3px 9px;
}
.shop-card-status.open   { background: #e8f8ee; color: #1a8f47; }
.shop-card-status.closed { background: #fdecea; color: #c0392b; }

/* body */
.shop-card-body {
  padding: 12px 14px 14px;
}
.shop-card-name {
  font-family: var(--font-family);
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin-bottom: 4px; line-height: 1.4;
}
.shop-card-addr {
  font-family: var(--font-family);
  font-size: 13px; color: var(--muted); line-height: 1.55;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-hours {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 5px;
  font-family: var(--font-family);
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.shop-card-detail {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 5px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-family);
  font-size: 13px; font-weight: 600;
  color: var(--maincolor);
  -webkit-transition: opacity .15s; transition: opacity .15s;
}
.shop-card-detail:hover { opacity: .75; }

/* empty state */
.shop-empty {
  text-align: center; padding: 48px 0 24px;
  color: rgba(255,255,255,.5);
}
.shop-empty svg { margin-bottom: 12px; opacity: .5; }
.shop-empty p { margin: 0; font-size: 14px; }

/* ════════════════════════════════════════════════════════════
   SHOP DETAIL PAGE
   ════════════════════════════════════════════════════════════ */

/* override member-screen so detail page owns its bg */
.member-screen--shop-detail {
  padding-bottom: 0;
  background: #fff;
}

/* ── Header bar ───────────────────────────────────────────── */
.sd-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  background: var(--maincolor);
  padding: 12px 16px;
  border-bottom: 1px solid var(--field-line);
  gap: 10px;
}
.sd-back {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--field-bg); color: var(--ink);
  text-decoration: none; -ms-flex-negative: 0; flex-shrink: 0;
  -webkit-transition: background .15s; transition: background .15s;
}
.sd-back:hover { background: var(--field-line); }
.sd-header-title {
  font-family: var(--font-family);
  font-size: 16px; font-weight: 700; color: #ffffff;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Scrollable body ──────────────────────────────────────── */
.sd-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff;
  padding-bottom: 32px;
}

/* ── Hero image ───────────────────────────────────────────── */
.sd-hero {
  width: 100%;
}
.sd-hero-img {
  display: block; width: 100%;
  height: 0; padding-top: 56.25%; /* 16:9 fallback */
  object-fit: cover; background: var(--field-bg);
}
@supports (aspect-ratio: 16/9) {
  .sd-hero-img { height: auto; padding-top: 0; aspect-ratio: 16/9; }
}

/* ── Sections ─────────────────────────────────────────────── */
.sd-section {
  padding: 16px 16px 0;
}
.sd-section:last-child { padding-bottom: 0; }

.sd-shop-name {
  font-family: var(--font-family);
  font-size: 18px; font-weight: 700; color: var(--ink);
  line-height: 1.4; margin-bottom: 2px;
}

.sd-section-label {
  font-family: var(--font-family);
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin-bottom: 10px;
}

/* row layout for phone */
.sd-section-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  border-top: 1px solid var(--field-line);
  padding-top: 14px; margin-top: 4px;
}
.sd-section-row .sd-section-label { margin-bottom: 0; }

.sd-phone {
  font-family: var(--font-family);
  font-size: 15px; font-weight: 600;
  color: var(--maincolor); text-decoration: none;
}
.sd-phone:hover { text-decoration: underline; }

/* ── Hours table ──────────────────────────────────────────── */
.sd-hours-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-family);
  font-size: 14px;
}
.sd-hours-table tr {
  border-bottom: 1px solid var(--field-line);
}
.sd-hours-table tr:last-child { border-bottom: none; }
.sd-day {
  padding: 9px 0; color: var(--ink); width: 55%;
}
.sd-time {
  padding: 9px 0; color: var(--muted);
  text-align: right;
}
.sd-closed { color: #c0392b; font-size: 13px; }

/* ── Detail map ───────────────────────────────────────────── */
.sd-section-map {
  padding-top: 16px;
}
.sd-map {
  width: 100%; height: 200px;
  border-radius: 16px; overflow: hidden;
  background: var(--field-bg);
  border: 1px solid var(--field-line);
}

/* ── Shell page placeholder ───────────────────────────────── */
.shell-body {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  min-height: 60vh; color: var(--muted); font-size: 15px; padding: 24px;
  text-align: center;
}
.shell-body svg { margin-bottom: 16px; color: var(--field-line); }

/* ════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION
   ════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  /* Respect device home-indicator area */
  bottom: calc(14px + env(safe-area-inset-bottom));
  height: 64px;
  background: var(--bottom-nav-bg);
  border-radius: 32px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: space-around; -ms-flex-pack: space-around; justify-content: space-around;
  -webkit-box-shadow: 0 8px 32px -8px rgba(0,30,90,.45),
                      0 2px 8px rgba(0,0,0,.18);
          box-shadow: 0 8px 32px -8px rgba(0,30,90,.45),
                      0 2px 8px rgba(0,0,0,.18);
  padding: 0 6px;
  z-index: 100;
}

/*
  On screens wider than the phone shell, re-centre the nav so it
  stays visually inside the 480px column rather than spanning the
  full viewport width.

  Formula:
    left  = (100vw - 480px) / 2  +  14px gutter
    right = auto  (drive width instead)
    width = 480px - 28px  (two 14px gutters)
*/
@media (min-width: 481px) {
    .bottom-nav {
        left: calc(50vw - 240px + 30px);
        right: auto;
        width: calc(480px - 60px);
        bottom: 14px;
    }
}

.navitem {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  color: rgba(255,255,255,.55); cursor: pointer;
  font-family: var(--font-family); font-size: 10px;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  text-decoration: none;
  padding-top: 2px;
  -webkit-transition: color .15s; transition: color .15s;
}
.navitem .ico {
  width: 40px; height: 40px; border-radius: 20px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-transition: background .15s; transition: background .15s;
}
.navitem.active { color: #fff; font-weight: 600; }
.navitem.active .ico {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.gm-style .gm-style-iw-c{
    padding:0!important;
}

/* ════════════════════════════════════════════════════════════
   AUTH PAGES (Login / OTP) — zen GROUP redesign
   ════════════════════════════════════════════════════════════ */

/* Foreground content, filling the auth screen with the zen GROUP artwork */
.auth-content {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
      -ms-flex-direction: column; flex-direction: column;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-height: 0;
  background-image: url('/images/bg-img.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Coral phone field focus + CTA button — scoped to the login page only */
.login-field:focus-within { border-color: var(--zen-coral); }
.login-btn, .login-btn:hover { background: var(--zen-coral); }
.login-btn:active { background: var(--zen-coral-press); }
.login-btn:disabled, .login-btn.disabled,
.login-btn:disabled:hover, .login-btn.disabled:hover {
  background: var(--disabled);
}
.brand-story-header{
  text-align:center;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
}
.brand-story-header-icon { color: var(--navy); -ms-flex-negative: 0; flex-shrink: 0; }
.loader-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /*width: 95px;*/
    font-size: 20px;
    /*color: #00416b;*/
    color: white;
    margin:0;
}

#loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: transparent;
    background-color: rgb(0 0 0 / 50%);
    /*background: #fff;*/
    display: none;
    align-items: center;
    justify-content: center;
}



#loader {
    display: block;
    position: relative;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: transparent solid 3px;
    /*border-top-color: var(--main-color);*/
    border-top-color: #073763;
    animation: spin 1.5s linear infinite;
}

    #loader:before {
        content: "";
        position: absolute;
        top: 5px;
        left: 5px;
        right: 5px;
        bottom: 5px;
        border-radius: 50%;
        border: transparent solid 3px;
        border-top-color: var(--orange);
        animation: spin 2s linear infinite;
    }

    #loader:after {
        content: "";
        position: absolute;
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
        border-radius: 50%;
        border: transparent solid 3px;
        /*border-top-color: var(--plus);*/
        border-top-color: white;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================
   Point history (member/point-history)  — tabbed card list
   ============================================================ */
.ph-page {
  min-height: 100%;
}

/* ── Pill tabs ────────────────────────────────────────────── */
.ph-pills {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin: 6px 16px 16px;
    padding: 5px;
    background: var(--maincolor);
    border-radius: 999px;
}
.ph-pill {
  -webkit-box-flex: 1; -ms-flex: 1 1 0px; flex: 1 1 0;
  padding: 9px 6px;
  border: none; background: none; cursor: pointer;
  border-radius: 999px;
  font-family: var(--font-family);
  font-size: 14px; font-weight: 700; line-height: 1.15;
  color: #BDBDBD;
  -webkit-transition: background .15s, color .15s;
  transition: background .15s, color .15s;
}
.ph-pill.active { background: #ffffff; color: #111111; }

/* ── Panels ───────────────────────────────────────────────── */
.ph-panel { display: block; margin:10px; }
.ph-panel[hidden] { display: none; }

/* ── Month section header ─────────────────────────────────── */
.ph-month {
  padding: 18px 16px 12px;
  font-family: var(--font-family);
  font-size: 18px; font-weight: 600; color: #191919;
}

/* ── Transaction card ─────────────────────────────────────── */
.ph-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    margin-bottom: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}
.ph-logo {
  -ms-flex-negative: 0; flex-shrink: 0;
  width: 88px; padding-right: 14px;
  border-right: 1px solid #E4E4E2;
}
.ph-logo img {
  display: block;
  width: 74px; height: 74px;
  object-fit: contain;
}
.ph-info {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
}
.ph-name {
  font-family: var(--font-family);
  font-size: 15px; font-weight: 700; color: #1c1c1c;
  line-height: 1.3;
}
.ph-sub {
  margin-top: 1px;
  font-family: var(--font-family);
  font-size: 15px; color: #6C7075; line-height: 1.3;
}
.ph-date {
  margin-top: 8px;
  font-family: var(--font-family);
  font-size: 13px; color: #9A9DA2;
}
.ph-right {
  -ms-flex-negative: 0; flex-shrink: 0;
  text-align: right;
}
.ph-point {
  font-family: var(--font-family);
  font-size: 17px; font-weight: 700; line-height: 1.3;
  white-space: nowrap;
}
.ph-point.is-earn   { color: #2FA84F; }
.ph-point.is-void   { color: #C0392B; }
.ph-point.is-redeem { color: var(--maincolor); }
.ph-amt {
  margin-top: 4px;
  font-family: var(--font-family);
  font-size: 15px; font-weight: 600; color: #2A3341;
  white-space: nowrap;
}

/* ── Point-expiry card ────────────────────────────────────── */
.ph-exp-item { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.ph-exp-label {
  font-family: var(--font-family);
  font-size: 14px; color: #9A9DA2; line-height: 1.3;
}
.ph-exp-val {
  margin-top: 2px;
  font-family: var(--font-family);
  font-size: 18px; font-weight: 700; color: #1c1c1c; line-height: 1.3;
}
.ph-exp-date {
  font-family: var(--font-family);
  font-size: 15px; font-weight: 700; color: #C0392B; white-space: nowrap;
}

/* ── Empty state ──────────────────────────────────────────── */
.ph-empty {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 12px; padding: 64px 24px; text-align: center;
  color: #9A9DA2;
}
.ph-empty p {
  font-family: var(--font-family);
  font-size: 14px; margin: 0;
}
.text-danger{
    color: red;
}