:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --paper-soft: #fbf8f1;
  --ink: #29251e;
  --muted: #7d7568;
  --wash: #ebe3d5;
  --accent: #8b7357;
  --accent-strong: #5f4f3d;
  --green: #7a8a61;
  --shadow: 0 18px 50px rgba(65, 53, 37, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: ui-rounded, "Aptos", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 34rem),
    linear-gradient(180deg, var(--paper) 0%, #f3eee4 100%);
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--accent-strong);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 34rem),
    linear-gradient(180deg, var(--paper) 0%, #f3eee4 100%);
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.app-splash img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  box-shadow: 0 18px 50px rgba(65, 53, 37, 0.08);
}

.app-splash span {
  font-size: 1.08rem;
  font-weight: 500;
}

.app-splash.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(36px + env(safe-area-inset-bottom));
}

.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  animation: rise-in 480ms ease both;
}

.google-button,
.save-prompt {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--accent-strong);
  transition: transform 180ms ease, background 180ms ease;
}

.google-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf7;
  background: var(--accent-strong);
  font-size: 0.8rem;
}

.settings-button {
  display: grid;
  width: 42px;
  height: 42px;
  margin-left: auto;
  flex: 0 0 42px;
  place-items: center;
  color: var(--accent-strong);
  background: transparent;
  transition: transform 180ms ease, opacity 180ms ease;
}

.settings-button:hover {
  opacity: 0.7;
  transform: rotate(22deg);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 11px 5px 5px;
  color: var(--accent-strong);
}

.profile-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.hero {
  padding: 18px 2px 20px;
  animation: rise-in 520ms ease both;
}

.hero__top,
.date-card,
.summary__numbers,
.entry-form__row,
.estimate-row,
.macro-circles,
.meal-section__heading,
.food-entry {
  display: flex;
  align-items: center;
}

.hero__top,
.summary__numbers,
.meal-section__heading,
.food-entry {
  justify-content: space-between;
  gap: 12px;
}

.eyebrow,
.label,
label,
.estimate-note,
.meal-section__heading span,
.food-entry__calories {
  color: var(--muted);
  font-size: 0.78rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  margin-top: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 14vw, 4.9rem);
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 25rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.day-content {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.day-content.swipe-from-right {
  animation: day-swipe-from-right 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.day-content.swipe-from-left {
  animation: day-swipe-from-left 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.icon-button,
.soft-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover,
.soft-button:hover,
.google-button:hover,
.save-prompt button:hover,
.primary-button:hover,
.secondary-button:hover,
.food-entry button:hover {
  transform: translateY(-1px);
}

.date-card,
.summary,
.entry-form,
.library-section {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.save-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  animation: rise-in 300ms ease both;
}

.save-prompt[hidden],
.profile-chip[hidden],
.google-button[hidden] {
  display: none;
}

.save-prompt p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.save-prompt button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 7px;
  color: #fffdf7;
  background: var(--accent-strong);
  transition: transform 180ms ease, background 180ms ease;
}

.date-card {
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  animation: rise-in 560ms 60ms ease both;
}

.date-card div {
  flex: 1;
}

#entry-date {
  background: transparent;
}

label {
  display: block;
  margin-bottom: 7px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  outline: none;
}

input {
  padding: 0 13px;
}

select {
  padding: 0 10px;
}

input:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(139, 115, 87, 0.16);
}

.summary {
  margin-top: 0;
  padding: 16px 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  animation: rise-in 560ms 100ms ease both;
}

.summary strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1;
}

.progress-track {
  height: 9px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wash);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--accent));
  transition: width 280ms ease;
}

.macro-circles {
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 18px;
}

.macro-circle {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
}

.macro-circle span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1;
}

.macro-circle small {
  color: var(--muted);
  font-size: 0.72rem;
}

.field-stack {
  flex: 1;
}

.food-name-stack {
  position: relative;
}

.library-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border-radius: 8px;
  background: var(--paper-soft);
  box-shadow: 0 8px 28px rgba(65, 53, 37, 0.13);
  animation: fade-in 180ms ease both;
}

.library-suggestions[hidden] {
  display: none;
}

.library-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid rgba(120, 100, 72, 0.08);
  cursor: pointer;
  transition: background 140ms ease;
}

.library-suggestion:first-child {
  border-top: 0;
}

.library-suggestion:active {
  background: rgba(139, 115, 87, 0.08);
}

