:root {
  --orange: #bf4410;
  --orange-dark: #9c3309;
  --orange-pale: #fff0e8;
  --ink: #25231f;
  --muted: #69645e;
  --line: #e4e1dc;
  --bg: #f5f5f7;
  --green: #38633f;
  --green-pale: #edf4e9;
  --radius: 24px;
  --shadow: 0 10px 36px #2b241309;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  /* 根字号 = 浏览器默认（通常 16px），全站字号用 rem；大字模式只放大根字号，所有文字按比例变大 */
  font-size: 100%;
  line-height: 1.6;
  font-synthesis: none;
}
/* 大字模式：app.js 在 body 上加 large-text（或在 html 上加 large），两种都认 */
:root.large,
:root.large-text,
:root:has(> body.large-text) {
  font-size: 120%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 1.1875rem;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 10px 18px;
  font-weight: 600;
  line-height: 1.3;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s,
    border-color 0.18s;
}
button:hover {
  background: #f6f2ed;
}
button:active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
button.primary:hover {
  background: var(--orange-dark);
}
button.quiet {
  background: transparent;
  border-color: transparent;
}
button[aria-pressed="true"],
button.active {
  color: var(--orange-dark);
  border-color: var(--orange);
  background: var(--orange-pale);
}
button.danger {
  color: #a02620;
}
button.full {
  width: 100%;
}
a {
  color: var(--orange-dark);
  text-underline-offset: 4px;
}
input,
select,
textarea {
  max-width: 100%;
  min-height: 52px;
  border: 1px solid #b7b1a9;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}
input[type="checkbox"] {
  accent-color: var(--orange);
  min-height: 24px;
  width: 24px;
  height: 24px;
  flex: none;
}
textarea {
  width: 100%;
  resize: vertical;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #194e85;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 1.400rem + 3vw, 3rem);
  line-height: 1.22;
  letter-spacing: -1.2px;
  font-weight: 750;
}
h2 {
  font-size: 1.6875rem;
  line-height: 1.35;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 1.375rem;
  line-height: 1.4;
}
p + p {
  margin-top: 10px;
}
small,
.small {
  font-size: 1rem;
}
.muted {
  color: var(--muted);
}
.skip-link {
  position: fixed;
  z-index: 30;
  top: -100px;
  left: 12px;
  padding: 12px;
  background: #fff;
}
.skip-link:focus {
  top: 10px;
}
.app-header {
  height: 90px;
  max-width: 1240px;
  margin: auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.625rem;
  font-weight: 750;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--orange);
}
.brand svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}
.navigation {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: #eae9e6;
  border-radius: 18px;
}
.navigation button {
  border: 0;
  min-width: 105px;
  background: transparent;
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: center;
  font-size: 1.125rem;
}
.navigation button[aria-current="page"] {
  background: #fff;
  box-shadow: 0 2px 7px #302b1510;
  color: var(--orange-dark);
}
.nav-symbol {
  font-size: 1.4375rem;
}
.count:empty {
  display: none;
}
.count {
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  padding: 1px 6px;
  font-size: 1rem;
  min-width: 20px;
}
.header-tools {
  display: flex;
  gap: 0;
}
.header-tools button {
  font-size: 1rem;
  padding: 10px;
}
main {
  max-width: 1176px;
  margin: 25px auto 0;
  padding: 0 28px;
  min-height: 65vh;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  margin-top: 13px;
  color: var(--muted);
}
.eyeline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 12px;
}
.sun {
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 5px #ffddc5;
}
.demo-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 18px;
  background: #fff5e4;
  border-radius: 16px;
  margin-bottom: 24px;
  font-size: 1rem;
}
.demo-note button {
  min-height: 44px;
  font-size: 1rem;
  background: transparent;
}
.food-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.workspace {
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading button {
  font-size: 1rem;
  min-height: 44px;
}
.pantry-box {
  padding: 25px 26px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.pantry-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}
.pantry-item {
  flex: 0 0 82px;
  text-align: center;
}
.pantry-item .photo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}
.pantry-item span.food-label {
  display: block;
  margin-top: 7px;
  font-size: 1.0625rem;
}
.photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f1f0ed;
  aspect-ratio: 1;
  border-radius: 15px;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.photo[data-food="egg"] img,
