:root {
  --bg: #f2dfbf;
  --bg-alt: #c58b4b;
  --bg-mid: #fff4dd;
  --panel: rgba(255, 248, 235, 0.95);
  --panel-strong: #fff4df;
  --ink: #1b110b;
  --muted: #4f3a2a;
  --accent: #b94f24;
  --accent-strong: #6f2b12;
  --accent-soft: #f0b889;
  --button-bg: #fff9ee;
  --glow-a: rgba(185, 79, 36, 0.28);
  --glow-b: rgba(95, 105, 49, 0.18);
  --line: rgba(37, 26, 18, 0.16);
  --success: #3f7f52;
  --track-green: #5f9f64;
  --track-yellow: #e4bc43;
  --track-red: #d35b45;
  --shadow: 0 18px 48px rgba(71, 47, 22, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--glow-a), transparent 26%),
    radial-gradient(circle at top right, var(--glow-b), transparent 24%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-mid) 38%, var(--bg-alt) 100%);
}

body[data-theme="coastal"] {
  --bg: #cfeaf2;
  --bg-mid: #eefcff;
  --bg-alt: #3d92b4;
  --panel: rgba(239, 252, 255, 0.95);
  --panel-strong: #e1f7ff;
  --ink: #082635;
  --muted: #31596a;
  --accent: #0077a3;
  --accent-strong: #004b68;
  --accent-soft: #8bd6ec;
  --button-bg: #f2fdff;
  --glow-a: rgba(0, 119, 163, 0.28);
  --glow-b: rgba(37, 172, 186, 0.2);
  --line: rgba(16, 46, 61, 0.17);
}

body[data-theme="sage"] {
  --bg: #d4e4bb;
  --bg-mid: #fbffe8;
  --bg-alt: #789b4b;
  --panel: rgba(250, 255, 235, 0.95);
  --panel-strong: #eef8d5;
  --ink: #18250f;
  --muted: #465a2d;
  --accent: #537c2b;
  --accent-strong: #315116;
  --accent-soft: #badb82;
  --button-bg: #fbfff2;
  --glow-a: rgba(83, 124, 43, 0.28);
  --glow-b: rgba(179, 139, 43, 0.18);
  --line: rgba(38, 53, 28, 0.17);
}

body[data-theme="berry"] {
  --bg: #f1d2e1;
  --bg-mid: #fff0f6;
  --bg-alt: #9b3f77;
  --panel: rgba(255, 243, 249, 0.95);
  --panel-strong: #ffe4f0;
  --ink: #251020;
  --muted: #5f4157;
  --accent: #b31970;
  --accent-strong: #76104a;
  --accent-soft: #f2a7cd;
  --button-bg: #fff6fb;
  --glow-a: rgba(179, 25, 112, 0.28);
  --glow-b: rgba(102, 59, 153, 0.18);
  --line: rgba(50, 23, 43, 0.17);
}

body[data-theme="sunrise"] {
  --bg: #ffd0c3;
  --bg-mid: #fff4e7;
  --bg-alt: #ff8d7a;
  --panel: rgba(255, 246, 237, 0.95);
  --panel-strong: #ffe2d3;
  --ink: #2d1215;
  --muted: #633f41;
  --accent: #f04f58;
  --accent-strong: #a52632;
  --accent-soft: #ffb2a0;
  --button-bg: #fff7f0;
  --glow-a: rgba(240, 79, 88, 0.31);
  --glow-b: rgba(255, 151, 71, 0.27);
  --line: rgba(63, 30, 33, 0.17);
}

body[data-theme="slate"] {
  --bg: #c9d1dc;
  --bg-mid: #f4f7fb;
  --bg-alt: #596a82;
  --panel: rgba(246, 249, 253, 0.95);
  --panel-strong: #e9eef6;
  --ink: #111b26;
  --muted: #3e4d5f;
  --accent: #405a78;
  --accent-strong: #24364e;
  --accent-soft: #b8c5d8;
  --button-bg: #fbfdff;
  --glow-a: rgba(64, 90, 120, 0.28);
  --glow-b: rgba(32, 41, 56, 0.16);
  --line: rgba(26, 36, 48, 0.17);
}

