/* BasketBoss preview/servings-and-fixes — presentation only.
   No changes to original card/grid/flex layouts or existing control IDs. */
@media(max-width:720px){#app.view{padding-top:max(16px,env(safe-area-inset-top,0px));min-width:0}}
#app .bbfeed-control{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;min-width:0;max-width:100%;box-sizing:border-box;border:1px solid #cbdccc;border-radius:999px;padding:3px 7px;background:#f3f9f2;color:#174a31;font:750 12px/1.3 system-ui,-apple-system,sans-serif;vertical-align:middle;white-space:normal}
#app .bbfeed-control button{display:inline-grid;place-items:center;flex:0 0 auto;min-width:28px;min-height:28px;padding:2px 6px;border:1px solid #b2cbb9;border-radius:999px;background:#fff;color:#1d5635;font:900 17px/1 system-ui,sans-serif;touch-action:manipulation;cursor:pointer}
#app .bbfeed-control button:disabled{opacity:.42;cursor:default}
#app .bbfeed-control button:focus-visible{outline:2px solid #247a47;outline-offset:2px}
#app.bbnext-plan .bbnext-plan-budget .bbfeed-global{display:flex;width:max-content;max-width:100%;margin:7px 0 9px;padding:4px 9px}
#app.bbnext-plan .bbnext-day-toggle .bbnext-day-description,
#app.bbnext-plan .bbnext-day-toggle .bbnext-day-description small{min-width:0;max-width:100%;overflow-wrap:anywhere}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meal{margin:3px 4px 3px 0;font-size:11px;padding:2px 5px;vertical-align:middle}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meal button{min-width:26px;min-height:26px;font-size:15px}
#app .bbfeed-shop-status{display:block;width:fit-content;max-width:100%;box-sizing:border-box;margin:0 0 10px;padding:7px 11px;border:1px solid #d7e4d4;border-radius:999px;background:#f5faf4;color:#295c3d;font:700 12px/1.4 system-ui,sans-serif;white-space:normal;overflow-wrap:anywhere}
#app .bbfeed-ingredients{min-width:0}
#app .bbfeed-ingredients summary{cursor:pointer;color:#245f3b;font-weight:800;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
#app .bbfeed-ingredients[open] summary{margin-bottom:10px}
/* Only the duplicated inner title, never the actual School Lunchboxes accordion. */
#app #bb1756Lunchboxes #bb321SchoolLunchbox > .section-head{display:none!important}
/* Cook retains its visible BasketBoss logo, Premium link and five-tab dock. */
body .bb17513-meal-topbar > .bb17513-meal-back{display:none!important}
/* Existing left-hand Premium comparison remains functional; hide only two redundant upsells. */
body[data-bbnext-view="discover"] #app > .bb173-leftover-card,
body[data-bbnext-view="discover"] #app > .bb173-recipe-tier-banner{display:none!important}
body[data-bbnext-view="discover"] #bb175Toolbar{margin:0 0 7px!important}
body[data-bbnext-view="discover"] #bb175Toolbar #bb175Compare{min-height:36px!important;padding:7px 12px!important;font-size:12px!important}
/* The original region card is already preserved as a header popover by plan-polish.
   Hide a redundant collapsed shell banner only when the functional header pill exists. */
body:has(#bbpolRegionPill) .shell > #bb17RegionCard.bb17513-region-collapsed{display:none!important}
@media(max-width:520px){
  #app.bbnext-plan .bbnext-plan-budget .bbfeed-global{margin-left:auto;margin-right:auto}
  #app.bbnext-plan .bbnext-day-toggle .bbfeed-meal{max-width:100%}
}

/* Review refinement: metadata stays in three independent pills, and the
   existing bbpol meta decorator skips structured controls. No grid changes. */
#app.bbnext-plan .bbnext-day-description small.bbfeed-meta{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important;min-width:0!important;max-width:100%!important;overflow-wrap:normal!important}
#app.bbnext-plan .bbfeed-meta .bbfeed-meal{margin:0!important;flex:0 1 auto!important;white-space:nowrap!important;flex-wrap:nowrap!important;gap:4px!important;padding:3px 6px!important}
#app.bbnext-plan .bbfeed-meta .bbfeed-price{display:inline-flex!important;white-space:nowrap!important;padding:5px 8px!important}
#app.bbnext-plan .bbfeed-meta .bbfeed-meal button{min-width:30px!important;min-height:30px!important}
#app.bbnext-plan .bbfeed-night-row{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0;max-width:100%;box-sizing:border-box;padding:6px 1px 10px;color:#244f35;font-size:12px}
#app.bbnext-plan .bbfeed-night-row .bbfeed-meal{flex-wrap:nowrap;white-space:nowrap;min-width:0;max-width:100%}
#app.bbnext-plan .bbfeed-night-row .bbfeed-meal button{min-width:34px;min-height:34px}
#app.bbnext-plan .bbnext-meal-ingredients p{overflow-wrap:anywhere}
@media(max-width:390px){#app.bbnext-plan .bbfeed-meta{gap:4px!important}#app.bbnext-plan .bbfeed-meta .bbfeed-meal{font-size:11px!important}}

/* BasketBoss approved mobile Plan-card declutter — 2026-10-29.
   Presentation only; all existing buttons, handlers, DOM IDs, saves and state intact. */
#app.bbnext-plan .bbnext-day-content .bb172-planner-controls .bb172-replace-meal,
#app.bbnext-plan .bbnext-day-content > .bb77-remove-meal {
  display:none!important;
}
/* Only the meal-action control itself changes; no card or photo grid changes. */
#app.bbnext-plan .bbnext-day-content .small-actions.bb172-planner-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important;
  gap:9px!important;
}
#app.bbnext-plan .bbnext-day-content .bb172-planner-controls select[data-move] {
  grid-column:1 / -1!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
/* Cook uses the exact same available width as the date selector. */
#app.bbnext-plan .bbnext-day-content .bb172-planner-controls [data-cook] {
  grid-column:1 / -1!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:56px!important;
}
/* Separate the one remaining Clear action from the day-serving stepper.
   Flex wrapping remains responsive without repositioning or moving DOM nodes. */
