/* Shared desktop/mobile extensions use the existing app's palette and typography. */
.availability-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-strong, #fff);
  cursor: pointer;
}
.availability-option input {
  flex: 0 0 36px;
  width: 36px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent-strong, #f3604a);
  cursor: pointer;
}
.availability-option strong { display: block; font-size: 14px; }
.availability-option small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.price-budget { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; background: var(--mint-soft, #eff8f5); }
.price-budget-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-weight: 700; }
.price-budget-heading strong { font-size: 24px; white-space: nowrap; }
.price-budget p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.price-note, .price-match { margin-top: 6px; font-size: 12px; line-height: 1.65; }
.price-match summary { cursor: pointer; color: var(--accent-strong, #bd513c); font-weight: 600; }
.price-match summary span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.price-product { margin: 7px 0; padding: 8px 10px; border-left: 2px solid var(--mint, #5fbda9); background: var(--bg-soft, #fffdf9); overflow-wrap: anywhere; }
.price-product strong, .price-product small { display: block; }
.price-product small { margin-top: 3px; color: var(--muted); line-height: 1.6; }
.price-pending { color: #8c6433; }
.ingredient-row > div { min-width: 0; flex: 1; }
.ingredient-row > strong { max-width: 38%; flex-shrink: 0; overflow-wrap: anywhere; text-align: right; }
.price-match summary:focus-visible, .availability-option input:focus-visible { outline: 2px solid var(--accent-strong, #f3604a); outline-offset: 3px; }
@media (max-width: 440px) {
  .price-budget { padding: 13px; }
  .price-budget-heading { flex-wrap: wrap; gap: 4px 12px; }
  .price-budget-heading strong { font-size: 22px; }
}
.reuse-summary { margin: 0 0 16px; padding: 15px; background: var(--bg-soft, #fffdf9); border: 1px solid var(--line); border-radius: 16px; }
.reuse-summary-heading, .reuse-product-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.reuse-summary h3 { margin: 0; font-size: 16px; }
.reuse-summary-heading > span, .reuse-product-head > span { font-size: 12px; color: #367c67; }
.reuse-summary p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 8px 0; }
.reuse-details { margin-top: 12px; }
.reuse-details > summary { font-size: 13px; cursor: pointer; color: var(--ink); }
.reuse-product { padding: 12px 0; border-bottom: 1px dashed var(--line-strong, #dfe7e0); }
.reuse-product:last-child { border-bottom: 0; padding-bottom: 0; }
.reuse-product-head strong { font-size: 13px; }
.reuse-product ul { list-style: none; padding: 0; margin: 8px 0; }
.reuse-product li { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.8; }
.reuse-product li strong { flex-shrink: 0; }
.reuse-details > summary:focus-visible { outline: 2px solid var(--accent-strong, #f3604a); outline-offset: 3px; }

/* Nutrition Balance Board & Badges */
.nutrition-board { margin-bottom: 16px; }
.nutrition-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(46, 157, 104, 0.22);
  background: linear-gradient(145deg, rgba(239, 248, 245, 0.92), rgba(255, 253, 249, 0.96));
  margin-bottom: 14px;
}
.nutrition-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.nutrition-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #27836f;
  margin-bottom: 4px;
}
.nutrition-card-head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--ink, #1f2430);
}
.nutrition-card-head h3 small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #697089);
}
.rainbow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rainbow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(119, 127, 166, 0.16);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink, #1f2430);
}
.rainbow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.nutrition-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nutrition-pillar {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(119, 127, 166, 0.14);
}
.nutrition-pillar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.nutrition-pillar-head strong {
  font-size: 13px;
  color: var(--ink, #1f2430);
}
.pillar-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(46, 157, 104, 0.14);
  color: #217856;
}
.nutrition-pillar.is-partial .pillar-badge {
  background: rgba(217, 155, 38, 0.16);
  color: #9f6e14;
}
.nutrition-pillar p {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #697089);
  line-height: 1.5;
}
.meta-chip-nutri {
  background: rgba(46, 157, 104, 0.12) !important;
  color: #237656 !important;
}
@media (max-width: 640px) {
  .nutrition-pillars-grid {
    grid-template-columns: 1fr;
  }
}

/* === 今日想吃：图标快选 === */
.want-bar {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md, 18px);
  border: 1px solid var(--line, rgba(119, 127, 166, 0.14));
  background: linear-gradient(140deg, rgba(255, 253, 249, 0.98), rgba(255, 242, 232, 0.9));
}
.want-bar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.want-bar-head strong {
  display: block;
  font-size: 16px;
  color: var(--ink, #2b2c3a);
}
.want-bar-head small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted, #74778d);
  line-height: 1.5;
}
.want-clear {
  flex: none;
  border: 1px solid var(--line, rgba(119, 127, 166, 0.14));
  background: #fff;
  color: var(--muted, #74778d);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.want-clear:hover {
  color: var(--accent-strong, #f3604a);
  border-color: var(--accent-soft, rgba(255, 126, 107, 0.4));
}
.want-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.want-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.want-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.want-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 9px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong, rgba(119, 127, 166, 0.22));
  background: #fff;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.want-chip:hover .want-face {
  border-color: var(--accent, #ff7e6b);
  transform: translateY(-1px);
}
.want-chip input:focus-visible + .want-face {
  outline: 2px solid var(--accent, #ff7e6b);
  outline-offset: 2px;
}
.want-chip input:checked + .want-face {
  border-color: var(--accent, #ff7e6b);
  background: var(--accent-soft, rgba(255, 126, 107, 0.14));
  box-shadow: 0 4px 12px rgba(243, 96, 74, 0.14);
}
.want-icon {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-strong, #f3604a);
}
.want-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #2b2c3a);
  white-space: nowrap;
}
.want-face small {
  font-size: 11px;
  color: var(--muted, #74778d);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .want-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .want-face small {
    display: none;
  }
}
/* 移动端主屏是一屏式网格：给想吃栏单独一行，并改为单行横向滑动 */
.mobile-page .today-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
}
.mobile-page .want-bar {
  min-width: 0;
  margin: 4px 0 10px;
  padding: 10px 10px 8px;
}
.mobile-page .want-bar-head {
  margin-bottom: 8px;
}
.mobile-page .want-bar-head strong {
  font-size: 15px;
}
.mobile-page .want-bar-head small {
  font-size: 11.5px;
}
.mobile-page .want-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.mobile-page .want-chips::-webkit-scrollbar {
  display: none;
}
.mobile-page .want-chip {
  flex: 0 0 68px;
  scroll-snap-align: start;
}
.mobile-page .want-face {
  padding: 7px 2px 6px;
  gap: 1px;
}
.mobile-page .want-icon {
  font-size: 17px;
}
.mobile-page .want-label {
  font-size: 12px;
}

/* === 烹饪顺序提示 === */
.meal-order {
  margin: 4px 0 10px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong, rgba(119, 127, 166, 0.22));
  background: rgba(95, 189, 169, 0.08);
  font-size: 12px;
  line-height: 1.6;
  color: #2f7d6b;
}

/* === 单道换菜：左滑露出「换一道」（仅触屏设备显示） === */
.dish-swipe {
  position: relative;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
  touch-action: pan-y;
}
.dish-swipe > .dish-card {
  position: relative;
  z-index: 1;
  transition: transform 0.24s ease;
}
.dish-swipe.is-revealed > .dish-card {
  transform: translateX(-88px);
}
.dish-swipe-action {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 0 var(--radius-md, 16px) var(--radius-md, 16px) 0;
  background: var(--accent-strong, #f3604a);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.dish-swipe-action span {
  font-size: 22px;
  line-height: 1;
}
.dish-swipe.is-swiping .dish-swipe-action,
.dish-swipe.is-revealed .dish-swipe-action {
  opacity: 1;
}
@media (hover: none) and (pointer: coarse) {
  .dish-swipe-action {
    display: flex;
  }
}

/* === 轻提示 === */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  max-width: min(92vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(39, 48, 66, 0.92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .dish-swipe > .dish-card,
  .app-toast,
  .want-face {
    transition: none;
  }
}
