@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-VariableFont_wght.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --accent: #07777b;
  --accent-strong: #047865;
  --text: #11140b;
  --surface: #ffffff;
  --background: #f7f9f8;
  --muted: #71807a;
  --line: #e4ebe8;
  --hover: #f4f8f6;
  --active-soft: #edf7f4;
  --success-text: #047865;
  --success-bg: #ecf7f2;
  --warning-text: #9a6817;
  --warning-bg: #fff7e9;
  --danger-text: #a93d3d;
  --danger-bg: #fff0f0;
  --neutral-text: #66736e;
  --neutral-bg: #f1f4f2;
  --shadow: 0 8px 28px rgba(20, 54, 48, 0.06);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Quiet plant-food line art only on the FOOD page; solid work panels stay clear. */
body[data-page="app"] {
  isolation: isolate;
}
body[data-page="app"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .10;
  background-image: url("/static/img/food-vegan-pattern.svg?v=produce47-20261119");
  background-repeat: repeat;
  background-size: 1024px 1024px;
}

.food-cabinet-return { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 12px; color: var(--accent); text-decoration: none; font-weight: 500; }
.food-cabinet-return:hover { text-decoration: underline; }
.food-cabinet-shell { min-height: calc(100dvh - 76px); }
.food-cabinet-content { min-width: 0; }
.food-cabinet-shell .cabinet-sidebar { overflow-y: auto; }
@media (max-width: 900px) {
  .food-cabinet-content .app-main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 860px);
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand img,
.login-logo {
  display: block;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #42514c;
  font-weight: 600;
  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--line);
  background: var(--hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lms-admin-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #b9d6cf;
  border-radius: 10px;
  padding: 0 14px;
  background: #edf7f4;
  color: #07777b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.lms-admin-link:hover {
  border-color: #78afa3;
  background: #e2f3ee;
}

.app-main {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 54px 0 30px;
}

.intro-section {
  margin-bottom: 24px;
}

.eyebrow,
.brand-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.intro-section h1,
.login-panel h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.24;
}

