/* Shared Grocery: readable forms, pink paper, and space for the household. */
.grocery-page { min-width: 0; margin-top: 22px; }
.grocery-page h2 { line-height: 1.3; }
.grocery-page h3 { color: #643849; font-size: 16px; line-height: 1.5; }
.grocery-page p { overflow-wrap: anywhere; }
.grocery-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.grocery-heading > div:first-child { min-width: 0; }
.grocery-heading .page-kicker { margin: 0 0 5px; }
.grocery-help { color: #765561; font-size: 13px; line-height: 1.6; margin: 8px 0 14px; font-weight: 400; }
.grocery-tabs { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; padding: 5px 4px 11px; margin: 0 -4px 13px; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.grocery-tabs button { flex: 0 0 auto; min-height: 45px; padding: 10px 14px; border: 1px solid #ecd0dc; border-radius: 13px; color: #7b425a; background: #fff; font-size: 13px; font-weight: 700; }
.grocery-tabs button[aria-current="page"] { background: #f8dce7; border-color: #cf8eaa; color: #74334e; box-shadow: inset 0 0 0 1px #fff1f6; }
.grocery-form { display: grid; gap: 14px; margin-top: 14px; min-width: 0; }
.grocery-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.grocery-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #6e4155; font-size: 13px; font-weight: 700; line-height: 1.5; }
.grocery-field > span > small, .grocery-field > small { font-size: 12px; font-weight: 400; color: #795a68; }
.grocery-field input, .grocery-field select, .grocery-field textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 46px; border: 1px solid #dec1cf; border-radius: 11px; background: #fff; padding: 11px 12px; font: inherit; font-size: 16px; font-weight: 400; color: #452d37; }
.grocery-field textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.grocery-field input::placeholder, .grocery-field textarea::placeholder { color: #806b74; opacity: 1; }
.grocery-field input[readonly] { background: #fff5f9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
.grocery-actions, .grocery-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grocery-actions .button, .grocery-item-actions .button { min-height: 44px; }
.grocery-auth { max-width: 600px; margin-inline: auto; padding: 24px; }
.grocery-auth > p:not(.page-kicker) { font-size: 14px; color: #765561; }
.grocery-auth .grocery-form { margin-top: 22px; }
.grocery-auth .grocery-form > .grocery-actions .primary { flex: 1; }
.grocery-auth-links { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #f0dfe6; margin-top: 20px; padding-top: 16px; }
.grocery-auth-links .button { font-size: 12px; }
.grocery-working { position: sticky; top: 8px; z-index: 5; padding: 12px 15px; margin: 0 0 14px; border: 1px solid #e8b9cd; border-radius: 12px; background: #fde9f1; color: #76344f; font-size: 13px; font-weight: 700; box-shadow: 0 4px 16px rgba(86, 38, 58, .08); }
.grocery-page [disabled] { cursor: wait; opacity: .55; }
.grocery-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 22px 0; }
.grocery-setup-grid > section { min-width: 0; padding: 17px; border: 1px solid #efd4e0; border-radius: 15px; background: #fff9fb; }
.grocery-empty { display: grid; justify-items: start; gap: 8px; padding: 24px 14px; margin-top: 20px; border: 1px dashed #e5bfce; border-radius: 15px; background: #fff9fb; }
.grocery-empty > span { color: #b66b8a; font-size: 24px; }
.grocery-empty p { color: #765561; font-size: 13px; margin: 0; line-height: 1.65; }
.grocery-empty h3 { margin: 0; }
.grocery-items { list-style: none; padding: 0; margin: 23px 0 0; display: grid; gap: 10px; }
.grocery-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 13px 14px; background: #fff; border: 1px solid #eed8e2; border-radius: 14px; }
.grocery-item.is-checked { background: #fbf4f7; }
.grocery-item.is-checked .grocery-item-check strong { color: #806b74; text-decoration: line-through; text-decoration-thickness: 1px; }
.grocery-item-check { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 210px; min-height: 48px; cursor: pointer; }
.grocery-item-check > span { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.grocery-item-check strong { font-size: 15px; line-height: 1.45; color: #54303f; }
.grocery-item-check small { color: #775d69; font-size: 12px; line-height: 1.4; }
.grocery-item-check input[type="checkbox"] { width: 23px; height: 23px; min-width: 23px; margin: 0; accent-color: #a2476b; }
.grocery-item-actions .button { padding: 8px 12px; font-size: 12px; background: #fffafd; }
.grocery-delete-confirm { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #e8b8cb; border-radius: 11px; background: #fff0f5; font-size: 13px; }
.grocery-footnote { border-top: 1px solid #f0dfe6; padding-top: 14px; margin-top: 20px; margin-bottom: 0; }
.grocery-migration { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: #fff8fb; }
.grocery-migration > div { flex: 1 1 250px; }
.grocery-migration .grocery-help { margin-bottom: 0; }
.grocery-preview-list { max-height: 330px; overflow-y: auto; display: grid; list-style: none; padding: 0; margin: 15px 0; border: 1px solid #efdae3; border-radius: 12px; }
.grocery-preview-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 12px; padding: 12px; border-bottom: 1px solid #f1e1e8; font-size: 13px; overflow-wrap: anywhere; }
.grocery-preview-list li:last-child { border-bottom: 0; }
.grocery-preview-list small { color: #806373; }
.grocery-local-list summary, .grocery-diet-details summary { min-height: 44px; padding: 11px 0; color: #81445f; font-size: 13px; font-weight: 700; cursor: pointer; }
.grocery-month-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: end; }
.grocery-month-picker { max-width: 205px; }
.grocery-budget-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 12px; }
.grocery-budget-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 16px; border: 1px solid #ead2dd; border-radius: 16px; background: #fffbfd; }
.grocery-budget-card.is-main { background: linear-gradient(135deg, #fbe1ec, #fff6fa); border-color: #e7b8cc; }
.grocery-budget-card > span { color: #73435a; font-weight: 700; font-size: 13px; }
.grocery-budget-card > strong { color: #8b3d60; font-size: 27px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.grocery-budget-card > strong.grocery-pending-number { color: #7f6571; font-size: 18px; letter-spacing: normal; }
.grocery-budget-card > small { margin-top: auto; color: #7c5c6b; font-size: 11px; line-height: 1.45; }
.grocery-budget-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.grocery-budget-form .grocery-field { flex: 1 1 240px; }
.grocery-next-step { background: #fff8fb; }
.grocery-next-step p { color: #765561; font-size: 13px; line-height: 1.65; }
.grocery-history { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.grocery-history button { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 12px; width: 100%; min-height: 66px; padding: 15px; border: 1px solid #ecd2df; border-radius: 13px; background: #fffafd; text-align: left; color: #65394e; }
.grocery-history button:hover { background: #ffeff6; }
.grocery-history button strong { color: #8b3d60; font-size: 18px; }
.grocery-history-arrow { font-size: 24px; color: #af7a93; }
.grocery-location-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 24px; }
.grocery-location-tabs button { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; min-width: 0; min-height: 72px; padding: 13px 12px; border: 1px solid #e8cdda; border-radius: 13px; background: #fffbfd; color: #785065; text-align: left; }
.grocery-location-tabs button[aria-pressed="true"] { border-color: #bf7c9b; background: #f9e1eb; }
.grocery-location-tabs button span { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.grocery-location-tabs button strong { font-size: 21px; color: #88415f; }
.grocery-stock-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.grocery-stock-item { padding: 16px; border: 1px solid #ebd3de; border-radius: 15px; background: #fffafd; }
.grocery-stock-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.grocery-stock-heading > div { min-width: 0; }
.grocery-stock-heading h3 { overflow-wrap: anywhere; }
.grocery-stock-heading .grocery-help { margin: 4px 0 0; }
.grocery-stock-amount { text-align: right; font-size: 21px; color: #8a3f60; line-height: 1.4; overflow-wrap: anywhere; max-width: 48%; }
.grocery-stock-amount span { font-size: 13px; font-weight: 600; }
.grocery-stock-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #7c5b6c; font-size: 12px; margin: 11px 0; }
.grocery-stock-notes { white-space: pre-wrap; color: #73505f; font-size: 13px; margin: 10px 0 14px; }
.grocery-profile-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.grocery-profile-card { min-width: 0; padding: 17px; border: 1px solid #e8c5d4; border-top: 5px solid #d58bab; border-radius: 15px; background: #fff5f9; }
.grocery-profile-card.grocery-profile-purple { background: #f9f5fc; border-color: #ded1eb; border-top-color: #aa8abf; }
.grocery-profile-card.grocery-profile-empty { border-style: dashed; border-top-width: 1px; background: #fffafd; }
.grocery-profile-card .page-kicker { font-size: 10px; margin: 0 0 8px; }
.grocery-profile-card h3 { overflow-wrap: anywhere; }
.grocery-target-summary { margin: 14px 0 6px; }
.grocery-target-summary > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(172, 115, 144, .15); font-size: 12px; line-height: 1.45; }
.grocery-target-summary dt { color: #745263; }
.grocery-target-summary dd { margin: 0; color: #71435a; font-weight: 700; text-align: right; }
.grocery-target-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grocery-diet-details p { margin: 8px 0 13px; font-size: 12px; line-height: 1.6; }
.grocery-diet-details strong, .grocery-diet-details span { display: block; }
.grocery-diet-details span { white-space: pre-wrap; color: #765667; margin-top: 3px; }
.grocery-scope-label { display: inline-flex; border: 1px solid #e8c4d5; border-radius: 100px; background: #fce8f0; color: #873f60; padding: 6px 10px; margin: 0 0 12px; font-size: 11px; font-weight: 750; line-height: 1.4; }
.grocery-scope-label.is-private { background: #f4f4ef; border-color: #dcdccd; color: #606147; }
.grocery-member-list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 20px 0; }
.grocery-member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff7fb; border: 1px solid #eed7e3; border-radius: 12px; font-size: 14px; }
.grocery-member-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.grocery-member-list small { color: #806374; }
.grocery-sharing { margin-top: 22px; padding-top: 20px; border-top: 1px solid #f0dde7; }
.grocery-signout { margin-top: 26px; padding-top: 17px; border-top: 1px solid #f0dde7; }
.grocery-cloud-caption { color: #7e6270; font-size: 12px; line-height: 1.6; margin: 10px 3px 16px; }
.grocery-draft-status { margin: 0 4px 14px; }
.grocery-list-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px; margin: 17px 0; border: 1px solid #e9bfd2; border-radius: 14px; background: #fff3f9; }
.grocery-list-summary > span { display: flex; flex-direction: column; gap: 6px; color: #755165; font-size: 12px; }
.grocery-list-summary strong { color: #8c4262; font-size: 24px; }
.grocery-list-summary small { color: #7d6170; font-size: 11px; }
.grocery-budget-category { margin: 24px 0 10px; }
.grocery-budget-card .is-over-budget { color: #a13c43; }
.grocery-history button > span:first-child small { display: block; margin-top: 7px; color: #826674; font-size: 10px; font-weight: 400; line-height: 1.5; }
.grocery-date-fields { min-width: 0; padding: 17px; margin: 5px 0; border: 1px solid #dfafc6; border-radius: 15px; background: #fff7fb; }
.grocery-date-fields legend { padding: 0 7px; color: #79465e; font-size: 13px; font-weight: 750; }
.grocery-date-fields .grocery-help { margin-bottom: 0; }
.grocery-stock-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin: 13px 0 17px; padding: 12px; border: 1px solid #eed7e3; border-radius: 11px; background: #fff; }
.grocery-stock-dates > div { min-width: 0; }
.grocery-stock-dates dt { color: #806272; font-size: 10px; margin: 0 0 5px; }
.grocery-stock-dates dd { color: #70435b; font-size: 12px; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.grocery-date-alert { border: 1px solid #e0b99b; border-radius: 100px; padding: 5px 9px; color: #7e5639; background: #fff1e4; font-size: 11px; font-weight: 700; }
.grocery-freeze-action { margin-top: 9px; }
.grocery-freeze-action .button { font-size: 12px; background: #f1f8fb; border-color: #c4dce8; color: #4a6f85; }
.grocery-backup { margin-top: 25px; padding-top: 20px; border-top: 1px solid #ebcfde; }
.grocery-backup-picker { margin-top: 19px; }
.grocery-backup-review { margin-top: 15px; padding: 16px; border: 1px solid #ddb1c6; border-radius: 13px; background: #fff4f9; }
.grocery-backup-review h4 { margin: 0 0 10px; color: #74425a; overflow-wrap: anywhere; }
@media (min-width: 850px) {
  .grocery-budget-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grocery-budget-card > strong { font-size: 23px; }
  .grocery-budget-card > strong.grocery-pending-number { font-size: 16px; }
}
@media (max-width: 600px) {
  .grocery-setup-grid, .grocery-profile-cards { grid-template-columns: minmax(0, 1fr); }
  .grocery-target-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grocery-auth { padding: 19px 16px; }
  .grocery-location-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grocery-location-tabs button { flex-direction: row; justify-content: space-between; align-items: center; min-height: 54px; }
}
@media (max-width: 440px) {
  .grocery-form-grid { grid-template-columns: minmax(0, 1fr); }
  .grocery-page .grocery-field input, .grocery-page .grocery-field select { min-height: 48px; }
  .grocery-item-actions { width: 100%; }
  .grocery-item-actions .button { flex: 1; }
  .grocery-item-check { flex-basis: 100%; }
  .grocery-budget-card { padding: 14px 12px; }
  .grocery-budget-card > strong { font-size: 22px; }
  .grocery-budget-card > strong.grocery-pending-number { font-size: 16px; }
  .grocery-month-picker { max-width: 100%; width: 100%; }
  .grocery-budget-form .primary { width: 100%; }
  .grocery-history button { padding: 13px 11px; gap: 7px; font-size: 13px; }
  .grocery-history button strong { font-size: 16px; }
  .grocery-preview-list li { grid-template-columns: minmax(0, 1fr); }
  .grocery-stock-amount { font-size: 18px; }
}
.grocery-purchase-notice {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border, #efbdd0);
  border-radius: 1rem;
  background: #fff2f7;
}
.grocery-purchase-notice p { margin: .5rem 0 .85rem; }
.grocery-meal-source { color: var(--accent, #9e436d); line-height: 1.5; overflow-wrap: anywhere; }