body[data-theme="mocha"] {
  --bg: #c5aa96;
  --bg-mid: #ead5c5;
  --bg-alt: #4b3329;
  --panel: rgba(247, 231, 219, 0.95);
  --panel-strong: #e2c4af;
  --ink: #19100d;
  --muted: #4f3d33;
  --accent: #6b3b2b;
  --accent-strong: #3c2118;
  --accent-soft: #be8b6d;
  --button-bg: #f8eadf;
  --glow-a: rgba(73, 45, 35, 0.34);
  --glow-b: rgba(123, 77, 52, 0.24);
  --line: rgba(36, 25, 21, 0.2);
}

body[data-theme="fresh"] {
  --bg: #c4f0dc;
  --bg-mid: #effff7;
  --bg-alt: #28a883;
  --panel: rgba(241, 255, 248, 0.95);
  --panel-strong: #dcf9ec;
  --ink: #0b2a22;
  --muted: #365f51;
  --accent: #008767;
  --accent-strong: #005943;
  --accent-soft: #85e0c0;
  --button-bg: #f6fffb;
  --glow-a: rgba(0, 135, 103, 0.28);
  --glow-b: rgba(66, 183, 116, 0.22);
  --line: rgba(20, 53, 44, 0.17);
}

button,
input,
select {
  font: inherit;
}

body,
input,
select,
button {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero,
.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.hero {
  padding: 32px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent-strong);
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

h2 {
  font-size: 1.7rem;
}

.hero-copy,
.muted,
.save-status {
  color: var(--muted);
  font-weight: 600;
}

.hero-copy {
  max-width: 720px;
  line-height: 1.6;
  margin: 14px 0 20px;
  font-size: 1.08rem;
  font-weight: 700;
}

.hero-actions,
.app-tools,
.view-nav,
.section-heading,
.library-controls,
.metric-grid,
.metric-flags,
.row-actions,
.day-tabs,
.meal-entry,
.recipe-row {
  display: flex;
  gap: 12px;
}

.hero-actions {
  align-items: end;
  flex-wrap: wrap;
}

.app-tools {
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--accent-strong);
  font-weight: 900;
}

.save-status {
  min-height: 1.2em;
  margin: 0;
}

.offline-status {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(211, 91, 69, 0.35);
  background: rgba(211, 91, 69, 0.12);
  color: var(--track-red);
  font-weight: 800;
}

.save-status[data-status="success"] {
  color: var(--success);
}

.save-status[data-status="error"] {
  color: var(--track-red);
}

.library-controls {
  margin-bottom: 16px;
}

.view-nav,
.section-actions,
.home-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.view-nav {
  margin-top: 18px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-card {
  text-align: left;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.home-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.4rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent-strong);
}

.week-picker {
  display: grid;
  gap: 6px;
}

.week-picker span,
.field label,
.metric-block label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

select,
input[type="text"],
input[type="number"],
input[type="search"] {
  width: 100%;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 700;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(195, 95, 59, 0.35);
  outline-offset: 2px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.chip-button {
  background: var(--button-bg);
  border: 1px solid var(--line);
  color: var(--ink);
}

.chip-button.active,
.primary-button {
  background: var(--accent);
  color: #fff8f3;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.layout {
  display: grid;
  gap: 24px;
}

.panel {
  padding: 26px;
}

.section-heading {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.food-form-panel {
  margin-bottom: 18px;
}

.summary-grid,
.snapshot-grid,
.meal-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.snapshot-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.summary-card,
.snapshot-card,
.meal-card,
.metrics-card,
.recipe-summary,
.food-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
}

.summary-card,
.snapshot-card,
.recipe-summary,
.food-card {
  padding: 18px;
}

.summary-card strong,
.snapshot-card strong,
.meal-total,
.recipe-summary strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
}