.photo[data-food="tofu"] img,
.photo[data-food="milk"] img {
  object-fit: contain;
  background: #f6f5f1;
}
.photo .image-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 1rem;
  text-align: center;
  background: #f1f0ed;
}
.photo.failed .image-fallback {
  display: flex;
}
.photo.small {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 14px;
}
.pantry-add {
  flex: 0 0 80px;
  align-self: flex-start;
  height: 80px;
  border: 1px dashed #aaa097;
  border-radius: 20px;
  font-size: 1.75rem;
  color: var(--orange);
}
.inline-prefs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.inline-prefs button {
  border-radius: 100px;
  font-size: 1.0625rem;
  padding: 10px 15px;
  min-height: 48px;
}
.filter-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 3px 1px 12px;
  scrollbar-width: thin;
}
.filter-row button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  min-height: 46px;
  font-size: 1.0625rem;
}
.filter-row button.active {
  background: var(--orange-pale);
  color: var(--orange-dark);
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 8px 0 15px;
  padding-left: 15px;
}
.search input {
  border: none;
  background: transparent;
  width: 100%;
  min-width: 0;
}
.search > span {
  color: var(--muted);
}
.recipe-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 5px 1px 20px;
  scrollbar-width: thin;
}
.recipe-card {
  flex: 0 0 min(100%, 340px);
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e9e6e1;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 4px 18px #28200c05;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.recipe-card.is-selected {
  border: 2px solid var(--orange);
}
.recipe-media {
  display: flex;
  height: 174px;
  background: #f3f1ed;
  position: relative;
  gap: 3px;
}
.recipe-media .photo {
  flex: 1;
  border-radius: 0;
  min-width: 0;
  height: 100%;
  aspect-ratio: auto;
}
.recipe-media .photo:first-child {
  flex: 1.3;
}
.media-note {
  position: absolute;
  bottom: 9px;
  left: 11px;
  background: #fffffff0;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 1rem;
  color: #514b44;
}
.recipe-body {
  padding: 19px 20px 21px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.recipe-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.recipe-title-row {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.favorite {
  padding: 0;
  width: 44px;
  min-height: 44px;
  flex: none;
  border: 0;
  font-size: 1.5625rem;
  margin-top: -8px;
  margin-right: -7px;
}
.recipe-body p {
  font-size: 1rem;
}
.recipe-body .have {
  color: var(--green);
}
.recipe-body .missing {
  color: #835123;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.card-actions button:first-child {
  flex: 1;
}
.card-actions button {
  font-size: 1.0625rem;
  padding: 10px 12px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 5px 0 20px;
}
.recipe-grid .recipe-card {
  width: 100%;
}
.browse-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 2px 0 30px;
}
.browse-controls .arrows {
  display: flex;
  gap: 8px;
}
.browse-controls button {
  font-size: 1rem;
}
.arrows button {
  white-space: nowrap;
  flex: none;
}
.arrows button[data-action="slide"] {
  width: 52px;
  font-size: 1.5rem;
}
.browse-controls {
  flex-wrap: wrap;
}
.browse-controls .arrows {
  flex: none;
}
.meal-panel {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: 22px;
}
.meal-panel h2 {
  font-size: 1.5625rem;
}
.people-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stepper button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.4375rem;
}
.meal-empty {
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.0625rem;
}
.meal-empty .empty-plate {
  width: 78px;
  height: 78px;
  border: 7px double #e3dfd7;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: #faf9f5;
}
.chosen-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.chosen-row > div {
  flex: 1;
  min-width: 0;
}
.chosen-row strong {
  font-size: 1.0625rem;
}
.chosen-row small {
  display: block;
  color: var(--muted);
}
.chosen-row > button {
  padding: 0;
  width: 44px;
  min-height: 44px;
  border: 0;
  font-size: 1.375rem;
  flex: none;
}
.chosen-row small button {
  padding: 5px 0;
  width: auto;
  min-height: 44px;
  border: 0;
  font-size: 1rem;
  white-space: nowrap;
  color: var(--orange-dark);
}
.coverage {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0 14px;
}
.coverage span {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f2f0ec;
  color: var(--muted);
  font-size: 1rem;
}
.coverage span.present {
  background: var(--green-pale);
  color: var(--green);
}
.meal-hint {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.meal-panel > .actions {
  display: grid;
  margin-top: 18px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.meal-link {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff4e8;
  color: var(--orange-dark);
  padding: 13px;
  margin: 8px 0;
  border-radius: 12px;
  font-size: 1rem;
}
.small-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.empty-state {
  padding: 35px 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  text-align: center;
}
.empty-state p {
  margin-top: 12px;
}
.empty-state button {
  margin-top: 20px;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.shopping-list {
  background: #fff;
  border-radius: 24px;
  padding: 8px 26px;
}
.shop-row {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.shop-row:last-child {
  border: 0;
}
.shop-row.checked .shop-name {
  text-decoration: line-through;
  color: var(--muted);
}
.shop-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 58px;
}
.shop-item-main {
  min-width: 0;
  flex: 1;
}
.shop-name {
  font-size: 1.4375rem;
}
.shop-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.shop-edit input {
  width: 90px;
  min-height: 44px;
  font-size: 1.0625rem;
  padding: 6px 10px;
}
.shop-edit select {
  min-height: 44px;
  padding: 8px;
  font-size: 1rem;
}
.shop-note {
  width: 100%;
  font-size: 1rem;
  min-height: 44px;
  margin-top: 8px;
}
.shop-delete {
  padding: 0;
  border: 0;
  min-width: 44px;
  min-height: 44px;
}
.shopping-side {
  padding: 24px;
  background: var(--orange-pale);
  border-radius: 24px;
}
.shopping-side p {
  font-size: 1.0625rem;
  margin: 14px 0 20px;
}
.warning-label {
  color: #9d241d;
  font-size: 1rem;
  display: block;
  margin: 6px 0;
}
.app-footer {
  max-width: 1176px;
  padding: 35px 28px 40px;
  margin: 30px auto 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 1rem;
}
.app-footer span {
  margin-right: auto;
}
.app-footer button {
  font-size: 1rem;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.app-footer a {
  color: var(--muted);
}
.toast-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}
.toast-wrap:has(#toast:not(:empty)) {
  background: #282722;
  box-shadow: 0 6px 26px #0002;
  border-radius: 17px;
  padding: 12px 16px;
  color: #fff;
}
.toast-wrap #toast {
  font-size: 1rem;
  line-height: 1.4;
}
.toast-wrap button {
  font-size: 1rem;
  white-space: nowrap;
  min-height: 44px;
  background: #fff;
  color: var(--orange-dark);
  border: 0;
  pointer-events: auto;
}
.toast-wrap:has(#toast:empty) #undo {
  display: none;
}
.save-warning {
  max-width: 1120px;
  margin: 10px auto;
  padding: 16px 22px;
  background: #ffe6da;
  color: #8a2300;
  border-radius: 16px;
  font-size: 1.0625rem;
}
.save-warning button {
  margin-left: 12px;
}
dialog {
  border: 0;
  border-radius: 26px;
  box-shadow: 0 20px 100px #0003;
  padding: 0;
  width: min(740px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #30282066;
  backdrop-filter: blur(5px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 14px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}
.dialog-header h2 {
  font-size: 1.6875rem;
}
.close-button {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: #f1efeb;
  border-radius: 50%;
  flex: none;
}
.dialog-header + .dialog-body,
#dialog-body {
  padding: 5px 28px 28px;
}
.dialog-description {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-bottom: 20px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.picker-food {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  font-weight: 500;
  position: relative;
}
.picker-food .photo {
  border-radius: 0;
  aspect-ratio: 1.1;
}
.picker-food > span:last-child {
  display: block;
  padding: 9px 4px;
  font-size: 1.0625rem;
}
.picker-food[aria-pressed="true"] {
  border: 2px solid var(--orange);
}
.picker-food[aria-pressed="true"]:after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  font-size: 1.0625rem;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  position: sticky;
  bottom: -28px;
  background: #fff;
  padding: 16px 0;
}
.setting-section {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.setting-section h3 {
  margin-bottom: 13px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  cursor: pointer;
}
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 16px;
}
.settings-caption {
  font-size: 1rem;
  color: var(--muted);
  margin: 10px 0 15px;
}
.exclude-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exclude-list button {
  font-size: 1rem;
  min-height: 44px;
  padding: 10px 12px;
}
.recipe-detail-media {
  display: flex;
  gap: 12px;
  margin: 12px 0 22px;
  overflow: auto;
}
.recipe-detail-media figure {
  margin: 0;
  flex: 0 0 100px;
}
.recipe-detail-media .photo {
  height: 100px;
}
.recipe-detail-media figcaption {
  font-size: 1rem;
  text-align: center;
  margin-top: 7px;
}
.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 22px;
}
.ingredient-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}
.recipe-steps {
  padding-left: 28px;
  line-height: 1.8;
}
.recipe-steps li {
  padding-left: 6px;
  margin: 13px 0;
}
.tip {
  background: #f5f3ee;
  padding: 15px 18px;
  border-radius: 14px;
  color: #5d584f;
  font-size: 1rem;
  margin-top: 16px;
}
.pill {
  display: inline-block;
  font-size: 1rem;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 7px;
  padding: 3px 9px;
  margin-left: 7px;
}
.file-input {
  max-width: 100%;
  font-size: 1rem;
}
.intro-rule {
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  margin-top: 22px;
}
.intro-rule h3 {
  margin-bottom: 10px;
}
.view-enter {
  animation: appear 0.24s ease both;
}
@keyframes appear {
  from {
    opacity: 0.6;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
[hidden] {
  display: none !important;
}
#print-area {
  display: none;
}
@media (min-width: 1050px) {
  .recipe-card {
    flex-basis: calc(50% - 9px);
  }
}
@media (max-width: 950px) {
  .app-header {
    padding: 0 24px;
    gap: 10px;
  }
  .header-tools button {
    font-size: 1rem;
    padding: 8px;
  }
  .navigation button {
    min-width: 88px;
    font-size: 1.0625rem;
  }
  .food-layout,
  .shop-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
  }
  .meal-panel {
    padding: 20px;
  }
  .recipe-card {
    flex-basis: 100%;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: 78px;
    padding: 0 20px;
  }
  .brand {
    font-size: 1.5rem;
  }
  .brand svg {
    width: 31px;
    height: 31px;
  }
  .header-tools button {
    font-size: 1rem;
  }
  .navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    z-index: 20;
    padding: 7px 13px calc(7px + env(safe-area-inset-bottom));
    background: #fffffff2;
    backdrop-filter: blur(18px);
    border-top: 1px solid #dedad4;
    justify-content: space-around;
  }
  .navigation button {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
    font-size: 1rem;
    min-height: 61px;
    border-radius: 14px;
    position: relative;
  }
  .navigation .nav-symbol {
    font-size: 1.4375rem;
    line-height: 1.1;
  }
  .navigation button[aria-current="page"] {
    background: var(--orange-pale);
    box-shadow: none;
  }
  .navigation .count {
    position: absolute;
    top: 0;
    right: 24%;
  }
  main {
    margin-top: 20px;
    padding: 0 20px;
  }
  .page-heading {
    margin-bottom: 23px;
  }
  .page-heading h1 {
    font-size: 2.125rem;
    letter-spacing: -0.9px;
  }
  .page-heading p {
    font-size: 1.125rem;
    margin-top: 10px;
  }
  .eyeline {
    display: none;
  }
  .food-layout,
  .shop-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .workspace {
    width: 100%;
  }
  .meal-panel {
    position: static;
    width: 100%;
    order: 2;
    padding: 24px;
  }
  .pantry-box {
    padding: 20px;
    margin-bottom: 20px;
  }
  .pantry-strip {
    gap: 12px;
  }
  .pantry-item {
    flex-basis: 73px;
  }
  .pantry-item .photo,
  .pantry-add {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    border-radius: 17px;
  }
  .pantry-item span.food-label {
    font-size: 1rem;
  }
  .section-heading h2 {
    font-size: 1.4375rem;
  }
  .section-heading button {
    padding: 8px 9px;
    font-size: 1rem;
  }
  .inline-prefs {
    gap: 8px;
    margin-bottom: 20px;
  }
  .inline-prefs button {
    font-size: 1rem;
    min-height: 46px;
    padding: 9px 13px;
  }
  .recipe-card {
    flex-basis: 88%;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipe-media {
    height: 184px;
  }
  .recipe-body {
    padding: 18px;
  }
  .recipe-body h3 {
    font-size: 1.4375rem;
  }
  .browse-controls {
    margin-bottom: 0;
  }
  .people-stepper {
    margin: 16px 0;
  }
  .shopping-list {
    width: 100%;
    padding: 0 18px;
  }
  .shop-row {
    gap: 9px;
    padding: 20px 0;
  }
  .shop-row .photo.small {
    width: 52px;
    height: 52px;
  }
  .shop-check {
    min-width: 30px;
  }
  .shop-delete {
    min-width: 38px;
  }
  .shop-name {
    font-size: 1.3125rem;
  }
  .shopping-side {
    width: 100%;
  }
  .app-footer {
    margin-top: 32px;
    padding: 24px 20px 116px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .app-footer span {
    flex-basis: 100%;
  }
  .toast-wrap {
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: max-content;
  }
  .toast-wrap #toast {
    font-size: 1rem;
  }
  .toast-wrap:has(#toast:not(:empty)) {
    padding: 12px;
  }
  .demo-note {
    font-size: 1rem;
    align-items: flex-start;
  }
  .demo-note button {
    flex: none;
    font-size: 1rem;
    padding: 7px 10px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 23px;
  }
  .dialog-header {
    padding: 20px 20px 14px;
  }
  .dialog-header h2 {
    font-size: 1.5rem;
  }
  #dialog-body {
    padding: 5px 20px 22px;
  }
  .picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .check-grid {
    grid-template-columns: 1fr;
  }
  .dialog-actions {
    bottom: -22px;
  }
  .save-warning {
    margin: 0 20px;
  }
  .recipe-detail-media figure {
    flex-basis: 86px;
  }
  .recipe-detail-media .photo {
    height: 86px;
  }
}
@media (max-width: 360px) {
  main {
    padding: 0 14px;
  }
  .app-header {
    padding: 0 14px;
  }
  .brand {
    font-size: 1.375rem;
  }
  .header-tools button {
    font-size: 1rem;
    padding: 8px;
  }
  .pantry-box {
    padding: 17px;
  }
  .page-heading h1 {
    font-size: 1.875rem;
  }
  .recipe-card {
    flex-basis: 95%;
  }
  .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recipe-title-row h3 {
    font-size: 1.3125rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  body > #print-area {
    display: block !important;
    color: #000;
    font: 16px/1.7 sans-serif;
    padding: 20px;
  }
  #print-area h1 {
    font-size: 1.625rem;
  }
  #print-area li {
    margin: 12px 0;
  }
  #print-area img {
    max-width: 65px;
    max-height: 65px;
  }
  #print-area svg {
    width: 100%;
    height: auto;
    max-height: 500px;
  }
  #print-area a {
    color: #000;
  }
  #print-area button {
    display: none;
  }
}

