:root {
  --bg: #070b10;
  --screen: #0b1017;
  --panel: #171d25;
  --panel-2: #20262f;
  --panel-3: #111820;
  --line: rgba(255,255,255,.075);
  --text: #f7f8fb;
  --muted: #8b929f;
  --muted-2: #606976;
  --lime: #c8ff2d;
  --lime-2: #a9f01d;
  --blue: #56d7ff;
  --orange: #ff7b31;
  --shadow: 0 24px 54px rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 8%, rgba(200,255,45,.08), transparent 165px),
    radial-gradient(circle at 8% 16%, rgba(82,141,255,.08), transparent 160px),
    linear-gradient(155deg, #111820 0, #090d13 46%, #06090d 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.shell {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) clamp(12px, 4vw, 18px) calc(92px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background: transparent;
}
.top {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 13px;
}
.back, .top-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 25px;
  line-height: 1;
}
.top-dot { font-size: 16px; opacity: .9; }
.back.ghost { opacity: 0; pointer-events: none; }
h1 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.12;
  font-weight: 840;
  letter-spacing: -.02em;
}
.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.28;
  font-weight: 520;
}
h2, h3 { margin: 0; }
h2 {
  font-size: 24px;
  line-height: 1.08;
  font-weight: 860;
  letter-spacing: -.03em;
}
h3 {
  font-size: 14px;
  line-height: 1.15;
  font-weight: 820;
}
p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}
.card {
  position: relative;
  overflow: hidden;
  margin: 9px 0;
  padding: 14px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
}
.hero {
  min-height: 170px;
  padding: 16px;
  display: grid;
  align-content: end;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(7,10,14,.06), rgba(7,10,14,.88)),
    radial-gradient(circle at 90% 10%, rgba(200,255,45,.18), transparent 32%),
    #111820;
}
.hero.ref-onboarding { min-height: 365px; background-image: linear-gradient(180deg, rgba(7,10,14,.04), rgba(7,10,14,.94)), url("/static/ref-onboarding.jpg"); background-size: cover; background-position: center; }
.hero.ref-home { min-height: 150px; background-image: linear-gradient(90deg, rgba(18,24,32,.94), rgba(18,24,32,.58)), url("/static/ref-home.jpg"); background-size: cover; background-position: center; }
.hero.ref-run { min-height: 122px; background-image: linear-gradient(90deg, rgba(18,24,32,.94), rgba(18,24,32,.38)), url("/static/ref-run.jpg"); background-size: cover; background-position: center; }
.hero h2 { max-width: 285px; font-size: 26px; }
.lime { color: var(--lime); }
.btn, button {
  min-height: 45px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(180deg, var(--lime), var(--lime-2));
  color: #0d1116;
  font-weight: 860;
  font-size: 12px;
  line-height: 1;
}
.btn.dark, button.dark {
  background: rgba(255,255,255,.065);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.full, button.full { width: 100%; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.metric {
  min-height: 78px;
  padding: 12px 10px;
  display: grid;
  align-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.055);
}
.metric b {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  font-weight: 830;
}
.metric span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.18;
}
form { display: grid; gap: 10px; }
label {
  display: grid;
  gap: 7px;
  color: #c8d0dc;
  font-size: 11px;
  font-weight: 680;
}
input, select, textarea {
  width: 100%;
  min-height: 45px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: var(--text);
  outline: none;
}
textarea { resize: vertical; }
select option { color: #10151d; }
.choice {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px;
  border-radius: 9px;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--line);
  color: #d9dee7;
  font-size: 12px;
  font-weight: 640;
}
.choice input { display: none; }
.choice::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24);
}
.choice:has(input:checked)::after {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: var(--lime);
  background: var(--lime);
  color: #111;
  font-size: 12px;
  font-weight: 900;
}
.list { display: grid; gap: 7px; }
.row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255,255,255,.062);
  border: 1px solid rgba(255,255,255,.055);
}
.thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 70% 20%, rgba(200,255,45,.23), transparent 40%), linear-gradient(145deg,#2e3741,#10161d);
  color: var(--lime);
  font-size: 20px;
  font-weight: 850;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-main { flex: 1; min-width: 0; }
.row-main b {
  display: block;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 770;
}
.row-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.chev { color: var(--muted-2); font-size: 18px; }
.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.055);
}
.tabs a {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}
.tabs a.active {
  color: var(--lime);
  border-bottom: 1px solid var(--lime);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--lime);
  font-size: 11px;
  font-weight: 760;
}
.set {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  margin-top: 5px;
  border-radius: 8px;
  background: rgba(255,255,255,.055);
}
.stepper {
  display: grid;
  grid-template-columns: 49px 1fr 49px;
  gap: 12px;
  align-items: center;
  margin: 8px 0 14px;
}
.stepper button {
  min-height: 49px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  font-weight: 420;
}
.stepper input {
  min-height: 56px;
  border: 0;
  background: rgba(255,255,255,.045);
  text-align: center;
  font-size: 24px;
  font-weight: 820;
}
.empty { padding: 18px; color: var(--muted); text-align: center; }
.avatar {
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: url("/static/avatar-ref.jpg") center / cover;
  border: 2px solid rgba(200,255,45,.34);
  color: #fff;
  font-size: 0;
}
.profile-name { text-align: center; font-size: 21px; font-weight: 820; }
.chart {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}
.bar {
  flex: 1;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, var(--lime), rgba(200,255,45,.28));
  box-shadow: 0 0 22px rgba(200,255,45,.18);
}
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  padding: 6px clamp(10px, 4vw, 18px) max(8px, env(safe-area-inset-bottom));
  background: rgba(8,12,17,.94);
  border-top: 1px solid rgba(255,255,255,.055);
  backdrop-filter: blur(18px);
  z-index: 10;
}
.nav a {
  min-height: 47px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #6d7580;
  border-radius: 12px;
  font-size: 8px;
  line-height: 1;
  font-weight: 720;
}
.nav a b {
  font-size: 17px;
  line-height: 1;
}
.nav a.active {
  color: var(--lime);
}
@media (max-width: 390px) {
  .shell { padding-left: 10px; padding-right: 10px; }
}