.library-suggestion__name {
  font-size: 0.95rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.library-suggestion__meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.entry-form__row {
  gap: 10px;
  margin-top: 12px;
}

.entry-form > .field-stack + .field-stack,
.calories-stack {
  margin-top: 12px;
}

.amount-row .field-stack:first-child {
  flex: 0.92;
}

.estimate-row {
  gap: 8px;
}

.estimate-row input,
.entry-form > .field-stack {
  min-width: 0;
}

.estimate-button {
  min-height: 46px;
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: 7px;
  color: var(--accent-strong);
  background: rgba(235, 227, 213, 0.75);
  transition: transform 180ms ease, background 180ms ease;
}

.estimate-button:hover {
  transform: translateY(-1px);
  background: rgba(229, 217, 198, 0.9);
}

.estimate-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.estimate-note {
  min-height: 1rem;
  margin-top: 8px;
  line-height: 1.35;
}

.food-preview-img {
  display: block;
  width: 80px;
  height: 80px;
  margin-top: 10px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--wash);
}

.food-preview-img[hidden] {
  display: none;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border-radius: 7px;
  color: #fffdf7;
  background: var(--accent-strong);
  transition: transform 180ms ease, background 180ms ease;
}

.secondary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 7px;
  color: var(--accent-strong);
  background: rgba(235, 227, 213, 0.75);
  transition: transform 180ms ease, background 180ms ease;
}

.entry-panel {
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  animation: rise-in 560ms 140ms ease both;
}

.entry-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 14px 2px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.entry-toggle::-webkit-details-marker {
  display: none;
}

.entry-toggle::after {
  content: "＋";
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  transition: transform 240ms ease;
}

.entry-panel.is-open > .entry-toggle::after {
  content: "－";
}

.entry-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.entry-panel.is-open > .entry-wrapper {
  grid-template-rows: 1fr;
}

.entry-toggle {
  border-bottom: 1px solid rgba(120, 100, 72, 0.12);
}

.entry-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
  animation: rise-in 300ms ease both;
}

.entry-notice[hidden] {
  display: none;
}

.entry-notice p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.entry-notice__btn {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 7px;
  color: #fffdf7;
  background: var(--accent-strong);
  transition: transform 180ms ease;
}

.entry-notice__btn:hover {
  transform: translateY(-1px);
}

.entry-form {
  overflow: hidden;
  min-height: 0;
  padding: 0 2px 16px;
}

.micros-panel {
  margin-top: 12px;
}

.micros-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  background: rgba(235, 227, 213, 0.5);
  cursor: pointer;
  user-select: none;
  transition: background 180ms ease;
}

.micros-toggle span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  opacity: 0.7;
}

.micros-toggle::before {
  content: "▸";
  margin-right: 7px;
  font-size: 0.65rem;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.micros-panel.is-open > .micros-toggle::before {
  transform: rotate(90deg);
}

.micros-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.micros-panel.is-open > .micros-wrapper {
  grid-template-rows: 1fr;
}

.micros-fields {
  overflow: hidden;
  min-height: 0;
  padding-top: 0;
  transition: padding-top 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.micros-panel.is-open .micros-fields {
  padding-top: 4px;
}

.micro-row {
  margin-top: 8px;
}

.micro-row .field-stack input {
  min-height: 40px;
  font-size: 0.88rem;
}

.micro-row label {
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.library-section {
  margin-top: 0;
  padding: 16px 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  animation: rise-in 560ms 160ms ease both;
}

.library-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.library-trigger span:first-child {
  font-size: 1rem;
  font-weight: 500;
}

.library-trigger span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.library-form {
  margin-top: 12px;
}

.library-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.search-results {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.search-results:empty {
  display: none;
}

.search-results button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 11px 12px;
  border-radius: 7px;
  color: var(--accent-strong);
  text-align: left;
  background: rgba(235, 227, 213, 0.64);
}

.result-thumb {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf7;
  background: var(--accent-strong);
  font-size: 0.78rem;
  overflow: hidden;
}

.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  min-width: 0;
}

.result-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.search-results small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.search-status {
  display: block;
  padding: 14px 12px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(235, 227, 213, 0.42);
  font-size: 0.8rem;
}

.search-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 34rem),
    linear-gradient(180deg, var(--paper) 0%, #f3eee4 100%);
  transform: translate3d(100%, 0, 0);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 34rem),
    linear-gradient(180deg, var(--paper) 0%, #f3eee4 100%);
  transform: translate3d(0, 100%, 0);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.settings-panel.is-open {
  transform: translate3d(0, 0, 0);
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 0 40px;
}

.settings-body::-webkit-scrollbar {
  display: none;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 0 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
}

.settings-row:first-child {
  border-top: 0;
}

.settings-row label,
.settings-label {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.settings-unit {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  margin-left: 4px;
}

.settings-row input,
.settings-row select {
  width: auto;
  min-height: auto;
  max-width: 120px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
  color: var(--ink);
  font-size: 1rem;
}

.settings-row select {
  padding-right: 2px;
  cursor: pointer;
}

.settings-row input:focus,
.settings-row select:focus {
  box-shadow: none;
  outline: none;
  color: var(--accent-strong);
}

.settings-value {
  color: var(--muted);
  font-size: 0.95rem;
}

.settings-row--readonly {
  cursor: default;
}

.patch-notes {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
}

.patch-notes__title {
  margin: 0 0 20px 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
}

.patch-entry {
  margin-bottom: 24px;
}

.patch-entry__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.patch-version {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent-strong);
}

.patch-entry__name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.patch-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.patch-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.45;
  padding-left: 2px;
}

.patch-tag {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.patch-tag--new {
  color: #4a7c59;
  background: rgba(74, 124, 89, 0.1);
}

.patch-tag--improved {
  color: var(--accent-strong);
  background: rgba(95, 79, 61, 0.1);
}

.patch-tag--fixed {
  color: #7a6020;
  background: rgba(122, 96, 32, 0.1);
}

.settings-height-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-height-label label {
  margin: 0;
}

.settings-unit-toggle {
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-strong);
  background: rgba(139, 115, 87, 0.1);
  font-size: 0.72rem;
  font-weight: 500;
  transition: background 180ms ease;
}

.settings-unit-toggle:hover {
  background: rgba(139, 115, 87, 0.18);
}

.settings-height-inputs {
  display: flex;
  align-items: center;
  gap: 0;
}

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

.height-ftin input {
  width: 36px;
  text-align: right;
  padding: 0;
  min-height: auto;
  background: transparent;
  border-radius: 0;
  font-size: 1rem;
}

.height-ftin input:focus {
  box-shadow: none;
  color: var(--accent-strong);
}

.height-sep {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 1px;
  user-select: none;
}

.settings-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 520px);
  margin: 0 auto;
}