main:focus {
  outline: none;
}
.land-eyebrow {
  display: none !important;
}


.app-footer .offline-status {
  margin-right: 0;
  font-size: 1rem;
}
@media (max-width: 760px) {
  .app-footer .offline-status {
    flex-basis: 100%;
  }
}

.download-link {
  display: inline-block;
  min-height: 52px;
  border-radius: 14px;
  padding: 11px 18px;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- V3（Agent A）：搭配建议、我家、轮盘、记录、设置 ---------- */
.navigation[hidden] {
  display: none !important;
}
.role-banner {
  max-width: 1176px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  background: #eef3fb;
  color: #1d3d63;
  font-size: 1.0625rem;
}
.role-banner[hidden] {
  display: none;
}
.role-banner button {
  min-height: 44px;
}
.module-error {
  padding: 22px;
  border-radius: 18px;
  background: #fff6f3;
  border: 1px solid #f0c9b8;
}
.module-error p {
  margin-top: 6px;
  color: var(--muted);
}
.photo.no-image {
  background: #f4efe6;
}
.photo.no-image .image-fallback {
  background: #f4efe6;
  color: #5b4a33;
  font-weight: 650;
}
button.reason,
button.chip {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 1rem;
  border-radius: 12px;
}
.reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.combo-section {
  margin-bottom: 30px;
}
.combo-intro {
  margin: -8px 0 16px;
}
.combo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.combo-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.combo-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  height: 104px;
}
.combo-photos .photo {
  border-radius: 0;
  aspect-ratio: auto;
  height: 104px;
}
.combo-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.combo-body h3 {
  font-size: 1.375rem;
  line-height: 1.35;
}
.combo-plus {
  color: var(--orange);
}
.combo-reasons {
  margin: 0;
  padding-left: 1.1em;
  font-size: 1rem;
  color: #45413b;
}
.combo-reasons li + li {
  margin-top: 3px;
}
.combo-body .card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.combo-body .card-actions button {
  flex: 1 1 auto;
}
.reject-panel {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 12px;
}
.reject-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.0625rem;
}
.gap-strip {
  margin-top: 20px;
  padding: 18px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.gap-strip h3 {
  font-size: 1.1875rem;
  margin-bottom: 10px;
}
.gap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.gap-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.gap-card p:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.gap-card.gap-stuck {
  border-color: #e7b39c;
  background: #fff8f4;
}
.salt-tip strong {
  margin-right: 6px;
}
.review-label {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 8px;
  background: #eef0f3;
  color: #4a5361;
  font-size: 1rem;
  font-weight: 600;
}
.reject-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.reject-details summary,
.food-details summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}
.reject-details .reason-row {
  margin-top: 10px;
}
.exclude-group {
  margin: 14px 0 6px;
  font-size: 1rem;
  color: var(--muted);
}
/* 我家 */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 22px;
  align-items: start;
}
.home-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
  min-width: 0;
}
.home-card > h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.person-row {
  margin-bottom: 16px;
}
.wheel {
  display: block;
  width: 100%;
  max-width: 21.25rem;
  margin: 14px auto 6px;
  height: auto;
}
/* 轮盘里的字是 SVG 用户单位（随轮盘缩放），手机上让轮盘占满卡片宽度，保证显示出来 ≥16px */
@media (max-width: 480px) {
  .home-card .wheel {
    width: calc(100% + 36px);
    max-width: none;
    margin-left: -18px;
    margin-right: -18px;
  }
}
@media (max-width: 360px) {
  .home-card .wheel {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
  }
}
.wheel-seg path {
  fill: #eeebe6;
  stroke: #fff;
  stroke-width: 1;
}
.wheel-seg text {
  font-size: 18px;
  font-weight: 650;
  fill: #6f6a63;
}
.wheel-seg.lit path {
  fill: var(--orange);
}
.wheel-seg.lit text {
  fill: #fff;
}
.wheel-days {
  font-size: 18px;
  font-weight: 500;
}
.wheel-center {
  font-size: 44px;
  font-weight: 750;
  fill: var(--ink);
}
.wheel-center-unit {
  font-size: 20px;
}
.wheel-center-sub {
  font-size: 18px;
  fill: var(--muted);
}
.group-lines {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2px 18px;
  font-size: 1.0625rem;
}
.group-lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #ebe7e1;
  color: var(--muted);
}
.group-lines li.lit {
  color: var(--ink);
}
.group-lines small {
  color: var(--muted);
  font-size: 1rem;
}
.disclaimer {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f6f4f0;
  border-radius: 12px;
  font-size: 1rem;
  color: #514c45;
}
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.segmented button {
  flex: 1 1 140px;
}
.date-row {
  margin-bottom: 10px;
}
.group-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.group-toggle {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 2px;
  padding: 10px 14px;
}
.group-toggle small {
  font-weight: 500;
  color: var(--muted);
  font-size: 1rem;
}
.group-toggle[aria-pressed="true"] small {
  color: var(--orange-dark);
}
.sub-title {
  font-size: 1.125rem;
  margin: 8px 0 10px;
}
.food-details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.food-details summary span {
  font-weight: 500;
  color: var(--orange-dark);
  font-size: 1rem;
}
.food-chip-group h4 {
  margin: 12px 0 6px;
  font-size: 1rem;
  color: var(--muted);
}
.recall-list {
  display: grid;
  gap: 6px;
}
.recall-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
  border-bottom: 1px dashed #ebe7e1;
}
.recall-row .stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recall-row .stepper button {
  min-width: 52px;
  min-height: 52px;
  font-size: 1.375rem;
  padding: 0;
}
.recall-row .stepper strong {
  min-width: 52px;
  text-align: center;
}
.notice-inline {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff6e8;
}
.bars {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 170px;
}
.bars li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
  gap: 4px;
}
.bars .bar {
  width: 100%;
  max-width: 44px;
  height: var(--h);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: var(--orange);
}
.bars li.empty .bar {
  background: #e6e2dc;
}
.bar-value {
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
}
.bars li.empty .bar-value {
  color: var(--muted);
  font-weight: 500;
}
.bar-label {
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
}
.metric-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.metric-lines li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 9px 0;
  border-bottom: 1px solid #f0ede8;
}
.metric-lines strong {
  text-align: right;
}
.settings-panel .setting-section:first-of-type {
  border-top: 0;
}
.rejection-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rejection-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #ebe7e1;
}
.rejection-list small {
  display: block;
  color: var(--muted);
  font-size: 1rem;
}
.rejection-list button {
  min-height: 44px;
}
.home-card.embed-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.embed-card:has(> div:empty) {
  display: none;
}
@media (max-width: 950px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .role-banner {
    padding: 10px 20px;
    font-size: 1rem;
  }
  .combo-list {
    grid-template-columns: 1fr;
  }
  .home-card {
    padding: 18px;
  }
  .bar-label {
    font-size: 1rem;
  }
  .navigation button {
    font-size: 1rem;
  }
}
@media (max-width: 360px) {
  .navigation {
    padding-left: 6px;
    padding-right: 6px;
  }
  .navigation button {
    padding: 6px 2px;
    white-space: nowrap;
    font-size: 1rem !important;
  }
  .group-buttons {
    grid-template-columns: 1fr;
  }
  .home-card {
    padding: 14px;
  }
  .bars {
    gap: 3px;
  }
  .bar-value {
    font-size: 1rem;
  }
  .bar-label {
    font-size: 1rem;
  }
  .combo-list,
  .gap-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* V3.1 适老化底线（帮手版 / 小店端，F）：字号都用 rem、最小 1rem；可点区域 ≥44×44；输入框 ≥48px 高 */
button {
  min-width: 44px;
}
.brand,
.app-footer a,
#dialog-body p.small > a:only-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select {
  min-height: 48px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 28px;
  height: 28px;
  min-height: 28px;
  flex: none;
}

