:root {
  --bg: #0a0a0b; --s1: #141416; --s2: #1c1c1f; --s3: #26262a; --line: #232327;
  --text: #f4f4f5; --muted: #9a9aa2; --faint: #5e5e66;
  --accent: #ff5a1f; --accent-ink: #fff; --accent-soft: #ff5a1f1f;
  --good: #30d158; --rest: #64a8ff; --bad: #ff453a; --warn: #ffd60a;
  --r: 16px; --r-sm: 11px;
  --nav-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main { max-width: 600px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
h1 { font-size: 28px; font-weight: 750; letter-spacing: -0.025em; margin: 0; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 26px 2px 10px; }
h3 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 8px; min-height: 60px; margin: 0 -16px 6px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; }
.top .title { flex: 1; min-width: 0; }
.top .title h1 { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { font-size: 13px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--s1); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:active { background: var(--s2); }

/* surfaces */
.card { background: var(--s1); border-radius: var(--r); padding: 16px; margin-bottom: 10px; }
.card.tight { padding: 4px 0; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* list rows */
.list { background: var(--s1); border-radius: var(--r); overflow: hidden; margin-bottom: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 56px; cursor: pointer; position: relative; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.item:active { background: var(--s2); }
.item .grow { flex: 1; min-width: 0; }
.item .name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chev { color: var(--faint); }
.item.selected { background: var(--accent-soft); }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--s3); display: grid; place-items: center; flex: none; }
.selected .check { background: var(--accent); border-color: var(--accent); }
.selected .check svg { stroke: #fff; width: 14px; height: 14px; stroke-width: 3; }

/* buttons */
button { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px; padding: 0 18px; height: 48px; font-weight: 600; font-size: 15px;
  background: var(--s2); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:active { filter: brightness(1.15); transform: scale(.99); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--s3); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.lg { height: 56px; font-size: 17px; border-radius: 15px; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn .i { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px 0; }

/* forms */
input, select, textarea { font: inherit; width: 100%; background: var(--s2); color: var(--text); border: 1px solid transparent; border-radius: var(--r-sm); padding: 12px 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--s3); background: var(--s3); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 76px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9aa2' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 14px 2px 6px; font-weight: 500; }
.field + .field { margin-top: 2px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }
.search input { padding-left: 38px; }

/* chips & segmented */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip { flex: none; border: 0; background: var(--s1); color: var(--muted); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--s2); border-radius: 7px; padding: 3px 8px; }
.tag.accent { color: var(--accent); background: var(--accent-soft); }
.seg { display: flex; background: var(--s2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); height: 38px; border-radius: 9px; font-weight: 600; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--s3); color: var(--text); }

/* today */
.hero { padding: 20px; }
.hero .big { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin: 4px 0 2px; }
.hero.pending { background: linear-gradient(160deg, #2a1209 0%, var(--s1) 60%); }
.hero.done { background: linear-gradient(160deg, #0b2414 0%, var(--s1) 60%); }
.hero.rest { background: linear-gradient(160deg, #0b1a2e 0%, var(--s1) 60%); }
.hero.live { background: linear-gradient(160deg, #2a1209 0%, var(--s1) 70%); box-shadow: inset 0 0 0 1px #ff5a1f55; }
.dotline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.dotline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.week .d { font-size: 12px; color: var(--muted); font-weight: 500; }
.dot { width: 34px; height: 34px; border-radius: 50%; margin: 6px auto 0; display: grid; place-items: center; background: var(--s2); }
.dot svg { width: 16px; height: 16px; stroke-width: 3; }
.dot.workout { background: var(--good); color: #062b12; } .dot.rest { background: var(--rest); color: #061a33; } .dot.missed { background: #ff453a33; color: var(--bad); }
.dot.pending { box-shadow: inset 0 0 0 2px var(--accent); } .dot.future, .dot.before { opacity: .35; }
.stat { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis .card { margin: 0; padding: 14px; }

/* bars */
.bar { height: 8px; background: var(--s3); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.bar.good > i { background: var(--good); }
.bar.over > i { background: var(--warn); }
.bar.thin { height: 5px; margin: 6px 0 0; }

/* workout logger */
.ex-card { background: var(--s1); border-radius: var(--r); padding: 14px 14px 10px; margin-bottom: 10px; }
.ex-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ex-head .grow { flex: 1; min-width: 0; }
.ex-head h3 { font-size: 16px; }
.sets-head, .set { display: grid; grid-template-columns: 30px 1fr 1fr 44px; gap: 8px; align-items: center; }
.sets-head { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 0 2px 4px; }
.set { padding: 4px 0; }
.set .n { text-align: center; font-weight: 650; color: var(--muted); font-size: 14px; }
.set input { text-align: center; padding: 10px 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.set .tick { width: 44px; height: 42px; border-radius: 11px; border: 0; background: var(--s2); color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.set .tick svg { stroke-width: 3; }
.set.done input { background: #30d15814; color: var(--good); }
.set.done .tick { background: var(--good); color: #062b12; }
.set .rm { background: none; border: 0; color: var(--faint); }
.ex-foot { display: flex; gap: 8px; margin-top: 6px; }
.ex-foot .btn { flex: 1; height: 38px; font-size: 14px; }
.timer-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); max-width: 576px; margin: 0 auto; z-index: 20;
  background: var(--s2); border-radius: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 40px #000a; }
.timer-bar .t { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; min-width: 64px; }
.timer-bar .bar { flex: 1; margin: 0; }

/* ranks */
.badge { display: inline-grid; place-items: center; position: relative; flex: none; }
.badge svg { width: 100%; height: 100%; display: block; }
.rank-hero { text-align: center; padding: 26px 18px 20px; position: relative; overflow: hidden; }
.rank-hero .glow { position: absolute; inset: -40% -20% auto; height: 260px; filter: blur(60px); opacity: .28; pointer-events: none; }
.rank-hero .rname { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.muscles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcard { background: var(--s1); border-radius: var(--r); padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.mcard:active { background: var(--s2); }
.mcard .grow { flex: 1; min-width: 0; }
.mcard .m { font-size: 13px; color: var(--muted); font-weight: 550; text-transform: capitalize; }
.mcard .r { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.ladder > div { padding: 9px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.ladder > div:nth-child(-n+2) { border-top: 0; }
.ladder > div:nth-child(even) { justify-content: flex-end; font-variant-numeric: tabular-nums; font-weight: 600; }
.ladder .you { color: var(--accent); }

/* food */
.meal { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.meal:first-child { border-top: 0; padding-top: 2px; }
.est { display: grid; grid-template-columns: 1fr 70px 62px; gap: 6px; align-items: center; margin-bottom: 6px; }
.est input { padding: 9px 8px; font-size: 14px; }
.ai-out { white-space: pre-wrap; background: var(--s2); border-radius: 12px; padding: 14px; margin-top: 12px; line-height: 1.55; }
.preview { max-width: 100%; max-height: 220px; border-radius: 12px; display: block; margin: 10px 0 0; }

/* progress */
.heat { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-rows: repeat(7, auto); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--s2); }
.heat i.workout { background: var(--good); } .heat i.rest { background: var(--rest); } .heat i.missed { background: #ff453a66; } .heat i.pending { box-shadow: inset 0 0 0 1.5px var(--accent); }
.heat i.before, .heat i.future { opacity: .3; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; display: block; background: var(--s2); }
.photos figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: #000b; padding: 2px 7px; border-radius: 6px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; display: block; }
svg.chart { width: 100%; height: 150px; display: block; }

/* banners */
.banner { display: flex; gap: 12px; align-items: center; background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; }
.banner .grow { flex: 1; min-width: 0; }
.banner b { display: block; }
.banner .icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }

/* sheets */
.backdrop { position: fixed; inset: 0; background: #0009; z-index: 40; opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 600px; margin: 0 auto; background: var(--s1); border-radius: 22px 22px 0 0;
  max-height: 92vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet.show { transform: none; }
.sheet.full { height: 92vh; }
.sheet .grab { width: 38px; height: 5px; border-radius: 9px; background: var(--s3); margin: 8px auto 2px; flex: none; }
.sheet .sh-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 10px; flex: none; }
.sheet .sh-head h3 { flex: 1; font-size: 18px; }
.sheet .sh-body { overflow-y: auto; padding: 0 16px 16px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet .sh-foot { padding: 10px 16px 14px; flex: none; border-top: 1px solid var(--line); }
.sheet .list { background: var(--s2); }
.sheet .item + .item::before { background: var(--s3); }
.sheet input, .sheet select, .sheet textarea { background: var(--s2); }

/* nav */
nav#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav#tabs .in { display: flex; width: 100%; max-width: 600px; }
nav#tabs a { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; height: var(--nav-h); justify-content: center; }
nav#tabs a svg { width: 23px; height: 23px; }
nav#tabs a.on { color: var(--text); }
nav#tabs a.on svg { stroke: var(--accent); }
#toast { position: fixed; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); max-width: 420px; margin: 0 auto; background: var(--s3); color: var(--text);
  padding: 12px 16px; border-radius: 14px; text-align: center; z-index: 60; font-weight: 550; box-shadow: 0 10px 40px #000a; transition: opacity .2s, transform .2s; }
#toast[hidden] { display: block; opacity: 0; transform: translateY(-10px); pointer-events: none; }
.login { max-width: 320px; margin: 0 auto; padding-top: 20vh; text-align: center; }
.login .logo { width: 72px; height: 72px; border-radius: 20px; background: var(--accent); display: grid; place-items: center; margin: 0 auto 16px; }
.login .logo svg { width: 38px; height: 38px; stroke: #fff; stroke-width: 2.4; }
.login input { margin-top: 10px; height: 52px; }
.login .seg + input, .login p + input { margin-top: 18px; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.spin { width: 18px; height: 18px; border: 2px solid #fff5; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 640px) { main { padding-left: 20px; padding-right: 20px; } }
.sec { display: flex; justify-content: space-between; align-items: center; margin: 26px 2px 10px; }
.sec h2 { margin: 0; }
.sec .link { padding: 0; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- people: avatars, rank nametags ---------- */
.pip { position: absolute; top: 9px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.icon-btn { position: relative; }
.icon-btn .pip { top: 6px; right: 6px; }
.av { --ring: #3a3a40; position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--s3); color: var(--text); font-weight: 750;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring); margin: 4px; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.icon-btn .av { margin: 0; box-shadow: 0 0 0 2px var(--ring); }
.av.t-skinny { --ring: #55555c; } .av.t-twig { --ring: #9b7653; } .av.t-bronze { --ring: #cd7f3e; } .av.t-silver { --ring: #c9d1dc; } .av.t-gold { --ring: #f5c232; }
.av.t-platinum { --ring: #4fe0c8; } .av.t-diamond { --ring: #6fa8ff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 14px #6fa8ff88; }
.av.t-master { --ring: #b36bff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 16px #b36bffaa; }
.av.t-grandmaster { --ring: #ff4d6d; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 18px #ff4d6daa; }
.av.t-chad { box-shadow: 0 0 0 2px var(--bg), 0 0 20px #ffb800cc; }
.av.t-chad::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; z-index: -1; background: conic-gradient(#fff1a8, #ff5a1f, #ffd000, #ff2d95, #fff1a8); animation: spin 3s linear infinite; }
.av.t-chad { z-index: 0; }

.nt-link { display: inline; }
.nt { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.nt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt.t-skinny { color: #8e8e96; } .nt.t-twig { color: #c49a6c; } .nt.t-bronze { color: #e8a065; } .nt.t-silver { color: #dfe6ef; }
.nt.t-gold { color: #ffd34d; text-shadow: 0 0 10px #ffc40033; }
.nt.t-platinum { color: #6ff2dc; text-shadow: 0 0 10px #2fe0c444; }
.nt.t-diamond { color: #a6ccff; text-shadow: 0 0 8px #5b9bff, 0 0 18px #3d6fe088; }
.nt.t-master .nt-name, .nt.t-grandmaster .nt-name, .nt.t-chad .nt-name { background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 3.2s linear infinite; }
.nt.t-master .nt-name { background-image: linear-gradient(100deg, #b47cff 20%, #f1dcff 40%, #b47cff 60%); filter: drop-shadow(0 0 6px #9b4dff99); }
.nt.t-grandmaster .nt-name { background-image: linear-gradient(100deg, #ff3d5e 20%, #ffd0d8 40%, #ff3d5e 60%); filter: drop-shadow(0 0 7px #ff2d55aa); }
.nt.t-chad .nt-name { background-image: linear-gradient(100deg, #ffd000, #ff5a1f, #ff2d95, #b36bff, #4fe0c8, #ffd000); background-size: 300% 100%; animation-duration: 4s; filter: drop-shadow(0 0 8px #ffb800aa); font-weight: 800; }
.nt-crown { width: 16px; height: 16px; color: #ffd000; fill: #ffd00055; filter: drop-shadow(0 0 4px #ffb800); }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.rank-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 99px; background: var(--s2); color: var(--muted); vertical-align: middle; }
.rank-pill.lg { font-size: 13px; padding: 5px 12px; }
.rank-pill.t-bronze { color: #e8a065; background: #e8a06518; } .rank-pill.t-silver { color: #dfe6ef; background: #dfe6ef14; } .rank-pill.t-gold { color: #ffd34d; background: #ffd34d18; }
.rank-pill.t-platinum { color: #6ff2dc; background: #6ff2dc18; } .rank-pill.t-diamond { color: #a6ccff; background: #5b9bff22; box-shadow: 0 0 12px #5b9bff44; }
.rank-pill.t-master { color: #e2c4ff; background: #9b4dff2a; box-shadow: 0 0 12px #9b4dff55; } .rank-pill.t-grandmaster { color: #ffc2cd; background: #ff2d552a; box-shadow: 0 0 12px #ff2d5555; }
.rank-pill.t-chad { color: #1a1000; background: linear-gradient(100deg, #ffd000, #ff8a1f, #ff2d95, #ffd000); background-size: 300% 100%; animation: shine 4s linear infinite; box-shadow: 0 0 16px #ffb80088; }
.rank-pill.t-twig { color: #c49a6c; background: #c49a6c18; }

/* ---------- feed ---------- */
.fi { padding: 14px 16px 10px; }
.fi-head { align-items: center; gap: 10px; }
.fi-head .grow > div:first-child { line-height: 1.3; }
.fi-body { margin: 10px 0 4px; cursor: pointer; }
.fi-title { font-weight: 700; font-size: 16px; }
.fi-prs { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.fi-prs span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--warn); }
.fi-prs svg { width: 15px; height: 15px; }
.rx { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.rx button { border: 0; background: var(--s2); border-radius: 99px; padding: 5px 10px; font-size: 15px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.rx button b { font-size: 12px; color: var(--muted); }
.rx button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px #ff5a1f66; }
.rx button.on b { color: var(--accent); }
video.proof { width: 100%; max-height: 420px; border-radius: 12px; background: #000; display: block; }

/* ---------- leaderboards ---------- */
.board .item { gap: 10px; padding: 10px 14px; }
.board .item.me { background: var(--accent-soft); }
.place { width: 26px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.place.p1 { color: #ffd34d; } .place.p2 { color: #dfe6ef; } .place.p3 { color: #e8a065; }
.vf { color: var(--good); display: grid; } .vf svg { width: 18px; height: 18px; }
.vf-btn { color: var(--good); }

/* ---------- profile ---------- */
.profile { text-align: center; position: relative; overflow: hidden; padding: 22px 18px 18px; }
.profile .glow { position: absolute; inset: -40% -20% auto; height: 240px; filter: blur(60px); opacity: .22; pointer-events: none; }
.p-name { font-size: 24px; margin-top: 10px; letter-spacing: -0.02em; }
.p-name .nt { justify-content: center; }
.p-name .nt-crown { width: 22px; height: 22px; }
.p-follow { display: flex; justify-content: center; gap: 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.p-follow b { color: var(--text); }
.kpis .card .stat { font-size: 26px; }
.kpis { margin-bottom: 0; }
.kpis .card { margin-bottom: 0; }
.kpis + h2 { margin-top: 26px; }
.fi-ranks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fi-ranks span { display: inline-flex; align-items: center; gap: 6px; background: var(--s2); border-radius: 99px; padding: 3px 10px 3px 4px; font-size: 13px; color: var(--muted); }
.fi-ranks b { color: var(--text); }

/* v4: onboarding, intro tour, quieter banner */
.icon-btn { position: relative; }
.banner.quiet { background: var(--s1); }
.banner.quiet .icon { background: var(--s3); }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.targets-box { background: var(--s2); border-radius: 14px; padding: 14px; margin-top: 16px; }
.sheet .targets-box { background: var(--s2); }
.sheet .targets-box input { background: var(--s3); }
.card .targets-box input { background: var(--s3); }
.onb { max-width: 400px; margin: 0 auto; padding: 6vh 0 40px; text-align: center; }
.onb .logo { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.onb .logo svg { width: 34px; height: 34px; stroke: #fff; stroke-width: 2.4; }
.onb > .btn.primary { margin-top: 14px; }
.steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 22px; }
.steps i { width: 22px; height: 5px; border-radius: 9px; background: var(--s3); transition: background .2s, width .2s; }
.steps i.on { background: var(--accent); }
.tour { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  opacity: 0; transition: opacity .2s; }
.tour.show { opacity: 1; }
.tour-in { width: 100%; max-width: 380px; text-align: center; position: relative; }
.tour-in p { line-height: 1.55; margin-top: 10px; font-size: 15px; }
.tour-in p b { color: var(--text); }
.tour-icon { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 26px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #ff8a4c, var(--accent)); box-shadow: 0 18px 50px #ff5a1f44; }
.tour-icon svg { width: 48px; height: 48px; stroke: #fff; stroke-width: 2.2; }
.tour-skip { position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; background: none; border: 0; color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px; }
.big-num { height: 64px; font-size: 28px; font-weight: 700; text-align: center; }
