:root {
  --bg: #f4f5fb; --card: #fff; --text: #171a26; --muted: #6a7184; --line: #e6e8f0;
  --brand: #5b4bff; --brand2: #00c2a8; --brand-soft: #eeecff;
  --good: #16a34a; --warn: #d97706; --bad: #dc2626;
  --c1: #5b4bff; --c2: #00c2a8; --c3: #f59e0b; --c4: #ec4899;
  --tab-h: 62px;
}
@media all {
  :root[data-theme="dark"] { --bg: #0e1016; --card: #171a23; --text: #eceef6; --muted: #959cb0; --line: #272b38; --brand-soft: #24215a; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
h1, h2, h3 { margin: 0; letter-spacing: -.3px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.hide-sm { display: inline; }

/* ---- top bar / nav ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.5px; }
.logo span { color: var(--brand); }
.logo.big { font-size: 34px; color: #fff; }
.logo.big span { color: #b8b0ff; }
.nav { display: flex; gap: 4px; }
.nav button, button.link { background: none; border: 0; padding: 8px 12px; border-radius: 9px; color: var(--muted); }
.nav button.active, .nav button:hover { background: var(--brand-soft); color: var(--brand); }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
button.link { padding: 6px 8px; color: var(--brand); }
button.link.back { padding: 0; margin-bottom: 10px; }
.tabbar { display: none; }

main { max-width: 1040px; margin: 0 auto; padding: 22px 16px 48px; }
.page-head { margin-bottom: 16px; }
.page-head h2 { font-size: 24px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }

/* ---- layout primitives ---- */
.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.grid > .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.card-head h3 { font-size: 16px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat .hint { font-size: 12px; color: var(--muted); }

/* ---- wallet hero ---- */
.hero { background: linear-gradient(135deg, #5b4bff 0%, #8b5cf6 55%, #00c2a8 130%); color: #fff; border-radius: 22px; padding: 20px; margin-bottom: 14px; box-shadow: 0 10px 30px -12px rgba(91,75,255,.6); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hero-label { opacity: .85; font-size: 13px; }
.hero-amt { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.meter { height: 8px; background: rgba(255,255,255,.25); border-radius: 99px; margin: 18px 0 10px; overflow: hidden; }
.meter i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .5s; }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }

/* ---- lists ---- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:active { background: var(--brand-soft); }
.list li.you { background: var(--brand-soft); margin: 0 -8px; padding: 11px 8px; border-radius: 10px; }
.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sub { font-size: 12px; color: var(--muted); }
.right { text-align: right; flex-shrink: 0; }
.amt { font-weight: 700; color: var(--good); white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sq { border-radius: 11px; }
.rank { width: 38px; text-align: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.empty { padding: 26px 8px; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: var(--brand-soft); color: var(--brand); }
.pill.admin { background: #fef3c7; color: #92400e; }
.pill.paid { background: #dcfce7; color: #166534; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.rejected { background: #fee2e2; color: #991b1b; }

/* ---- charts ---- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bar { flex: 1; background: linear-gradient(to top, var(--brand), #9b8cff); border-radius: 4px 4px 0 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--line); margin-bottom: 12px; }
.stack i { display: block; height: 100%; }
.c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); } .c4 { background: var(--c4); }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

/* ---- forms & buttons ---- */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--text); font-size: 16px; /* 16px stops iOS zoom */ }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.btn { background: var(--brand); color: #fff; border: 0; padding: 12px 18px; border-radius: 11px; font-weight: 600; min-height: 44px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.light { background: #fff; color: #4a3bd8; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 13px; white-space: nowrap; }
.row-btns { display: flex; gap: 10px; margin-top: 16px; }
.row-btns .btn { flex: 1; }
.row-btns.tight { margin: 0; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-btns.tight .btn { flex: none; }
.error { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---- auth (sign up / sign in) ---- */
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: middle; }
.logo { width: 34px; height: 34px; flex-shrink: 0; }
.authpage { --ink: #0b0b1f; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--ink); }
.ap-side { position: relative; overflow: hidden; color: #fff; padding: max(18px, env(safe-area-inset-top)) 22px 70px; }
.aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; animation: drift 16s ease-in-out infinite alternate; }
.aurora .b1 { width: 560px; height: 560px; background: radial-gradient(circle, #6a5cff 0%, transparent 66%); left: -200px; top: -240px; }
.aurora .b2 { width: 500px; height: 500px; background: radial-gradient(circle, #00d1b2 0%, transparent 66%); right: -200px; top: -60px; opacity: .34; animation-delay: -5s; }
.aurora .b3 { width: 440px; height: 440px; background: radial-gradient(circle, #ff6fa8 0%, transparent 66%); left: 28%; bottom: -250px; opacity: .26; animation-delay: -9s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.1); } }
.ap-top, .ap-hero, .ap-floats { position: relative; z-index: 1; }
.ap-top { display: flex; align-items: center; justify-content: space-between; }
.ap-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: #fff; text-decoration: none; }
.ap-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }
.ap-back .flip { transform: scaleX(-1); }
.ap-back-m { color: #fff; opacity: .85; padding: 8px 12px; border-radius: 99px; background: rgba(255,255,255,.12); }
.ap-hero { margin-top: 22px; }
.ap-tag { margin: 0; font-size: 26px; line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.ap-tag br { display: none; }
.ap-tag span { background: linear-gradient(90deg, #a99cff, #5dffe3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-perks, .ap-floats { display: none; }

.ap-main { flex: 1; background: var(--bg); border-radius: 28px 28px 0 0; margin-top: -34px; position: relative; z-index: 2; padding: 22px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.ap-bar { width: 100%; max-width: 420px; display: flex; justify-content: flex-end; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.ap-bar .ap-back-d { display: none; }
.ap-alt a { color: var(--brand); font-weight: 700; text-decoration: none; margin-left: 4px; }
.ap-card { width: 100%; max-width: 420px; }
.ap-card h1 { font-size: 28px; letter-spacing: -.035em; font-weight: 800; }
.ap-sub { margin: 6px 0 8px; color: var(--muted); font-size: 15px; }

.fld label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.inp { position: relative; }
.inp .lead { position: absolute; left: 15px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .15s; }
.inp input { width: 100%; height: 54px; padding: 0 16px 0 44px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.inp input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.inp input:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.inp input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.inp:focus-within .lead { color: var(--brand); }
.inp:has(.eye) input { padding-right: 52px; }
.eye { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.eye:hover { background: var(--brand-soft); color: var(--brand); }
.eye .ic { width: 20px; height: 20px; }
.fld .msg { display: flex; align-items: center; gap: 6px; min-height: 18px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.fld .msg .ic { width: 15px; height: 15px; }
.fld.bad input { border-color: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 14%, transparent); }
.fld.bad .msg, .fld.bad .lead { color: var(--bad); }
.meter-s { display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.meter-s i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); transition: background .2s; }
.meter-s em { font-style: normal; font-size: 12px; font-weight: 700; min-width: 46px; text-align: right; color: var(--muted); }
.meter-s.s0 i:nth-child(1), .meter-s.s1 i:nth-child(1) { background: var(--bad); }
.meter-s.s2 i:nth-child(-n+2) { background: var(--warn); }
.meter-s.s3 i:nth-child(-n+3), .meter-s.s4 i { background: var(--good); }
.form-err { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 4px; color: var(--bad); font-size: 13.5px; font-weight: 600; }
.form-err .ic { width: 17px; height: 17px; }
.btn-primary { width: 100%; height: 56px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 16px; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #5b4bff, #8b5cf6); box-shadow: 0 14px 28px -12px rgba(91, 75, 255, .85), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .18s, filter .18s, box-shadow .18s; }
.btn-primary:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-primary:not(:disabled):hover .ic { transform: translateX(3px); }
.btn-primary .ic { transition: transform .18s; }
.btn-primary:not(:disabled):active { transform: scale(.985); }
.btn-primary:disabled { opacity: .8; cursor: progress; }
.spin { width: 19px; height: 19px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ap-trust { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.ap-trust .ic { color: var(--good); width: 16px; height: 16px; }
.ap-legal { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.ok { text-align: center; padding: 10px 0; }
.ok-burst { position: relative; width: 84px; height: 84px; margin: 6px auto 20px; }
.ok-ic { position: relative; z-index: 1; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2fe0bd, #00b894); box-shadow: 0 0 0 10px color-mix(in srgb, var(--good) 16%, transparent), 0 16px 30px -10px rgba(0, 184, 148, .6); animation: pop .55s cubic-bezier(.2, 1.5, .4, 1) both; }
.ok-ic .ic { width: 40px; height: 40px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.ok-burst s { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: var(--c); opacity: 0; animation: burst .9s cubic-bezier(.2, .8, .3, 1) var(--t) both; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(.5) rotate(200deg); } }
.ok .ap-sub { margin: 8px 0 22px; }
@media (prefers-reduced-motion: reduce) { .ap-main, .ok-ic, .spin, .aurora i, .ok-burst s, .gl { animation: none; } }

/* desktop: split layout, form sits directly on the page (no card) */
@media (min-width: 900px) {
  .authpage { flex-direction: row; background: var(--bg); }
  .ap-side { flex: 1.05; padding: 40px 48px; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--ink); border-radius: 0 36px 36px 0; }
  .aurora .b1 { width: 820px; height: 820px; } .aurora .b2 { width: 720px; height: 720px; } .aurora .b3 { width: 640px; height: 640px; }
  .ap-brand { font-size: 22px; }
  .ap-back-m { display: none; }
  .ap-hero { margin-top: auto; padding-bottom: 8px; }
  .ap-tag { font-size: clamp(40px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.045em; }
  .ap-tag br { display: inline; }
  .ap-perks { display: grid; gap: 16px; margin: 34px 0 0; padding: 0; list-style: none; }
  .ap-perks li { display: flex; align-items: center; gap: 14px; }
  .ap-perks i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #bfb6ff; }
  .ap-perks i .ic { width: 22px; height: 22px; }
  .ap-perks b { display: block; font-size: 15.5px; }
  .ap-perks small { color: rgba(255,255,255,.65); font-size: 13.5px; }
  .ap-floats { display: block; position: absolute; right: 36px; top: 110px; z-index: 1; width: 230px; height: 190px; }
  .gl { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); animation: bob 6s ease-in-out infinite; }
  .gl b { display: block; font-size: 15px; line-height: 1.2; }
  .gl small { color: rgba(255,255,255,.65); font-size: 12.5px; }
  .gl .d { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; }
  .gl .d.a { background: linear-gradient(135deg, #7a6bff, #5b4bff); } .gl .d.c { background: linear-gradient(135deg, #ffc247, #ff9a1f); }
  .g1 { left: 0; top: 0; } .g2 { right: 0; top: 96px; animation-delay: -3s; }
  @keyframes bob { 50% { transform: translateY(-10px); } }
  .ap-main { flex: 1; margin: 0; border-radius: 0; background: transparent; justify-content: center; padding: 40px; position: relative; animation: none; }
  .ap-bar { position: absolute; top: 34px; left: 40px; right: 40px; max-width: none; width: auto; justify-content: space-between; align-items: center; margin: 0; }
  .ap-bar .ap-back-d { display: inline-flex; color: var(--muted); }
  .ap-bar .ap-back-d:hover { color: var(--brand); }
  .ap-card { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
  .ap-card h1 { font-size: 34px; }
}
@media (min-width: 900px) and (max-width: 1100px) { .ap-floats { display: none; } }

/* ---- withdraw sheet ---- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: var(--card); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }

/* ---- mobile ---- */
@media (max-width: 760px) {
  .two { grid-template-columns: 1fr; }
  .nav, .hide-sm { display: none; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  main { padding: 16px 14px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
  .hero-amt { font-size: 38px; }
  .page-head h2 { font-size: 21px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { flex: 1; height: var(--tab-h); background: none; border: 0; color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .tabbar button span { line-height: 1; display: grid; place-items: center; }
  .tabbar button span .ic { width: 24px; height: 24px; }
  .tabbar button.active { color: var(--brand); font-weight: 700; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 22px; }
}


/* ---- shared small pieces ---- */
.brand-top { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.5px; color: var(--text); text-decoration: none; }
.brand-top .logo { width: 30px; height: 30px; }
.nav button { font-weight: 600; }
.d { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; flex-shrink: 0; }
.d .ic { width: 18px; height: 18px; }
.d.a { background: linear-gradient(135deg, #7a6bff, #5b4bff); } .d.b { background: linear-gradient(135deg, #2fe0bd, #00b894); }
.d.c { background: linear-gradient(135deg, #ffc247, #ff9a1f); } .d.d { background: linear-gradient(135deg, #5db5ff, #3b82f6); }

/* ---- user dashboard ---- */
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kpi .value { font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.kpi .label { color: var(--muted); font-size: 13px; }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.delta .ic { width: 14px; height: 14px; }
.delta.up { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: var(--good); }
.delta.down { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--bad); }
.delta.flat { background: var(--brand-soft); color: var(--muted); font-weight: 600; }
.grid.wide { grid-template-columns: 1.6fr 1fr; }
.grid.two-eq { grid-template-columns: 1fr 1fr; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--brand-soft); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.chart-total { margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.chart-total b { color: var(--text); font-size: 16px; }
.bars { height: 150px; }
.bar { min-width: 3px; }
.goal { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; padding-bottom: 0; }
.goal.link { cursor: pointer; }
.goal .chev { width: 18px; height: 18px; color: var(--muted); }
.track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0 4px; }
.track.slim { height: 6px; }
.track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b4bff, #00c9ab); }
.heat-wrap { --cell: clamp(24px, 3vw, 34px); display: flex; gap: 10px; justify-content: flex-start; }
.heat-days { display: grid; grid-template-rows: repeat(7, var(--cell)); gap: 5px; font-size: 10.5px; color: var(--muted); }
.heat-days span { display: flex; align-items: center; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: 5px; }
.heat i { border-radius: 7px; background: var(--line); }
.heat i.pad { background: transparent; }
.heat i.h1, .heat-key i.h1 { background: color-mix(in srgb, var(--brand) 28%, var(--line)); }
.heat i.h2, .heat-key i.h2 { background: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.heat i.h3, .heat-key i.h3 { background: color-mix(in srgb, var(--brand) 80%, var(--line)); }
.heat i.h4, .heat-key i.h4 { background: var(--brand); }
.heat-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.heat-key { display: inline-flex; align-items: center; gap: 4px; }
.heat-key i { width: 12px; height: 12px; border-radius: 4px; background: var(--line); display: inline-block; }
.feed .d { width: 34px; height: 34px; }
.appbar { align-items: flex-start; }
.ab-top { display: flex; justify-content: space-between; gap: 8px; }
.start { text-align: left; margin-bottom: 14px; }
.start .eyebrow-s { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.start h3 { font-size: 22px; letter-spacing: -.03em; margin: 4px 0 4px; }
.start .sub { margin-bottom: 8px; }
.nudge { display: flex; align-items: center; gap: 14px; }
@media (max-width: 760px) {
  .grid.wide, .grid.two-eq { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 22px; }
  .kpi:first-child { grid-column: span 2; }
}

/* ---- admin ---- */
.ic.flip { transform: scaleX(-1); }
.ic.mini { width: 13px; height: 13px; margin: -2px 2px 0 0; color: #ff9a1f; }
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 14px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, #ffb020 22%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, #ffb020 40%, var(--line)); cursor: pointer; transition: transform .18s; }
.banner:hover { transform: translateY(-2px); }
.banner .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.banner.calm { cursor: default; background: linear-gradient(120deg, color-mix(in srgb, var(--good) 14%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.banner.calm:hover { transform: none; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; margin: 0; }
.search .ic { position: absolute; left: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.toolbar select { width: auto; height: 46px; padding: 0 12px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 15px; }
.search input:focus, .toolbar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip-btn { flex-shrink: 0; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); padding: 7px 14px; border-radius: 99px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip-btn b { margin-left: 4px; color: var(--text); font-weight: 700; }
.chip-btn:hover { border-color: var(--brand); }
.chip-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip-btn.on b { color: var(--brand); }
.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile h2 { font-size: 24px; letter-spacing: -.03em; }
.avatar.big { width: 56px; height: 56px; font-size: 20px; }
.grid.kpis.three { grid-template-columns: repeat(3, 1fr); }
button.link.name { padding: 0; font-weight: 700; color: var(--text); }
button.link.name:hover { color: var(--brand); }
.rank { font-size: 18px; }
@media (max-width: 760px) {
  .grid.kpis.three { grid-template-columns: 1fr 1fr 1fr; }
  .grid.kpis.three .stat .value { font-size: 20px; }
  .banner { padding: 14px; }
  .banner .btn { padding: 8px 12px; }
}

/* Tasks */
textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.task-form label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; }
.task-form input + input { margin-top: 8px; }
.task-form[hidden], #tmin[hidden] { display: none; }
.task .task-btn { margin-top: 6px; display: flex; justify-content: flex-end; }
.task .task-btn .btn { min-width: 84px; }
.sub.err { color: var(--bad); }
.sub.proof { color: var(--text); font-style: italic; margin-top: 2px; word-break: break-word; }
.error:empty { display: none; }
.chart-empty { padding: 48px 12px; }
.link { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; }

/* Task steps */
.list li.task { display: block; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--brand) 4%, transparent); }
.list li.task:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.task .steps { margin-top: 10px; padding: 4px 0 0 2px; }
.task-head { display: flex; align-items: flex-start; gap: 12px; }
.task .meter.slim { height: 5px; margin: 12px 0 4px; background: color-mix(in srgb, var(--brand) 15%, transparent); border-radius: 99px; overflow: hidden; }
.task .meter.slim i { display: block; height: 100%; background: linear-gradient(90deg, #5b4bff, #22c3a6); border-radius: 99px; transition: width .3s; }
.steps { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; }
.list .steps li.step { display: flex; align-items: center; gap: 12px; padding: 9px 0; border: 0; }
.step .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--line); color: var(--muted); }
.step .tick .ic { width: 15px; height: 15px; }
.step.active .tick { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.step.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.step.done .step-label { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.step.locked { opacity: .55; }
.step-label { font-size: 14px; }
.step.active .step-label { font-weight: 600; }
.step-builder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sb-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.sb-row input[hidden], .sb-row select[hidden] { display: none; }
.sb-row .sd { justify-self: end; color: var(--bad); font-size: 13px; }
.row-btns.tight.left { justify-content: flex-start; margin-top: 10px; }

/* ---- tasks: compact cards, detail screen, timeline ---- */
.list li.task.click { cursor: pointer; transition: transform .15s, border-color .15s; }
.list li.task.click:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); transform: translateY(-1px); }
.list li.task.expired { opacity: .72; }
.task .chev { width: 18px; height: 18px; color: var(--muted); align-self: center; flex-shrink: 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.task-meta:empty { display: none; }
.chip-s { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--muted); }
.chip-s .ic { width: 13px; height: 13px; }
.chip-s.warn { background: color-mix(in srgb, var(--warn) 18%, var(--card)); color: var(--warn); }
.chip-s.bad { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--bad); }
.pill.soft { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.task-hero { padding: 20px; }
.task-hero h2 { font-size: 22px; letter-spacing: -.03em; line-height: 1.2; }
.d.big { width: 48px; height: 48px; border-radius: 14px; }
.d.big .ic { width: 24px; height: 24px; }
.amt.big { font-size: 22px; letter-spacing: -.03em; }
.task-desc { margin: 14px 0 0; color: var(--muted); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.notice.good { background: color-mix(in srgb, var(--good) 12%, var(--card)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.notice.warn { background: color-mix(in srgb, var(--warn) 12%, var(--card)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, var(--card)); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.sched { display: grid; gap: 14px; }
.sched > div { display: grid; gap: 2px; }
.sched .sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.sched b { font-weight: 600; }
.sched-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sched-inputs input { width: 100%; }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); flex-shrink: 0; z-index: 1; }
.timeline li.good .tl-dot { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 18%, transparent); }
.timeline li.bad .tl-dot { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 16%, transparent); }
.timeline li.warn .tl-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.timeline li.upcoming .tl-dot { background: var(--card); border: 2px dashed var(--muted); box-shadow: none; }
.timeline li.upcoming { opacity: .8; }
.tl-body { min-width: 0; }
.tl-body b { font-weight: 600; font-size: 14.5px; }
@media (max-width: 760px) { .sched-inputs { grid-template-columns: 1fr; } .task-hero h2 { font-size: 19px; } }
.card .meter.slim { height: 5px; margin: 4px 0 8px; background: color-mix(in srgb, var(--brand) 15%, transparent); border-radius: 99px; overflow: hidden; }
.card .meter.slim i { display: block; height: 100%; background: linear-gradient(90deg, #5b4bff, #22c3a6); border-radius: 99px; transition: width .3s; }
.steps li.step { display: flex; align-items: center; gap: 12px; padding: 9px 0; border: 0; }

/* ================= tasks v2: list, detail, admin ================= */
.avatar-menu { position: relative; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #5b4bff, #8b5cf6); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 6px 14px -6px rgba(91,75,255,.7); }
.menu { position: absolute; right: 0; top: 46px; min-width: 210px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); z-index: 30; }
.menu[hidden] { display: none; }
.menu-user { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-item { width: 100%; text-align: left; border: 0; background: none; color: var(--bad); font: inherit; font-weight: 600; padding: 10px; border-radius: 10px; cursor: pointer; }
.menu-item:hover { background: var(--brand-soft); }

/* app logo */
.appic { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--brand-soft); }
.appic.lg { width: 58px; height: 58px; border-radius: 16px; }
.appic.xl { width: 68px; height: 68px; border-radius: 18px; }
.appic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; z-index: 1; }
.appic-fb { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.appic.lg .appic-fb { font-size: 20px; } .appic.xl .appic-fb { font-size: 24px; }

/* list */
.t-tools { display: flex; gap: 10px; margin-bottom: 12px; }
.t-tools .search { flex: 1; min-width: 0; }
.filter-btn { position: relative; width: 46px; height: 46px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.filter-btn .ic { width: 20px; height: 20px; }
.filter-btn i { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); border: 2px solid var(--card); }
.filter-btn i[hidden] { display: none; }
.tabs-pill { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: all .15s; }
.tab b { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--muted); font-size: 12.5px; text-align: center; }
.tab.on { background: linear-gradient(135deg, #5b4bff, #8b5cf6); border-color: transparent; color: #fff; box-shadow: 0 10px 20px -10px rgba(91,75,255,.8); }
.tab.on b { background: rgba(255,255,255,.22); color: #fff; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tcard { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; }
.tcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 16px 30px -20px rgba(70,55,200,.5); }
.tcard.expired { opacity: .75; }
.tc-main { min-width: 0; }
.tc-title { display: block; font-size: 16px; letter-spacing: -.01em; line-height: 1.25; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; background: var(--brand-soft); color: var(--muted); font-size: 12px; font-weight: 600; }
.mini .ic { width: 13px; height: 13px; }
.mini.warn { background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--warn); }
.tc-side { text-align: right; display: grid; justify-items: end; gap: 2px; }
.tc-side .amt { font-size: 19px; letter-spacing: -.03em; }
.sp { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 5px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: var(--brand-soft); color: var(--text); white-space: nowrap; }
.sp .ic { width: 14px; height: 14px; }
.sp.good { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: var(--good); }
.sp.amber { background: color-mix(in srgb, var(--warn) 17%, var(--card)); color: var(--warn); }
.sp.red { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--bad); }
.sp.muted { background: color-mix(in srgb, var(--muted) 14%, var(--card)); color: var(--muted); }
.tcard .chev { width: 18px; height: 18px; color: var(--muted); }
.tcard .meter.slim { margin: 10px 0 0; }
.empty-card { list-style: none; display: grid; justify-items: center; gap: 6px; padding: 36px 16px; text-align: center; border-radius: 20px; border: 1.5px dashed var(--line); color: var(--muted); }
.empty-card .ic { width: 30px; height: 30px; color: var(--brand); }
.empty-card b { color: var(--text); }
.chips-row.wrap { flex-wrap: wrap; overflow: visible; }
.chip-btn .ic { width: 14px; height: 14px; vertical-align: -2px; }

/* detail */
.td { max-width: 760px; margin: 0 auto; position: relative; }
.td-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 14px; }
.td-bar b { font-size: 16px; }
.td-bar .back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.task-hero { padding: 18px; }
.th-top { display: flex; align-items: center; gap: 14px; }
.th-reward { text-align: right; flex-shrink: 0; }
.th-reward .amt { font-size: 24px; letter-spacing: -.035em; }
.task-hero h2 { font-size: 19px; letter-spacing: -.02em; line-height: 1.25; }
.task-hero .tc-chips { margin-top: 14px; }
.task-desc { margin: 14px 0 0; color: var(--muted); }
.banner-ok { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--good) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); }
.banner-ok b { color: var(--good); font-size: 16px; }
.banner-ok div > div { font-size: 13.5px; color: var(--text); opacity: .85; }
.bo-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; flex-shrink: 0; }
.bo-ic .ic { width: 22px; height: 22px; }
.confetti { position: absolute; left: 50%; top: 70px; width: 0; height: 0; pointer-events: none; z-index: 5; }
.confetti s { position: absolute; width: 8px; height: 12px; margin: -6px -4px; border-radius: 2px; background: var(--c); opacity: 0; animation: burst2 1.1s cubic-bezier(.2,.8,.3,1) var(--t) both; }
@keyframes burst2 { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(260deg); } }
.sprog { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.sprog .meter.slim { flex: 1; margin: 0; }
.sprog span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mini-i { width: 15px; height: 15px; vertical-align: -3px; }
.h-ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; color: var(--muted); }

/* stepper */
.stepper { list-style: none; margin: 0; padding: 0; }
.st { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.st:last-child { padding-bottom: 0; }
.st::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.st:last-child::before { display: none; }
.st.done::before { background: var(--good); opacity: .55; }
.st-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 15px; background: var(--brand-soft); color: var(--muted); z-index: 1; }
.st-dot .ic { width: 19px; height: 19px; }
.st.active .st-dot { background: linear-gradient(135deg, #5b4bff, #8b5cf6); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); }
.st.done .st-dot { background: var(--good); color: #fff; }
.st-body { flex: 1; min-width: 0; padding: 2px 0 0; }
.st.locked .st-body { padding: 8px 12px; margin-top: -4px; border-radius: 14px; background: color-mix(in srgb, var(--muted) 8%, var(--card)); opacity: .85; }
.st-head { display: flex; gap: 8px; align-items: flex-start; }
.st-title { font-size: 15.5px; letter-spacing: -.01em; }
.st-sub { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.st-lock { color: var(--muted); } .st-lock .ic { width: 18px; height: 18px; }
.st-action { margin-top: 12px; }
.st-proof { margin-top: 6px; font-size: 13px; color: var(--muted); font-style: italic; }
.btn-primary.sm { height: 48px; margin-top: 0; font-size: 15px; border-radius: 14px; }
.rv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 17%, var(--card)); }
.rv-chip .ic { width: 15px; height: 15px; }

/* timer */
.timer-box { display: grid; gap: 10px; }
.tm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-time { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.tm-time .ic { color: var(--brand); width: 20px; height: 20px; }
.tm-time b { color: var(--brand); font-size: 22px; letter-spacing: -.02em; }
.tm-btn { width: 52px; height: 52px; border: 0; border-radius: 15px; background: linear-gradient(135deg, #5b4bff, #8b5cf6); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 20px -10px rgba(91,75,255,.8); }
.tm-btn .ic { width: 22px; height: 22px; }
.tm-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 15%, transparent); overflow: hidden; }
.tm-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b4bff, #22c3a6); transition: width .9s linear; }
.tm-info { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, var(--card)); }
.tm-info .ic { width: 17px; height: 17px; flex-shrink: 0; }
.tm-done[hidden] { display: none; }

/* photo proof */
.photo-box { padding: 12px; border: 2px dashed color-mix(in srgb, var(--brand) 55%, var(--line)); border-radius: 18px; display: grid; gap: 12px; }
.pb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pb-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.pb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-thumb button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,15,35,.8); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pb-thumb button .ic { width: 13px; height: 13px; }
.pb-add { aspect-ratio: 1; border-radius: 12px; border: 0; background: var(--brand-soft); color: var(--brand); display: grid; place-content: center; justify-items: center; gap: 4px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pb-add .ic { width: 24px; height: 24px; }
.pb-req { padding: 12px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, var(--muted) 9%, var(--card)); }
.pb-req ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.proof-form { display: grid; gap: 10px; }
.proof-form textarea { width: 100%; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.proof-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.pb-err:empty, .pf-err:empty { display: none; }
.pthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pthumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--line); cursor: zoom-in; display: block; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.broken { display: grid; place-items: center; font-size: 11px; color: var(--muted); cursor: default; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,20,.9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* guidelines, schedule, about */
.gbox { margin-bottom: 14px; padding: 16px; border-radius: 18px; background: color-mix(in srgb, #ffb020 16%, var(--card)); border: 1px solid color-mix(in srgb, #ffb020 38%, var(--line)); }
.gb-title { display: flex; align-items: center; gap: 10px; }
.gb-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ffb020; color: #fff; flex-shrink: 0; }
.gb-ic .ic { width: 16px; height: 16px; }
.gbox ul { margin: 10px 0 0; padding-left: 22px; font-size: 14px; }
.gbox li { margin: 3px 0; }
.sched2 { display: grid; gap: 4px; }
.sched2 > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sched2 > div:last-child { border-bottom: 0; }
.sched2 .ic { width: 19px; height: 19px; color: var(--muted); }
.sched2 span { width: 74px; color: var(--muted); font-size: 14px; }
.sched2 b { flex: 1; min-width: 150px; font-weight: 600; font-size: 14.5px; }
.sched2 b.good { color: var(--good); }
.sched2 .sp { margin: 0; }
.about { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-line; }

/* admin */
.rv { align-items: flex-start; }
.rv .proof { margin-top: 4px; }
.warnbox { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--warn); margin-bottom: 8px; }
.row-btns.top { margin-top: 14px; }
.btn.ghost.danger, .danger { color: var(--bad); }
.btn.small .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.step-builder .sb-row { display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--muted) 5%, var(--card)); }
.sb-top { display: grid; grid-template-columns: minmax(130px, 190px) 1fr auto; gap: 8px; align-items: center; }
.sb-opts { display: grid; grid-template-columns: 1fr 140px 150px; gap: 8px; }
.sb-opts input[hidden], .sb-opts select[hidden] { display: none; }
.sb-row input, .sb-row select, .sb-row textarea, .task-form textarea, .task-form select, .task-form input { font: inherit; font-size: 15px; }
.sb-row textarea, .task-form textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); resize: vertical; }
@media (max-width: 760px) {
  .tcard { grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; padding: 12px; }
  .tcard .chev { display: none; }
  .tc-side .amt { font-size: 17px; }
  .appic.lg { width: 52px; height: 52px; }
  .sb-top { grid-template-columns: 1fr auto; } .sb-top .sk { grid-column: 1 / -1; }
  .sb-opts { grid-template-columns: 1fr; }
  .th-reward .amt { font-size: 20px; }
}
.tcard .meter.slim { height: 5px; margin: 10px 0 0; background: color-mix(in srgb, var(--brand) 15%, transparent); border-radius: 99px; overflow: hidden; }
.tcard .meter.slim i { display: block; height: 100%; background: linear-gradient(90deg, #5b4bff, #22c3a6); border-radius: 99px; }

/* in-app dialogs and toasts */
.dlg { z-index: 90; }
.dlg .sheet { max-width: 420px; }
.dlg .sheet h3 { font-size: 19px; letter-spacing: -.02em; }
.dlg-msg { margin: 8px 0 4px; color: var(--muted); font-size: 14.5px; }
.dlg .sheet input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.dlg .sheet input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.btn.danger-fill { background: var(--bad); box-shadow: 0 10px 20px -10px rgba(220,38,38,.7); }
#toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 95; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 14px; background: #1b1d2e; color: #fff; font-size: 14.5px; font-weight: 600; border-left: 4px solid var(--brand); box-shadow: 0 16px 36px -14px rgba(0,0,0,.6); animation: toast-in .25s ease both; }
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 760px) { #toasts { bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); } }

/* ---- Figma alignment ---- */
li.tcard { display: block; padding: 14px; }
.tcard .tc-top { display: flex; align-items: center; gap: 12px; }
.tcard .tc-top .tc-main { flex: 1; }
.tcard .tc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tcard .tc-bottom .tc-chips { margin: 0; }
.tcard .tc-bottom .sp { margin: 0; }
.tcard .chev { display: none; }
.rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; font-weight: 800; background: var(--brand-soft); color: var(--muted); }
.rank.r1 { background: linear-gradient(135deg,#ffd75e,#f5a623); color: #5a3b00; }
.rank.r2 { background: linear-gradient(135deg,#e6e9f0,#b4bac8); color: #3b4252; }
.rank.r3 { background: linear-gradient(135deg,#f0b27a,#c07a3e); color: #4a2a0c; }
.seg.wide { display: flex; width: 100%; margin-bottom: 4px; }
.seg.wide button { flex: 1; padding: 9px 12px; font-size: 14px; }

.hero-row { display: grid; grid-template-columns: 1.75fr 1fr; gap: 14px; align-items: stretch; margin-bottom: 14px; }
.hero-row .hero { margin-bottom: 0; }
.hero-row .goals { margin: 0; }
@media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } .hero-row .hero { margin-bottom: 0; } }
ul.list > li.tcard { margin-bottom: 10px; }
