/* Sansar24 phone app – "Clean cards" */
:root { --red: #e0201b; --red-dark: #b81712; --red-soft: #fde8e7; --ink: #222; --muted: #666; --line: #e6e6e6; --bg: #fcfafa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h3 { font-size: 17px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#app { max-width: 520px; margin: 0 auto; padding-bottom: 86px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* Header */
header { padding: 16px 18px 22px; background: var(--red); color: #fff; border-radius: 0 0 24px 24px; }
.top { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.hello { margin: 14px 0 12px; font-size: 21px; font-weight: 700; }
.progress { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.16); }
.prow { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.bar { height: 8px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: #fff; }

/* Task list */
main { padding: 16px 14px; }
.listhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.listhead h1 { margin: 0; font-size: 18px; }
.filters { display: flex; gap: 6px; }
.fchip { width: auto; min-height: 36px; padding: 0 14px; border: 1px solid #dcdcdc; border-radius: 999px; background: #fff; color: #444; font-size: 14px; font-weight: 500; }
.fchip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.tcard { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.07); color: var(--ink); text-decoration: none; }
.tcard:active { background: #fafafa; }
.tbody { flex: 1; min-width: 0; }
.tbody strong { display: block; line-height: 1.3; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }
.tbody .meta { display: block; font-size: 13px; margin-top: 2px; }
.chip { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: 12px; font-weight: 600; }
.tcard.isdone { background: #fafafa; border: 1px dashed #d9d9d9; box-shadow: none; color: var(--muted); }
.tcard.isdone strong { color: #444; }
.badge { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; font-size: 17px; }
.badge.blue { background: #e8f0fe; color: #1d4ea8; } .badge.amber { background: #fff3dc; color: #8a4f00; }
.badge.green { background: #e6f6ef; color: #0c6544; } .badge.purple { background: #f0eafd; color: #5b34b0; }
.badge.teal { background: #e2f5f5; color: #0b6262; } .badge.done { background: #e6f6ef; color: #0c6544; }
.card { margin-bottom: 14px; padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.empty { padding: 28px 16px; text-align: center; }
.empty .big { width: 56px; height: 56px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); }
.empty p { margin: 0; color: var(--muted); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.clip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.date { flex: 0 0 auto; color: var(--muted); }

/* Profile */
.profile { text-align: center; padding: 24px 16px; }
.profile .avatar { width: 72px; height: 72px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); font-size: 28px; font-weight: 700; }
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.pstats div { padding: 12px; border-radius: 12px; background: var(--bg); }
.pstats strong { display: block; font-size: 24px; }
.pstats span { color: var(--muted); font-size: 13px; }

/* Forms and buttons */
label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
input, select { display: block; width: 100%; min-height: 48px; margin-top: 4px; padding: 10px 12px; border: 1px solid #d4d4d4; border-radius: 10px; background: #fff; font: inherit; }
input:focus { outline: 2px solid rgba(224,32,27,.25); border-color: var(--red); }
button, .btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
button:active, .btn:active { background: var(--red-dark); }
button:disabled { opacity: .55; }
.btn.outline { border: 2px solid var(--red); background: #fff; color: var(--red); }
button.plain { margin-top: 8px; background: none; color: var(--red); font-weight: 600; }
.claim { display: flex; gap: 8px; }
.claim input { flex: 1; min-width: 0; margin: 0; text-transform: uppercase; letter-spacing: 1px; }
.claim button { width: auto; background: var(--ink); }
.note { margin: 8px 0 0; color: #a3150f; font-size: 14px; }
.note:empty { display: none; }
.note.good { color: #0c6544; font-weight: 600; }

/* Bottom tabs */
nav { padding: 0 4px; position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: #fff; border-top: 1px solid var(--line); }
.tab { flex: 1; max-width: 180px; min-height: 66px; padding: 6px 2px 8px; flex-direction: column; gap: 3px; border-radius: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 500; }
.tab.on { color: var(--red-dark); font-weight: 700; }
.ticon { position: relative; display: grid; place-items: center; width: 60px; height: 32px; border-radius: 999px; }
.tab.on .ticon { background: var(--red-soft); }
.tab.on .ticon svg { stroke-width: 2.5; }
.tbadge { position: absolute; top: -2px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.tab:active { background: #fafafa; }

/* Task page */
.tpage { max-width: 520px; margin: 0 auto; padding-bottom: 96px; }
.tbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; color: var(--ink); border-radius: 0; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.tbar .chip { margin-left: auto; }
.iconlink { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); }
.thead { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.thead .badge { flex-basis: 52px; width: 52px; height: 52px; border-radius: 14px; font-size: 20px; }
.thead h1 { margin: 0; font-size: 21px; }
.info { padding: 4px 16px; }
.inforow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #eee; }
.inforow:first-child { border-top: 0; }
.itext { flex: 1; min-width: 0; }
.itext .lbl { display: block; color: var(--muted); font-size: 12px; }
.itext strong { display: block; overflow-wrap: anywhere; }
.copy { flex: 0 0 auto; width: auto; min-height: 40px; padding: 0 14px; border: 1px solid #e3e3e3; background: #fff; color: var(--red); font-weight: 600; }
.copy:active { background: var(--red-soft); }
.card h2 { font-size: 17px; margin-bottom: 12px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 2px 0 14px 42px; counter-increment: s; overflow-wrap: anywhere; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 14px; }
.steps li:last-child { padding-bottom: 0; }
.codelabel { font-size: 15px; margin-bottom: 8px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 14px 16px; background: #fff; border-top: 1px solid var(--line); }
.bottombar .btn { max-width: 492px; margin: 0 auto; min-height: 52px; }
.bottombar svg { width: 18px; height: 18px; }

/* Login and download pages */
.auth { max-width: 440px; margin: 0 auto; padding: 36px 18px; }
.auth .brand { display: block; margin: 0 0 22px; }
.auth h1 { font-size: 28px; }
.sub { margin: 0 0 20px; color: var(--muted); }
.error { padding: 10px 14px; border-radius: 10px; background: var(--red-soft); color: #a3150f; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); padding: 11px 20px; border-radius: 10px; background: #222; color: #fff; white-space: nowrap; }

/* In-app article */
.read { max-width: 680px; margin: 0 auto; padding: 16px 18px 32px; background: #fff; min-height: 100vh; font-size: 18px; line-height: 1.7; }
.read h1 { font-size: 27px; margin-top: 12px; }
.read h2 { font-size: 21px; margin: 24px 0 6px; }
.read p { margin: 0 0 16px; }
.back { color: var(--red); font-weight: 700; text-decoration: none; font-size: 16px; }
.rne-box { margin: 2.5em 0 1em; padding: 20px; border: 2px solid var(--red); border-radius: 16px; background: #fff6f5; text-align: center; color: var(--ink); }
.rne-box p { margin: 0 0 12px; }
.rne-box button, .rne-box .rne-link { display: inline-flex; width: auto; min-height: 48px; padding: 11px 24px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.rne-box button:disabled { background: #c9c9c9; cursor: not-allowed; }
#rne-code { margin-bottom: 14px; font: 700 30px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 3px; }
#rne-done { margin-top: 12px; font-weight: 700; color: #0c6544; }
#rne-done a { color: var(--red); }

/* Welcome screen */
.splash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; background: linear-gradient(165deg, #e0201b, #a8130f); color: #fff; text-align: center; transition: opacity .4s ease; }
.splash img { margin-bottom: 26px; }
.splash .hi { margin: 0; font-size: 30px; line-height: 1.25; overflow-wrap: anywhere; animation: rise .5s ease both; }
.splash .ready { margin: 0; font-size: 16px; opacity: .9; animation: rise .5s .15s ease both; }
.splash .dots { display: flex; gap: 6px; margin-top: 18px; }
.splash .dots i { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .4; animation: blink 1s infinite; }
.splash .dots i:nth-child(2) { animation-delay: .2s; } .splash .dots i:nth-child(3) { animation-delay: .4s; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .splash .hi, .splash .ready, .splash .dots i { animation: none; } .splash { transition: none; } }

/* Home cards */
.htitle { margin: 4px 2px 14px; font-size: 19px; }
.hcard { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 0; margin-bottom: 12px; padding: 18px 16px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--ink); font-weight: 400; text-align: left; justify-content: flex-start; }
.hcard:active { background: #fafafa; }
.hicon { flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; }
.hicon svg { width: 28px; height: 28px; }
.hicon.red { background: var(--red-soft); color: var(--red); }
.hicon.blue { background: #e8f0fe; color: #1d4ea8; }
.hicon.green { background: #e6f6ef; color: #0c6544; }
.htext { flex: 1; min-width: 0; }
.htext strong { display: block; font-size: 18px; }
.htext .meta { display: block; margin-top: 2px; }
.hgo { color: #999; }
.chip.soon { background: #f1f1f2; color: #555; }
.backrow { width: auto; min-height: 44px; margin: -4px 0 6px -6px; padding: 0 10px 0 4px; gap: 4px; background: none; color: var(--ink); font-weight: 600; justify-content: flex-start; }
.backrow:active { background: rgba(0,0,0,.04); }
.soonbox { padding: 32px 20px; text-align: center; }
.soonbox .hicon.big { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 24px; }
.soonbox .hicon.big svg { width: 40px; height: 40px; }
.soonbox h1 { font-size: 24px; margin-bottom: 10px; }
.soonchip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: #fff3dc; color: #8a4f00; font-weight: 700; }
.soonchip svg { width: 18px; height: 18px; }
.soonbox .meta { margin-bottom: 20px; }

/* Home: section chips, latest cards and coins */
.hchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.hchip { width: 100%; min-width: 0; min-height: 46px; padding: 0 6px; gap: 6px; border: 1px solid #d6d6d6; border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap; }
.hchip:active { background: #fafafa; }
.hchip svg { flex: 0 0 auto; width: 20px; height: 20px; }
@media (max-width: 350px) { .hchips { gap: 6px; } .hchip { gap: 4px; padding: 0 4px; font-size: 14px; } .hchip svg { width: 17px; height: 17px; } }
.hchip.red svg { color: var(--red); } .hchip.blue svg { color: #1d4ea8; } .hchip.green svg { color: #0c6544; }
.home .htitle { margin: 0 2px 10px; font-size: 18px; }
button.tcard { width: 100%; min-height: 0; border: 0; justify-content: flex-start; text-align: left; font-weight: 400; }
.hicon.small { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; }
.hicon.small svg { width: 24px; height: 24px; }
.hicon.amber { background: #fff3dc; color: #7a4600; }
.ltag { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ltag.red { color: var(--red-dark); } .ltag.blue { color: #1d4ea8; } .ltag.green { color: #0c6544; }
.coin { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border-radius: 999px; background: #fff3dc; color: #7a4600; font-size: 13px; font-weight: 700; white-space: nowrap; }
.coin svg { width: 18px; height: 18px; }
.listhead { flex-wrap: wrap; }
.listnote { margin: 0 2px 10px; }
.balance { padding: 26px 16px; text-align: center; }
.balance .hicon.big { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; }
.balance .hicon.big svg { width: 38px; height: 38px; }
.balance strong { display: block; font-size: 44px; line-height: 1.1; }
.row .amt { flex: 0 0 auto; min-width: 44px; text-align: right; font-weight: 700; color: #7a4600; }
.row .clip { flex: 1; min-width: 0; }
.pstats.three { grid-template-columns: repeat(3, 1fr); }

/* Header numbers: tasks completed today and coins earned */
.hstats { display: flex; border-radius: 16px; background: var(--red-dark); }
.hstat { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.hstat.right { justify-content: flex-end; text-align: right; border-left: 1px solid rgba(255, 255, 255, .35); }
.hstat strong { display: block; font-size: 22px; line-height: 1.15; }
.hstat strong small { font-size: 15px; font-weight: 500; }
.hstat .hl { display: block; font-size: 13px; }
.hsicon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; }
.hsicon.done { background: #fff; color: var(--red-dark); }
.hsicon.coin { background: #fff3dc; color: #7a4600; }
@media (max-width: 350px) { .hsicon { display: none; } .hstat { padding: 12px; } }

/* Profile */
header.phead { padding-bottom: 52px; text-align: center; }
.pavatar { width: 80px; height: 80px; margin: 6px auto 0; display: grid; place-items: center; border: 3px solid #f08d8a; border-radius: 50%; background: #fff; color: var(--red-dark); font-size: 32px; font-weight: 700; }
.phead h1 { margin: 10px 0 0; font-size: 22px; overflow-wrap: anywhere; }
.puser { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 15px; }
.vbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 999px; background: #fff; color: #0c6544; font-size: 12px; font-weight: 700; }
.vbadge svg { width: 14px; height: 14px; stroke-width: 3; }
.since { margin: 4px 0 0; font-size: 13px; }
.pnums { margin-top: -50px; display: flex; padding: 14px 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .10); text-align: center; }
.pnums > div { flex: 1; min-width: 0; }
.pnums > div + div { border-left: 1px solid var(--line); }
.pnums strong { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 24px; line-height: 1.2; }
.pnums strong.coinc { color: #7a4600; }
.pnums strong svg { width: 20px; height: 20px; }
.pnums > div > span { font-size: 13px; color: var(--muted); }
.whead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.whead h3 { margin: 0; }
.wbars { display: flex; align-items: flex-end; gap: 10px; height: 92px; margin-top: 8px; }
.wbars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wbars i { display: block; width: 100%; max-width: 30px; border-radius: 6px; background: #f6c6c4; }
.wbars i.zero { background: #e3e3e3; }
.wbars .now i { background: var(--red); }
.wbars span { font-size: 12px; color: #555; }
.wbars .now span { color: var(--red-dark); font-weight: 700; }
.plinks { padding: 2px 16px; }
.plink { width: 100%; min-height: 52px; padding: 0; gap: 12px; border-radius: 0; background: none; color: var(--ink); font-weight: 500; justify-content: flex-start; text-align: left; }
.plink + .plink { border-top: 1px solid #eee; }
.plink:active { background: #fafafa; }
.lic { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.lic svg { width: 18px; height: 18px; }
.lic.green { background: #e6f6ef; color: #0c6544; }
.lic.amber { background: #fff3dc; color: #7a4600; }
.lic.blue { background: #e8f0fe; color: #1d4ea8; }
.plink .ltext { flex: 1; }
.plink .chev { display: grid; color: #666; }
.plink .chev svg { width: 18px; height: 18px; }
.logoutbtn svg { width: 18px; height: 18px; }
.appver { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.formnote { margin: -4px 0 14px; }

/* ===== Home design (Nov 2026): white top bar, brand-red icons ===== */
header.topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px 4px; background: transparent; color: var(--ink); border-radius: 0; }
.topbar img { display: block; width: 150px; height: auto; }
.tright { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: none; color: var(--ink); }
.bell:active { background: rgba(0, 0, 0, .05); }
.bell svg { width: 26px; height: 26px; }
.bell .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--red); }
.cpill { width: auto; min-height: 44px; padding: 0 16px 0 8px; gap: 8px; border-radius: 999px; background: var(--red-soft); color: var(--ink); font-size: 18px; font-weight: 700; }
.cpill:active { background: #f9d6d4; }
.cpill svg.gold { width: 28px; height: 28px; }
svg.gold { flex: 0 0 auto; }
.home2 { position: relative; }
.blob { position: absolute; z-index: 0; top: -150px; right: -170px; width: 330px; height: 330px; border-radius: 46% 54% 40% 60%; background: #fdeeee; transform: rotate(-20deg); pointer-events: none; }
.home2 > :not(.blob) { position: relative; z-index: 1; }
.hi { margin: 6px 2px 2px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; overflow-wrap: anywhere; }
.tagline { margin: 0 2px 16px; font-size: 17px; color: #444; }
.card { border: 1px solid #f3e8e8; }
.prog { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; }
.progicon { flex: 0 0 auto; color: var(--red); display: grid; }
.progicon svg { width: 46px; height: 46px; stroke-width: 2.2; }
.progtext { flex: 0 0 auto; }
.progtext span { display: block; font-size: 14px; color: #444; }
.progtext strong { display: block; font-size: 22px; line-height: 1.2; }
.progtext strong small { font-size: 18px; font-weight: 500; }
.segs { flex: 1; min-width: 0; display: flex; gap: 5px; justify-content: flex-end; }
.segs i { flex: 1; max-width: 30px; height: 9px; border-radius: 9px; background: #ececec; }
.segs i.on { background: var(--red); }
.next { margin-bottom: 18px; padding: 16px; border: 1px solid #f6dcdb; border-radius: 20px; background: #fff3f2; }
.nexttop { display: flex; align-items: center; gap: 8px; }
.nextbody { flex: 1; min-width: 0; }
.nextpill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 13px 4px 9px; border-radius: 999px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; }
.nextpill svg { width: 16px; height: 16px; }
.next h2 { margin: 10px 0 8px; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.nextmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 16px; color: var(--ink); }
.nm { display: inline-flex; align-items: center; gap: 6px; }
.nm svg { width: 20px; height: 20px; }
.nm.coins { color: var(--red-dark); font-weight: 700; }
.nm.coins svg.gold { width: 22px; height: 22px; }
.sep { width: 1px; height: 20px; background: #e6b9b7; }
.artwrap { flex: 0 0 104px; width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; background: #fde3e2; }
.bookart { width: 86px; height: 72px; }
.startbtn { margin-top: 14px; min-height: 54px; border-radius: 999px; font-size: 18px; font-weight: 700; text-decoration: none; }
.startbtn svg { width: 22px; height: 22px; stroke-width: 2.4; }
.xhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 2px 8px; }
.xhead h2 { margin: 0; font-size: 21px; }
.seeall { width: auto; min-height: 44px; padding: 0 4px; gap: 6px; background: none; color: var(--red); font-size: 16px; font-weight: 700; }
.seeall:active { background: var(--red-soft); }
.seeall svg { width: 20px; height: 20px; stroke-width: 2.4; }
.xtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xtile { min-width: 0; min-height: 0; padding: 16px 6px 14px; flex-direction: column; gap: 4px; border: 1px solid #f6dcdb; border-radius: 18px; background: #fff5f5; color: var(--ink); font-weight: 400; text-align: center; }
.xtile:active { background: #fde8e7; }
.xicon { display: grid; place-items: center; color: var(--red); margin-bottom: 4px; }
.xicon svg { width: 52px; height: 52px; }
.xtile strong { font-size: 16px; line-height: 1.2; }
.xtile span:last-child { font-size: 13px; color: #555; line-height: 1.3; }
@media (max-width: 360px) {
	.hi { font-size: 28px; }
	.artwrap { flex-basis: 80px; width: 80px; height: 80px; }
	.bookart { width: 66px; height: 56px; }
	.segs { display: none; }
	.xicon svg { width: 42px; height: 42px; }
	.xtile strong { font-size: 15px; }
}

/* Bottom bar: red icon and an underline on the active tab */
.tab { position: relative; }
.tab.on .ticon { background: none; }
.tab.on svg .fill { fill: currentColor; }
.tab.on::after { content: ''; position: absolute; left: 24%; right: 24%; bottom: 3px; height: 3px; border-radius: 3px; background: var(--red); }
.tab.on { color: var(--red); }

/* Brand red everywhere instead of blue, green and gold accents */
.badge.blue, .badge.amber, .badge.green, .badge.purple, .badge.teal { background: var(--red-soft); color: var(--red-dark); }
.badge.done { background: #efefef; color: #555; }
.coin { background: var(--red-soft); color: var(--red-dark); }
.coin svg.gold { width: 18px; height: 18px; }
.row .amt { color: var(--red-dark); }
.soonchip { background: var(--red-soft); color: var(--red-dark); }
.hicon.blue, .hicon.green, .hicon.amber { background: var(--red-soft); color: var(--red); }
.lic.red { background: var(--red-soft); color: var(--red-dark); }
.pnums strong.coinc { color: var(--red-dark); }
.pnums strong svg.gold { width: 24px; height: 24px; }
.balance .hicon.coinbig { background: none; }
.balance .hicon.coinbig svg.gold { width: 72px; height: 72px; }

/* The background shape must never make the page scroll sideways */
html, body { overflow-x: hidden; }
#app { overflow-x: clip; }
nav { z-index: 20; }

/* Bottom bar: rounded top with a soft shadow, as in the design */
nav { border-top: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .07); }

/* ===== Reading and website task pages, Quizzes and Games: same look as the home page ===== */
.rbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(252, 250, 250, .96); border-bottom: 1px solid #f3e8e8; }
.rback { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #f0e2e2; border-radius: 50%; background: #fff; color: var(--ink); }
.rback:active { background: var(--red-soft); }
.rtitle { flex: 1; font-size: 17px; font-weight: 700; }
.rmain { max-width: 680px; margin: 0 auto; padding: 14px 14px 210px; }
.rhero, .thero { margin-bottom: 14px; padding: 18px 16px; border: 1px solid #f6dcdb; border-radius: 20px; background: #fff3f2; }
.rhero h1 { margin: 10px 0 8px; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.rbody { padding: 20px 18px; font-size: 18px; line-height: 1.75; }
.rbody h2 { margin: 22px 0 6px; font-size: 21px; }
.rbody p { margin: 0 0 16px; }
.rbody > :last-child { margin-bottom: 0; }
.rbody img { max-width: 100%; height: auto; border-radius: 12px; }
.rpanel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 16px 16px; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); text-align: center; }
.rpanel > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.rprog { height: 8px; margin-bottom: 10px; border-radius: 8px; background: #f1e4e4; overflow: hidden; }
.rprog i { display: block; width: 0; height: 100%; border-radius: 8px; background: var(--red); transition: width .9s linear; }
.rpanel #rne-msg { margin: 0 0 10px; font-size: 15px; color: #444; }
.rpanel button, .rpanel .btn { width: 100%; min-height: 54px; border-radius: 999px; font-size: 17px; font-weight: 700; text-decoration: none; }
.rpanel button:disabled { opacity: 1; background: #ece4e4; color: #6f6363; }
.codebox { margin-bottom: 10px; padding: 10px; border: 2px dashed #f0b9b7; border-radius: 14px; background: #fff5f5; }
.codebox span { display: block; font-size: 13px; color: #555; }
.rpanel #rne-code { display: block; margin: 0; font: 700 28px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 3px; color: var(--red-dark); }
.rpanel #rne-done { margin: 10px 0 0; font-weight: 700; color: #0c6544; }
.tpage main { max-width: 680px; margin: 0 auto; }
.thero { display: flex; gap: 12px; align-items: flex-start; }
.thero .badge { flex: 0 0 52px; width: 52px; height: 52px; border: 1px solid #f6dcdb; border-radius: 14px; background: #fff; color: var(--red); font-size: 22px; }
.tinfo { flex: 1; min-width: 0; }
.sitename { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red-dark); }
.thero h1 { margin: 2px 0 8px; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.thero .nextmeta { font-size: 15px; }
.codecard .meta { margin: -6px 0 10px; font-size: 14px; }
.claim button { background: var(--red); border-radius: 999px; }
.tpage .bottombar { border-top: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); }
.tpage .bottombar .btn { min-height: 54px; border-radius: 999px; font-size: 17px; text-decoration: none; }
.soon2 { display: flex; flex-direction: column; }
.soonhero { padding: 26px 18px 22px; border: 1px solid #f6dcdb; border-radius: 22px; background: #fff3f2; text-align: center; }
.soonart { width: 112px; height: 112px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: #fde3e2; color: var(--red); }
.soonart svg { width: 64px; height: 64px; }
.soonhero h1 { margin: 12px 0 6px; font-size: 26px; }
.soonhero p { margin: 0; color: #444; }
.soon2 .startbtn { margin-top: 16px; }
.soonback { align-self: center; margin-top: 6px; }
.rbar { color: var(--ink); border-radius: 0; }

/* ===== Games ===== */
.gamespage { display: flex; flex-direction: column; gap: 14px; }
.gpageh { margin: 4px 2px 0; font-size: 30px; line-height: 1.15; }
.gpagesub { margin: -10px 2px 0; color: #444; }
.gcard { padding: 16px; border: 1px solid #f6dcdb; border-radius: 20px; background: #fff3f2; }
.ghead { display: flex; align-items: center; gap: 14px; }
.gicon { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: #fde3e2; }
svg.gameart { width: 52px; height: 52px; }
.gtitle { flex: 1; min-width: 0; }
.gtitle h2 { margin: 0; font-size: 20px; }
.gtitle p { margin: 0; font-size: 14px; color: #444; }
.gcard .coin { background: #fff; }
.gprog { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 14px; }
.gbar { height: 10px; margin-top: 6px; border-radius: 10px; background: #f4d8d7; overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 10px; background: var(--red); transition: width .4s; }
.gbar.thin { height: 6px; margin: 0; border-radius: 0; }
.gbar.thin i { border-radius: 0; }
.gsegs { display: flex; gap: 6px; margin-top: 6px; }
.gsegs i { flex: 1; height: 10px; border-radius: 10px; background: #f4d8d7; }
.gsegs i.on { background: var(--red); }
.gcard .startbtn { margin-top: 14px; }
.startbtn svg.gold { width: 24px; height: 24px; }
.startbtn.done { background: #ece4e4; color: #5d5353; opacity: 1; }
.startbtn.done svg { width: 20px; height: 20px; }
.gfoot { text-align: center; font-size: 13px; }
.gamemsg { margin: 0; }
.gscreen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #fcfafa; }
.gscreen .rbar { flex: 0 0 auto; }
.gscreen .rtitle { min-width: 0; line-height: 1.2; }
.gscreen .rtitle > div:first-child { font-size: 17px; font-weight: 700; }
.gsub { font-size: 13px; font-weight: 400; color: var(--muted); }
.flywrap { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: manipulation; }
.flycanvas { display: block; width: 100%; height: 100%; cursor: pointer; -webkit-user-select: none; user-select: none; }
.gclaim { position: absolute; left: 16px; right: 16px; top: 96px; width: auto; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tmain { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 16px; max-width: 520px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.tmain .gsegs { margin: 0; }
.tplayers { display: flex; gap: 10px; }
.tplayer { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid #f0e2e2; border-radius: 16px; background: #fff; }
.tplayer.on { border-color: var(--red); background: #fff3f2; }
.tplayer strong { display: block; line-height: 1.2; }
.tplayer span { display: block; font-size: 13px; color: var(--red-dark); font-weight: 700; min-height: 18px; }
svg.tmark { width: 26px; height: 26px; flex: 0 0 auto; }
svg.tmark.big { width: 56%; height: 56%; }
.tboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; border-radius: 24px; background: #fde3e2; }
.tcell { aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 16px; background: #fff; display: grid; place-items: center; }
.tcell:active, .tcell:disabled { background: #fff; opacity: 1; }
.tcell:not(:disabled):active { background: #fff3f2; }
.tmsg { margin: 0; text-align: center; font-size: 17px; font-weight: 500; min-height: 26px; }
.tactions { display: flex; flex-direction: column; gap: 10px; }
.tactions .startbtn { margin-top: 0; }
.tplayer:not(.on) span { color: var(--muted); font-weight: 500; }

/* Logo in the top bar */
.topbar svg.brand { display: block; width: 150px; height: 45px; stroke: none; }

/* Tasks page: daily path */
.pathpage { padding-top: 4px; }
.pathtitle { font-size: 22px; margin: 6px 0 10px; }
.pathhead { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 18px; border-radius: 20px; background: var(--red); color: #fff; }
.pathhead h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.pathhead p { margin: 4px 0 0; font-size: 15px; }
.ring { position: relative; flex: 0 0 78px; height: 78px; }
.ring svg { width: 78px; height: 78px; stroke-width: 11; }
.ring .rbg { stroke: var(--red-dark); }
.ring .rfg { stroke: #fff; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; }
.path { margin: 0; padding: 0; list-style: none; }
.pstep { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.pstep:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: -6px; width: 3px; border-radius: 3px; background: #ececec; }
.pstep.is-done:not(:last-child)::before { background: var(--red); }
.pdot { position: relative; z-index: 1; flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f1f1f2; color: var(--muted); font-weight: 700; }
.pstep.is-done .pdot { background: var(--red); color: #fff; }
.pstep.is-done .pdot svg { width: 18px; height: 18px; stroke-width: 3; }
.pstep.is-now .pdot { border: 3px solid var(--red); background: #fff; color: var(--red); font-weight: 900; }
.ptext { flex: 1; min-width: 0; padding-top: 6px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.pstep.is-done .ptext { color: var(--muted); }
.ptitle { font-weight: 500; }
.pmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; font-size: 13px; color: var(--muted); }
.pmeta strong, .pcoin { color: var(--red-dark); font-weight: 700; }
.pcoin { display: inline-flex; align-items: center; gap: 3px; }
.pcoin svg { width: 16px; height: 16px; }
.pnow { flex: 1; min-width: 0; padding: 14px; border: 1px solid #f6dcdb; border-radius: 18px; background: #fff3f2; }
.plabel { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red-dark); }
.pnow strong { display: block; margin-top: 2px; font-size: 18px; line-height: 1.3; }
.pnow .pmeta { font-size: 14px; color: var(--ink); }
.pnow .startbtn { margin-top: 12px; min-height: 48px; font-size: 16px; }
.pathall { margin-top: 4px; }

/* Website task: the article inside the app, under a timer bar */
.vpage { position: fixed; inset: 0; display: flex; flex-direction: column; background: #fff; }
.vbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 4px; background: #fff; color: var(--ink); border-radius: 0; box-shadow: 0 1px 0 var(--line); }
.vbar .rback { flex: 0 0 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.vinfo { flex: 1; min-width: 0; line-height: 1.25; }
.vinfo strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.vinfo span { font-size: 13px; color: var(--muted); }
.vtime { flex: 0 0 auto; min-width: 64px; padding: 6px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: 17px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.vprog { height: 4px; background: var(--red-soft); }
.vprog i { display: block; width: 0; height: 100%; background: var(--red); transition: width 1s linear; }
.vmsg { margin: 0; padding: 6px 14px; background: #fafafa; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.vmsg.warn { background: #fff6e0; color: #7a5200; }
.vmsg.good { background: #e8f6ec; color: #1d6b35; }
.vframe { flex: 1; width: 100%; border: 0; background: #fff; }
.vdone { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 520px; margin: 0 auto; padding: 24px 20px 20px; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.15); text-align: center; }
.vdone svg.gold { width: 56px; height: 56px; }
.vdone h2 { margin: 8px 0 4px; font-size: 22px; }
.vdone p { margin: 0; color: var(--muted); }
.vdone .seeall { margin: 6px auto 0; }

/* Home fits the screen: no scrolling. Spacing shrinks on shorter phones. */
#app.fit { height: 100vh; height: 100dvh; padding-bottom: 0; display: flex; flex-direction: column; overflow: visible; }
#app.fit > main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 14px 84px; }
#app.fit .home2 { flex: 1; display: flex; flex-direction: column; }
#app.fit .home2 .next { margin-bottom: auto; }
#app.fit .xhead { margin-top: 12px; }
@media (max-height: 820px) {
	#app.fit .next h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	#app.fit .hi { font-size: 28px; margin-top: 2px; }
	#app.fit .tagline { margin-bottom: 10px; font-size: 15px; }
	#app.fit .prog { padding: 12px 14px; }
	#app.fit .next { padding: 14px; }
	#app.fit .next h2 { margin: 8px 0 6px; font-size: 20px; }
	#app.fit .artwrap { flex-basis: 84px; width: 84px; height: 84px; }
	#app.fit .startbtn { margin-top: 10px; min-height: 48px; font-size: 17px; }
	#app.fit .xhead { margin: 10px 2px 6px; }
	#app.fit .xhead h2 { font-size: 19px; }
	#app.fit .xtile { padding: 12px 6px 10px; }
}
@media (max-height: 700px) {
	#app.fit .tagline { display: none; }
	#app.fit .hi { font-size: 24px; margin-bottom: 8px; }
	#app.fit .prog { padding: 10px 12px; }
	#app.fit .artwrap { display: none; }
	#app.fit .next h2 { font-size: 18px; }
	#app.fit .xhead { margin: 8px 2px 4px; }
	#app.fit .xtile { padding: 8px 4px; }
	#app.fit .xtile span:last-child { display: none; }
}
@media (max-height: 600px) {
	#app.fit .xhead { display: none; }
	#app.fit .hi { font-size: 22px; }
}

/* Quizzes */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qzcard { border-color: #dfe6f7; background: #f3f6fd; }
.qzicon { background: #2457c5; color: #fff; }
.qzicon svg { width: 60%; height: 60%; }
.qzabout { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.qzabout span:first-child { font-weight: 700; }
.qzcard .startbtn { margin-top: 14px; }
.qzmain { gap: 14px; }
.qzq { margin: 4px 0 0; font-size: 22px; line-height: 1.3; }
.qzopts { display: flex; flex-direction: column; gap: 10px; }
button.qzopt { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 2px solid #ececec; border-radius: 16px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; }
button.qzopt b { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f1f1f2; color: var(--muted); font-size: 14px; }
button.qzopt.on { border-color: var(--red); background: #fff3f2; }
button.qzopt.on b { background: var(--red); color: #fff; }
.qzerr:empty { display: none; }
.qzback { align-self: center; }
.qzresult { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border-radius: 20px; text-align: center; }
.qzresult.ok { background: #e8f6ec; }
.qzresult.no { background: #fff6e0; }
.qzresult svg.gold { width: 64px; height: 64px; }
.qzresult .qzbig { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #7a5200; }
.qzresult .qzbig svg { width: 32px; height: 32px; }
.qzresult h1 { margin: 6px 0 0; font-size: 24px; }
.qzresult p { margin: 0; color: var(--ink-2, #3a3d45); }
.qzmarks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.qzmarks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #ececec; font-size: 15px; }
.qzmark { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.qzmark svg { width: 16px; height: 16px; stroke-width: 3; }
.qzmarks li.ok .qzmark { background: #1d6b35; }
.qzmarks li.no .qzmark { background: #b81712; }
button.qzopt span { flex: 1; min-width: 0; }