.settings-panel__bar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.settings-close {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
  outline: none;
  transition: transform 180ms ease, background 180ms ease;
}

.settings-close:hover {
  transform: translateY(-1px);
}

.search-sheet.is-open {
  transform: translate3d(0, 0, 0);
}

.search-sheet__bar,
.sheet-content {
  display: flex;
  width: min(100%, 520px);
  margin: 0 auto;
}

.search-sheet__bar {
  align-items: center;
  gap: 12px;
}

.search-sheet__bar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.sheet-back {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 72, 0.08);
}

.sheet-results {
  margin-top: 12px;
  padding-bottom: 30px;
}

.sheet-content {
  display: block;
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 30px;
}

.sheet-page {
  min-height: 100%;
  padding: 16px 4px;
  animation: fade-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sheet-page[hidden] {
  display: none;
}

.library-menu-page {
  display: grid;
  align-content: start;
  gap: 0;
  padding-top: 18px;
}

.library-choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 64px;
  padding: 0 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  color: var(--ink);
  text-align: left;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  transition: color 180ms ease, transform 180ms ease;
}

.library-choice:first-child {
  border-top: 0;
}

.library-choice:hover {
  color: var(--accent-strong);
  transform: translateX(2px);
}

.sheet-section {
  padding: 16px 0;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
}

.sheet-section:first-child {
  border-top: 0;
}

.sheet-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 500;
}

.sheet-page h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 500;
}

.library-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
  font-size: 0.82rem;
}

.meal-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.meal-section {
  padding: 16px 2px;
  border-top: 1px solid rgba(120, 100, 72, 0.12);
  animation: rise-in 560ms 180ms ease both;
}

.meal-section:first-child {
  border-top: 0;
}

.meal-section h2 {
  font-size: 1rem;
  font-weight: 500;
}

.meal-section ul {
  display: grid;
  gap: 7px;
  min-height: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.meal-section.is-empty ul::before {
  content: "No entries yet";
  color: #a99f8f;
  font-size: 0.9rem;
}

.food-entry {
  min-height: 42px;
  padding: 7px 0;
  animation: fade-in 220ms ease both;
}

.food-entry__name {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.food-entry__main {
  min-width: 0;
}

.food-entry__amount {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.food-entry__calories {
  margin-left: auto;
  white-space: nowrap;
}

.food-entry button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(235, 227, 213, 0.8);
  transition: transform 180ms ease, background 180ms ease;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes day-swipe-from-right {
  from {
    opacity: 0.82;
    transform: translate3d(18%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes day-swipe-from-left {
  from {
    opacity: 0.82;
    transform: translate3d(-18%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (min-width: 680px) {
  .app-shell {
    padding-top: calc(34px + env(safe-area-inset-top));
  }

  h1 {
    font-size: 5.25rem;
  }
}

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