/* v0.28.4 — mobile Pokédex filters, quest reward marks, and source-of-truth catalog controls. */
/* Main-menu Pokédex is reference-only; targets are configured only while playing. */
#recipeModal.catalog-mode #recipeTargetsBtn {display:none!important;}

/* Landscape touch: never clip the Whole/rarity selector, never require horizontal scrolling. */
@media (pointer:coarse) and (orientation:landscape) and (max-width:1280px) {
  #recipeModal .recipe-filter-toolbar {
    display:flex!important;align-items:center!important;flex:none!important;
    width:100%!important;min-width:0!important;min-height:56px!important;
    gap:5px!important;margin:0!important;overflow:visible!important;
  }
  #recipeModal #recipeFilters.recipe-filters {
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    grid-auto-flow:row!important;grid-auto-rows:26px!important;
    gap:3px!important;flex:1 1 auto!important;width:auto!important;
    min-width:0!important;min-height:55px!important;height:auto!important;
    max-height:none!important;overflow:visible!important;
    margin:0!important;padding:0!important;justify-content:stretch!important;
  }
  #recipeModal.catalog-mode #recipeFilters.recipe-filters {
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  #recipeModal #recipeFilters > .recipe-filter {
    position:relative!important;display:inline-flex!important;flex:initial!important;
    justify-content:center!important;align-items:center!important;
    box-sizing:border-box!important;min-width:0!important;width:100%!important;
    max-width:100%!important;height:26px!important;min-height:26px!important;
    max-height:26px!important;margin:0!important;padding:2px 4px!important;
    font-size:clamp(9px,1vw,11px)!important;line-height:1!important;
    white-space:nowrap!important;overflow:hidden!important;border-radius:6px!important;
  }
  #recipeModal #recipeFilters .filter-count {min-width:0!important;padding:1px 3px!important;font-size:8px!important;}
  #recipeModal .recipe-filter-toolbar > .dex-dust-badge {
    position:relative!important;top:auto!important;right:auto!important;left:auto!important;
    transform:none!important;margin:0!important;flex:0 0 auto!important;
    white-space:nowrap!important;padding:2px 5px!important;
  }
  /* The badge is an independent right-side item, not an overlay on rarity buttons. */
  #recipeModal .recipe-modal {overflow:hidden!important;}

  /* Reward-ready check count: smaller top-right square, with the label kept centered. */
  body > .app-shell .battle-utility-panel > #gameQuestsBtn > #questCountBadge,
  body > .app-shell .battle-utility-panel > #achievementBtn > #achievementCountBadge {
    inset:2px 2px auto auto!important;top:2px!important;right:2px!important;
    left:auto!important;bottom:auto!important;transform:none!important;
    width:17px!important;min-width:17px!important;max-width:17px!important;
    height:12px!important;min-height:12px!important;max-height:12px!important;
    padding:0 1px!important;font-size:7px!important;border-radius:2px!important;
    line-height:1!important;letter-spacing:-.4px!important;
  }
  body > .app-shell .battle-utility-panel > #gameQuestsBtn > #questCountBadge::before,
  body > .app-shell .battle-utility-panel > #achievementBtn > #achievementCountBadge::before {font-size:7px!important;}
  body > .app-shell .battle-utility-panel > #gameQuestsBtn > .utility-button-label,
  body > .app-shell .battle-utility-panel > #achievementBtn > .utility-button-label {
    padding-left:0!important;padding-right:0!important;
    max-width:calc(100% - 23px)!important;
    margin:0 auto!important;text-align:center!important;
  }
}
@media (pointer:coarse) and (orientation:landscape) and (max-width:670px) {
  #recipeModal #recipeFilters > .recipe-filter {font-size:8px!important;padding:2px!important;}
  #recipeModal #recipeFilters .filter-count {font-size:7px!important;padding:1px 2px!important;}
  #recipeModal .recipe-filter-toolbar > .dex-dust-badge {padding:1px 3px!important;font-size:9px!important;}
}
