/* Public Refer & Earn page and the nav entry points (button, account menu card). */
.rf { max-width: 960px; }
.rf--narrow { padding-top: 48px; padding-bottom: 48px; }
.rf-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(600px 300px at 85% 20%, rgba(255, 214, 102, .22), transparent 70%), linear-gradient(135deg, #0d6e56 0%, #0b5a47 50%, #0f3f4a 100%); }
.rf-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.rf-hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px; max-width: 960px; padding-top: 40px; padding-bottom: 40px; }
.rf-tag { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rf-hero h1 { margin: 14px 0 10px; font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.1; letter-spacing: -.025em; color: #fff; }
.rf-hero p { max-width: 440px; margin: 0; font-size: 1rem; line-height: 1.55; color: rgba(255, 255, 255, .88); }
.rf-link { display: flex; align-items: center; gap: 8px; max-width: 460px; height: 52px; margin-top: 22px; padding: 0 6px 0 16px; border-radius: 14px; background: #fff; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .5); }
.rf-link span { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .82rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-copy { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: #0d6e56; color: #fff; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: filter .15s ease; }
.rf-copy:hover { filter: brightness(1.12); }
.rf-copy em { font-style: normal; }
.rf-copy.is-done { background: #16a34a; }
.rf-icons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rf-ico { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12); color: #fff; font: inherit; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.rf-ico:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-2px); }
.rf-ico[hidden] { display: none; }
.rf-ico--wa { background: #25d366; border-color: #25d366; }
.rf-ico--wa:hover { background: #20bd5b; }
.rf-ico--tg { background: #229ed9; border-color: #229ed9; }
.rf-ico--tg:hover { background: #1c8cc2; }
.rf-ico--x { background: #0f172a; border-color: #0f172a; }
.rf-ico--x:hover { background: #1e293b; }
.rf-ico--wide { width: auto; padding: 0 16px; border-radius: 999px; font-size: .84rem; font-weight: 700; }
.rf-ico--wide em { font-style: normal; }
.rf-cta { display: inline-flex; align-items: center; gap: 8px; height: 50px; margin-top: 22px; padding: 0 26px; border-radius: 14px; background: #fff; color: #0d6e56; font-size: .98rem; font-weight: 800; text-decoration: none; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .5); transition: transform .15s ease; }
.rf-cta:hover { color: #0d6e56; transform: translateY(-2px); }
.rf-hero__art { position: relative; display: grid; place-items: center; min-height: 250px; }
.rf-hero__art::before { content: ""; position: absolute; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 102, .32), transparent 68%); }
.rf-coin { position: relative; width: 190px; height: 190px; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
.rf-pill { position: absolute; display: flex; flex-direction: column; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: #0f172a; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); line-height: 1.15; }
.rf-pill small { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.rf-pill b { font-size: 1.3rem; font-weight: 800; color: #0d6e56; font-variant-numeric: tabular-nums; }
.rf-pill--you { left: 0; top: 24px; }
.rf-pill--friend { right: 0; bottom: 24px; }
.rf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 26px 0 16px; padding: 0; list-style: none; counter-reset: s; }
.rf-steps li { position: relative; padding: 18px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); }
.rf-steps li::after { content: counter(s); counter-increment: s; position: absolute; right: 14px; top: 10px; font-size: 1.8rem; font-weight: 800; color: var(--border); }
.rf-steps span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-light); color: var(--accent); }
.rf-steps b { display: block; margin-top: 12px; font-size: 1rem; color: var(--text-primary); }
.rf-steps small { display: block; margin-top: 2px; font-size: .84rem; line-height: 1.45; color: var(--text-secondary); }
.rf-card { margin-bottom: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); }
.rf-card h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; }
.rf-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.rf-facts li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-secondary); }
.rf-facts li > span { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-card); color: var(--accent); }
.rf-facts b { display: block; font-size: .95rem; color: var(--text-primary); }
.rf-facts small { display: block; font-size: .8rem; color: var(--text-secondary); }
.rf-faq details + details { border-top: 1px solid var(--border); }
.rf-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; font-size: .92rem; font-weight: 650; cursor: pointer; }
.rf-faq summary::-webkit-details-marker { display: none; }
.rf-faq summary svg { flex: none; color: var(--text-muted); transition: transform .2s ease; }
.rf-faq details[open] summary svg { transform: rotate(180deg); color: var(--accent); }
.rf-faq details p { margin: 0 0 13px; font-size: .86rem; line-height: 1.6; color: var(--text-secondary); }
.rf-note { margin: 8px 0 0; font-size: .74rem; color: var(--text-muted); }
@media (max-width: 760px) {
  .rf-hero__in { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: 26px; padding-bottom: 28px; text-align: center; }
  .rf-hero__art { order: -1; min-height: 190px; }
  .rf-hero__art::before { width: 190px; height: 190px; }
  .rf-coin { width: 130px; height: 130px; }
  .rf-pill { padding: 6px 11px; }
  .rf-pill b { font-size: 1.05rem; }
  .rf-pill--you { left: 6%; top: 14px; }
  .rf-pill--friend { right: 6%; bottom: 14px; }
  .rf-hero p, .rf-link { margin-left: auto; margin-right: auto; }
  .rf-icons { justify-content: center; }
  .rf-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 18px 0 14px; }
  .rf-steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding: 14px; }
  .rf-steps li::after { top: 8px; font-size: 1.4rem; }
  .rf-steps span { grid-row: span 2; }
  .rf-steps b { margin: 0; }
  .rf-facts { grid-template-columns: minmax(0, 1fr); }
  .rf-copy em { display: none; }
}

/* ── nav button ── */
.nav__refer { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 14px 0 4px; margin-left: auto; border-radius: 999px; flex: none; text-decoration: none; white-space: nowrap; font-size: .82rem; font-weight: 700; color: #b45309; background: linear-gradient(135deg, #fff7e0, #ffeab8); border: 1px solid #fbd38d; transition: transform .15s ease, box-shadow .15s ease; }
.nav__refer:hover { color: #92400e; transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(217, 119, 6, .8); }
.nav__refer svg { flex: none; }
.nav__refer + .nav__searchbtn { margin-left: 0; }
[data-theme="dark"] .nav__refer { color: #fcd34d; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .4); }
@media (max-width: 1180px) { .nav__refer span { display: none; } .nav__refer { width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 768px) { .nav__refer { display: none; } }

/* ── account menu ── */
.nav__dropdown { min-width: 268px !important; background: var(--bg-card) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.nav__dropdown-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px !important; }
.nav__dropdown-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; }
.nav__dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav__dropdown-who { min-width: 0; }
.nav__dropdown-name, .nav__dropdown-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__dropdown-points { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 10px 0; padding: 9px 12px; border-radius: 10px; background: var(--bg-secondary); text-decoration: none; font-size: .82rem; color: var(--text-secondary); }
.nav__dropdown-points b { font-size: .95rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.nav__dropdown-points:hover { background: var(--accent-light); }
.nav__dropdown-refer { display: flex; align-items: center; gap: 12px; margin: 8px 10px 6px; padding: 11px 12px; border-radius: 12px; text-decoration: none; background: linear-gradient(135deg, #0d6e56, #0f3f4a); color: #fff; transition: filter .15s ease; }
.nav__dropdown-refer:hover { color: #fff; filter: brightness(1.1); }
.nav__dropdown-refer > span:first-child { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.nav__dropdown-refer b { display: block; font-size: .86rem; }
.nav__dropdown-refer small { display: block; margin-top: 1px; font-size: .74rem; color: rgba(255, 255, 255, .85); }
.nav__dropdown-refer > svg { margin-left: auto; flex: none; }

/* mobile drawer entry */
.nav__mobile-refer { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; background: linear-gradient(135deg, #0d6e56, #0f3f4a); color: #fff; }
.nav__mobile-refer:hover { color: #fff; }
.nav__mobile-refer > span:first-child { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.nav__mobile-refer b { display: block; font-size: .9rem; }
.nav__mobile-refer small { display: block; font-size: .76rem; color: rgba(255, 255, 255, .85); }

/* Sense Points coin (assets/images/logo/sp-96.webp) */
.sp-coin { display: inline-block; flex: none; width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; }
.nav__dropdown-pts { display: inline-flex; align-items: center; gap: 8px; }
.nav__dropdown-points .sp-coin { width: 20px; height: 20px; }
.rw-ic .sp-coin, .dashboard-nav__item .sp-coin { width: 20px; height: 20px; }
.rw-hero__label .sp-coin { width: 20px; height: 20px; }
.sp-use__ic { background: none !important; }
.sp-use__ic .sp-coin { width: 28px; height: 28px; }
.rf-steps span .sp-coin { width: 26px; height: 26px; }

/* coin: periodic spin (every ~7s, reduced-motion safe) */
@keyframes spCoinSpin { 0%, 78%, 100% { transform: perspective(240px) rotateY(0); } 92% { transform: perspective(240px) rotateY(360deg); } }
.sp-coin--spin { animation: spCoinSpin 7s ease-in-out infinite; will-change: transform; }
.nav__refer .sp-coin { width: 32px; height: 32px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .sp-coin--spin { animation: none; } }

/* account menu: bigger coin, centred on the text */
.nav__dropdown-points { padding: 8px 12px; }
.nav__dropdown-pts { display: inline-flex; align-items: center; gap: 10px; line-height: 1; font-size: .84rem; font-weight: 600; color: var(--text-secondary); }
.nav__dropdown-points .sp-coin { width: 30px; height: 30px; vertical-align: middle; }

/* the Refer & Earn button is hidden on phones; the search button then takes over the free space so everything sits at the right end */
@media (max-width: 768px) { .nav__refer + .nav__searchbtn { margin-left: auto; } }
