*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: oklch(10% 0.025 240);
  --surface: oklch(14% 0.02 240);
  --surface-2: oklch(17% 0.018 240);
  --ink: oklch(93% 0.012 240);
  --muted: oklch(68% 0.04 240);
  --accent: oklch(68% 0.19 42);
  --teal: oklch(72% 0.15 195);
  --teal-dim: oklch(72% 0.15 195 / 0.15);
  --border: oklch(100% 0 0 / 0.08);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 68px;
}

html { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: var(--nav-h);
  min-height: 100dvh;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: oklch(12% 0.022 240 / 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 4px;
  transition: color 0.2s;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--teal); }

/* ── Page Layout ── */
.page { padding: 24px 20px 16px; max-width: 480px; margin: 0 auto; }
.page-header { padding: 56px 20px 0; max-width: 480px; margin: 0 auto 0; }
.page-eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 6px; }
.page-title { font-family: var(--font-display); font-size: clamp(40px, 10vw, 56px); letter-spacing: 1px; line-height: 0.95; color: var(--ink); }
.page-sub { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* ── Section Labels ── */
.section-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.card + .card { margin-top: 12px; }
.card-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.card-sub { font-size: 13px; color: var(--muted); }

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
}
.stat-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-family: var(--font-display); font-size: 32px; letter-spacing: 1px; color: var(--ink); line-height: 1; }
.stat-unit { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: oklch(10% 0.025 240);
  font-weight: 600;
}
.btn-primary:active { background: oklch(65% 0.15 195); }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(10% 0.025 240);
  font-weight: 600;
}

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.form-input, .form-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.form-input:focus, .form-select:focus { border-color: var(--teal); }
.form-input::placeholder { color: var(--muted); }

/* ── Input Row ── */
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Streaks ── */
.streak-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.streak-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--muted);
}
.streak-dot.done { background: var(--teal); border-color: var(--teal); color: oklch(10% 0.025 240); }

/* ── Progress Bar ── */
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 99px; transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }

/* ── List Items ── */
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-dim); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.list-text { flex: 1; }
.list-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.list-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-right { font-size: 13px; color: var(--muted); }

/* ── BPM Badge ── */
.bpm-badge { display: inline-block; font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; color: var(--teal); }

/* ── Achievement Grid ── */
.achievement-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.achievement-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 12px; text-align: center; }
.achievement-card.unlocked { border-color: oklch(72% 0.15 195 / 0.4); }
.achievement-icon { font-size: 28px; margin-bottom: 8px; }
.achievement-name { font-size: 11px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.achievement-card:not(.unlocked) .achievement-icon { filter: grayscale(1) opacity(0.3); }
.achievement-card:not(.unlocked) .achievement-name { color: var(--muted); }

/* ── Spacing ── */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.gap-12 { display: flex; flex-direction: column; gap: 12px; }

/* ── Accent Line ── */
.accent-line { width: 32px; height: 3px; background: var(--teal); border-radius: 99px; margin: 8px 0 16px; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; line-height: 1.6; }

/* ── Shop Banner ── */
.shop-banner {
  background: oklch(68% 0.19 42 / 0.1);
  border: 1px solid oklch(68% 0.19 42 / 0.25);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.shop-banner-text { flex: 1; }
.shop-banner-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.shop-banner-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.shop-banner-arrow { font-size: 20px; color: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--teal);
  color: oklch(10% 0.025 240);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