#app.bbnext-plan .bbnext-day-toggle .bbnext-day-description small.bbfeed-meta {
  row-gap:9px!important;
  column-gap:9px!important;
  min-width:0!important;
  max-width:100%!important;
}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meta > .bbpol-time {order:1;}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meta > .bbfeed-meal {order:2;}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meta::after {
  content:"";
  flex-basis:100%;
  height:0;
  order:3;
}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meta > .bbfeed-price {order:4;}
#app.bbnext-plan .bbnext-day-toggle .bbfeed-meta > .bb77-clear-day {
  order:5;
  margin:0 0 0 13px!important;
  min-height:40px!important;
  min-width:54px!important;
}

/* Hide duplicate expanded servings control only. */
#app.bbnext-plan .bbfeed-night-row {
  display: none !important;
}

/* One quiet control surface. The buttons retain full 44px touch targets;
   only their visible circular face is smaller than the surrounding pill. */
html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal{
 display:inline-grid!important;grid-template-columns:44px minmax(40px,auto) 44px;
 align-items:center;gap:0!important;width:136px;min-width:136px!important;flex:0 0 auto!important;
 height:48px;padding:1px 3px!important;
 border:1px solid #ccddcd;border-radius:999px;background:#f2f6ef;
 box-shadow:inset 0 1px 0 #ffffffb3;vertical-align:middle;
}
html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button{
 position:relative;isolation:isolate;display:inline-grid;place-items:center;
 width:44px;height:44px;min-width:44px!important;min-height:44px!important;
 padding:0;border:0!important;border-radius:50%!important;background:transparent!important;
 box-shadow:none!important;color:#245b40;font:650 21px/1 system-ui,sans-serif;
}
html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button::before{
 content:'';position:absolute;inset:6px;z-index:-1;border:1px solid #d0ddcb;
 border-radius:50%;background:#fffdf7;box-shadow:0 1px 2px #173f2b0a;
 transition:background-color .15s ease,border-color .15s ease,transform .15s ease;
}
html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button:not(:disabled):active::before{
 transform:scale(.92);background:#e5efdf;border-color:#9ab594;
}
html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button:focus-visible{
 outline:2px solid #b28d3f;outline-offset:-2px;
}
html body #app.bbnext-plan .bbfeed-meta .bbfeed-value{
 display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:40px;
 color:#244f38;font:700 14px/1 system-ui,sans-serif;font-variant-numeric:tabular-nums;
}
html body #app.bbnext-plan .bbfeed-value svg{width:15px;height:15px;flex:none;color:#55775c}
@media(hover:hover){html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button:not(:disabled):hover::before{background:#edf4e7;border-color:#a9c0a0}}
@media(prefers-reduced-motion:reduce){html body #app.bbnext-plan .bbfeed-meta .bbfeed-meal button::before{transition:none}}
@media(min-width:360px){html body #app.bbnext-plan .bbnext-day.has-meal>.bbnext-day-toggle>.bbnext-day-caret{position:relative;left:8px}}
/* Narrow screens keep the decorative expansion caret below the full-width
   touch controls, so it cannot sit inside the servings pill. */
@media(max-width:359px){
 html body #app.bbnext-plan .bbnext-day.has-meal>.bbnext-day-toggle{padding-bottom:28px!important}
 html body #app.bbnext-plan .bbnext-day.has-meal>.bbnext-day-toggle>.bbnext-day-caret{
  position:absolute;right:12px;bottom:6px;margin:0!important;font-size:18px;line-height:18px;
 }
}
