:root {
  font-family: system-ui, sans-serif;
  color: #173b36;
  background: #f4f6f2;
  line-height: 1.6;
}
.food-catalog,
.food-catalog-picker,
.catalog-notices {
  min-width: 0;
  overflow-wrap: anywhere;
}
.food-catalog label:not(.check),
.food-catalog-picker label:not(.check) {
  display: grid;
  gap: 6px;
  margin-block: 10px;
}
.food-catalog fieldset {
  min-width: 0;
  margin-block: 16px;
}
.food-catalog button,
.food-catalog-picker button,
.catalog-notices button {
  min-height: 48px;
  max-width: 100%;
  white-space: normal;
  margin: 6px 8px 6px 0;
}
.food-catalog textarea {
  width: 100%;
  min-height: 96px;
  font: inherit;
}
.authenticator-setup {
  min-width: 0;
  overflow-wrap: anywhere;
}
.authenticator-setup svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 12px;
}
.authenticator-setup button {
  max-width: 100%;
  white-space: normal;
  margin: 8px 8px 0 0;
}
.planning-area {
  min-width: 0;
  overflow-wrap: anywhere;
}
.import-app,
.import-editor,
.recipe-photo,
.import-consent,
.import-admin {
  min-width: 0;
  overflow-wrap: anywhere;
}
.import-app label:not(.check),
.import-consent label,
.import-admin label:not(.check) {
  display: grid;
  gap: 6px;
  margin-block: 10px;
}
.import-app button,
.import-consent button,
.import-admin button,
.recipe-photo button {
  min-height: 48px;
  max-width: 100%;
  white-space: normal;
  margin: 8px 8px 0 0;
}
.import-app input,
.import-app select,
.import-app textarea,
.import-admin textarea,
.recipe-photo input {
  min-width: 0;
  max-width: 100%;
  font: inherit;
}
.import-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
}
.import-images figure {
  margin: 0;
  min-width: 0;
}
.import-images img,
.recipe-photo img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 10px;
}
.import-json {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.import-feedback {
  padding: 12px;
  border-left: 4px solid #27705e;
  background: #f2f6ef;
}
.import-search-results {
  margin-block: 16px;
  padding: 12px;
  border: 1px solid #8b9f98;
  border-radius: 8px;
  background: #f7f9f6;
  min-width: 0;
}
.import-search-results h4 {
  margin-block: 0 8px;
}
.import-app .import-result-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.import-app .import-result-card {
  display: block;
  padding: 12px;
  border: 1px solid #c3cdc7;
  border-radius: 6px;
  background: #fff;
  min-width: 0;
}
.import-result-card p {
  margin-block: 4px;
}
.import-app .import-result-card button {
  display: inline-block;
  width: auto;
  min-height: 44px;
  padding: 6px 12px;
  margin: 6px 8px 0 0;
  border-radius: 6px;
}
@media (max-width: 560px) {
  .import-app button,
  .import-consent button,
  .import-admin button,
  .recipe-photo button {
    display: block;
    width: 100%;
    margin-inline: 0;
  }
}
.shopping-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 16px;
}
.shopping-values dt,
.shopping-values dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.shopping-values dd {
  font-weight: 650;
}
@media (max-width: 430px) {
  .shopping-values {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .shopping-values dd {
    margin-bottom: 10px;
  }
}
.planning-area form {
  max-width: none;
}
.planning-area fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d5dfd6;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}
.planning-area legend {
  font-weight: 700;
  padding: 0 4px;
}
.planning-area label:not(.check) {
  display: grid;
  gap: 6px;
}
.planning-area .planning-week-start {
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 24rem;
  grid-template-columns: minmax(0, 1fr);
}
.planning-week-start input[type='date'] {
  box-sizing: border-box;
  display: block;
  /* Keep the native date editor's intrinsic width out of the mobile grid. */
  contain: inline-size;
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-block-size: 48px;
  font-size: max(16px, 1rem);
  text-align: start;
  white-space: nowrap;
  overflow-wrap: normal;
  -webkit-appearance: none;
  appearance: none;
}
.planning-week-start input[type='date']::-webkit-datetime-edit {
  min-inline-size: 0;
  padding: 0;
}
.planning-week-start input[type='date']::-webkit-date-and-time-value {
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-block-size: 1.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.planning-week-date-display {
  display: none;
}
@media (max-width: 600px) and (pointer: coarse),
  (max-height: 600px) and (pointer: coarse) {
  .planning-week-date {
    position: relative;
  }
  /* Keep the native picker tappable across the entire displayed field. */
  .planning-area .planning-week-date input[type='date'] {
    position: absolute;
    inset: 0;
    z-index: 1;
    block-size: 100%;
    opacity: 0;
  }
  .planning-week-date input[type='date']::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    inline-size: auto;
    block-size: auto;
    margin: 0;
  }
  .planning-week-date-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-block-size: max(52px, calc(1.6em + 22px));
    padding: 10px 12px;
    border: 1px solid var(--line, #8a9f91);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: var(--ink, inherit);
    font-size: max(16px, 1rem);
    font-weight: 400;
    line-height: 1.6;
  }
  .planning-week-date-display svg {
    flex: none;
  }
  .planning-week-date input:disabled + .planning-week-date-display {
    opacity: 0.75;
  }
  .planning-week-date input:focus-visible + .planning-week-date-display {
    outline: 3px solid var(--focus, #ddae49);
    outline-offset: 3px;
  }
}
.planning-area input:not([type='checkbox']),
.planning-area select,
.planning-area textarea,
.planning-area button {
  min-height: 48px;
  max-width: 100%;
}
.planning-area textarea {
  min-height: 96px;
  width: 100%;
  font: inherit;
}
.planning-area .check {
  min-height: 44px;
  align-items: center;
  font-weight: 500;
}
.planning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.planning-actions > button {
  flex: 1 1 160px;
}
.planning-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.planning-list li {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.planning-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}
.planning-days .planning-meal-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.planning-days .planning-meal-choice input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin: 0;
  justify-self: start;
}
.planning-days .planning-meal-choice span {
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .planning-days {
    grid-template-columns: minmax(0, 1fr);
  }
}
.planning-day,
.planning-meal,
.planning-component,
.planning-summary,
.planning-allocation,
.planning-pending {
  min-width: 0;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid #d5dfd6;
  border-radius: 10px;
}
.planning-area h3,
.planning-area h4 {
  margin: 8px 0 12px;
}
@media (max-width: 600px) {
  .planning-area button {
    width: 100%;
  }
  .planning-area fieldset {
    padding: 10px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.shell {
  max-width: 800px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
  border-bottom: 1px solid #d5dfd6;
}
.brand {
  font-size: 1.3rem;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
}
.brand span {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
}
.status {
  background: #e4ece2;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
button {
  border: 1px solid #27705e;
  border-radius: 8px;
  padding: 11px 16px;
  background: #fff;
  color: #164f40;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}
button[type='submit'],
button[aria-current='page'] {
  background: #17664f;
  color: #fff;
}
button:disabled {
  cursor: not-allowed;
  color: #616962;
  border-color: #bdc5bd;
  background: #edf0eb;
}
/* Shared by every menu, inline dialog and programmatic focus target.
   Native focus-visible also keeps editing fields identifiable after a tap. */
:focus-visible {
  outline: 3px solid var(--focus, #ddae49);
  outline-offset: 3px;
}
/* A pointer may activate an already keyboard-focused button. Its asynchronous
   destination can inherit native focus-visible; suppress only non-editing rings
   after an observed pointer action. Without the helper, native rules still apply. */
:root[data-focus-input='pointer']
  :focus-visible:not(:read-write):not(input):not(select):not(textarea) {
  outline-style: none;
}
:root
  :where(input, select, textarea, [contenteditable='true']):focus:not(
    [aria-invalid='true']
  ) {
  border-color: var(--focus, #ddae49);
}
section {
  background: white;
  border: 1px solid #dce4dc;
  border-radius: 16px;
  padding: clamp(16px, 4vw, 32px);
  margin-bottom: 16px;
  min-width: 0;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 8px 0 24px;
}
h2 {
  font-size: 1.15rem;
  margin-top: 28px;
}
.eyebrow {
  color: #5a7663;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  font-weight: 700;
}
form {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 24px 0;
}
label {
  font-weight: 600;
}
input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #8a9f91;
  border-radius: 7px;
  font: inherit;
  min-width: 0;
  min-height: 44px;
  background: #fff;
  color: inherit;
}
input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: #17664f;
  flex-shrink: 0;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.check input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 4px;
}
.empty {
  background: #f3f6f0;
  border-radius: 10px;
  padding: 18px;
}
.alert {
  background: #fff0e8;
  border-left: 4px solid #9c4325;
  padding: 16px;
  color: #71351f;
}
.success {
  background: #e6f4e8;
  padding: 16px;
}
article {
  padding: 4px 0 24px;
  border-bottom: 1px solid #dce4dc;
  overflow-wrap: anywhere;
}
article button {
  margin-right: 8px;
}
footer {
  padding: 30px 0;
  color: #65766c;
  font-size: 0.85rem;
}
.disclosure {
  border-top: 1px solid #d5dfd6;
  margin-top: 12px;
}
.disclosure > summary {
  cursor: pointer;
  min-height: 48px;
  padding: 14px 4px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.disclosure[open] > summary {
  color: #17664f;
}
.disclosure-body {
  padding: 0 4px 16px;
}
.disclosure-body > form:first-child {
  margin-top: 8px;
}
.disclosure-body h2:first-child {
  margin-top: 12px;
}
.password-visibility {
  margin: 8px 0;
  min-height: 44px;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 400;
}
.sign-out {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #d5dfd6;
}
.list-panel {
  background: #f8faf6;
  padding: 18px;
}
.list-panel h3 {
  margin: 0 0 14px;
}
.list-panel form {
  max-width: none;
  margin: 16px 0;
}
.list-empty {
  color: #52695e;
  font-size: 0.95rem;
}
.list-item {
  padding: 16px 0;
}
.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.list-item .check {
  min-height: 44px;
}
.list-item button {
  margin-top: 8px;
  font-size: 0.9rem;
}
.empty button {
  margin: 4px;
}
code {
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .shell {
    padding: 12px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  nav button {
    flex: 1 1 40%;
  }
  h1 {
    font-size: 1.75rem;
  }
  .list-panel {
    padding: 14px;
  }
  input,
  select {
    font-size: 16px;
  }
  header {
    gap: 8px;
    padding-bottom: 16px;
  }
}

.recipe-app {
  overflow-wrap: anywhere;
}
.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.recipe-search {
  display: grid;
  gap: 6px;
  margin-block: 20px;
}
.bls-search-button {
  margin-top: 12px;
}
@media (max-width: 560px) {
  .recipe-actions {
    flex-direction: column;
  }
  .recipe-actions button {
    width: 100%;
  }
}
.recipe-app fieldset {
  min-width: 0;
  margin-block: 1rem;
  border: 1px solid #ccd8d1;
  border-radius: 0.6rem;
}
.recipe-app pre {
  white-space: pre-wrap;
  max-height: 20rem;
  overflow: auto;
}
.recipe-app textarea {
  width: 100%;
  min-height: 5rem;
  box-sizing: border-box;
}
.recipe-app article section {
  margin-block: 1.2rem;
}
.recipe-app select {
  max-width: 100%;
}
.recipe-app form label {
  display: grid;
  gap: 6px;
  margin-block: 12px;
}
.recipe-app form button {
  min-height: 44px;
  margin: 6px 8px 6px 0;
}
.recipe-app fieldset fieldset {
  border: 0;
  border-top: 1px solid #ccd8d1;
  border-radius: 0;
  padding: 16px 0;
}
.recipe-app textarea {
  border: 1px solid #71877c;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
}
.recipe-app form .recipe-group-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.recipe-app .recipe-group-choice input {
  width: auto;
}
.recipe-app .recipe-remove {
  background: transparent;
  color: #52695e;
}

.inventory {
  min-width: 0;
  overflow-wrap: anywhere;
}
.inventory .card,
.inventory form,
.inventory details {
  margin-block: 1rem;
  min-width: 0;
}
.inventory .card {
  border: 1px solid #ccd8d1;
  border-radius: 12px;
  padding: 16px;
}
.inventory label {
  display: grid;
  gap: 6px;
  margin-block: 12px;
}
.inventory .check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inventory .check input {
  width: auto;
}
.inventory button {
  min-height: 44px;
  margin: 6px 8px 6px 0;
  max-width: 100%;
  white-space: normal;
}
.inventory input,
.inventory select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}
.inventory p,
.inventory dd {
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .inventory button {
    width: 100%;
    margin-inline: 0;
  }
}
.inventory .primary {
  background: #17634f;
  color: #fff;
  border: 2px solid #17634f;
  font-weight: 700;
}
.inventory .secondary {
  background: transparent;
  color: #244e40;
}
.inventory .inventory-amount {
  font-size: 1.4rem;
  font-weight: 700;
  margin-block: 0.6rem;
}
.inventory .inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory .inventory-secondary {
  border-top: 1px solid #ccd8d1;
  margin-top: 24px;
  padding-top: 12px;
}
.inventory .inventory-preview > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #d7e0d9;
}
.inventory .inventory-preview dd {
  margin: 0;
  font-weight: 700;
}
.inventory fieldset {
  min-width: 0;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
}
.inventory pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.inventory [aria-invalid='true'] {
  border: 2px solid #9a3428;
}
.inventory [role='alertdialog'] {
  border: 2px solid #6b542a;
}
.inventory summary {
  cursor: pointer;
  padding-block: 12px;
  min-height: 44px;
  box-sizing: border-box;
}
@media (max-width: 560px) {
  .inventory .inventory-actions {
    flex-direction: column;
  }
}
.household-app {
  min-width: 0;
  overflow-wrap: anywhere;
}
.draft-dialog {
  border: 2px solid #6b542a;
  border-radius: 12px;
  padding: 16px;
  margin-block: 16px;
  background: #fffaf0;
  overflow-wrap: anywhere;
}
.draft-dialog button {
  min-height: 44px;
  margin: 6px 8px 6px 0;
}
.recipe-app .recipe-save-feedback:not(:empty) {
  padding: 12px;
  background: #f2f6ef;
  border-left: 4px solid #27705e;
}
.recipe-app [aria-invalid='true'] {
  border: 2px solid #9a3428;
}
@media (max-width: 560px) {
  .draft-dialog button {
    width: 100%;
    margin-inline: 0;
  }
}

/* Food actions are one mobile layout, including search, detail and editor controls. */
.recipe-app [data-food-area='catalog'] > label {
  display: grid;
  gap: 6px;
  margin-block: 12px;
}
.household-app .list-save-feedback {
  min-height: 1.6em;
  margin-block: 8px 0;
  color: #164f40;
}
.household-app .list-save-feedback:not(:empty) {
  border-left: 4px solid #27705e;
  background: #f2f6ef;
  padding: 8px 12px;
}
/* Confirmed compact capture flow; resolve remains a draft action. */
.capture-line-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.capture-reviewed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  padding: 3px 8px;
  border-radius: 16px;
  color: var(--accent, #315c41);
  background: var(--soft, #e8eedf);
  font-size: 0.8rem;
  font-weight: 650;
}
.capture-compact {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-bottom: 130px;
}
.capture-compact [hidden] {
  display: none !important;
}
.capture-compact h1 {
  margin-block: 12px;
  font-size: 1.5rem;
}
.capture-compact h2 {
  font-size: 1.15rem;
  scroll-margin-top: 12px;
}
.capture-compact fieldset {
  border: 0;
  padding: 0;
  margin: 12px 0;
  min-width: 0;
}
.capture-compact legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.capture-compact .capture-summary {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line, #dce2d5);
  border-radius: 14px;
  background: var(--surface, #fffefb);
  padding: 8px;
}
.capture-compact .capture-summary button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 0;
  text-align: left;
  font-weight: 650;
}
.capture-compact small {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted, #647060);
}
.capture-compact .capture-intent {
  font-size: 0.85rem;
  margin-block: 8px;
}
.capture-compact .capture-choices {
  display: grid;
  gap: 8px;
  margin-block: 12px;
}
.capture-compact .capture-choices button {
  width: 100%;
  text-align: left;
  margin: 0;
}
.capture-compact label:not(.check) {
  display: grid;
  gap: 4px;
  margin-block: 12px;
}
.capture-compact input:not([type='checkbox']),
.capture-compact select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.capture-compact summary {
  min-height: 44px;
  cursor: pointer;
  padding-block: 10px;
}
.capture-compact [aria-invalid='true'] {
  border: 2px solid #9a3428;
}
.capture-compact [role='alert'],
.capture-compact .capture-field-error {
  padding: 8px;
  border-left: 3px solid #9a3428;
  background: var(--soft, #e8eedf);
}
.capture-compact .capture-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 10px 12px;
  border-top: 1px solid var(--line, #dce2d5);
  background: var(--canvas, #f6f5f0);
}
.capture-compact .capture-actions button {
  display: block;
  width: 100%;
  margin: 0;
  background: var(--accent, #315c41);
  color: var(--surface, #fffefb);
  font-weight: 650;
  min-height: 48px;
}
.capture-compact .capture-actions p {
  font-size: 0.75rem;
  text-align: center;
  margin: 6px 0 0;
}
@media (max-width: 760px) {
  .capture-compact .capture-actions {
    position: fixed;
    bottom: var(--capture-nav-height, 0px);
    left: 16px;
    right: 16px;
  }
  .capture-compact {
    padding-bottom: calc(130px + var(--capture-nav-height, 0px));
  }
  .capture-compact label {
    scroll-margin-bottom: calc(130px + var(--capture-nav-height, 0px));
  }
}
@media (max-width: 560px) {
  .recipe-app [data-food-area] button,
  .recipe-app .food-action {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 12px 0 0;
    white-space: normal;
  }
  .recipe-app .recipe-actions .food-action {
    margin: 0;
  }
}
.recipe-collection-app,
.recipe-collection-app fieldset,
.recipe-collection-app .planning-card {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
.recipe-collection-app form {
  margin-block: 24px;
}
.recipe-collection-app fieldset {
  margin-block: 16px;
}
.recipe-collection-app input,
.recipe-collection-app select,
.recipe-collection-app textarea {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.recipe-collection-app .planning-actions > label {
  flex: 1 1 10rem;
  min-inline-size: 0;
}
.recipe-collection-app figure img {
  max-inline-size: min(100%, 24rem);
  max-block-size: 20rem;
  object-fit: contain;
}
.recipe-import-values {
  overflow-x: auto;
  max-inline-size: 100%;
}
.recipe-import-values table {
  inline-size: 100%;
  min-inline-size: 42rem;
  border-collapse: collapse;
}
.recipe-import-values th,
.recipe-import-values td {
  text-align: start;
  vertical-align: top;
  padding: 10px;
  border-bottom: 1px solid var(--line, #cbd5d1);
}