.meal-total,
.summary-card strong,
.snapshot-card strong,
.recipe-summary strong {
  color: #050505;
  font-weight: 900;
}

.meal-tag {
  color: #050505;
  font-weight: 900;
}

.day-tabs {
  flex-wrap: wrap;
}

.day-editor-grid {
  display: grid;
  gap: 18px;
}

.meal-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.meal-card,
.metrics-card {
  padding: 18px;
}

.meal-card h3,
.metrics-card h3 {
  margin-bottom: 6px;
}

.tracking-card {
  position: relative;
  overflow: hidden;
}

.tracking-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: transparent;
}

.tracking-green {
  background:
    linear-gradient(135deg, rgba(95, 159, 100, 0.16), rgba(255, 253, 248, 0.98) 42%);
  border-color: rgba(95, 159, 100, 0.5);
}

.tracking-green::before {
  background: var(--track-green);
}

.tracking-yellow {
  background:
    linear-gradient(135deg, rgba(228, 188, 67, 0.18), rgba(255, 253, 248, 0.98) 42%);
  border-color: rgba(228, 188, 67, 0.6);
}

.tracking-yellow::before {
  background: var(--track-yellow);
}

.tracking-red {
  background:
    linear-gradient(135deg, rgba(211, 91, 69, 0.18), rgba(255, 253, 248, 0.98) 42%);
  border-color: rgba(211, 91, 69, 0.58);
}

.tracking-red::before {
  background: var(--track-red);
}

.tracking-neutral::before {
  background: rgba(29, 36, 48, 0.14);
}

.tracking-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.meal-list,
.recipe-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.meal-entry,
.recipe-row {
  align-items: center;
}

.meal-entry-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #fff8f2;
  border: 1px solid rgba(195, 95, 59, 0.16);
}

.meal-entry-tag-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 247, 238, 0.98), rgba(248, 236, 222, 0.96));
  border: 1px solid rgba(195, 95, 59, 0.22);
}

.meal-entry-tag-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.meal-entry-tag-top strong {
  font-size: 1rem;
  font-family: Georgia, "Times New Roman", serif;
}

.meal-entry-tags,
.tag-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meal-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(195, 95, 59, 0.12);
  color: #050505;
  font-size: 0.9rem;
  font-weight: 900;
}

.meal-entry-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.meal-entry-heading strong {
  font-size: 1rem;
  font-family: Georgia, "Times New Roman", serif;
}

.meal-entry-calories {
  color: #050505;
  font-weight: 900;
}

.meal-entry-fields {
  display: grid;
  gap: 12px;
}

.entry-field {
  display: grid;
  gap: 6px;
}

.entry-field span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.meal-entry-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meal-entry > input:first-child,
.recipe-row > input:first-child {
  flex: 1.8;
}

.meal-entry > input,
.recipe-row > input {
  flex: 1;
}

.recipe-row > input {
  text-align: left;
}

.inline-stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: #050505;
  font-size: 0.92rem;
  font-weight: 900;
}

.row-remove-button {
  white-space: nowrap;
}

.row-actions {
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.text-button {
  background: transparent;
  color: var(--accent-strong);
  padding-inline: 0;
}

.metric-grid {
  flex-wrap: wrap;
}

.metric-block {
  flex: 1 1 130px;
  display: grid;
  gap: 6px;
}

.combo-metric {
  flex-basis: 220px;
}

.inline-control-pair {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(92px, auto);
  gap: 8px;
}

.height-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.compact-stats {
  margin-top: 10px;
}

.water-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.water-list {
  display: grid;
  gap: 10px;
}

.water-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.metric-flags {
  flex-wrap: wrap;
  margin-top: 12px;
}

.habit-toolbar,
.habit-list {
  gap: 12px;
}

.habit-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.habit-toolbar {
  display: grid;
}

.habit-toolbar {
  margin-top: 12px;
}

.habit-toolbar.bottom {
  justify-content: start;
  margin-bottom: 12px;
}

.habit-row {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 8px;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.habit-check {
  background: transparent;
  border: 0;
  padding: 0 4px 0 2px;
}

.compact-habit {
  width: auto;
  flex: 0 1 auto;
  min-width: 0;
}

.habit-inline-input {
  flex: 1 1 auto;
  min-width: 180px;
}

.habit-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.habit-delete-button,
.small-action-button {
  padding: 7px 12px;
  font-size: 0.82rem;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.habit-check.flag {
  padding: 7px 8px;
  border: 0;
  background: transparent;
}

.habit-check input[type="checkbox"] {
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--button-bg);
  cursor: pointer;
}

.habit-check input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 120ms ease;
  background: #fff;
}

.habit-check input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent-strong);
}

