:root {
  --lh-canvas: #fbfaf7;
  --lh-surface: #ffffff;
  --lh-navy: #17324d;
  --lh-navy-strong: #10283f;
  --lh-text: #1c2833;
  --lh-muted: #64717d;
  --lh-gold: #b58a2d;
  --lh-gold-soft: #f5ecd7;
  --lh-line: #dfe4e8;
  --lh-success: #267a54;
  --lh-warning: #9a6b17;
  --lh-danger: #a33f36;
  --lh-radius-lg: 24px;
  --lh-radius-md: 16px;
  --lh-shadow: 0 14px 36px rgba(16, 40, 63, 0.08);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lh-text);
  background: var(--lh-canvas);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--lh-canvas);
  color: var(--lh-text);
}

body {
  min-height: 100dvh;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.lh-app {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(92px + env(safe-area-inset-bottom));
}

.lh-shell {
  width: min(100%, 720px);
  margin: 0 auto;
}

.lh-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 24px;
}

.lh-wordmark {
  color: var(--lh-navy-strong);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.lh-wordmark-accent { color: var(--lh-gold); }

.lh-profile-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--lh-line);
  border-radius: 50%;
  background: var(--lh-surface);
  color: var(--lh-navy);
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(16, 40, 63, 0.05);
}

.lh-greeting { margin: 0 0 22px; }
.lh-greeting-kicker {
  margin: 0 0 4px;
  color: var(--lh-navy-strong);
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.lh-greeting-copy { margin: 0; color: var(--lh-muted); font-size: 17px; }

.lh-sodium {
  padding: 24px;
  border: 1px solid #e5e8ea;
  border-radius: var(--lh-radius-lg);
  background: var(--lh-surface);
  box-shadow: var(--lh-shadow);
}

.lh-eyebrow {
  margin: 0 0 12px;
  color: var(--lh-navy);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lh-total-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lh-total {
  color: var(--lh-navy-strong);
  font-family: "Dosis", "Nunito", system-ui, sans-serif;
  font-size: clamp(52px, 15vw, 72px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.lh-unit { color: var(--lh-navy); font-size: 22px; font-weight: 800; }
.lh-goal { margin: 6px 0 20px; color: var(--lh-muted); }
.lh-goal strong { color: var(--lh-text); }

.lh-progress {
  position: relative;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf0;
}
.lh-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lh-navy);
  transition: width 260ms ease;
}
.lh-progress[data-state="near"] .lh-progress-fill { background: var(--lh-warning); }
.lh-progress[data-state="over"] .lh-progress-fill { background: var(--lh-danger); }

.lh-remaining {
  margin: 12px 0 22px;
  color: var(--lh-muted);
  font-size: 17px;
}
.lh-remaining strong { color: var(--lh-navy-strong); font-weight: 900; }

.lh-primary {
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 16px;
  background: var(--lh-navy-strong);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 40, 63, 0.16);
}
.lh-primary:hover { background: #0b2135; }
.lh-primary:focus-visible,
.lh-entry:focus-visible,
.lh-nav-item:focus-visible,
.lh-profile-button:focus-visible {
  outline: 3px solid rgba(181, 138, 45, 0.42);
  outline-offset: 3px;
}

.lh-section { margin-top: 30px; }
.lh-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.lh-section-title {
  margin: 0;
  color: var(--lh-navy-strong);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.lh-section-meta { color: var(--lh-muted); font-size: 14px; }

.lh-entry-list { display: grid; gap: 10px; }
.lh-entry {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius-md);
  background: var(--lh-surface);
  color: inherit;
  text-align: left;
}
.lh-entry:hover { border-color: #c8d0d6; }
.lh-entry-name { display: block; color: var(--lh-navy-strong); font-weight: 900; }
.lh-entry-detail { display: block; margin-top: 2px; color: var(--lh-muted); font-size: 14px; }
.lh-entry-sodium {
  white-space: nowrap;
  color: var(--lh-navy-strong);
  font-family: "Dosis", "Nunito", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.lh-empty {
  padding: 22px;
  border: 1px dashed #cfd7dd;
  border-radius: var(--lh-radius-md);
  background: rgba(255,255,255,0.55);
  text-align: center;
}
.lh-empty strong { display: block; margin-bottom: 4px; color: var(--lh-navy-strong); }
.lh-empty p { margin: 0 0 16px; color: var(--lh-muted); }
.lh-empty .lh-primary { max-width: 320px; }

.lh-yummybit {
  padding: 18px 20px;
  border-left: 4px solid var(--lh-gold);
  border-radius: 0 14px 14px 0;
  background: var(--lh-gold-soft);
}
.lh-yummybit strong { color: var(--lh-navy-strong); }
.lh-yummybit p { margin: 4px 0 0; color: #495866; }

.lh-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px max(12px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  border-top: 1px solid #dfe4e8;
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(16px);
}
.lh-nav-inner {
  width: min(100%, 720px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.lh-nav-item {
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--lh-muted);
  font-size: 13px;
  font-weight: 800;
}
.lh-nav-item[aria-current="page"] { color: var(--lh-navy-strong); background: #edf1f4; }
.lh-nav-icon { display: block; margin-bottom: 2px; font-size: 20px; line-height: 1; }

.lh-toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  max-width: calc(100vw - 36px);
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--lh-navy-strong);
  color: #fff;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.lh-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .lh-app { padding-left: 28px; padding-right: 28px; }
  .lh-sodium { padding: 30px; }
  .lh-entry { padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
