:root {
  --bg: #f3eee6;
  --paper: #fffaf3;
  --ink: #1c261f;
  --muted: #5c6b62;
  --line: #e2d8c8;
  --accent: #2f6a55;
  --accent-soft: #dceae3;
  --health: #3d6b8a;
  --fitness: #c45c26;
  --nutrition: #6b7c32;
  --supplements: #6a4f8a;
  --shadow: 0 10px 30px rgba(40, 32, 18, 0.06);
  --radius: 18px;
  --nav-h: 76px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
}

body {
  background-image:
    radial-gradient(circle at top right, rgba(47, 106, 85, 0.08), transparent 36%),
    linear-gradient(#f3eee6, #efe6d8);
}

h1,
h2,
h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0;
  font-size: 1.7rem;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: 1.15rem;
}

p {
  margin: 0;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px 16px calc(var(--nav-h) + 20px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.status-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.view {
  display: grid;
  gap: 14px;
}

.hero,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 20px;
}

.hero p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.day-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.day-banner.is-first {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.day-banner.is-last {
  grid-template-columns: 44px minmax(0, 1fr);
}

.day-banner.is-first .pager-prev,
.day-banner.is-last .pager-next {
  display: none;
}

.hero-copy {
  text-align: center;
  min-width: 0;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.7rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy p {
  margin-top: 8px;
  font-size: 0.92rem;
}

.pager {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8, #f4ece0);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 10px rgba(40, 32, 18, 0.05);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pager:hover {
  transform: translateY(-1px);
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 16px rgba(47, 106, 85, 0.1);
}

.pager:active {
  transform: translateY(0) scale(0.97);
}

.chevrons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pager-prev .chevrons {
  flex-direction: row;
}

.tri {
  width: 0;
  height: 0;
  border-style: solid;
  display: block;
}

.pager-prev .tri {
  border-width: 6px 8px 6px 0;
  border-color: transparent var(--ink) transparent transparent;
}

.pager-next .tri {
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent var(--ink);
}

.tri.ghost {
  display: none;
  opacity: 0.22;
}

.day-banner.is-mid .tri.ghost {
  display: block;
}

.grid {
  display: grid;
  gap: 12px;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 128px;
  box-shadow: var(--shadow);
}

.tile .label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.tile .value {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
}

.tile .hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.tile.health {
  border-top: 4px solid var(--health);
}
.tile.fitness {
  border-top: 4px solid var(--fitness);
}
.tile.nutrition {
  border-top: 4px solid var(--nutrition);
}
.tile.supplements {
  border-top: 4px solid var(--supplements);
}

.card {
  padding: 16px 18px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.muted {
  color: var(--muted);
}

.foundations {
  display: grid;
  gap: 8px;
}

.foundation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.foundation:last-child {
  border-bottom: 0;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #efe8dc;
  padding: 4px 8px;
  border-radius: 999px;
}

.card-lead {
  margin-bottom: 10px;
}

.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 2px;
  border-radius: 12px;
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-icon {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

@media (min-width: 720px) {
  .app {
    padding-top: 28px;
  }

  .summary {
    grid-template-columns: repeat(4, 1fr);
  }
}
