/* Keep the recipe collection close: one selected type, one compact chooser. */
html body .page .discover-categories.discover-category-picker{
  display:flex;position:relative;align-items:stretch;justify-content:flex-start;gap:8px;
  width:100%;max-width:100%;min-width:0;overflow:visible;padding:4px 0 8px;
  grid-template-columns:none;grid-auto-flow:initial;margin-bottom:14px;
}
html body .page .discover-category-picker>.discover-category-choice{flex:0 1 104px;width:auto;min-width:0;min-height:48px}
.discover-category-menu{flex:0 1 180px;min-width:0;margin:0;border:0;padding:0}
.discover-category-menu>summary{
  display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:8px 13px;
  box-sizing:border-box;border:1px solid var(--tab-edge,#d3dfce);border-radius:var(--tab-radius,10px);
  color:var(--ink-2,#315745);background:var(--tab-surface,#fffef8);cursor:pointer;
  font:800 11px/1.35 var(--sans,system-ui,sans-serif);list-style:none;user-select:none;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease;
}
.discover-category-menu>summary::-webkit-details-marker{display:none}
.discover-category-menu>summary>svg{flex-shrink:0}
.discover-category-menu>summary:hover{background:var(--tab-hover,#fff0df);border-color:var(--highlight-edge,#d99a6d)}
.discover-category-menu[open]>summary{background:var(--highlight-fill,#efba91);color:var(--highlight-ink,#253a2a);border-color:var(--highlight-edge,#d99a6d)}
.discover-category-menu[open] .discover-category-chevron{transform:rotate(180deg)}
.discover-category-panel{
  position:absolute;z-index:35;left:0;top:calc(100% + 1px);box-sizing:border-box;width:min(560px,100%);
  max-height:min(420px,60vh);overflow:auto;padding:16px;border:1px solid var(--theme-line,var(--line,#d3dfce));
  border-radius:14px;background:var(--theme-surface,#fffef8);color:var(--ink,#18392c);box-shadow:0 14px 35px #18392c26;
}
.discover-category-panel-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 12px;line-height:1.5}
.discover-category-panel-heading>strong{font-size:13px;font-weight:750}
.discover-category-panel-heading>span{font-size:11px;color:var(--ink-2,#315745)}
.discover-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
html body .page .discover-category-grid>.discover-category-option{
  display:flex;align-items:center;justify-content:center;min-width:0;min-height:48px;width:100%;padding:8px 10px;
  border:1px solid var(--tab-edge,#d3dfce);border-radius:var(--tab-radius,10px);background:var(--tab-surface,#fffef8);
  color:var(--ink-2,#315745);font:750 11px/1.45 var(--sans,system-ui,sans-serif);text-align:center;
  white-space:normal;overflow-wrap:anywhere;box-shadow:none;transform:none;
}
html body .page .discover-category-grid>.discover-category-option:hover{background:var(--tab-hover,#fff0df);border-color:var(--highlight-edge,#d99a6d)}
.discover-category-picker :is(button,summary):focus-visible{outline:3px solid var(--highlight-edge,#d99a6d);outline-offset:3px}
@media(max-width:640px){
  html body .page .discover-category-picker>.discover-category-choice{flex-basis:84px}
  .discover-category-menu{flex-basis:168px}
  .discover-category-picker.has-selection .discover-category-menu{flex:0 0 48px}
  .discover-category-picker.has-selection .discover-category-menu>summary{padding:10px}
  .discover-category-picker.has-selection :is(.discover-category-toggle-copy,.discover-category-chevron){display:none}
  html body .page .discover-category-picker.has-selection>.discover-category-choice{flex:1 1 0}
  html body .page .discover-category-picker.has-selection>.discover-category-choice:first-child{flex:0 0 60px}
  .discover-category-panel{padding:13px;max-height:min(480px,70vh)}
  .discover-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .discover-category-panel-heading{align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){.discover-category-menu>summary{transition:none}}
