@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@500;700;800&display=swap");

:root {
  --paper: #fff1ea;
  --card: #fffaf6;
  --ink: #3b2a2e;
  --muted: #8a6d73;
  --line: #f3d5d0;
  --berry: #e85a71;
  --berry-deep: #c93d58;
  --peach: #ffd4c4;
  --lemon: #ffe38a;
  --matcha: #7eb8a2;
  --matcha-deep: #3e7a68;
  --lilac: #e9d7ff;
  --cream: #fff7ee;
  --shadow: 0 8px 0 #f3c9c0;
  --radius: 24px;
  --nav-h: 72px;
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--paper); }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -6%, #ffe0ea 0 18%, transparent 42%),
    radial-gradient(circle at 100% 8%, #ffe9c2 0 16%, transparent 40%),
    radial-gradient(circle at 80% 100%, #d8f0e6 0 14%, transparent 36%),
    var(--paper);
  line-height: 1.45;
  padding-bottom: calc(var(--nav-h) + 28px);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 0; }

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.brand {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.brand span { color: var(--berry); }
.sub { color: var(--muted); font-size: .95rem; margin: 2px 0 0; font-weight: 700; }

.mascot {
  width: 72px; height: 72px; flex: 0 0 72px;
  filter: drop-shadow(0 6px 0 #f3c9c0);
}

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.pill {
  background: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--berry-deep);
  box-shadow: 0 3px 0 #f3c9c0;
}
.pill.matcha { color: var(--matcha-deep); background: #eef8f3; }
.pill.lemon { color: #8a6a12; background: var(--lemon); }
.pill.lilac { color: #6b4ea1; background: var(--lilac); }

.card {
  background: var(--card);
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 15px;
  margin-bottom: 16px;
}
.card h2, .card h3 {
  font-family: var(--display);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.card h2 { font-size: 1.45rem; }
.card h3 { font-size: 1.12rem; }
.card p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.card a { color: var(--berry-deep); font-weight: 800; }
.card a:visited { color: var(--berry-deep); }
.kicker {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--berry);
  margin: 0 0 6px;
}

.today-hero {
  background: linear-gradient(165deg, #ffb3c1 0%, #ff8fa0 48%, #ffc089 100%);
  color: #4a2430;
  border: 2px solid #fff;
  position: relative;
  overflow: hidden;
}
.today-hero::after {
  content: "♡";
  position: absolute;
  right: 14px; top: 6px;
  font-size: 3.2rem;
  color: rgba(255,255,255,.35);
  font-family: var(--display);
}
.today-hero .kicker { color: #7a2438; }
.today-hero h2 { color: #3b1520; font-size: 2rem; }
.today-hero p { color: #4a2430; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.cta-row .cta { margin-top: 0; }
.cta {
  display: inline-block;
  margin-top: 6px;
  background: #fff;
  color: var(--berry-deep);
  border: 0;
  font: inherit;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 3px 0 #e28b96;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.stat {
  background: var(--peach);
  border-radius: 18px;
  padding: 10px 12px;
}
.stat b { display: block; font-family: var(--display); font-size: 1.25rem; }
.stat span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.today-hero .stat { background: rgba(255,255,255,.45); }
.today-hero .stat span { color: #7a2438; }

ol.steps, ul.clean { margin: 0; padding: 0; list-style: none; }
ol.steps { counter-reset: s; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 0 10px 40px;
  border-bottom: 1px dashed var(--line);
}
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lemon);
  color: #8a6a12;
  font-size: .78rem; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 2px 0 #e8c56a;
}

.check { list-style: none; margin: 0; padding: 0; }
.check li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.check li:last-child { border-bottom: 0; }
.check input { margin-top: 4px; accent-color: var(--berry); width: 20px; height: 20px; }
.check .ex { flex: 1; font-weight: 700; }
.check .sets { color: var(--muted); font-size: .85rem; font-weight: 700; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 0 4px; -webkit-overflow-scrolling: touch; }
.tabs button {
  border: 2px solid #fff;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 13px;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 0 #f3c9c0;
}
.tabs button[aria-selected="true"] {
  background: var(--berry);
  color: #fff;
  box-shadow: 0 3px 0 #c93d58;
}

.list { margin: 0; padding-left: 18px; }
.list li { margin: 5px 0; }

.note {
  background: #eef8f3;
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--matcha-deep);
  font-size: .92rem;
  font-weight: 700;
}

.sticker {
  display: inline-block;
  transform: rotate(-6deg);
  background: var(--lemon);
  color: #8a6a12;
  font-family: var(--display);
  font-weight: 700;
  font-size: .78rem;
  padding: 4px 9px;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 0 #e8c56a;
}
.sticker.right { transform: rotate(5deg); background: var(--lilac); color: #6b4ea1; box-shadow: 0 2px 0 #d0b6f0; }

footer.fine {
  color: var(--muted);
  font-size: .8rem;
  padding: 8px 4px 20px;
  text-align: center;
  font-weight: 700;
}

nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  background: rgba(255,250,246,.94);
  backdrop-filter: blur(12px);
  border-top: 2px solid #fff;
  box-shadow: 0 -8px 24px rgba(232,90,113,.08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
nav.bottom button {
  border: 0; background: none; font: inherit;
  color: #c49aa1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .7rem; font-weight: 800;
}
nav.bottom button svg { width: 24px; height: 24px; }
nav.bottom button[aria-current="page"] { color: var(--berry); }

.view { display: none; }
.view.on { display: block; }
.hidden { display: none !important; }

.reset {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: underline;
  padding: 0;
}


#picks-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -4px 12px;
  padding: 4px;
  background: linear-gradient(180deg, var(--paper) 70%, transparent);
}
#picks-bar .picks-inner { margin-bottom: 0; }
.picks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.meal-filters { margin-top: 4px; }

.meal-library {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.meal-library .card { margin-bottom: 0; }
@media (min-width: 560px) {
  .meal-library { grid-template-columns: 1fr 1fr; }
}

.meal-card.selected {
  background: linear-gradient(165deg, #fff6f1 0%, #ffd4c4 62%, #ffc3c9 100%);
  border-color: #ffb3c1;
  box-shadow: 0 8px 0 #e85a71;
}
.meal-card .how {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  margin: 8px 0 12px;
}
.meal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.add-btn,
.shop-jump {
  display: inline-block;
  border: 2px solid #fff;
  background: var(--berry);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: .9rem;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 3px 0 #c93d58;
}
.add-btn:active, .shop-jump:active, .stepper button:active { transform: translateY(1px); }

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stepper button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #fff;
  background: #fff;
  color: var(--berry-deep);
  font: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 999px;
  box-shadow: 0 3px 0 #f3c9c0;
  line-height: 1;
}
.meal-card.selected .stepper button {
  background: var(--berry);
  color: #fff;
  box-shadow: 0 3px 0 #c93d58;
}
.stepper .qty {
  min-width: 1.4em;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}

.grocery-store {
  margin-top: 12px;
  padding-top: 4px;
}
.grocery-store h3 { margin-bottom: 4px; }
.grocery-check li div { font-weight: 700; }

#grocery-out .cta,
#grocery-out .shop-jump { margin-top: 4px; }

.how.wrap-how {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
