:root {
  --ink: #172033;
  --muted: #687188;
  --line: #e8e4dc;
  --paper: #fffdf7;
  --panel: #ffffff;
  --brand-pink: #ff4f7b;
  --brand-blue: #2f7df6;
  --brand-yellow: #ffd166;
  --brand-green: #55c98a;
  --brand-coral: #ff8a5b;
  --shadow: 0 24px 70px rgba(47, 57, 84, 0.13);
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 11%, rgba(255, 209, 102, 0.42), transparent 24%),
    radial-gradient(circle at 89% 7%, rgba(47, 125, 246, 0.16), transparent 25%),
    linear-gradient(135deg, #fff8ee 0%, #f6fbff 46%, #fff7fb 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 28px;
  min-height: 310px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Michroma", "Geist", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.05;
}

.lede {
  max-width: 600px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-art {
  position: relative;
  min-height: 280px;
}

.plate {
  position: absolute;
  inset: 24px 38px 18px 18px;
  border: 14px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 42%, #f0f7ff 43% 62%, #ffedf3 63%);
  box-shadow: var(--shadow);
}

.oats {
  position: absolute;
  width: 118px;
  height: 96px;
  left: 31%;
  top: 31%;
  border-radius: 46% 54% 48% 52%;
  background: #f5c26b;
  box-shadow: inset 0 0 0 12px #ffe0a6;
}

.banana {
  position: absolute;
  width: 130px;
  height: 72px;
  right: 19%;
  top: 24%;
  border: 18px solid var(--brand-yellow);
  border-left-color: transparent;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-22deg);
}

.egg {
  position: absolute;
  width: 70px;
  height: 58px;
  border-radius: 50%;
  background: #fffaf0;
  box-shadow: inset 0 0 0 16px #ffbd45;
}

.egg-one {
  left: 22%;
  bottom: 24%;
  transform: rotate(14deg);
}

.egg-two {
  right: 26%;
  bottom: 22%;
  transform: rotate(-17deg);
}

.leaf {
  position: absolute;
  width: 82px;
  height: 46px;
  left: 48%;
  bottom: 21%;
  border-radius: 100% 0 100% 0;
  background: var(--brand-green);
  transform: rotate(-18deg);
}

.spark,
.bubble-card {
  position: absolute;
}

.spark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-pink);
  transform: rotate(16deg);
}

.spark-a {
  left: 4px;
  top: 42px;
}

.spark-b {
  right: 7px;
  bottom: 45px;
  background: var(--brand-blue);
}

.bubble-card {
  right: 0;
  top: 35px;
  width: 144px;
  padding: 16px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.bubble-card strong {
  display: block;
  color: var(--brand-pink);
  font-size: 2rem;
}

.bubble-card span {
  color: var(--muted);
  font-weight: 700;
}

.composer-panel,
.table-panel {
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.composer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding: 22px;
}

.log-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 112px;
  gap: 16px;
  align-items: end;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input {
  min-height: 52px;
  padding: 0 14px;
}

textarea {
  min-height: 138px;
  resize: vertical;
  padding: 15px 16px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--brand-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 125, 246, 0.14);
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-blue));
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 79, 123, 0.25);
}

.primary-btn span {
  margin: 0;
  color: inherit;
  font-size: 1.15rem;
}

.tips {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  background: #14213d;
  color: #fff;
}

.tips h2 {
  position: relative;
  margin-top: 66px;
  font-family: "Geist", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
}

.tips p {
  position: relative;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.mini-illustration span {
  position: absolute;
  display: block;
}

.cup {
  top: 20px;
  left: 22px;
  width: 54px;
  height: 42px;
  border-radius: 6px 6px 14px 14px;
  background: var(--brand-blue);
}

.cup::after {
  content: "";
  position: absolute;
  right: -17px;
  top: 9px;
  width: 22px;
  height: 20px;
  border: 6px solid var(--brand-blue);
  border-left: 0;
  border-radius: 0 16px 16px 0;
}

.fruit {
  top: 16px;
  right: 30px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-pink);
}

.grain {
  top: 34px;
  left: 122px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--brand-yellow);
  transform: rotate(18deg);
}

.table-panel {
  margin-top: 22px;
  overflow: hidden;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.table-head h2 {
  font-size: 1.35rem;
}

.ghost-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(47, 125, 246, 0.24);
  background: #eff6ff;
  color: var(--brand-blue);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.date-badge {
  display: inline-grid;
  overflow: hidden;
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.date-badge span {
  padding: 6px 8px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.date-badge strong {
  padding: 5px 8px 7px;
  background: var(--brand-pink);
  color: #fff;
  font-size: 1.1rem;
}

.meal-cell strong,
.total-cell strong {
  font-size: 1.05rem;
}

.meal-cell small {
  display: block;
  max-width: 210px;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.total-cell strong {
  display: block;
  font-size: 1.25rem;
}

.total-cell span {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff2c6;
  color: #7a5400;
  font-size: 0.78rem;
  font-weight: 800;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #fff1f4;
  color: #d92653;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.week-row td {
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.24), rgba(85, 201, 138, 0.18));
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.week-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #173b2a;
  font-weight: 800;
}

.week-summary span {
  color: var(--brand-pink);
  font-size: 1.3rem;
}

.empty-state {
  display: none;
  padding: 44px 20px 54px;
  text-align: center;
}

.empty-state.show {
  display: block;
}

.empty-state h3 {
  margin-top: 10px;
  font-size: 1.35rem;
}

.empty-state p {
  margin: 8px auto 0;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.55;
}

.empty-art {
  display: inline-flex;
  gap: 8px;
}

.empty-art span {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.empty-art span:nth-child(1) {
  background: var(--brand-pink);
}

.empty-art span:nth-child(2) {
  background: var(--brand-yellow);
  transform: translateY(-10px);
}

.empty-art span:nth-child(3) {
  background: var(--brand-blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 920px) {
  .hero,
  .composer-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 250px;
  }

  .log-form {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  h1 {
    font-size: 2rem;
  }

  .hero-art {
    min-height: 220px;
  }

  .plate {
    inset: 16px 28px 18px 4px;
  }

  .bubble-card {
    width: 128px;
  }

  .composer-panel,
  .table-head {
    padding: 16px;
  }

  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