.intro-section > p:last-child {
  max-width: 590px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.workspace,
.result-card,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace {
  padding: 22px;
}

.control-block + .control-block {
  margin-top: 22px;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selection-counter {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
}

.segment {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #53615c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.segment:hover {
  background: var(--hover);
}

.segment.is-active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(20, 54, 48, 0.08);
}

.input-method-control {
  max-width: none;
}

.photo-workspace {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.photo-workspace[hidden] {
  display: none;
}

.photo-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.photo-heading h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.photo-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.fake-fixture-label {
  display: grid;
  min-width: 220px;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.fake-fixture-label .text-field {
  min-height: 38px;
  font-size: 10px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.photo-file-button {
  min-width: 150px;
}

.photo-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(20, 54, 48, 0.08);
}

.photo-preview[hidden] {
  display: none;
}

.photo-preview img {
  width: 132px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
}

.photo-preview-meta {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-width: 0;
}

.photo-preview-meta strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.add-product-action {
  margin-top: 10px;
}

.photo-status {
  min-height: 16px;
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.photo-status.is-error {
  color: var(--danger-text);
}

.photo-status.is-success,
.vision-resolved {
  color: var(--success-text);
}

.photo-manual-fallback {
  justify-self: start;
}

.photo-manual-fallback[hidden] {
  display: none;
}

.vision-findings {
  display: grid;
  gap: 9px;
}

.vision-summary {
  margin: 0;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--active-soft);
  color: #31584f;
  font-size: 10px;
  line-height: 1.5;
}

.vision-finding {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.vision-finding > strong {
  font-size: 11px;
}

.vision-finding > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.vision-uncertainty {
  border-color: #ead8af;
  background: #fffdf8;
}

.vision-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vision-choice {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #c8dbd6;
  border-radius: 999px;
  background: #fff;
  color: #34534c;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.vision-choice:hover,
.vision-choice.is-selected {
  border-color: var(--accent);
  background: var(--active-soft);
  color: var(--accent-strong);
}

.vision-option-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #eee6d3;
  color: #42514c;
  font-size: 10px;
}

.vision-unresolved {
  color: var(--warning-text);
  font-size: 9px;
}

.selected-products {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.selected-products:empty {
  margin-bottom: 0;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 7px 5px 11px;
  border: 1px solid #cde4df;
  border-radius: 999px;
  background: var(--active-soft);
  color: #195e55;
  font-size: 11px;
  font-weight: 600;
}

.chip-remove {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(4, 120, 101, 0.08);
  color: var(--accent-strong);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.chip-replace {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-size: 8px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.chip-remove:hover {
  background: rgba(4, 120, 101, 0.15);
}

.search-combobox {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 12px;
  left: 13px;
  z-index: 2;
  color: #83908b;
  pointer-events: none;
}

.product-search,
.text-field,
.ripeness-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.product-search {
  padding: 0 14px 0 43px;
}

.text-field,
.ripeness-select {
  padding: 0 13px;
}

.product-search:focus,
.text-field:focus,
.ripeness-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(7, 119, 123, 0.09);
}

.product-search::placeholder {
  color: #8c9793;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 12;
  max-height: 292px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 54, 48, 0.13);
}

.search-option,
.search-prompt,
.search-empty {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.search-prompt {
  min-height: auto;
  margin: 2px 3px 5px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #52615b;
  font-size: 10px;
  line-height: 1.45;
}

.search-option {
  cursor: pointer;
}

.search-option:hover,
.search-option.is-highlighted {
  background: var(--hover);
  color: var(--accent-strong);
}

.search-option span:first-child {
  font-weight: 600;
}

.search-option span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.search-empty {
  color: var(--muted);
}

.field-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.ripeness-fields {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ripeness-field {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafcfb;
}

.ripeness-field strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
}

.ripeness-field span {
  color: var(--muted);
  font-size: 9px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button-primary {
  border: 1px solid var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  border-color: #035f50;
  background: #035f50;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #42514c;
}

.button-secondary:hover {
  background: var(--hover);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.check-button {
  width: 100%;
  margin-top: 20px;
}

.button-wide {
  width: 100%;
}

.inline-error,
.form-alert {
  padding: 10px 12px;
  border: 1px solid #f0cccc;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 11px;
}

.inline-error {
  margin-top: 12px;
}

.result-card {
  margin-top: 16px;
  overflow: hidden;
}

.scenario-note {
  margin: 10px 0 0;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 600;
}

.scenario-heading {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.scenario-heading h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.scenario-heading p,
.scenario-result > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.scenario-result {
  display: grid;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.scenario-result h3 {
  margin: 0;
  font-size: 14px;
}

.scenario-result .status-badge {
  justify-self: start;
}

.scenario-actions {
  padding: 18px 22px 20px;
}

.result-summary {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.status-badge,
.pair-verdict {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.status-badge {
  min-height: 29px;
  padding: 5px 11px;
  font-size: 10px;
}

.result-title {
  margin: 12px 0 5px;
  font-size: 20px;
  line-height: 1.3;
}

.result-message {
  max-width: 620px;
  margin: 0;
  color: #52615b;
  font-size: 12px;
}

.status-good,
.status-allowed {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-undesirable {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-no {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status-review,
.status-excluded,
.status-unknown {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.result-notices {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.result-notice {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--neutral-bg);
  color: #52615b;
  font-size: 10px;
}

.result-notice strong {
  color: var(--text);
  font-size: 11px;
}

.notice-limited,
.notice-conditional {
  border-color: #f0ddb9;
  background: var(--warning-bg);
}

.notice-excluded {
  border-color: #f0cccc;
  background: var(--danger-bg);
}

.result-details {
  padding: 18px 22px 20px;
}

.result-details h3 {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.4;
}

.pair-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pair-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #edf1ef;
}

.pair-item:last-child {
  border-bottom: 0;
}

.pair-name {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
}

.pair-explanation {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.pair-verdict {
  min-height: 25px;
  padding: 4px 9px;
  font-size: 9px;
  white-space: nowrap;
}

.suggestion {
  margin-top: 15px;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--active-soft);
}

.suggestion strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent-strong);
  font-size: 10px;
}

.suggestion p {
  margin: 0;
  color: #3f5650;
  font-size: 11px;
}

.result-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.disclaimer {
  margin: 16px auto 0;
  color: #87928e;
  font-size: 9px;
  text-align: center;
}

.legal-footer {
  margin: 20px auto 0;
  color: #87928e;
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.legal-footer p {
  margin: 0;
}

.legal-footer a {
  color: #63716c;
  text-underline-offset: 2px;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  margin-top: 6px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-shell {
  width: min(100%, 430px);
}

.login-panel {
  padding: 30px;
  text-align: center;
}

.login-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
}

.login-panel h1 {
  font-size: 22px;
}

.login-intro {
  margin: 9px auto 22px;
  color: var(--muted);
  font-size: 11px;
}

.login-form {
  display: grid;
  text-align: left;
}

.field-label {
  margin: 12px 0 6px;
  font-size: 10px;
  font-weight: 700;
}

.login-form .button {
  margin-top: 18px;
}

.login-form .form-alert {
  margin-bottom: 4px;
}

.member-auth-body {
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.member-auth-shell {
  width: min(100%, 460px);
}

.member-auth-panel {
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.member-auth-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.member-auth-panel .brand-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-align: center;
}

.member-auth-panel h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  text-align: center;
}

.member-auth-intro {
  margin: 12px auto 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.member-auth-form {
  display: grid;
  gap: 0;
}

.member-auth-form .button {
  margin-top: 18px;
}

.member-auth-alert {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #f2caca;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 12px;
}

.member-auth-success {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  padding: 13px 14px;
  border: 1px solid #cfe9df;
  border-radius: var(--radius);
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  line-height: 1.45;
}

.member-auth-success strong {
  font-size: 13px;
}

.member-otp-field {
  letter-spacing: 0.45em;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.member-auth-hint,
.member-cooldown {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.member-remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: #52615b;
  font-size: 11px;
  line-height: 1.4;
}

.member-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.member-change-email {
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.member-auth-footer {
  margin-top: 18px;
  font-size: 10px;
}

.member-cabinet-panel {
  text-align: center;
}

.member-entitlements {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--hover);
  text-align: left;
}

.member-entitlements h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.member-entitlements ul {
  margin: 0;
  padding-left: 18px;
  color: #42514c;
  font-size: 12px;
}

@media (max-width: 620px) {
  .header-inner,
  .app-main {
    width: min(100% - 32px, 820px);
  }

  .header-inner {
    min-height: 62px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .app-main {
    padding-top: 34px;
  }

  .intro-section h1 {
    font-size: 24px;
  }

  .intro-section > p:last-child {
    font-size: 12px;
  }

  .workspace,
  .result-summary,
  .result-details {
    padding: 17px;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .photo-heading,
  .photo-preview {
    grid-template-columns: 1fr;
  }

  .photo-heading {
    display: grid;
  }

  .fake-fixture-label {
    min-width: 0;
  }

  .photo-actions {
    display: grid;
  }

  .photo-file-button {
    width: 100%;
  }

  .photo-preview img {
    width: 100%;
    height: 180px;
  }

  .vision-option-row {
    grid-template-columns: 1fr;
  }

  .ripeness-field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pair-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .pair-verdict {
    justify-self: start;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

}

@media (max-width: 380px) {
  .header-inner,
  .app-main {
    width: calc(100% - 24px);
  }

  .logout-button span {
    display: none;
  }

  .logout-button {
    width: 42px;
    padding: 0;
  }

  .lms-admin-link span {
    display: none;
  }

  .lms-admin-link {
    width: 42px;
    padding: 0;
  }

  .login-panel {
    padding: 24px 18px;
  }

  .member-auth-panel {
    padding: 28px 18px;
  }

  .member-auth-panel h1 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Minimum FOOD typography only; auth and other screens unchanged. */
body[data-page="app"] { font-size: 16px; }
body[data-page="app"] .eyebrow,
body[data-page="app"] .brand-label,
body[data-page="app"] .control-label,
body[data-page="app"] .selection-counter,
body[data-page="app"] .segment,
body[data-page="app"] .photo-heading p,
body[data-page="app"] .fake-fixture-label,
body[data-page="app"] .fake-fixture-label .text-field,
body[data-page="app"] .photo-preview-meta strong,
body[data-page="app"] .text-action,
body[data-page="app"] .photo-status,
body[data-page="app"] .vision-summary,
body[data-page="app"] .vision-finding > strong,
body[data-page="app"] .vision-finding > p,
body[data-page="app"] .vision-choice,
body[data-page="app"] .vision-option-row,
body[data-page="app"] .vision-unresolved,
body[data-page="app"] .product-chip,
body[data-page="app"] .chip-replace,
body[data-page="app"] .search-prompt,
body[data-page="app"] .search-option span:last-child,
body[data-page="app"] .field-help,
body[data-page="app"] .ripeness-field strong,
body[data-page="app"] .ripeness-field span,
body[data-page="app"] .button,
body[data-page="app"] .inline-error,
body[data-page="app"] .form-alert,
body[data-page="app"] .scenario-note,
body[data-page="app"] .scenario-heading p,
body[data-page="app"] .scenario-result > p,
body[data-page="app"] .status-badge,
body[data-page="app"] .result-message,
body[data-page="app"] .result-notice,
body[data-page="app"] .result-notice strong,
body[data-page="app"] .pair-name,
body[data-page="app"] .pair-explanation,
body[data-page="app"] .pair-verdict,
body[data-page="app"] .suggestion strong,
body[data-page="app"] .suggestion p,
body[data-page="app"] .disclaimer,
body[data-page="app"] .legal-footer,
body[data-page="app"] .login-intro,
body[data-page="app"] .field-label,
body[data-page="app"] .member-auth-panel .brand-label,
body[data-page="app"] .member-auth-intro,
body[data-page="app"] .member-auth-alert,
body[data-page="app"] .member-auth-success,
body[data-page="app"] .member-auth-success strong,
body[data-page="app"] .member-auth-hint,
body[data-page="app"] .member-cooldown,
body[data-page="app"] .member-remember,
body[data-page="app"] .member-change-email,
body[data-page="app"] .member-auth-footer,
body[data-page="app"] .member-entitlements ul,
body[data-page="app"] .intro-section > p:last-child { font-size: 14px; }

/* FOOD composition editor: one list, no scrolling to another input. */
body[data-page="app"] .photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body[data-page="app"] .photo-file-button { width: 100%; min-height: 44px; }
body[data-page="app"] .segment,
body[data-page="app"] .button { font-size: 16px; }
body[data-page="app"] .selected-products { display: grid; gap: 12px; }
body[data-page="app"] .product-chip,
.food-ingredient {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
}
body[data-page="app"] .product-chip > span,
.food-ingredient > div { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
body[data-page="app"] .chip-replace,
body[data-page="app"] .chip-remove { min-height: 44px; min-width: 44px; font-size: 14px; cursor: pointer; }
body[data-page="app"] .chip-replace { border: 0; background: var(--hover); color: var(--accent); border-radius: var(--radius); padding: 8px 16px; }
.food-ingredient p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.food-ingredient.is-pending p { color: var(--warning-text); }
.food-ingredient.is-omitted { background: var(--hover); padding: 16px; }
.food-photo-mode .product-control > .search-combobox { display: none; }
.food-photo-mode .photo-workspace + .product-control { margin-top: 24px; }
.food-ingredient > div { flex: 0 0 100%; min-width: 0; }
.food-ingredient > .button { flex: 0 1 auto; max-width: 100%; white-space: normal; height: auto; min-height: 44px; padding: 12px 16px; }
.text-workspace { margin: 24px 0; padding: 24px; background: var(--hover); border-radius: var(--radius); }
.text-workspace[hidden] { display: none; }
body[data-page="app"] .product-control { margin-top: var(--uq-space-6, 24px); }
.text-workspace > p:empty, #text-context:empty { display: none; }
.photo-text-action { min-height: 44px; font-size: 16px; margin-bottom: var(--uq-space-4, 16px); }
.food-text-dialog .text-workspace { margin: 0; padding: 0; background: transparent; }
.food-text-dialog .food-picker-heading { margin-bottom: var(--uq-space-4, 16px); }
.text-workspace h3 { margin: 0 0 16px; font-size: 20px; font-weight: 600; }
.text-workspace textarea { display: block; width: 100%; margin: 8px 0; padding: 16px; min-height: 144px; resize: vertical; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.text-workspace p, #text-context { font-size: 14px; }
body[data-page="app"] .input-method-control { grid-template-columns: repeat(3, minmax(0,1fr)); }
body[data-page="app"] .input-method-control .segment { padding: 12px; }
#text-context { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .food-ingredient > .button { flex-basis: 100%; width: 100%; }
  body[data-page="app"] .input-method-control { grid-template-columns: 1fr; }
  .text-workspace { padding: 16px; }
}
.food-photo-mode .add-product-action { min-height: 44px; font-size: 16px; }
.food-partial-warning { padding: 16px; color: var(--warning-text); background: var(--warning-bg); }
.food-picker {
  width: min(640px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--uq-radius-large, 28px);
  padding: 32px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 16px;
}
.food-picker::backdrop { background: rgba(11,16,13,.45); }
.food-picker-heading { display: flex; gap: 16px; justify-content: space-between; align-items: start; }
.food-picker-heading h2 { font-size: 22px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.food-picker-heading button { flex: 0 0 44px; min-height: 44px; padding: 8px; }
.food-picker > p { font-size: 14px; line-height: 1.5; }
.food-picker input { margin-top: 8px; width: 100%; min-height: 48px; font-size: 16px; }
.food-picker-results { display: grid; gap: 8px; margin: 16px 0; }
.food-picker-results button { width: 100%; min-height: 44px; text-align: left; white-space: normal; }
.food-picker [hidden], #photo-restore[hidden] { display: none !important; }
.food-picker :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .food-picker { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  body[data-page="app"] .photo-actions { grid-template-columns: 1fr; }
  .food-ingredient > div { flex-basis: 100%; }
  .food-ingredient > button { flex: 1; }
}
