:root {
  --bg: #07080a;
  --bg-2: #0d0f13;
  --surface: #14171d;
  --card: #191d25;
  --line: rgba(255,255,255,.08);
  --text: #f3f4f6;
  --muted: #8b909c;
  --lime: #c6f54a;
  --lime-2: #9ad11a;
  --orange: #ff7a3d;
  --blue: #6aa6ff;
  --ok: #3ddc97;
  --warn: #ffc857;
  --danger: #ff5d73;
  --shadow: 0 18px 50px rgba(0,0,0,.38);
  --radius: 22px;
  --safe-b: env(safe-area-inset-bottom);
  --tab: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(198,245,74,.10), transparent 50%),
    radial-gradient(800px 500px at -10% 20%, rgba(255,122,61,.08), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  color: var(--lime);
  font-weight: 700;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px 18px calc(var(--tab) + var(--safe-b) + 24px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lime), #eaff9a);
  color: #111; font-weight: 800;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}
.stat b { display: block; font-size: 22px; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 13px 16px;
  font-weight: 700; cursor: pointer; transition: transform .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-lime { background: var(--lime); color: #111; width: 100%; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); width: 100%;
}
.btn-orange { background: var(--orange); color: #111; width: 100%; }
.btn-danger { background: rgba(255,93,115,.16); color: #ff8b9a; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(198,245,74,.55);
  box-shadow: 0 0 0 3px rgba(198,245,74,.12);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .choice {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.chip.active, .choice.active, .choice:has(input:checked) {
  background: rgba(198,245,74,.16);
  border-color: rgba(198,245,74,.5);
  color: var(--lime);
}
.choice input { display: none; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.split-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.split-card.active {
  border-color: rgba(198,245,74,.55);
  background: linear-gradient(180deg, rgba(198,245,74,.14), var(--surface));
}
.split-card small { color: var(--muted); }

.range-wrap { display: grid; gap: 8px; }
.range-wrap input[type=range] { width: 100%; accent-color: var(--lime); }
.range-val { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab) + var(--safe-b));
  padding: 8px 10px var(--safe-b);
  display: flex; justify-content: space-around; align-items: flex-start;
  background: rgba(10,11,13,.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 10px; font-weight: 600;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--lime); }

.hero {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.hero-card { width: min(520px, 100%); }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(198,245,74,.12);
  color: var(--lime);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.hero h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1.05; letter-spacing: -.04em; margin: 14px 0; }
.feature-list { display: grid; gap: 10px; margin: 22px 0; }
.feature {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--lime);
  margin-top: 6px; flex: 0 0 auto;
}

.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; padding: 10px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
}
.toast-ok { border-color: rgba(61,220,151,.4); color: var(--ok); }
.toast-error { border-color: rgba(255,93,115,.4); color: var(--danger); }

.bmi-bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #6aa6ff, #3ddc97, #ffc857, #ff5d73); position: relative; }
.bmi-dot {
  position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(255,255,255,.15);
}

.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eq-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
  font-size: 13px; cursor: pointer;
}
.eq-item input { accent-color: var(--lime); }
.eq-item.checked { border-color: rgba(198,245,74,.4); background: rgba(198,245,74,.08); }

.ex-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ex-row:last-child { border-bottom: 0; }
.badge {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: rgba(198,245,74,.12); color: var(--lime);
}
.pill {
  display: inline-block; padding: 4px 8px; border-radius: 99px;
  background: rgba(255,255,255,.06); color: var(--muted); font-size: 11px;
}

.session-head { position: sticky; top: 0; z-index: 5; background: rgba(7,8,10,.86); backdrop-filter: blur(12px); padding: 10px 0 12px; }
.progress { height: 6px; background: #222; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--lime); width: 0; transition: width .25s; }

.set-table { width: 100%; border-collapse: collapse; }
.set-table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 4px; }
.set-table td { padding: 6px 4px; }
.set-table input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px; text-align: center;
}
.set-done { background: rgba(61,220,151,.18); color: var(--ok); border: 0; border-radius: 10px; padding: 9px 10px; cursor: pointer; }
.set-done.done { background: var(--ok); color: #102216; font-weight: 800; }

.timer {
  margin: 16px 0;
  display: grid; place-items: center;
  background: #10130d;
  border: 1px solid rgba(198,245,74,.2);
  border-radius: 24px;
  padding: 22px;
}
.timer b { font-size: 56px; letter-spacing: -.05em; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: #222; }
.steps i.on { background: var(--lime); }

.empty { text-align: center; padding: 36px 10px; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 4px; text-align: center; font-size: 11px; min-height: 64px;
}
.day strong { display: block; font-size: 10px; color: var(--muted); }
.day.today { border-color: rgba(198,245,74,.5); }

@media (min-width: 860px) {
  .app { width: min(980px, 100%); padding-bottom: 40px; }
  .tabbar {
    left: 18px; right: auto; top: 18px; bottom: auto;
    width: 220px; height: auto; flex-direction: column;
    border-radius: 24px; padding: 14px; border: 1px solid var(--line);
  }
  .tab { flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 14px; padding: 10px; border-radius: 14px; }
  .tab.active { background: rgba(198,245,74,.1); }
  body.has-nav .app { margin-left: 250px; width: min(860px, calc(100% - 280px)); }
}
