:root {
  --cream: #fff8e9;
  --paper: #fffdf7;
  --ink: #273043;
  --muted: #6b6f7d;
  --coral: #ff6f61;
  --coral-dark: #d94e43;
  --teal: #3cc6b7;
  --teal-pale: #dff8f3;
  --yellow: #ffd166;
  --yellow-pale: #fff2bf;
  --purple: #7768ae;
  --red: #c33d48;
  --line: #273043;
  --shadow: 5px 6px 0 var(--ink);
  --shadow-small: 3px 3px 0 var(--ink);
  --radius: 20px;
  --radius-small: 12px;
  --shell: 1160px;
  --heading: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
  font: 16px/1.55 var(--body);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}
img { max-width: 100%; }
button, input, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.08; margin-top: 0; }
h1 { font-size: clamp(2.35rem, 9vw, 5rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.65rem, 5vw, 2.7rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
[hidden] { display: none !important; }

.shell { width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; }
.section { padding-block: 58px; }
.app-section { padding-block: 28px 54px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--coral-dark);
  font: 800 0.76rem/1.2 var(--body);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.lede { font-size: clamp(1.1rem, 3vw, 1.35rem); color: #454b5b; max-width: 46rem; }
.microcopy, .source-note, .form-footnote, .field-help, .search-hint { font-size: .86rem; color: var(--muted); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link { position: fixed; left: 12px; top: 10px; z-index: 100; transform: translateY(-150%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 19px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-small);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button-primary { background: var(--coral); color: #fff; }
.button-primary:hover { background: #ff8176; }
.button-ghost { background: transparent; box-shadow: none; }
.button-ghost:hover { background: var(--paper); box-shadow: var(--shadow-small); }
.button-ink { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--coral); }
.button-danger { background: var(--red); color: #fff; box-shadow: 3px 3px 0 #70232b; }
.button-small { min-height: 38px; padding: 7px 14px; font-size: .88rem; }
.button-wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; margin: 27px 0 18px; }
.text-button, .nav-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 248, 233, .94); border-bottom: 2px solid var(--ink); backdrop-filter: blur(10px); }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font: 900 1.22rem/1 var(--heading); text-decoration: none; letter-spacing: -.03em; }
.brand img { width: 40px; height: 40px; }
.desktop-nav { display: none; align-items: center; gap: 22px; font-weight: 760; }
.desktop-nav a:not(.button) { text-decoration: none; }
.desktop-nav a:not(.button):hover { text-decoration: underline; text-decoration-thickness: 2px; }
.desktop-nav form { margin: 0; }

.mobile-nav {
  position: fixed;
  z-index: 50;
  left: 0;
  bottom: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
}
.mobile-nav a { display: flex; min-height: 55px; flex-direction: column; justify-content: center; align-items: center; gap: 1px; border-radius: 10px; font-size: .72rem; font-weight: 850; text-decoration: none; }
.mobile-nav span { font-size: 1.4rem; line-height: 1; }
.mobile-nav a:hover { background: var(--yellow-pale); }

.flash { margin-top: 16px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--radius-small); font-weight: 750; box-shadow: var(--shadow-small); }
.flash-success { background: var(--teal-pale); }
.flash-notice { background: var(--yellow-pale); }
.inline-alert { margin: 15px 0; padding: 13px 15px; border: 2px solid var(--red); border-radius: var(--radius-small); background: #fff0f1; color: #76212a; font-weight: 700; }

.site-footer { border-top: 2px solid var(--ink); background: var(--paper); padding: 30px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 15px; font-size: .9rem; }

/* Home */
.home-hero { overflow: hidden; padding: 56px 0 70px; background: radial-gradient(circle at 12% 20%, var(--yellow-pale) 0 11%, transparent 11.3%), radial-gradient(circle at 86% 76%, var(--teal-pale) 0 14%, transparent 14.3%); }
.hero-grid { display: grid; gap: 42px; align-items: center; }
.hero-copy h1 { max-width: 780px; margin-bottom: 20px; }
.hero-copy .lede { max-width: 620px; }
.hero-demo { position: relative; padding: 27px; border: 3px solid var(--ink); border-radius: 28px; background: var(--paper); box-shadow: 9px 10px 0 var(--ink); transform: rotate(1.5deg); }
.hero-demo h2 { margin-bottom: 23px; font-size: 2rem; }
.demo-label { color: var(--muted); font-weight: 800; }
.demo-equation { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-equation span { padding: 13px 10px; border: 2px solid var(--ink); border-radius: 13px; background: var(--yellow-pale); text-align: center; }
.demo-equation span:nth-child(2) { border: 0; background: none; font-size: 1.6rem; }
.demo-equation strong { display: block; font: 900 1.7rem/1 var(--heading); }
.demo-result { margin: 20px 0 10px; font: 900 2.1rem/1 var(--heading); color: var(--coral-dark); }
.demo-result span { color: var(--ink); }
.hero-demo > p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }
.doodle-star { position: absolute; right: -12px; top: -25px; display: grid; place-items: center; width: 60px; height: 60px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 1.8rem; transform: rotate(10deg); }
.section-heading { text-align: center; max-width: 720px; margin: 0 auto 35px; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }
.fact-grid { display: grid; gap: 18px; }
.fact-card { padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.fact-card h3 { margin: 17px 0 8px; }
.fact-card p { margin: 0; }
.fact-coral { background: #ffe4df; }
.fact-teal { background: var(--teal-pale); }
.fact-yellow { background: var(--yellow-pale); }
.fact-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); font: 900 1.5rem/1 var(--heading); }
.source-note { margin-top: 23px; text-align: center; }
.band { background: var(--ink); color: #fff; }
.band .eyebrow { color: var(--yellow); }
.split-section { display: grid; gap: 28px; }
.split-section h2 { margin: 0; }
.tick-list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.tick-list li { position: relative; padding-left: 29px; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 900; }
.privacy-card { display: grid; gap: 25px; padding: 28px; border: 3px solid var(--ink); border-radius: 26px; background: var(--teal-pale); box-shadow: var(--shadow); align-items: center; }
.privacy-card p:last-child { margin-bottom: 0; }
.health-note { margin-top: 30px; padding: 18px 20px; border-left: 5px solid var(--coral); background: rgba(255,255,255,.55); }

/* Forms and auth */
.auth-shell { display: grid; gap: 25px; max-width: 1000px; }
.auth-card, .auth-aside, .welcome-card, .form-card, .account-card, .danger-card, .prose-card, .error-card { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-small); }
.auth-card { padding: 26px; }
.auth-intro { margin-bottom: 25px; }
.auth-intro h1 { font-size: clamp(2.3rem, 8vw, 4rem); margin-bottom: 14px; }
.auth-aside { align-self: start; padding: 25px; background: var(--teal-pale); transform: rotate(1deg); }
.auth-aside-yellow { background: var(--yellow-pale); }
.aside-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font: 900 1.5rem/1 var(--heading); }
.stack-form { display: grid; gap: 19px; }
.field { display: grid; gap: 7px; }
.field label, .report-details label, .goal-form label { font-weight: 850; }
.field label span { color: var(--muted); font-size: .78rem; font-weight: 600; }
input, select {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
input::placeholder { color: #9a9ca5; }
.field-error { margin: 0; color: var(--red); font-size: .87rem; font-weight: 750; }
.field-help { margin: 0; }
.form-footnote { text-align: center; margin: -4px 0 0; }
.welcome-shell { max-width: 760px; }
.welcome-card { position: relative; padding: 28px; text-align: center; overflow: hidden; }
.welcome-card h1 { font-size: clamp(2.4rem, 9vw, 4.4rem); }
.celebrate { position: absolute; top: 18px; right: 20px; color: var(--coral); font-size: 2.2rem; }
.account-code-box { display: grid; gap: 13px; margin: 28px 0 18px; padding: 18px; border: 2px dashed var(--ink); border-radius: 15px; background: var(--yellow-pale); }
.account-code-box code { overflow-wrap: anywhere; font: 850 clamp(.92rem, 4.5vw, 1.35rem)/1.4 ui-monospace, monospace; letter-spacing: .04em; }
.save-warning { display: grid; margin-bottom: 22px; color: var(--muted); }

/* Diary */
.today-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 23px; }
.today-header h1 { margin: 0; font-size: clamp(2.6rem, 10vw, 4.4rem); }
.date-nav { display: flex; align-items: center; gap: 7px; }
.date-nav a, .date-nav span { display: grid; place-items: center; min-width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font-weight: 900; text-decoration: none; }
.date-nav span { opacity: .3; }
.date-nav .date-today { width: auto; padding-inline: 13px; border-radius: 999px; font-size: .85rem; }
.dashboard-grid, .log-column { display: grid; gap: 22px; }
.search-card, .diary-card, .total-card, .tip-card { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.search-card, .diary-card { padding: 21px; }
.total-card, .tip-card { padding: 22px; }
.card-heading { display: flex; gap: 13px; align-items: center; margin-bottom: 18px; }
.card-heading h2 { margin: 0; font-size: 1.65rem; }
.card-heading p { margin: 0 0 3px; }
.step-bubble, .form-card-number { flex: 0 0 auto; display: grid; place-items: center; width: 45px; height: 45px; border: 2px solid var(--ink); border-radius: 50%; background: var(--coral); color: #fff; font: 900 1.15rem/1 var(--heading); box-shadow: 2px 2px 0 var(--ink); }
.step-teal { background: var(--teal); color: var(--ink); }
.food-search { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.food-search input { padding-left: 40px; }
.search-icon { position: absolute; left: 13px; top: 12px; z-index: 1; font-size: 1.3rem; }
.search-hint { margin: 9px 0 0; }
.search-status { min-height: 25px; padding-top: 10px; font-size: .85rem; color: var(--muted); }
.food-results { display: grid; gap: 10px; }
.food-result { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px; border: 2px solid var(--ink); border-radius: 13px; background: #fff; color: inherit; text-align: left; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.food-result:hover { background: var(--yellow-pale); transform: translateY(-1px); }
.food-result-main, .food-result-meta { min-width: 0; display: grid; }
.food-result-main strong { overflow: hidden; text-overflow: ellipsis; }
.food-result-main span, .food-result-meta small { color: var(--muted); font-size: .78rem; }
.food-result-meta { text-align: right; font-size: .8rem; }
.result-arrow { display: none; }
.empty-search { display: flex; gap: 12px; align-items: center; padding: 18px; border: 2px dashed var(--ink); border-radius: 13px; background: var(--cream); }
.empty-search span { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; font-weight: 900; }
.empty-search p { margin: 0; }
.add-food-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 17px; font-weight: 800; }
.add-food-link span { font-size: 1.4rem; }
.diary-card { min-height: 230px; }
.empty-diary { padding: 20px 10px 12px; text-align: center; }
.empty-diary > span { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 13px; border: 2px solid var(--ink); border-radius: 50%; background: var(--teal-pale); font-size: 1.8rem; }
.empty-diary h3 { margin-bottom: 7px; }
.empty-diary p { color: var(--muted); }
.meal-groups { display: grid; gap: 22px; }
.meal-group h3 { margin: 0 0 8px; color: var(--muted); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.diary-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px dashed #a8a8aa; }
.diary-entry > div { min-width: 0; display: grid; }
.diary-entry > div span { color: var(--muted); font-size: .82rem; }
.entry-kcal { font: 900 1.1rem/1 var(--heading); white-space: nowrap; }
.entry-kcal small { color: var(--muted); font: 600 .68rem/1 var(--body); }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font-weight: 900; cursor: pointer; }
.summary-column { display: grid; align-content: start; gap: 18px; }
.total-card { background: var(--yellow); box-shadow: var(--shadow-small); }
.total-number { display: flex; align-items: baseline; gap: 8px; margin: 3px 0 16px; }
.total-number strong { font: 900 clamp(3rem, 15vw, 5.2rem)/.9 var(--heading); letter-spacing: -.06em; }
.total-number span { font-weight: 800; }
.total-card p:last-child { margin-bottom: 0; }
.total-card progress { width: 100%; height: 17px; margin: 4px 0 8px; accent-color: var(--coral-dark); }
.goal-form { display: grid; gap: 8px; padding-top: 14px; }
.goal-form > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.tip-card { position: relative; background: var(--teal-pale); }
.tip-card > span { position: absolute; right: 18px; top: 14px; color: var(--purple); font-size: 1.5rem; }
.tip-card h2 { font-size: 1.35rem; margin-bottom: 8px; }
.tip-card p { margin: 0; }

/* Dialog */
.log-dialog { width: min(calc(100% - 24px), 540px); max-height: calc(100vh - 24px); padding: 0; border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 8px 9px 0 var(--ink); }
.log-dialog::backdrop { background: rgba(39,48,67,.72); backdrop-filter: blur(3px); }
.dialog-shell { position: relative; padding: 24px; overflow-y: auto; max-height: calc(100vh - 30px); }
.dialog-shell h2 { padding-right: 38px; margin-bottom: 3px; font-size: 1.8rem; }
.dialog-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 1.3rem; font-weight: 900; cursor: pointer; }
.selected-brand { color: var(--muted); }
.log-form { margin-top: 19px; }
.fraction-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fraction-row button { min-height: 38px; border: 2px solid var(--ink); border-radius: 9px; background: var(--cream); font-weight: 850; cursor: pointer; }
.fraction-row button:hover { background: var(--yellow); }
.calorie-preview { display: flex; align-items: baseline; justify-content: center; gap: 7px; padding: 15px; border: 2px dashed var(--ink); border-radius: 13px; background: var(--teal-pale); }
.calorie-preview strong { font: 900 2.25rem/1 var(--heading); }
.calorie-preview span { font-size: .8rem; font-weight: 800; }
.report-details { margin-top: 18px; border-top: 1px dashed var(--ink); padding-top: 12px; font-size: .86rem; }
.report-details summary { cursor: pointer; font-weight: 800; }
.report-details form { display: grid; gap: 8px; margin-top: 12px; }

/* Add-food page */
.form-page-heading { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.form-page-heading h1 { margin-bottom: 12px; }
.food-create-form { display: grid; gap: 20px; }
.form-card { position: relative; display: grid; gap: 18px; padding: 22px; overflow: hidden; }
.form-card-number { width: 47px; height: 47px; }
.form-card-teal { background: var(--teal); color: var(--ink); }
.form-card-yellow { background: var(--yellow); color: var(--ink); }
.form-card-content h2 { margin-bottom: 9px; font-size: 1.65rem; }
.form-card-content > p:not(.eyebrow) { color: var(--muted); }
.optional-tag { display: inline-block; color: var(--muted); font: 700 .72rem/1 var(--body); letter-spacing: .05em; text-transform: uppercase; }
.field-grid, .portion-grid { display: grid; gap: 15px; }
.measurement-inputs { display: grid; gap: 8px; align-items: end; }
.input-join { padding-bottom: 4px; font-weight: 800; text-align: center; }
.joined-fields { display: grid; grid-template-columns: 1fr 84px; }
.joined-fields input { border-radius: 11px 0 0 11px; }
.joined-fields select { border-left: 0; border-radius: 0 11px 11px 0; }
.fraction-example { margin-top: 17px; padding: 13px 15px; border-radius: 12px; background: var(--yellow-pale); }
.submit-bar { display: grid; gap: 18px; align-items: center; padding: 21px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: #fff; }
.submit-bar div { display: grid; }
.submit-bar span { color: #d8dbe3; font-size: .87rem; }

/* Privacy and account */
.prose-page > h1 { max-width: 830px; }
.promise-grid, .account-grid { display: grid; gap: 17px; margin: 32px 0; }
.promise-grid article { padding: 22px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.promise-grid article > span { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 15px; border: 2px solid var(--ink); border-radius: 13px; background: var(--yellow); font-weight: 900; }
.promise-grid h2 { margin-bottom: 8px; font-size: 1.3rem; }
.promise-grid p { margin: 0; }
.prose-card { max-width: 850px; padding: 26px; }
.prose-card h2 { margin-top: 28px; font-size: 1.45rem; }
.prose-card h2:first-child { margin-top: 0; }
.left-heading { margin-inline: 0; text-align: left; }
.account-card { padding: 23px; }
.account-card-teal { background: var(--teal-pale); }
.account-card h2 { font-size: 1.4rem; margin-bottom: 10px; }
.account-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 1.4rem; }
.plain-list { padding-left: 20px; }
.danger-card { display: grid; gap: 20px; margin-top: 25px; padding: 24px; border-color: var(--red); background: #fff3f4; }
.danger-card h2 { font-size: 1.7rem; }
.danger-card summary { list-style: none; width: fit-content; }
.danger-card summary::-webkit-details-marker { display: none; }
.delete-form { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--red); }
.install-help { margin-top: 12px; color: var(--muted); font-size: .85rem; }

/* Error and offline */
.error-page, .offline-page { display: grid; place-items: center; min-height: 75vh; }
.error-card, .offline-card { width: min(calc(100% - 32px), 620px); padding: 32px; text-align: center; }
.error-code { margin: 0; color: var(--coral); font: 900 4rem/1 var(--heading); }
.offline-page { padding: 20px; background: var(--cream); }
.offline-card { border: 3px solid var(--ink); border-radius: 25px; background: var(--paper); box-shadow: var(--shadow); }
.offline-card img { width: 90px; }
.offline-card h1 { font-size: clamp(2.2rem, 9vw, 4rem); }

@media (min-width: 680px) {
  .shell { width: min(calc(100% - 48px), var(--shell)); }
  .section { padding-block: 72px; }
  .fact-grid { grid-template-columns: repeat(3, 1fr); }
  .split-section, .privacy-card { grid-template-columns: 1fr 1.3fr; gap: 55px; }
  .promise-grid, .account-grid { grid-template-columns: repeat(2, 1fr); }
  .field-grid { grid-template-columns: repeat(2, 1fr); }
  .field-wide { grid-column: 1 / -1; }
  .measurement-inputs { grid-template-columns: minmax(150px, 1fr) auto 170px; }
  .form-page-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .food-result { grid-template-columns: minmax(0, 1fr) minmax(150px, auto) 24px; }
  .result-arrow { display: inline; font-weight: 900; }
  .account-code-box { grid-template-columns: 1fr auto; align-items: center; text-align: left; }
  .submit-bar { grid-template-columns: 1fr auto; }
  .form-card { grid-template-columns: 52px 1fr; padding: 27px; }
  .danger-card { grid-template-columns: 1fr auto; align-items: start; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .desktop-nav { display: flex; }
  .mobile-nav { display: none; }
  .home-hero { padding-block: 92px 105px; }
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(340px, .72fr); gap: 70px; }
  .auth-shell { grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); align-items: start; padding-block: 85px; }
  .auth-card { padding: 38px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .summary-column { position: sticky; top: 92px; }
  .search-card, .diary-card { padding: 27px; }
  .promise-grid { grid-template-columns: repeat(4, 1fr); }
  .account-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (max-width: 430px) {
  .food-search { grid-template-columns: 1fr; }
  .food-search .button { width: 100%; }
  .fraction-row { grid-template-columns: repeat(4, 1fr); }
  .today-header { align-items: center; }
  .today-header h1 { font-size: 2.7rem; }
}

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