/* 熟人声音（帮手版·我家，voice-notes.js，F） */
.vn h2 {
  margin: 0 0 8px;
}
.vn p {
  margin: 0 0 10px;
  line-height: 1.5;
}
.vn-local {
  font-weight: 700;
  color: var(--green);
}
.vn-unsupported,
.vn-msg {
  background: #fff6dd;
  border-radius: 12px;
  padding: 10px 14px;
  color: #5c3d00;
}
.vn-msg {
  background: var(--green-pale);
  color: var(--green);
}
.vn-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.vn-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.vn-recording {
  border: 3px solid var(--orange);
  background: var(--orange-pale);
}
.vn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.vn-head strong {
  font-size: 1.375rem;
}
.vn-status {
  color: var(--muted);
}
.vn-has {
  color: var(--green);
  font-weight: 700;
}
.vn-live {
  color: var(--orange-dark);
  font-weight: 700;
}
.vn .vn-example {
  color: var(--muted);
  margin: 4px 0 10px;
}
.vn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vn-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  min-width: 44px;
  flex: 1 1 auto;
}
.vn-row svg {
  width: 1.4em;
  height: 1.4em;
  flex: none;
}
.vn-rec {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.vn-rec:hover:not(:disabled) {
  background: var(--orange-dark);
  color: #fff;
}
.vn .vn-count {
  font-size: 1.375rem;
  margin: 8px 0 12px;
}
.vn-count b {
  font-size: 2.5rem;
  color: var(--orange-dark);
  font-variant-numeric: tabular-nums;
}
.vn-stop {
  width: 100%;
  min-height: 72px;
  font-size: 1.5rem;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.vn-stop:hover {
  background: #000;
  color: #fff;
}
.vn-confirm {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fdecea;
}
.vn-danger {
  background: #a02620;
  border-color: #a02620;
  color: #fff;
}
.vn button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.vn-danger:hover {
  background: #7f1d18;
  color: #fff;
}