.habit-check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 18px;
}

.stat-box {
  padding: 14px;
  border-radius: 16px;
  background: #f7f1e7;
}

.stat-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  color: #050505;
  font-weight: 900;
}

.recipe-layout {
  display: grid;
  gap: 18px;
}

.calculator-layout,
.meal-split-grid {
  display: grid;
  gap: 18px;
}

.meal-split-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.split-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.split-balance span {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #050505;
  font-weight: 800;
  padding: 9px 12px;
}

.split-balance strong {
  color: #050505;
  font-weight: 950;
}

.split-balance.is-over-target span:last-child {
  background: #f9d6cf;
  border-color: #d0634d;
}

.food-form-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #fff8f2;
  border: 1px solid rgba(195, 95, 59, 0.16);
}

.food-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.food-modal-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(110px, 0.55fr) minmax(210px, 0.9fr);
  gap: 14px;
  align-items: end;
}

.food-type-field select {
  min-width: 92px;
}

.calorie-value-pill,
.calorie-edit-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #050505;
  border: 1px solid var(--line);
}

.calorie-value-pill strong {
  white-space: nowrap;
  color: #050505;
  font-weight: 900;
}

.calorie-edit-pill input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px;
}

.modal-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.modal-main-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-panel {
  display: grid;
  gap: 12px;
}

.lookup-row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.lookup-search {
  flex: 1 1 260px;
}

.lookup-results {
  display: grid;
  gap: 10px;
}

.selected-lookup {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(29, 36, 48, 0.1);
}

.lookup-result {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(29, 36, 48, 0.1);
}

.lookup-result small {
  color: var(--muted);
}

.lookup-result span {
  color: #050505;
  font-weight: 900;
}

.danger-button {
  color: #a33b2f;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 36, 48, 0.4);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: #fffdf8;
  border: 1px solid rgba(29, 36, 48, 0.12);
  box-shadow: 0 28px 60px rgba(29, 36, 48, 0.22);
}

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

.form-error {
  color: #a33b2f;
  font-weight: 700;
  margin: 0;
}

.form-success {
  color: var(--success);
  font-weight: 700;
  margin: 0;
}

.recipe-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.food-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.food-card p {
  margin: 0;
}

.food-card strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #050505;
  font-weight: 900;
}

.food-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  min-height: 118px;
}

.food-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

.edit-food-button {
  flex: 0 0 auto;
  padding: 6px 11px;
  font-size: 0.82rem;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #050505;
  font-size: 0.82rem;
  font-weight: 900;
  margin-top: 0;
}

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

  .hero,
  .panel {
    padding: 20px;
  }

  .meal-entry,
  .recipe-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lookup-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .food-modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-bottom-actions,
  .modal-main-actions,
  .modal-delete-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .water-row {
    grid-template-columns: 1fr;
  }

  .inline-control-pair {
    grid-template-columns: 1fr;
  }

  .section-actions {
    width: 100%;
  }

  .habit-row {
    flex-direction: row;
    align-items: center;
  }

  .meal-entry-fields {
    grid-template-columns: 1fr;
  }

  .meal-entry > input:first-child,
  .recipe-row > input:first-child {
    grid-column: 1 / -1;
  }

  .meal-entry-fields > input:first-child {
    grid-column: 1 / -1;
  }
}
