:root {
  --forest: #1a472a;
  --forest-mid: #2d6a4f;
  --forest-light: #52b788;
  --leaf: #95d5b2;
  --mint: #d8f3dc;
  --cream: #f8f6f0;
  --charcoal: #1c1c1e;
  --warm-gray: #6b6b6b;
  --blush: #fce4ec;
  --blush-dark: #d4537e;
  --gold: #f4a261;
  --white: #ffffff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
}

.hero {
  background: var(--forest);
  color: var(--white);
  padding: 3rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(82, 183, 136, 0.15);
}
.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-tag {
  display: inline-block;
  background: rgba(82, 183, 136, 0.25);
  color: var(--leaf);
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(149, 213, 178, 0.3);
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}
.hero h1 span {
  color: var(--leaf);
}
.hero-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  max-width: 440px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--leaf);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* SETUP BANNER */
.setup-banner {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 760px;
}
.setup-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #7d5a00;
  margin-bottom: 6px;
}
.setup-input {
  width: 100%;
  border: 1.5px solid #ffd54f;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--charcoal);
  background: var(--white);
  outline: none;
  margin: 6px 0;
}
.setup-input:focus {
  border-color: var(--forest-light);
}
.setup-btn {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 99px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.setup-btn:hover {
  background: var(--forest-mid);
}
.setup-status {
  font-size: 12px;
  margin-top: 8px;
  color: var(--warm-gray);
}
.setup-status.ok {
  color: var(--forest-mid);
  font-weight: 500;
}
.setup-status.err {
  color: #c62828;
}

.mental-banner {
  background: linear-gradient(135deg, var(--blush) 0%, #fce4ec 100%);
  border-left: 4px solid var(--blush-dark);
  margin: 2rem auto;
  max-width: 760px;
  border-radius: 0 16px 16px 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.mental-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.mental-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--blush-dark);
  margin-bottom: 4px;
}
.mental-text {
  font-size: 13px;
  color: #880e4f;
  line-height: 1.6;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--forest-light);
  margin: 2.5rem 0 1rem;
}

.session-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  background: var(--white);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.stab {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--warm-gray);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.stab.active {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26, 71, 42, 0.25);
}

.phase-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.phase-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.phase-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.phase-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
}
.pill-breath {
  background: var(--blush);
  color: var(--blush-dark);
}
.pill-warmup {
  background: #fff3cd;
  color: #7d5a00;
}
.pill-strength {
  background: var(--mint);
  color: var(--forest);
}
.pill-cardio {
  background: #dbeafe;
  color: #1e40af;
}
.pill-cool {
  background: #ede9fe;
  color: #5b21b6;
}
.phase-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex: 1;
}
.phase-time {
  font-size: 12px;
  color: var(--warm-gray);
}
.phase-arrow {
  font-size: 14px;
  color: var(--warm-gray);
  transition: transform 0.25s;
}
.phase-card.open .phase-arrow {
  transform: rotate(180deg);
}
.phase-body {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.phase-card.open .phase-body {
  display: block;
}

.exercise {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}
.exercise:last-child {
  border-bottom: none;
}
.ex-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-mid);
  flex-shrink: 0;
}
.ex-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 3px;
}
.ex-detail {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.5;
}
.ex-tip {
  font-size: 12px;
  color: var(--warm-gray);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.5;
}
.ex-yt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  color: #cc0000;
  text-decoration: none;
  font-weight: 500;
  background: #fff0f0;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid #ffcdd2;
}

/* NUTRITION */
.meal-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 10px;
}
.meal-time-block {
  background: var(--mint);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.meal-time-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--forest-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.meal-time-val {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  margin-top: 2px;
  line-height: 1.3;
}
.meal-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 3px;
}
.meal-foods {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.5;
}
.meal-protein {
  display: inline-block;
  background: var(--mint);
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 5px;
}

/* BREATHWORK */
.breath-box {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 2rem;
  text-align: center;
}
.breath-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid var(--forest-light);
  margin: 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--forest);
  transition: all 1s ease-in-out;
}
.breath-btn {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  border-radius: 99px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
  transition:
    background 0.2s,
    transform 0.1s;
}
.breath-btn:hover {
  background: var(--forest-mid);
}
.breath-phase-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 4px;
}

/* PROGRESS */
.mood-row {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1.25rem;
  margin-bottom: 10px;
}
.mood-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.mood-session-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.mood-date-input {
  font-size: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--charcoal);
  font-family: 'DM Sans', sans-serif;
}
.mood-emojis {
  display: flex;
  gap: 8px;
}
.mood-btn {
  font-size: 20px;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.mood-btn.selected {
  border-color: var(--forest-light);
  background: var(--mint);
}
.mood-note {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--charcoal);
  margin-top: 10px;
  resize: none;
  background: var(--cream);
  outline: none;
}
.mood-note:focus {
  border-color: var(--forest-light);
  background: var(--white);
}
.save-mood-btn {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 8px 20px;
  border-radius: 99px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
.save-mood-btn:hover {
  background: var(--forest-mid);
}
.save-indicator {
  font-size: 11px;
  color: var(--forest-mid);
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.progress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.progress-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1.25rem;
}
.progress-ex {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.weight-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weight-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.weight-label {
  font-size: 11px;
  color: var(--warm-gray);
  width: 50px;
}
.weight-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
}
.weight-input:focus {
  border-color: var(--forest-light);
  background: var(--white);
}
.weight-unit {
  font-size: 11px;
  color: var(--warm-gray);
}
.save-weight-btn {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 6px 14px;
  border-radius: 99px;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  transition: background 0.2s;
}
.save-weight-btn:hover {
  background: var(--forest-mid);
}

.tip-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 10px;
}
.tip-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.tip-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.tip-text {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.6;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--warm-gray);
  transition: color 0.15s;
}
.nav-item.active {
  color: var(--forest);
}
.nav-icon {
  font-size: 20px;
}
.nav-label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.page {
  display: none;
  padding-bottom: 90px;
}
.page.active {
  display: block;
}

@media (max-width: 480px) {
  .progress-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 2rem 1.25rem 3rem;
  }
}
