/* ==========================================================================
   REFERRAL & EARN — hub, landing, tasks, rewards (Update 7)
   Desktop: multi-column dashboards with a sticky share column.
   Mobile (<= 760px): stacked, swipeable stat strip, bottom-anchored actions.
   ========================================================================== */
.zr { padding: 20px 0 80px; }
.zr-h { color: #eaf7ff; position: relative; overflow: hidden; border-radius: 26px; padding: 34px;
  background: radial-gradient(110% 130% at 100% 0, rgba(0,212,255,.36), transparent 55%),
              radial-gradient(80% 90% at 0 100%, rgba(16,185,129,.18), transparent 60%),
              linear-gradient(135deg, #041b26, #06303f 55%, #0a4d63); }
.zr-h::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(120deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(120deg, transparent 40%, #000); }
.zr-h > * { position: relative; z-index: 1; }
.zr-h h1 { color: #fff; margin: 12px 0 8px; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -.02em; }
.zr-h h1 em { font-style: normal; background: linear-gradient(90deg, #67e8f9, #a7f3d0, #67e8f9); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: zrShine 4s linear infinite; }
@keyframes zrShine { to { background-position: -200% 0; } }
.zr-h p { margin: 0; max-width: 560px; color: rgba(234,247,255,.82); line-height: 1.6; }
.zr-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.zr-pill i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: zrPulse 1.8s infinite; }
@keyframes zrPulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* rotating advertising line */
.zr-tick { margin-top: 18px; height: 26px; overflow: hidden; font-weight: 600; color: #a5f3fc; font-size: .95rem; }
.zr-tick ul { list-style: none; margin: 0; padding: 0; animation: zrTick 12s cubic-bezier(.7,0,.3,1) infinite; }
.zr-tick li { height: 26px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes zrTick { 0%,20% { transform: translateY(0); } 25%,45% { transform: translateY(-26px); } 50%,70% { transform: translateY(-52px); }
  75%,95% { transform: translateY(-78px); } 100% { transform: translateY(-104px); } }

.zr-hgrid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 26px; align-items: center; }
.zr-art { position: relative; height: 230px; }
.zr-art .coin { position: absolute; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #04212e;
  background: radial-gradient(circle at 30% 30%, #fff7c2, #facc15 45%, #b45309); box-shadow: 0 12px 30px rgba(0,0,0,.35), inset 0 -4px 0 rgba(0,0,0,.15);
  animation: zrFloat 5s ease-in-out infinite; }
.zr-art .coin:nth-child(1) { left: 10%; top: 18%; }
.zr-art .coin:nth-child(2) { right: 8%; top: 4%; width: 92px; height: 92px; font-size: 38px; animation-delay: -1.6s;
  background: radial-gradient(circle at 30% 30%, #ecfeff, #22d3ee 45%, #0e7490); color: #fff; }
.zr-art .coin:nth-child(3) { left: 38%; bottom: 4%; width: 60px; height: 60px; font-size: 24px; animation-delay: -3s;
  background: radial-gradient(circle at 30% 30%, #ecfdf5, #34d399 45%, #047857); color: #fff; }
.zr-art .gift { position: absolute; right: 18%; bottom: 10%; font-size: 64px; animation: zrFloat 4s ease-in-out infinite reverse; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
@keyframes zrFloat { 50% { transform: translateY(-14px) rotate(6deg); } }

/* stat strip */
.zr-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 22px; }
.zr-stat { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: inherit; text-decoration: none; transition: transform .2s, background .2s; }
.zr-stat:hover { transform: translateY(-2px); background: rgba(255,255,255,.13); }
.zr-stat b { display: block; font-size: 1.45rem; color: #fff; font-family: var(--font-mono, monospace); }
.zr-stat span { font-size: .76rem; opacity: .75; }

/* layout */
.zr-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 18px; margin-top: 18px; align-items: start; }
.zr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zr-side { position: sticky; top: 84px; }
.zr-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 20px; padding: 20px; position: relative; overflow: hidden; }
.zr-card h2, .zr-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.zr-card .sub { margin: 0 0 14px; font-size: .84rem; color: var(--ink-3); }
.zr-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }

/* wallet / dashboard */
.zr-wallet { color: #eaf7ff; background: linear-gradient(135deg, #062a38, #0a4d63); border: 0; }
.zr-wallet .sub { color: rgba(234,247,255,.7); }
.zr-bal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.zr-bal b { font: 800 clamp(2rem, 4vw, 2.6rem)/1 var(--font-mono, monospace); color: #fff; }
.zr-bal span { opacity: .8; font-weight: 600; }
.zr-usd { font-size: .9rem; opacity: .8; }
.zr-meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; margin: 14px 0 6px; }
.zr-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, #34d399); transition: width 1.2s cubic-bezier(.2,.8,.2,1); position: relative; }
.zr-meter i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: zrSweep 2.2s infinite; }
@keyframes zrSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.zr-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.zr-mini div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.zr-mini b { display: block; font-family: var(--font-mono, monospace); color: #fff; }
.zr-mini span { font-size: .72rem; opacity: .75; }
.zr-wallet .btn { margin-top: 14px; }
.zr-note { font-size: .78rem; opacity: .75; margin-top: 8px; }

/* code / link */
.zr-code { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--bg-inset); border: 1px dashed color-mix(in srgb, var(--brand) 50%, var(--line)); }
.zr-code code { flex: 1; min-width: 0; background: none; color: var(--ink); font: 700 1.55rem/1.2 var(--font-mono, monospace); letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; }
.zr-code--link code { font-size: .84rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); white-space: nowrap; }
.zr-lbl { display: block; font-size: .76rem; color: var(--ink-3); margin: 14px 0 6px; }
.zr-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.zr-soc { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); transition: all .2s; }
.zr-soc:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.zr-cardimg { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 24px 50px -24px rgba(0,0,0,.55); background: linear-gradient(135deg, #041b26, #0a4d63); aspect-ratio: 720 / 1180; object-fit: contain; }
.zbc-loading { animation: zrSkel 1.2s ease-in-out infinite alternate; }
@keyframes zrSkel { to { opacity: .55; } }

/* reward table: inviter vs invited */
.zr-tbl { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.zr-tbl th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); text-align: left; padding: 0 10px; font-weight: 600; }
.zr-tbl td { padding: 12px 10px; background: var(--bg-inset); }
.zr-tbl td:first-child { border-radius: 12px 0 0 12px; } .zr-tbl td:last-child { border-radius: 0 12px 12px 0; }
.zr-tbl .ic { font-size: 1.2rem; margin-right: 8px; }
.zr-amt { font-family: var(--font-mono, monospace); font-weight: 700; color: var(--brand-deep, var(--brand)); white-space: nowrap; }

/* milestones (invited user) */
.zr-ms { display: flex; flex-direction: column; gap: 10px; }
.zr-m { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-inset); transition: transform .2s, border-color .2s; }
.zr-m:hover { transform: translateY(-1px); }
.zr-m .i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: var(--bg-raised); }
.zr-m b { font-size: .92rem; } .zr-m small { display: block; color: var(--ink-3); font-size: .76rem; }
.zr-m .bar { height: 6px; border-radius: 999px; background: var(--line); margin-top: 6px; overflow: hidden; }
.zr-m .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #34d399); }
.zr-m.is-claimable { border-color: color-mix(in srgb, #34d399 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, #34d399 18%, transparent); }
.zr-m.is-claimable .i { animation: zrWiggle 2.4s ease-in-out infinite; }
.zr-m.is-claimed { opacity: .75; }
@keyframes zrWiggle { 0%,80%,100% { transform: rotate(0); } 85% { transform: rotate(-10deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.zr-tag { font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line); white-space: nowrap; }
.zr-tag--ok { color: #059669; border-color: color-mix(in srgb, #10b981 40%, var(--line)); }
.zr-tag--wait { color: #b45309; border-color: color-mix(in srgb, #f59e0b 40%, var(--line)); }
.zr-tag--bad { color: #dc2626; border-color: color-mix(in srgb, #ef4444 40%, var(--line)); }

/* steps */
.zr-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
.zr-steps li { padding: 14px; border-radius: 16px; background: var(--bg-inset); position: relative; }
.zr-steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep, #0a4d63)); }
.zr-steps b { font-size: .92rem; } .zr-steps p { margin: 4px 0 0; font-size: .8rem; color: var(--ink-3); line-height: 1.5; }

.zr-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.zr-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-raised); color: inherit; text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.zr-tile:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--brand) 70%, transparent); }
.zr-tile .ico { font-size: 1.5rem; } .zr-tile .t { font-weight: 700; } .zr-tile .d { font-size: .78rem; color: var(--ink-3); }

/* banner ad */
.zr-ad { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; color: #1f1300; text-decoration: none;
  background: linear-gradient(110deg, #fde68a, #facc15 40%, #fbbf24); position: relative; overflow: hidden; }
.zr-ad::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: rgba(255,255,255,.55); transform: skewX(-20deg); animation: zrGleam 3.5s ease-in-out infinite; }
@keyframes zrGleam { 60%,100% { left: 120%; } }
.zr-ad b { font-size: 1rem; } .zr-ad span { font-size: .82rem; opacity: .85; display: block; }
.zr-ad .big { font-size: 2rem; }

/* tasks */
.zr-streak { display: flex; align-items: center; gap: 14px; }
.zr-flame { font-size: 2.4rem; animation: zrFlame 1.4s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes zrFlame { to { transform: scale(1.12) rotate(-4deg); } }
.zr-days { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; margin: 16px 0 6px; }
.zr-day { position: relative; text-align: center; padding: 12px 4px 10px; border-radius: 14px; background: var(--bg-inset); border: 1px solid var(--line); transition: transform .2s; }
.zr-day span { display: block; font-size: .7rem; color: var(--ink-3); }
.zr-day b { display: block; margin-top: 4px; font-family: var(--font-mono, monospace); font-size: .95rem; }
.zr-day .ok { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #fff; background: #10b981; transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.zr-day.is-done { background: color-mix(in srgb, #10b981 12%, var(--bg-inset)); border-color: color-mix(in srgb, #10b981 40%, var(--line)); }
.zr-day.is-done .ok { transform: scale(1); }
.zr-day.is-next { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); animation: zrBreath 1.8s ease-in-out infinite; }
.zr-day:last-child b::after { content: " 🎁"; }
@keyframes zrBreath { 50% { transform: translateY(-3px); } }
.zr-tasks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.zr-tier { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.zr-tier .bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.zr-tier .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #34d399); transition: width 1s ease; }
.zr-gico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--bg-inset); }

/* rewards */
.zr-sum { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.zr-sum .zr-card { padding: 16px; }
.zr-sum b { display: block; font: 800 1.3rem/1.2 var(--font-mono, monospace); margin-top: 4px; }
.zr-sum span { font-size: .76rem; color: var(--ink-3); }
.zr-st-pending { color: #b45309 !important; background: color-mix(in srgb, #f59e0b 14%, transparent) !important; }
.zr-st-reversed, .zr-st-failed { color: #dc2626 !important; background: color-mix(in srgb, #ef4444 12%, transparent) !important; }

/* landing */
.zl-wrap { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 28px; align-items: center; }
.zl-inviter { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.zl-inviter img, .zl-inviter .a { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; background: rgba(255,255,255,.15); color: #fff; }
.zl-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; max-width: 420px; }
.zl-cta .btn { justify-content: center; }
.zl-store { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: #000; color: #fff; text-decoration: none; font-weight: 700; border: 1px solid rgba(255,255,255,.25); }
.zl-store:hover { background: #111; }
.zl-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.zl-perk { padding: 16px; border-radius: 18px; background: var(--bg-raised); border: 1px solid var(--line); }
.zl-perk .ico { font-size: 1.6rem; } .zl-perk b { display: block; margin-top: 6px; } .zl-perk p { margin: 4px 0 0; font-size: .82rem; color: var(--ink-3); line-height: 1.5; }
.zl-opening { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: .86rem; color: #a5f3fc; }
.zl-opening i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(165,243,252,.3); border-top-color: #a5f3fc; animation: zrSpin .8s linear infinite; }
@keyframes zrSpin { to { transform: rotate(360deg); } }

/* confetti */
.zr-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.zr-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: zrFall 1.6s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes zrFall { to { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--r)); opacity: .9; } }
.zr-pop { position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%) scale(.6); z-index: 9999; pointer-events: none; opacity: 0;
  font: 800 2rem/1 var(--font-mono, monospace); color: #10b981; text-shadow: 0 6px 24px rgba(16,185,129,.4); animation: zrPopIn 1.4s ease forwards; }
@keyframes zrPopIn { 15% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } 70% { opacity: 1; transform: translate(-50%,-70%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-90%) scale(.95); } }

/* gift templates picker */
.ztpls--pro { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.ztpl-pro { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4; padding: 10px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; color: #fff; text-align: left; overflow: hidden; font: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.ztpl-pro:hover { transform: translateY(-3px); }
.ztpl-pro[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.ztpl-pro[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 800; }
.ztpl-pro b { font-size: .8rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.ztpl-pro span { font-size: .66rem; opacity: .8; }
.ztpl-pro .em { position: absolute; top: 10px; left: 10px; font-size: 1.4rem; }
.tpl-celebrate { background: radial-gradient(circle at 80% 10%, rgba(244,114,182,.6), transparent 50%), linear-gradient(145deg, #1a0533, #45106b 55%, #a21caf); }
.tpl-festive   { background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.25) 2px, transparent 3px) 0 0/18px 18px, linear-gradient(145deg, #051a10, #0b3d22 55%, #7f1d1d); }
.tpl-neon      { background: linear-gradient(rgba(192,132,252,.12) 1px, transparent 1px) 0 0/16px 16px, linear-gradient(90deg, rgba(192,132,252,.12) 1px, transparent 1px) 0 0/16px 16px, linear-gradient(145deg, #05010f, #120a33 55%, #1e1b4b); box-shadow: inset 0 0 0 1px rgba(34,211,238,.5); }
.tpl-gold      { background: repeating-linear-gradient(45deg, rgba(250,204,21,.07) 0 2px, transparent 2px 12px), linear-gradient(145deg, #0b0904, #1d1606 55%, #3a2b08); box-shadow: inset 0 0 0 1px rgba(250,204,21,.6); }
.tpl-aurora    { background: radial-gradient(circle at 85% 5%, rgba(0,212,255,.45), transparent 45%), linear-gradient(145deg, #03161f, #063a4c 55%, #0b6a7d); }
.zgift-img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6); }

/* ── Desktop vs mobile ─────────────────────────────────────────────────── */
@media (min-width: 1200px) { .zr-grid { grid-template-columns: minmax(0,1fr) 400px; } }
@media (max-width: 1060px) { .zr-sum { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 960px) {
  .zr-grid, .zl-wrap { grid-template-columns: 1fr; }
  .zr-side { position: static; }
  .zr-hgrid { grid-template-columns: 1fr; } .zr-art { display: none; }
  .zr-tasks { grid-template-columns: 1fr; }
  .zr-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .zr { padding-top: 10px; }
  .zr-h { border-radius: 22px; padding: 24px 18px; }
  .zr-stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .zr-stat { padding: 12px 14px; }
  .zr-steps { grid-template-columns: 1fr; }
  .zr-days { grid-template-columns: repeat(7, minmax(40px,1fr)); overflow-x: auto; gap: 6px; }
  .zr-day { padding: 10px 2px 8px; }
  .zr-sum { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .zl-perks { grid-template-columns: 1fr; }
  .ztpls--pro { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .zr-tbl th:nth-child(4), .zr-tbl td:nth-child(4) { display: none; }
  .zr-mobile-bar { position: sticky; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
  .zr-mobile-bar .btn { flex: 1; justify-content: center; }
}
@media (min-width: 761px) { .zr-mobile-bar { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .zr *, .zr *::before, .zr *::after { animation: none !important; transition: none !important; }
}

/* Gift card rendered by ZelBrand */
.zgift-img { display: block; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 620 / 860; border-radius: 18px; box-shadow: 0 18px 48px rgba(0,0,0,.35); background: linear-gradient(145deg, #03161f, #063a4c 55%, #0b6a7d); }
.zgift-img.zbc-loading { opacity: .6; }
@media (max-width: 560px) { .ztpls--pro { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* ── Daily tasks: tabs (check-in first, one tab per task group) ── */
.zt-tabs { display: flex; gap: 8px; margin: 18px 0 14px; padding: 6px; border-radius: 16px; background: var(--bg-card, var(--bg-inset)); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--hdr-h, 64px) + 6px); z-index: 5; }
.zt-tabs::-webkit-scrollbar { display: none; }
.zt-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.zt-tab:hover { background: var(--bg-inset); color: var(--ink-1, inherit); }
.zt-tab.is-on { background: var(--brand); color: #04121a; }
.zt-dot { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: .72rem; background: #10b981; color: #fff; }
.zt-tab.is-on .zt-dot { background: #04121a; color: var(--brand); }
.zt-panel { display: grid; gap: 14px; }
.zt-panel[hidden] { display: none; }
.zt-check { max-width: 760px; width: 100%; margin: 0 auto; }
.zt-panel[data-panel="checkin"] .zr-ad { max-width: 760px; width: 100%; margin: 0 auto; }
.zt-sum { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 10px; color: var(--ink-3); font-size: .9rem; }
.zt-sum b { color: var(--ink-1, inherit); }
.zt-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.zt-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: .85rem; cursor: pointer; }
.zt-chip.is-on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.zt-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zt-tier { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-inset); border: 1px solid var(--line); }
.zt-tier[hidden] { display: none; }
.zt-tier.is-ready { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.zt-tier.is-done { opacity: .75; }
.zt-tier__m { min-width: 0; }
.zt-tier__m .bar { height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--ink-3) 18%, transparent); margin: 6px 0 2px; overflow: hidden; }
.zt-tier__m .bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .8s ease; }
.zt-tier__m small { color: var(--ink-3); font-size: .72rem; }
@media (max-width: 860px) {
  .zt-tiers { grid-template-columns: 1fr; }
  .zt-tabs { margin: 14px -4px 12px; border-radius: 14px; }
  .zt-tab { padding: 9px 13px; font-size: .9rem; }
  .zt-tier { grid-template-columns: 1fr auto; }
  .zt-tier .zr-amt { grid-column: 1; grid-row: 2; }
  .zt-tier > .btn, .zt-tier > .zr-tag { grid-column: 2; grid-row: 1 / span 2; }
}

/* ── Leaderboard (two boards: ZRC rewards · Invites) ── */
.zlb2 .wrap { padding-bottom: 90px; }
.zlb2-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 18px; }
.zlb2-top h1 { margin: 10px 0 4px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.zlb2-top p { margin: 0; }
.zlb2-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.zlb2-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 16px; background: var(--bg-card, var(--bg-inset)); border: 1px solid var(--line); max-width: 520px; margin: 0 0 18px; }
.zlb2-tab { padding: 11px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.zlb2-tab.is-on { background: var(--brand); color: #04121a; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.zlb2-grid { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 18px; align-items: start; }
.zlb2-stage { position: sticky; top: calc(var(--hdr-h, 64px) + 12px); display: grid; gap: 12px; }
.zlb2-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 26px 14px 0; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%), var(--bg-card, var(--bg-inset)); border: 1px solid var(--line); }
.zlb2-pod { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.zlb2-crown { font-size: 1.6rem; line-height: 1; margin-bottom: -4px; animation: zrBreath 2.4s ease-in-out infinite; }
.zlb2-ring { position: relative; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, #cbd5e1, #64748b); }
.p1 .zlb2-ring { background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 0 28px rgba(245, 158, 11, .45); }
.p3 .zlb2-ring { background: linear-gradient(135deg, #fdba74, #b45309); }
.zlb2-pod .zlb2-av { width: 64px; height: 64px; font-size: 1.4rem; border: 3px solid var(--bg-card, #0b1220); }
.p1 .zlb2-av { width: 84px; height: 84px; font-size: 1.8rem; }
.zlb2-badge { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; font-size: .78rem; color: #04121a; background: #cbd5e1; border: 2px solid var(--bg-card, #0b1220); }
.p1 .zlb2-badge { background: #fbbf24; } .p3 .zlb2-badge { background: #fb923c; }
.zlb2-pn { margin-top: 16px; max-width: 100%; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zlb2-pu { max-width: 100%; font-size: .72rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zlb2-pv { margin: 6px 0 10px; padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono, monospace); font-weight: 700; font-size: .88rem; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); white-space: nowrap; }
.zlb2-pv small, .zlb2-vl small { font-weight: 500; opacity: .75; font-size: .72em; }
.zlb2-step { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 10px; font-weight: 800; font-size: 1.5rem; color: color-mix(in srgb, var(--ink-1, #fff) 35%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 22%, var(--bg-inset)), var(--bg-inset)); height: 64px; }
.p1 .zlb2-step { height: 96px; background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 30%, var(--bg-inset)), var(--bg-inset)); }
.p3 .zlb2-step { height: 46px; }
.zlb2-pod.is-me .zlb2-pn { color: var(--brand); }
.zlb2-board { border-radius: 22px; background: var(--bg-card, var(--bg-inset)); border: 1px solid var(--line); padding: 10px; }
.zlb2-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 8px 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.zlb2-head span:nth-child(2) { padding-left: 52px; }
.zlb2-list { display: grid; gap: 6px; }
.zlb2-row { display: grid; grid-template-columns: 44px 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg-inset); border: 1px solid transparent; transition: transform .15s, border-color .15s; }
.zlb2-row:hover { border-color: var(--line); transform: translateY(-1px); }
.zlb2-row.is-me { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 30%, var(--bg-inset)), color-mix(in srgb, var(--brand) 12%, var(--bg-inset))); border-color: var(--brand); box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 22%, transparent); }
.zlb2-rk { font-weight: 800; font-family: var(--font-mono, monospace); text-align: center; color: var(--ink-2); }
.zlb2-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--brand) 18%, var(--bg-inset)); color: var(--brand); flex: none; }
.zlb2-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zlb2-nm { min-width: 0; display: flex; flex-direction: column; }
.zlb2-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.zlb2-nm b em { font-style: normal; font-size: .68rem; padding: 2px 7px; border-radius: 999px; background: var(--brand); color: #04121a; margin-left: 4px; vertical-align: 2px; }
.zlb2-nm small { color: var(--ink-3); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zlb2-vl { font-family: var(--font-mono, monospace); font-weight: 700; white-space: nowrap; }
.zlb2-mebar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); z-index: 30; }
.zlb2-mebar[hidden], .zlb2-mine[hidden] { display: none; }
.zlb2-priv { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--bg-card, var(--bg-inset)); border: 1px solid var(--line); }
.zlb2-priv div { display: flex; flex-direction: column; gap: 2px; } .zlb2-priv span { font-size: .8rem; }
.zlb2-switch { position: relative; width: 50px; height: 28px; border-radius: 14px; border: 0; background: color-mix(in srgb, var(--ink-3) 40%, transparent); cursor: pointer; flex: none; transition: background .2s; }
.zlb2-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.zlb2-switch.is-on { background: var(--brand); } .zlb2-switch.is-on i { transform: translateX(22px); }
@media (min-width: 900px) { .zlb2-mebar { display: none !important; } }
@media (max-width: 899px) {
  .zlb2-grid { grid-template-columns: 1fr; }
  .zlb2-stage { position: static; }
  .zlb2-mine { display: none !important; }
  .zlb2-tabs { max-width: none; }
  .zlb2-row { grid-template-columns: 32px 40px 1fr auto; gap: 8px; padding: 9px 10px; }
  .zlb2-av { width: 40px; height: 40px; }
  .zlb2-head { grid-template-columns: 32px 1fr auto; } .zlb2-head span:nth-child(2) { padding-left: 48px; }
  .zlb2-pod .zlb2-av { width: 56px; height: 56px; } .p1 .zlb2-av { width: 72px; height: 72px; }
  .zlb2-top { align-items: flex-start; }
}
