/* Mobile-first, light, one-handed reviewer app. Safe-area aware. */
:root {
  --bg: #f4f5f7; --surface: #fff; --border: #e4e7ec; --text: #16202c; --muted: #667085;
  --primary: #2563eb; --primary-dark: #1d4ed8; --ok: #16a34a; --danger: #dc2626; --warn: #d97706;
  --radius: 12px; --pad: 16px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* `hidden` must always win over component display rules (.btn/.check-marks use flex) */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; }
#root { min-height: 100vh; display: flex; flex-direction: column; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
img { max-width: 100%; }

.screen { flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-top) + var(--pad)) var(--pad) calc(var(--safe-bottom) + var(--pad)); max-width: 560px; width: 100%; margin: 0 auto; }
.center { align-items: center; justify-content: center; text-align: center; gap: 14px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

.appbar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 10px) var(--pad) 10px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.appbar .title { font-weight: 700; font-size: 17px; }
.appbar .stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.appbar .stats b { color: var(--text); }
.linkbtn { background: none; border: none; color: var(--primary); font-size: 15px; padding: 8px; cursor: pointer; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 17px; font-weight: 600; cursor: pointer; min-height: 56px; }
.btn:active { transform: scale(0.99); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:disabled { background: #c3cfe6; border-color: #c3cfe6; }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: 1; cursor: not-allowed; color: var(--muted); }
.btn.lg { font-size: 18px; min-height: 60px; }
.btn + .btn { margin-top: 10px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--pad); }
.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input { width: 100%; padding: 14px; font-size: 16px; border: 1px solid #c8cdd6; border-radius: 10px; background: var(--surface); }
input:focus { outline: none; border-color: var(--primary); }
/* selects + form textareas match inputs (browser defaults were tiny on mobile) */
select { width: 100%; padding: 14px 40px 14px 14px; font-size: 16px; border: 1px solid #c8cdd6; border-radius: 10px; background-color: var(--surface); box-sizing: border-box; font-family: inherit; -webkit-appearance: none; appearance: none; background-repeat: no-repeat; background-position: right 14px center; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>"); }
select:focus { outline: none; border-color: var(--primary); }
.field textarea { width: 100%; padding: 14px; font-size: 16px; border: 1px solid #c8cdd6; border-radius: 10px; background: var(--surface); box-sizing: border-box; min-height: 130px; resize: vertical; line-height: 1.4; font-family: inherit; }
.field textarea:focus { outline: none; border-color: var(--primary); }
[dir="rtl"] select { padding: 14px 14px 14px 40px; background-position: left 14px center; }
/* selectable payout-method chips (replaces the withdrawal dropdown) */
.method-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.method-chips .chip { padding: 10px 16px; border: 1.5px solid #c8cdd6; border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.method-chips .chip.active { border-color: var(--primary); background: #eef4ff; color: var(--primary); }
.err { color: var(--danger); font-size: 14px; margin-top: 8px; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.metric .n { font-size: 28px; font-weight: 700; } .metric .l { color: var(--muted); font-size: 13px; }

/* task screen */
.task-img { width: 100%; background: #eceef1; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 220px; max-height: 46vh; }
.task-img img { width: 100%; height: 100%; object-fit: contain; max-height: 46vh; }
.task-img .ph { color: var(--muted); padding: 40px; }
.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 16px; max-height: 26vh; overflow: auto; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22%); padding-top: 12px; padding-bottom: var(--safe-bottom); }
/* task screen: actions live in normal flow (no sticky overlap of the steps) */
.task-actions { margin-top: 22px; padding-bottom: var(--safe-bottom); }
.task-actions .earn-line { margin: 0 0 12px; font-size: 16px; }
/* compact comment+image preview (mirrors a TikTok comment with an attached image) */
.tt-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.tt-comment { position: relative; font-size: 18px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.tt-img { display: block; margin-top: 10px; width: 56%; max-width: 190px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; }
.tt-hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.ph.sm { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.expiry { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.expiry.soon { color: var(--danger); font-weight: 600; }

.cooldown-ring { width: 120px; height: 120px; }
.progress { width: 100%; height: 8px; background: #e4e7ec; border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; background: var(--primary); transition: width .3s linear; }
.big { font-size: 40px; font-weight: 800; }
.plus { color: var(--ok); font-weight: 700; font-size: 20px; }

.list-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.list-item .thumb { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; background: #eceef1; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #ecfdf5; color: var(--ok); }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 16px); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: #16202c; color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; max-width: 90%; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.toast.err { background: var(--danger); } .toast.ok { background: var(--ok); }

.spinner { width: 22px; height: 22px; border: 3px solid #d6dae1; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; }

.qr { background: #fff; padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.urlbox { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #eef0f3; padding: 8px 12px; border-radius: 8px; word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Coins theme (Credit = Coin) ---- */
:root { --gold:#f6b73c; --gold-deep:#e0921a; --gold-ink:#7a4e08; --gold-bg:#fff7e6; }
.coin { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: none; }
.coin-amt { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

/* home hero balance */
.hero { background: linear-gradient(135deg, #fff3d6 0%, #ffe7ad 100%); border: 1px solid #f3d690; border-radius: 18px; padding: 22px 20px; text-align: center; box-shadow: 0 2px 10px rgba(224,146,26,.12); }
.hero .bal { display: inline-flex; align-items: center; gap: 10px; font-size: 44px; font-weight: 800; color: var(--gold-ink); line-height: 1; }
.hero .bal .coin { width: 38px; height: 38px; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(122,78,8,.25)); }
.hero .cap { color: #9a7320; font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; margin-top: 8px; }
.metrics2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.metric2 { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; }
.metric2 .n { font-size: 24px; font-weight: 700; } .metric2 .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* coin balance pill (task/cooldown header) */
.coin-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--gold-bg); border: 1px solid #f3d690; color: var(--gold-ink); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.coin-pill .coin { width: 16px; height: 16px; }
.coin-pill .coin-usd { font-weight: 600; font-size: .82em; opacity: .8; }

/* reward (cooldown) */
.reward { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.reward .gain { display: inline-flex; align-items: center; gap: 8px; font-size: 30px; font-weight: 800; color: var(--gold-deep); }
.reward .gain .coin { width: 30px; height: 30px; }
.coin-pop { animation: coinpop .5s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes coinpop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.18); } 100% { transform: scale(1); opacity: 1; } }
.balance-row { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--gold-ink); margin-top: 4px; }
.balance-row .coin { width: 22px; height: 22px; }

/* completed history coin badge */
.badge.coin-badge { background: var(--gold-bg); color: var(--gold-ink); display: inline-flex; align-items: center; gap: 4px; }
.badge.coin-badge .coin { width: 14px; height: 14px; }

/* ---- Task page redesign ---- */
.screen.task { gap: 0; }
.img-frame { position: relative; border-radius: 16px; overflow: hidden; background: #0e1422; min-height: 240px; max-height: 46vh; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(14,20,34,.18); }
.img-frame img { width: 100%; height: 100%; object-fit: contain; max-height: 46vh; cursor: zoom-in; }
.img-frame .ph { color: #8a93a3; padding: 48px; font-size: 14px; }
.img-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
.icon-btn { background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.icon-btn:active { transform: scale(.97); }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 18px 2px 8px; }
.comment-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.copied-flag { position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--ok); font-weight: 700; opacity: 0; transition: opacity .2s; background: #ecfdf5; padding: 2px 8px; border-radius: 999px; }
.copied-flag.show { opacity: 1; }

.steps { display: flex; gap: 6px; margin: 18px 0 6px; }
.step { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.step .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-weight: 700; background: var(--surface); font-size: 13px; }
.step.active { color: var(--text); font-weight: 700; }
.step.active .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }

.earn-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--gold-ink); font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.lockbtn { position: relative; overflow: hidden; }
.lockbtn .fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: rgba(37,99,235,.16); transition: width .9s linear; pointer-events: none; }
.lockbtn .lbl { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 4px 14px rgba(22,163,74,.28); }
.btn.success .coin { filter: none; }
.zoom-ov { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 12px; }
.zoom-ov img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---- Task header + claim-button transition fixes ---- */
.taskbar { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 12px) var(--pad) 12px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.taskbar .coin-pill { font-size: 15px; }
.taskbar .left-pill { margin-left: auto; background: #eef2f7; color: #44566b; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; }
.taskbar .left-pill b { color: var(--text); }
.taskbar .linkbtn { padding: 6px 2px; font-size: 14px; }
.screen.task, .screen.subpage { padding-top: 14px; }   /* the appbar2 already handles the safe area */

/* locked Complete: clearly inactive; green progress previews the claim state */
.btn.lockbtn:disabled { background: #eef0f3; border-color: #e2e6eb; color: #97a0ad; }
.lockbtn .fill { background: rgba(22,163,74,.18); transition: width .9s linear; }
.btn.success { box-shadow: 0 6px 18px rgba(22,163,74,.30); }
@keyframes claimpop { 0% { transform: scale(.95); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
.claim-pop { animation: claimpop .5s ease; }

/* ---- Home redesign ---- */
.screen.home { gap: 0; }
.home-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: #e7edf5; color: #2d4a6b; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; }
.home-top .greeting { font-size: 19px; font-weight: 800; line-height: 1.1; }
.icon-link { margin-left: auto; background: none; border: none; color: var(--muted); padding: 8px; cursor: pointer; display: flex; }
.icon-link svg { width: 22px; height: 22px; }

.hero { position: relative; }
.hero .cap { margin: 0 0 8px; }
.hero .bal { justify-content: center; }
.hero-sub { color: #9a7320; font-size: 13px; margin-top: 10px; font-weight: 500; }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.stat-ic { width: 40px; height: 40px; border-radius: 11px; background: #eef2f8; color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.stat-ic svg { width: 21px; height: 21px; }
.stat .n { font-size: 23px; font-weight: 800; line-height: 1; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.cta-start { flex-direction: column; gap: 4px; padding: 15px; }
.cta-start .cta-main { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; }
.cta-start .cta-main svg { width: 20px; height: 20px; }
.cta-start .cta-sub { font-size: 13px; font-weight: 500; opacity: .92; }

.menu { margin-top: 18px; display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 13px; background: var(--surface); border: none; padding: 15px 16px; font-size: 16px; cursor: pointer; width: 100%; text-align: left; color: var(--text); }
.menu-row:active { background: #f3f4f6; }
.menu-row svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.menu-row .chev { margin-left: auto; color: #b6bcc6; font-size: 22px; line-height: 1; }

/* ---- Bigger, more visible task/cooldown header ---- */
.taskbar { padding: calc(var(--safe-top) + 14px) var(--pad) 14px; }
.taskbar .coin-pill { font-size: 19px; padding: 7px 15px; gap: 7px; }
.taskbar .coin-pill .coin { width: 23px; height: 23px; }
.taskbar .left-pill { font-size: 14px; padding: 6px 13px; }
.taskbar .linkbtn { font-size: 16px; font-weight: 600; }

/* ---- Cooldown fun message ---- */
.cd-msg { font-size: 17px; font-weight: 700; color: var(--gold-ink); margin: 18px 8px 22px; max-width: 320px; line-height: 1.35; }
.cd-label { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.cd-label + .big { margin-top: 4px; }

/* ---- Standard app-bar (task/cooldown): back · title · remaining ---- */
.appbar2 { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; padding: calc(var(--safe-top) + 12px) 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.appbar2 .bk { background: none; border: none; color: var(--text); padding: 8px; display: flex; cursor: pointer; }
.appbar2 .bk svg { width: 26px; height: 26px; }
.appbar2 .ab-title { text-align: center; font-weight: 700; font-size: 18px; }
.appbar2 .ab-right { justify-self: end; padding-right: 8px; min-width: 44px; text-align: right; }
.appbar2 .left-pill { background: #eef2f7; color: #44566b; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; }
.appbar2 .left-pill b { color: var(--text); }

/* ---- app-bar: centered title+sub, always-visible coin on right ---- */
.appbar2 .ab-center { text-align: center; min-width: 0; }
.appbar2 .ab-title { font-weight: 700; font-size: 16px; line-height: 1.15; }
.appbar2 .ab-sub { color: var(--muted); font-size: 12px; }
.appbar2 .ab-sub b { color: var(--text); }
.appbar2 .ab-right .coin-pill { font-size: 17px; padding: 6px 13px; }
.appbar2 .ab-right .coin-pill .coin { width: 20px; height: 20px; }

/* ---- Invite & Earn / Coin history ---- */
.invite-hero .ihead { display:flex; align-items:center; gap:8px; font-size:18px; font-weight:800; }
.invite-hero .ihead .coin { width:24px; height:24px; }
.ireward { display:flex; flex-direction:column; gap:6px; margin-top:10px; font-weight:600; }
.ireward .coin { width:18px; height:18px; }
.codebox { background:#f3f4f6; border:1px dashed #c8cdd6; border-radius:10px; padding:14px; text-align:center; font-family:ui-monospace,Menlo,monospace; font-size:20px; letter-spacing:1px; }
.callout-warn { background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:8px; padding:10px; font-size:13px; margin-top:10px; }
.amt-pos { color:var(--ok); font-weight:700; display:inline-flex; align-items:center; gap:4px; justify-content:flex-end; }
.amt-neg { color:var(--danger); font-weight:700; display:inline-flex; align-items:center; gap:4px; justify-content:flex-end; }
.amt-pos .coin, .amt-neg .coin { width:15px; height:15px; }
.list-item .badge.coin-badge { display:inline-flex; align-items:center; gap:3px; }
.referral-pop { margin-top:14px; background:var(--gold-bg); border:1px solid #f3d690; color:var(--gold-ink); border-radius:12px; padding:12px 16px; font-weight:700; display:inline-flex; flex-direction:column; align-items:center; gap:4px; }
.referral-pop .coin { width:20px; height:20px; }
.referral-pop .big-r { font-size:20px; display:inline-flex; align-items:center; gap:6px; }

/* ---- Wallet & withdrawals ---- */
.wallet-hero { text-align:center; }
.wallet-hero .cap { color:var(--muted); font-size:13px; }
.wallet-hero .bal.big { font-size:38px; font-weight:800; display:inline-flex; align-items:center; gap:6px; justify-content:center; }
.wallet-hero .bal.big .coin { width:30px; height:30px; }
.wbreak { display:flex; justify-content:space-around; margin-top:14px; border-top:1px solid var(--border); padding-top:12px; }
.wbreak .n { font-size:20px; font-weight:700; } .wbreak .l { font-size:12px; color:var(--muted); }
.wd-form { display:flex; flex-direction:column; gap:6px; }
.wd-form .rowbtns { display:flex; gap:10px; margin-top:6px; }
.btn.sm { width:auto; min-height:0; padding:8px 12px; font-size:14px; margin-top:8px; }
.wd-item { align-items:flex-start; }
.wd-badge { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:700; }
.wd-pending { background:#fef3c7; color:#92400e; }
.wd-approved { background:#dbeafe; color:#1e40af; }
.wd-paid { background:#dcfce7; color:#166534; }
.wd-rejected { background:#fee2e2; color:#991b1b; }
.wd-cancelled { background:#f1f5f9; color:#475569; }

/* login → join CTA */
.join-cta { text-align:center; margin-top:18px; font-size:15px; }
.join-cta a { color:var(--primary); font-weight:600; text-decoration:none; }
.join-cta a:hover { text-decoration:underline; }

/* offline / connection error states */
#offline-banner { position:fixed; left:0; right:0; top:0; z-index:80; background:#7a4e08; color:#fff; text-align:center; font-size:13px; font-weight:600; padding:calc(var(--safe-top) + 7px) 12px 7px; }
.err-ill { font-size:52px; line-height:1; }
.inline-err { text-align:center; padding:22px 8px; display:flex; flex-direction:column; align-items:center; gap:12px; }

/* wallet money clarity + progress */
.money-approx { color:var(--gold-ink); font-weight:700; font-size:15px; margin-top:4px; }
.withdraw-progress .wp-top { display:flex; justify-content:space-between; font-size:13px; color:var(--muted); margin-bottom:8px; }
.withdraw-progress .wp-top b { color:var(--text); }
.withdraw-progress .wp-foot { margin:10px 0 0; }
.payout-note { text-align:center; margin:10px 4px 0; }
.amt-money { color:var(--gold-ink); font-weight:700; margin-top:6px; }

/* styled confirm modal */
.modal-ov { position:fixed; inset:0; background:rgba(14,20,34,.5); display:flex; align-items:flex-end; justify-content:center; z-index:70; padding:16px; padding-bottom:calc(var(--safe-bottom) + 16px); }
.modal-box { background:var(--surface); border-radius:18px; padding:22px; width:100%; max-width:420px; box-shadow:0 -4px 24px rgba(0,0,0,.2); }
.modal-box h3 { font-size:19px; margin-bottom:8px; }
.modal-box p { margin:0 0 16px; }
@media (min-width:480px) { .modal-ov { align-items:center; } }

/* task: clear "what to do" banner + more legible steps */
.task-howto { display:flex; gap:8px; align-items:flex-start; background:#eef4ff; border:1px solid #cfe0ff; color:#1e40af; border-radius:12px; padding:11px 13px; font-size:14px; line-height:1.4; font-weight:600; margin-bottom:14px; }
.task-howto span { font-weight:500; }
.steps .step { font-size:12.5px; }
.steps .step .dot { width:30px; height:30px; font-size:14px; }
/* prominent, readable vertical step list */
.steps-v { display:flex; flex-direction:column; gap:10px; margin:8px 0 4px; }
.steps-v .vstep { display:flex; align-items:center; gap:12px; text-align:left; font-size:17px; line-height:1.35; }
.steps-v .vstep .dot { flex:none; width:34px; height:34px; border-radius:50%; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; background:var(--surface); color:var(--muted); }
.steps-v .vtext { flex:1; color:var(--muted); font-weight:500; }
.steps-v .vstep.active .vtext, .steps-v .vstep.done .vtext { color:var(--text); font-weight:700; }
.steps-v .vstep.active .dot { border-color:var(--primary); color:var(--primary); box-shadow:0 0 0 4px rgba(37,99,235,.12); }
.steps-v .vstep.done .dot { background:var(--ok); border-color:var(--ok); color:#fff; }

/* password show/hide */
.pw-wrap { position:relative; }
.pw-wrap input { padding-right:64px; }
.pw-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--primary); font-weight:600; font-size:14px; padding:8px 10px; cursor:pointer; }

/* first-run onboarding */
.screen.onboard { justify-content:flex-start; }
.ob-title { font-size:26px; font-weight:800; margin:8px 0 22px; }
.ob-steps { display:flex; flex-direction:column; gap:16px; }
.ob-step { display:flex; gap:14px; align-items:flex-start; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px; }
.ob-ic { font-size:30px; line-height:1; flex:none; }
.ob-step .ob-h { font-size:17px; font-weight:700; margin-bottom:3px; }

/* ---- RTL (Arabic/Urdu) ---- */
[dir="rtl"] .img-actions { right: auto; left: 10px; }
[dir="rtl"] .copied-flag { right: auto; left: 12px; }
[dir="rtl"] .pw-wrap input { padding-right: 14px; padding-left: 64px; }
[dir="rtl"] .pw-toggle { right: auto; left: 6px; }
[dir="rtl"] .menu-row .chev { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
[dir="rtl"] .icon-link { margin-left: 0; margin-right: auto; }

/* language picker — big, readable, flagged */
.lang-btn { display:inline-flex; align-items:center; gap:10px; align-self:center; margin-bottom:8px; padding:11px 16px; font-size:17px; font-weight:600; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text); cursor:pointer; min-height:48px; box-shadow:0 1px 3px rgba(16,24,40,.06); }
.lang-btn:active { transform:scale(.98); }
.lang-btn .lang-flag { font-size:22px; line-height:1; }
.lang-btn .lang-caret { color:var(--muted); font-size:14px; }
#langholder .lang-btn { display:flex; width:100%; justify-content:flex-start; border-radius:12px; }
#langholder .lang-btn .lang-caret { margin-left:auto; }

.lang-ov { align-items:flex-end; }
.lang-sheet { background:var(--surface); border-radius:20px 20px 0 0; width:100%; max-width:520px; padding:10px 10px calc(var(--safe-bottom) + 14px); max-height:80vh; overflow:auto; box-shadow:0 -6px 24px rgba(0,0,0,.22); }
.lang-sheet-title { text-align:center; font-weight:700; font-size:15px; color:var(--muted); padding:12px 0 8px; }
.lang-opt { display:flex; align-items:center; gap:14px; width:100%; padding:16px 14px; border:none; background:none; font-size:19px; font-weight:600; color:var(--text); cursor:pointer; border-radius:14px; text-align:left; }
.lang-opt:active { background:#f3f4f6; }
.lang-opt.sel { background:var(--gold-bg); }
.lang-opt .lang-flag { font-size:28px; line-height:1; flex:none; }
.lang-opt .lang-check { margin-left:auto; color:var(--ok); font-size:20px; font-weight:800; }
@media (min-width:520px) { .lang-ov { align-items:center; } .lang-sheet { border-radius:20px; } }
[dir="rtl"] .lang-opt { text-align:right; }
[dir="rtl"] .lang-opt .lang-check { margin-left:0; margin-right:auto; }
[dir="rtl"] #langholder .lang-btn .lang-caret { margin-left:0; margin-right:auto; }

/* 3-step onboarding stepper */
.ob-bar { display:flex; gap:8px; margin:4px 0 18px; }
.ob-seg { flex:1; text-align:center; position:relative; }
/* connector line linking the circles so the row reads as a progress bar */
.ob-seg:not(:first-child)::before { content:""; position:absolute; top:14px; left:-50%; width:100%; height:3px; background:var(--border); border-radius:2px; z-index:0; }
[dir="rtl"] .ob-seg:not(:first-child)::before { left:auto; right:-50%; }
.ob-seg.active:not(:first-child)::before, .ob-seg.done:not(:first-child)::before { background:var(--ok); }
.ob-seg .ob-num { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; width:30px; height:30px; margin:0 auto 6px; border-radius:50%; border:2px solid var(--border); background:var(--surface); font-weight:800; font-size:14px; color:var(--muted); }
.ob-seg label { font-size:12px; color:var(--muted); }
.ob-seg.active .ob-num { border-color:var(--primary); color:var(--primary); box-shadow:0 0 0 4px rgba(37,99,235,.12); }
.ob-seg.active label { color:var(--text); font-weight:700; }
.ob-seg.done .ob-num { background:var(--ok); border-color:var(--ok); color:#fff; }
.ob-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:22px 18px; text-align:center; }
.ob-card h2 { font-size:21px; margin:6px 0 8px; }
/* onboarding body: left-aligned (centered multi-line is hard to read), bigger, darker,
   and preserving the admin's line breaks/paragraphs */
.ob-body { text-align:left; font-size:16px; line-height:1.55; color:var(--text); white-space:pre-line; margin:10px 0 0; }
.ob-bullets { text-align:left; margin:12px 0 0; padding-left:24px; }
.ob-bullets li { font-size:16px; line-height:1.45; color:var(--text); margin:7px 0; }
.ob-ic-lg { font-size:44px; line-height:1; }
.ob-mock { margin:16px auto 0; max-width:260px; border:1px solid var(--border); border-radius:14px; overflow:hidden; text-align:left; box-shadow:0 2px 10px rgba(16,24,40,.06); pointer-events:none; user-select:none; }
.ob-mock-img { background:#0e1422; color:#8a93a3; font-size:40px; text-align:center; padding:22px 0; }
.ob-mock-cmt { padding:10px 12px; font-size:14px; border-bottom:1px solid var(--border); }
/* DOWNLOAD IMAGE is the hero of step 1 — prominent gold, clearly the primary action. */
.ob-mock-dl { display:flex; align-items:center; justify-content:center; gap:8px; margin:12px; padding:13px; border-radius:12px; background:var(--gold); color:var(--gold-ink); font-weight:800; font-size:15px; letter-spacing:.3px; box-shadow:0 2px 8px rgba(224,146,26,.3); }
.ob-mock-hint { text-align:center; color:var(--muted); font-size:12px; padding:0 12px 12px; }
/* "EXAMPLE" ribbon makes clear the mockup is illustrative, not tappable (feedback #2/#4). */
.ob-mock { position:relative; }
.ob-ex { position:absolute; top:8px; right:8px; z-index:1; background:#0e1422; color:#fff; font-size:10px; font-weight:800; letter-spacing:1px; padding:3px 8px; border-radius:6px; opacity:.85; }
[dir="rtl"] .ob-ex { right:auto; left:8px; }
/* Step-2 mockup buttons: look like the real UI but visibly inert (greyed, no shadow, dashed). */
.ob-fakebtn { margin:12px; padding:12px; border-radius:12px; text-align:center; font-weight:800; font-size:15px; border:1.5px dashed #c8cdd6; }
.ob-fakebtn.fb-primary { background:#eef2f7; color:#5b6573; }
.ob-fakebtn.fb-locked { background:transparent; color:var(--muted); font-weight:700; border-style:dashed; }

/* Step-3 welcome-bonus reward box — prominent gift card, feels rewarding (feedback #6). */
.ob-reward { margin:18px auto 4px; max-width:300px; background:linear-gradient(135deg,#fff7e6,#ffeec2); border:1.5px solid #f3d690; border-radius:16px; padding:18px 16px; box-shadow:0 4px 14px rgba(224,146,26,.18); }
.ob-gift { font-size:40px; line-height:1; animation:giftbob 1.6s ease-in-out infinite; }
.ob-reward-main { margin-top:8px; font-size:17px; font-weight:800; color:var(--gold-ink); }
.ob-reward-sub { margin-top:4px; font-size:13px; color:var(--gold-ink); opacity:.85; }
@keyframes giftbob { 0%,100%{ transform:translateY(0) rotate(-3deg);} 50%{ transform:translateY(-5px) rotate(3deg);} }

/* Next button: green + tick = "understood, moving on" (feedback #3). Claim: gold reward. */
.ob-next-btn { background:var(--ok); color:#fff; }
.ob-claim-btn { background:linear-gradient(135deg,var(--gold),var(--gold-deep)); color:#fff; box-shadow:0 4px 14px rgba(224,146,26,.35); }

/* Celebration overlay: confetti + reward card on completion (feedback #7), reusable for mini-tasks (#8). */
.celebrate { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; background:rgba(8,12,20,.45); overflow:hidden; }
.celebrate .confetti { position:absolute; inset:0; pointer-events:none; }
.celebrate .confetti i { position:absolute; top:-12px; width:9px; height:14px; border-radius:2px; opacity:.95; animation-name:conffall; animation-timing-function:linear; animation-iteration-count:1; }
@keyframes conffall { 0%{ transform:translateY(-12px) rotate(0); opacity:1; } 100%{ transform:translateY(108vh) rotate(720deg); opacity:.9; } }
.celebrate-card { background:var(--surface); border-radius:18px; padding:26px 30px; text-align:center; box-shadow:0 12px 40px rgba(0,0,0,.3); max-width:280px; }
.cb-emoji { font-size:52px; line-height:1; }
.cb-title { margin-top:8px; font-size:24px; font-weight:800; color:var(--gold-deep); }
.cb-sub { margin-top:6px; font-size:14px; color:var(--muted); }

/* promote & earn */
.promo-card { margin-bottom:12px; }
.promo-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.promo-name { font-weight:700; font-size:16px; }
.promo-reward { display:inline-flex; align-items:center; gap:5px; font-weight:800; color:var(--gold-ink); white-space:nowrap; }
.promo-reward .coin { width:18px; height:18px; }
.promo-foot { display:flex; justify-content:space-between; align-items:center; margin-top:10px; }

/* support / messaging */
.unread-dot { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--danger); color:#fff; font-size:12px; font-weight:800; margin-left:6px; }
.sup-item { display:flex; gap:10px; align-items:center; height:74px; box-sizing:border-box; overflow:hidden; }
/* text column must be allowed to shrink so both lines ellipsize instead of overflowing */
.sup-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.sup-subj { display:flex; align-items:center; gap:6px; min-width:0; }
.sup-subj b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.sup-item .wd-badge { flex:none; white-space:nowrap; align-self:center; }
.sup-thread { display:flex; flex-direction:column; gap:10px; padding:6px 0; }
.sup-msg { max-width:82%; padding:10px 13px; border-radius:14px; font-size:15px; line-height:1.4; white-space:pre-wrap; word-break:break-word; }
.sup-msg .sup-time { font-size:11px; color:var(--muted); margin-top:4px; }
.sup-msg.mine { align-self:flex-end; background:var(--primary); color:#fff; border-bottom-right-radius:4px; }
.sup-msg.mine .sup-time { color:rgba(255,255,255,.8); }
.sup-msg.them { align-self:flex-start; background:var(--surface); border:1px solid var(--border); border-bottom-left-radius:4px; }
.sup-sys { align-self:center; font-size:12px; color:var(--muted); background:#eef0f3; padding:4px 10px; border-radius:999px; }
.sup-composer { display:flex; gap:8px; align-items:flex-end; }
.sup-composer textarea { flex:1; padding:10px; border:1px solid #c8cdd6; border-radius:10px; font-size:15px; resize:none; }
.sup-composer .btn { width:auto; min-height:0; padding:10px 16px; }
textarea { font-family:inherit; }
[dir="rtl"] .sup-msg.mine { align-self:flex-start; } [dir="rtl"] .sup-msg.them { align-self:flex-end; }

/* gamification: level card, streak, celebration chips */
.level-card { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:14px 16px; margin-top:12px; }
.lvl-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.lvl-badge { font-weight:800; font-size:15px; }
.streak-chip { font-size:13px; font-weight:700; color:var(--gold-ink); background:var(--gold-bg); border:1px solid #f3d690; border-radius:999px; padding:3px 10px; }
.lvl-foot { margin-top:8px; }
.game-chip { margin-top:10px; padding:8px 14px; border-radius:12px; font-weight:700; font-size:14px; }
.game-chip.up { background:#eef4ff; border:1px solid #cfe0ff; color:#1e40af; }
.game-chip.ach { background:var(--gold-bg); border:1px solid #f3d690; color:var(--gold-ink); }
.game-chip.streak { background:#fff1f0; border:1px solid #fecaca; color:#b91c1c; }

/* task-screen notes + download gate */
.task-note { display:flex; align-items:flex-start; gap:7px; font-size:14px; line-height:1.4; border-radius:10px; padding:10px 12px; margin:10px 0; }
.task-note.attach { background:var(--gold-bg); border:1px solid #f3d690; color:var(--gold-ink); font-weight:700; }
.task-note.checked { background:#eef0f3; color:var(--muted); margin:8px 0 0; }
.dl-gate { text-align:center; font-size:13px; font-weight:700; color:var(--gold-ink); background:var(--gold-bg); border:1px dashed #f3d690; border-radius:10px; padding:8px 10px; margin-bottom:8px; }
/* phase-1: a clear explainer + granular preview + big "Download image" button */
.dl-intro { margin-top:16px; }
.dl-intro .dl-step { font-weight:800; font-size:19px; color:var(--text); text-align:center; }
.dl-intro > p { margin:8px 0 0; font-size:15px; line-height:1.5; color:var(--text); text-align:center; }
.dl-intro p .coin { vertical-align:-2px; }
.flow-label { margin:18px 2px 8px; font-size:12px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--muted); }
.flow-list { margin:0; padding:0; list-style:none; counter-reset:fl; display:flex; flex-direction:column; gap:10px; }
.flow-list li { counter-increment:fl; display:flex; align-items:flex-start; gap:12px; font-size:16px; line-height:1.35; color:var(--text); }
.flow-list li::before { content:counter(fl); flex:none; width:30px; height:30px; border-radius:50%; background:var(--gold-bg); border:1.5px solid #f3d690; color:var(--gold-ink); font-weight:800; font-size:14px; display:flex; align-items:center; justify-content:center; }
.dl-cta { margin-top:16px; }
.dl-again { display:block; width:100%; text-align:center; margin-top:10px; }
.dl-saved { margin-top:16px; text-align:center; font-size:15px; font-weight:700; color:var(--ok); }
/* support list: keep the unopened preview to one clean line */
.sup-preview { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
/* withdrawal CTA shares the two-line home-CTA look */
.wd-cta { width:100%; margin-top:16px; }
.withdraw-progress .progress > div { background: var(--ok); }
/* "endless earning" cues */
.home-promise { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 2px 2px; }
.earned-today { margin: 10px auto 0; font-size: 15px; font-weight: 700; color: var(--gold-ink); display: flex; align-items: center; justify-content: center; gap: 6px; }
.earned-today .coin { width: 18px; height: 18px; }
.earned-today .muted { font-weight: 500; }
.cd-more { margin-top: 18px; font-size: 13px; color: var(--muted); max-width: 300px; }
/* account-safety warning */
.safety-ic { font-size: 52px; line-height: 1; }
.safety-title { margin: 10px 0 6px; }
.safety-body { text-align: left; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 340px; margin: 0 auto 18px; }

/* Check & Earn (comment verification) */
.screen.check .check-warn { margin: 14px 0 2px; padding: 12px 14px; border-radius: 10px; background: #fff4e5; color: #92400e; font-size: 17px; line-height: 1.5; border: 1px solid #fcd9a8; }
/* Larger, easier-to-read type on the Check & earn screen (scoped, won't touch task screen) */
.screen.check .small { font-size: 16px; line-height: 1.5; }
.screen.check .section-label { font-size: 14px; }
.screen.check .tt-comment { font-size: 21px; line-height: 1.55; }
.screen.check .tt-hint { font-size: 14px; }
.screen.check .task-actions .earn-line { font-size: 17px; }
.screen.check .btn { font-size: 18px; }
.check-marks { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.check-marks .btn + .btn { margin-top: 0; } /* flex gap is the single source of spacing */
/* "No such comment": solid red, white text (mirrors the green Found button); keep
   text white-on-red even when locked/disabled so it stays readable */
.btn.danger:disabled { background: var(--danger); border-color: var(--danger); color: #fff; opacity: .5; }
.check-empty-ic { font-size: 52px; line-height: 1; }
.check-empty-title { margin: 10px 0 6px; }

/* respect reduced-motion: keep state visible, drop the motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
